CBMC
Loading...
Searching...
No Matches
simplify_expr_with_value_set.cpp File Reference
+ Include dependency graph for simplify_expr_with_value_set.cpp:

Go to the source code of this file.

Functions

static std::optional< exprttry_evaluate_pointer_comparison (const irep_idt &operation, const symbol_exprt &symbol_expr, const exprt &other_operand, const value_sett &value_set, const irep_idt language_mode, const namespacet &ns)
 Try to evaluate a simple pointer comparison.
 

Function Documentation

◆ try_evaluate_pointer_comparison()

static std::optional< exprt > try_evaluate_pointer_comparison ( const irep_idt operation,
const symbol_exprt symbol_expr,
const exprt other_operand,
const value_sett value_set,
const irep_idt  language_mode,
const namespacet ns 
)
static

Try to evaluate a simple pointer comparison.

Parameters
operationID_equal or ID_not_equal
symbol_exprThe symbol expression in the condition
other_operandThe other expression in the condition; we only support an address of expression, a typecast of an address of expression or a null pointer, and return an empty std::optional in all other cases
value_setThe value-set for looking up what the symbol can point to
language_modeThe language mode
nsA namespace
Returns
If we were able to evaluate the condition as true or false then we return that, otherwise we return an empty std::optional

Definition at line 33 of file simplify_expr_with_value_set.cpp.