CBMC
|
Determine whether an expression is constant. More...
#include <expr_util.h>
Public Member Functions | |
can_forward_propagatet (const namespacet &ns) | |
bool | operator() (const exprt &e) const |
returns true iff the expression can be considered constant | |
Protected Member Functions | |
virtual bool | is_constant (const exprt &) const |
This function determines what expressions are to be propagated as "constants". | |
virtual bool | is_constant_address_of (const exprt &) const |
this function determines which reference-typed expressions are constant | |
Protected Attributes | |
const namespacet & | ns |
Determine whether an expression is constant.
A literal constant is constant, but so are, e.g., sums over constants or addresses of objects. An implementation may derive from this class to refine what it considers constant in a particular context by overriding is_constant and/or is_constant_address_of.
Definition at line 86 of file expr_util.h.
|
inlineexplicit |
Definition at line 89 of file expr_util.h.
This function determines what expressions are to be propagated as "constants".
Reimplemented in constant_propagator_can_forward_propagatet, havoc_utils_can_forward_propagatet, and goto_symex_can_forward_propagatet.
Definition at line 198 of file expr_util.cpp.
this function determines which reference-typed expressions are constant
Definition at line 279 of file expr_util.cpp.
returns true iff the expression can be considered constant
Definition at line 94 of file expr_util.h.
|
protected |
Definition at line 100 of file expr_util.h.