18 bool unchanged =
true;
23 if(
auto r_or_w_ok = expr_try_dynamic_cast<r_or_w_ok_exprt>(*it))
25 const auto &
id = it->id();
28 id == ID_r_ok ? ID_prophecy_r_ok
29 :
id == ID_w_ok ? ID_prophecy_w_ok
35 .with_source_location(*it);
37 it.mutate() = std::move(replacement);
39 it.next_sibling_or_parent();
42 auto pointer_in_range =
43 expr_try_dynamic_cast<pointer_in_range_exprt>(*it))
48 pointer_in_range->pointer(),
49 pointer_in_range->upper_bound(),
52 .with_source_location(*it);
54 it.mutate() = std::move(replacement);
56 it.next_sibling_or_parent();
65 return std::move(expr);
72 for(
auto &instruction : goto_function.body.instructions)
73 instruction.transform(
Base class for all expressions.
depth_iteratort depth_end()
depth_iteratort depth_begin()
function_mapt function_map
::goto_functiont goto_functiont
symbol_tablet symbol_table
Symbol table.
goto_functionst goto_functions
GOTO functions.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
pointer_in_range (see pointer_in_range_exprt) with prophecy expressions to encode whether a pointer r...
const exprt & lower_bound() const
A base class for a predicate that indicates that an address range is ok to read or write or both.
const exprt & pointer() const
Forward depth-first search iterators These iterators' copy operations are expensive,...
API to expression classes for Pointers.
static std::optional< exprt > rewrite_rw_ok(exprt expr, const namespacet &ns)
Rewrite r/w/rw_ok expressions to ones including prophecy variables recording the state.