Skip to content

Commit cbc495d

Browse files
committed
Goto-symex: add documentation to let-lifting and related functions
1 parent d3ebf4a commit cbc495d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/goto-symex/goto_symex.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@ class goto_symext
288288

289289
void trigger_auto_object(const exprt &, statet &);
290290
void initialize_auto_object(const exprt &, statet &);
291+
292+
/// Given an expression, find the root object and the offset into it.
293+
///
294+
/// The extra complication to be considered here is that the expression may
295+
/// have any number of ternary expressions mixed with type casts.
291296
void process_array_expr(statet &, exprt &);
292297
exprt make_auto_object(const typet &, statet &);
293298
virtual void dereference(exprt &, statet &, bool write);
@@ -507,7 +512,16 @@ class goto_symext
507512

508513
typedef symex_targett::assignment_typet assignment_typet;
509514

515+
/// Execute any let expressions in \p expr using \ref symex_assign_symbol.
516+
/// The assignments will be made in bottom-up topological but otherwise
517+
/// arbitrary order (i.e. in `(let x = let y = 0 in x + y) + (let z = 0 in z)
518+
/// we will define `y` before `x`, but `z` and `x` could come in either order)
510519
void lift_lets(statet &, exprt &);
520+
521+
/// Execute a single let expression, which should not have any nested let
522+
/// expressions (use \ref lift_lets instead if there might be).
523+
/// The caller is responsible for killing the newly-defined variable when
524+
/// appropriate.
511525
void lift_let(statet &state, const let_exprt &let_expr);
512526

513527
void symex_assign_rec(

0 commit comments

Comments
 (0)