CBMC
|
Determine whether an expression is constant. More...
#include <expr_util.h>
Public Member Functions | |
bool | operator() (const exprt &e) const |
returns true iff the expression can be considered constant More... | |
Protected Member Functions | |
virtual bool | is_constant (const exprt &) const |
This function determines what expressions are to be propagated as "constants". More... | |
virtual bool | is_constant_address_of (const exprt &) const |
this function determines which reference-typed expressions are constant More... | |
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 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 88 of file expr_util.h.
|
protectedvirtual |
This function determines what expressions are to be propagated as "constants".
Reimplemented in constant_propagator_is_constantt, havoc_utils_is_constantt, goto_symex_is_constantt, and is_compile_time_constantt.
Definition at line 227 of file expr_util.cpp.
|
protectedvirtual |
this function determines which reference-typed expressions are constant
Reimplemented in is_compile_time_constantt.
Definition at line 255 of file expr_util.cpp.
|
inline |
returns true iff the expression can be considered constant
Definition at line 92 of file expr_util.h.