11 #ifndef CPROVER_GOTO_SYMEX_RENAMED_H
12 #define CPROVER_GOTO_SYMEX_RENAMED_H
31 template <
typename underlyingt, levelt level>
36 std::is_base_of<exprt, underlyingt>::value ||
37 std::is_base_of<typet, underlyingt>::value,
38 "underlyingt should inherit from exprt or typet");
40 const underlyingt &
get()
const
42 return static_cast<const underlyingt &
>(*this);
51 std::function<std::optional<renamedt>(
const renamedt &)>;
56 return static_cast<underlyingt &
>(*this);
65 template <levelt make_renamed_level>
69 template <levelt selectively_mutate_level>
81 template <levelt level>
94 template <levelt level>
99 for(
auto it = renamed.depth_begin(), itend = renamed.depth_end(); it != itend;
102 std::optional<renamedt<exprt, level>> replacement =
106 it.mutate() = std::move(replacement->value());
A constant literal expression.
Central data structure: state.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Wrapper for expressions or types which have been renamed up to a given level.
const underlyingt & get() const
renamedt(underlyingt value)
Only the friend classes can create renamedt objects.
friend renamedt< exprt, make_renamed_level > make_renamed(constant_exprt constant)
void simplify(const namespacet &ns)
std::function< std::optional< renamedt >(const renamedt &)> mutator_functiont
friend renamedt< ssa_exprt, L0 > symex_level0(ssa_exprt, const namespacet &, std::size_t)
Set the level 0 renaming of SSA expressions.
friend void selectively_mutate(renamedt< exprt, selectively_mutate_level > &renamed, typename renamedt< exprt, selectively_mutate_level >::mutator_functiont get_mutated_expr)
Expression providing an SSA-renamed symbol of expressions.
Forward depth-first search iterators These iterators' copy operations are expensive,...
renamedt< exprt, level > make_renamed(constant_exprt constant)
levelt
Symex renaming level names.
@ L1_WITH_CONSTANT_PROPAGATION
void selectively_mutate(renamedt< exprt, level > &renamed, typename renamedt< exprt, level >::mutator_functiont get_mutated_expr)
This permits replacing subexpressions of the renamed value, so long as each replacement is consistent...
API to expression classes.
Functor to set the level 1 renaming of SSA expressions.
Functor to set the level 2 renaming of SSA expressions.