cprover
|
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 | |
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 | |
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 is_compile_time_constantt, constant_propagator_is_constantt, havoc_utils_is_constantt, and goto_symex_is_constantt.
Definition at line 226 of file expr_util.cpp.
|
protectedvirtual |
this function determines which reference-typed expressions are constant
Reimplemented in is_compile_time_constantt.
Definition at line 254 of file expr_util.cpp.
|
inline |
returns true iff the expression can be considered constant
Definition at line 92 of file expr_util.h.