|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
Class containing expression dereference logic. More...
#include <dereference.h>
Classes | |
| struct | modet |
| The different ways in which a pointer may be accessed. More... | |
| class | quantifier_scopet |
| Records what a forall2t/exists2t binds while its body is walked, so the index fold in dereference_expr_nonscalar leaves the bound variable alone: the rename callback carries no quantifier context and would substitute the like-named program variable's SSA value (rename_quantified guards the same concern at the renaming layer, #7024). More... | |
Public Member Functions | |
| dereferencet (const namespacet &_ns, contextt &_new_context, const optionst &_options, dereference_callbackt &_dereference_callback) | |
| Primary constructor. | |
| virtual | ~dereferencet ()=default |
| virtual void | dereference_expr (expr2tc &expr, guard2tc &guard, modet mode) |
| Take an expression and dereference it. | |
| virtual expr2tc | dereference (const expr2tc &dest, const type2tc &type, const guard2tc &guard, modet mode, const expr2tc &extra_offset) |
| bool | has_dereference (const expr2tc &expr) const |
| Does the given expression have a dereference in it somewhere? | |
| void | build_reference_rec (expr2tc &value, const expr2tc &offset, const type2tc &type, const guard2tc &guard, modet mode, unsigned long alignment=0) |
| void | set_block_assertions (void) |
| void | clear_block_assertions (void) |
Static Public Member Functions | |
| static void | reset_object_counter () |
| Zero the failed-symbol counter. | |
Static Public Attributes | |
| static const constexpr modet | READ = {modet::READ, false} |
| static const constexpr modet | WRITE = {modet::WRITE, false} |
| static const constexpr modet | FREE = {modet::FREE, false} |
| static const constexpr modet | INTERNAL = {modet::INTERNAL, false} |
Class containing expression dereference logic.
This class doesn't actually store any state, in that all the side-effects of what it does are either returned to the caller, or passed through the dereference_callbackt object's virtual methods. Members of this class only exist to provide context to the dereference being performed.
|
inline |
Primary constructor.
| _ns | Namespace to make type lookups against |
| _new_context | Context to store new (failed) symbols in. |
| _options | Options to behave under (i.e., disable ptr checks etc). |
| _dereference_callback | Callback object to invoke when we need external information or otherwise need to interacte with the context. |
|
virtualdefault |
| void dereferencet::build_reference_rec | ( | expr2tc & | value, |
| const expr2tc & | offset, | ||
| const type2tc & | type, | ||
| const guard2tc & | guard, | ||
| modet | mode, | ||
| unsigned long | alignment = 0 ) |
|
inline |
|
virtual |
Take an expression and dereference it.
This will descend through the whole of the expression given, and dereference any dereferences contained within it. The given expr will be modified in place. It also doesn't necessarily have to contain a dereference at all (in which case nothing will happen), or start at a relevant part of the expression, as this method will recurse through the whole thing.
| expr | The expression to be dereferenced. |
| guard | Guard to be added to any dereference failure assertions generated. |
| The | way in which this dereference is being accessed. Only affects the assertions that are generated. |
Does the given expression have a dereference in it somewhere?
| expr | The expression to check for existence of a dereference. |
|
static |
Zero the failed-symbol counter.
Called once per exploration from reachability_treet::setup_for_new_explore, so the equation is a function of (program, options) alone (R15).
|
inline |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |