Skip to content

Commit e0eab84

Browse files
committed
Add documentation
to collect_allocations, check_rec, and check.
1 parent cecc289 commit e0eab84

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/analyses/goto_check.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ class goto_checkt
7979
const irep_idt &function_identifier,
8080
goto_functiont &goto_function);
8181

82+
/// Fill the list of allocations \ref allocationst with <address, size> for
83+
/// every allocation instruction. Also check that each allocation is
84+
/// well-formed.
85+
/// \param goto_functions: goto functions from which the allocations are to be
86+
/// collected
8287
void collect_allocations(const goto_functionst &goto_functions);
8388

8489
protected:
@@ -135,7 +140,15 @@ class goto_checkt
135140
/// \param guard: the condition for the check (unmodified here)
136141
void check_rec_arithmetic_op(const exprt &expr, guardt &guard);
137142

143+
/// Recursively descend into \p expr and run the appropriate check for each
144+
/// sub-expression, while collecting the condition for the check in \p
145+
/// guard.
146+
/// \param expr: the expression to be checked
147+
/// \param guard: the condition for when the check should be made
138148
void check_rec(const exprt &expr, guardt &guard);
149+
150+
/// Initiate the recursively analysis of \p expr with its `guard' set to TRUE.
151+
/// \param expr: the expression to be checked
139152
void check(const exprt &expr);
140153

141154
struct conditiont

0 commit comments

Comments
 (0)