|
cprover
|
#include <write_stack.h>
Public Types | |
| typedef std::vector< std::shared_ptr< write_stack_entryt > > | continuation_stack_storet |
Public Member Functions | |
| write_stackt () | |
| Build a topstack. | |
| write_stackt (const exprt &expr, const abstract_environmentt &environment, const namespacet &ns) | |
| Construct a write stack from an expression. | |
| exprt | to_expression () const |
| Convert the stack to an expression that can be used to write to. | |
| size_t | depth () const |
| exprt | target_expression (size_t depth) const |
| exprt | offset_expression () const |
| bool | is_top_value () const |
| Is the stack representing an unknown value and hence can't be written to or read from. | |
Private Types | |
| enum class | integral_resultt { LHS_INTEGRAL , RHS_INTEGRAL , NEITHER_INTEGRAL } |
Private Member Functions | |
| void | construct_stack_to_pointer (const exprt &expr, const abstract_environmentt &environment, const namespacet &ns) |
| Add to the stack the elements to get to a pointer. | |
| void | construct_stack_to_lvalue (const exprt &expr, const abstract_environmentt &environment, const namespacet &ns) |
| Construct a stack up to a specific l-value (i.e. | |
| void | construct_stack_to_array_index (const index_exprt &expr, const abstract_environmentt &environment, const namespacet &ns) |
| Construct a stack for an array position l-value. | |
| void | add_to_stack (std::shared_ptr< write_stack_entryt > entry_pointer, const abstract_environmentt environment, const namespacet &ns) |
| Add an element to the top of the stack. | |
Static Private Member Functions | |
| static integral_resultt | get_which_side_integral (const exprt &expr, exprt &out_base_expr, exprt &out_integral_expr) |
| Utility function to find out which side of a binary operation has an integral type, if any. | |
Private Attributes | |
| continuation_stack_storet | stack |
| bool | top_stack |
Definition at line 25 of file write_stack.h.
| typedef std::vector<std::shared_ptr<write_stack_entryt> > write_stackt::continuation_stack_storet |
Definition at line 29 of file write_stack.h.
|
strongprivate |
| Enumerator | |
|---|---|
| LHS_INTEGRAL | |
| RHS_INTEGRAL | |
| NEITHER_INTEGRAL | |
Definition at line 66 of file write_stack.h.
| write_stackt::write_stackt | ( | ) |
Build a topstack.
Definition at line 26 of file write_stack.cpp.
| write_stackt::write_stackt | ( | const exprt & | expr, |
| const abstract_environmentt & | environment, | ||
| const namespacet & | ns ) |
Construct a write stack from an expression.
| expr | The expression to represent |
| environment | The environment to evaluate any expressions in |
| ns | The global namespace |
Definition at line 34 of file write_stack.cpp.
|
private |
Add an element to the top of the stack.
This will squash in with the top element if possible.
| entry_pointer | The new element for the stack. |
| environment | The environment to evaluate any expressions in |
| ns | The global namespace |
Definition at line 235 of file write_stack.cpp.
|
private |
Construct a stack for an array position l-value.
| index_expr | The index expression to construct to. |
| environment | The environment to evaluate any expressions in |
| ns | The global namespace |
Definition at line 161 of file write_stack.cpp.
|
private |
Construct a stack up to a specific l-value (i.e.
symbol or position in an array or struct)
| expr | The expression representing a l-value |
| environment | The environment to evaluate any expressions in |
| ns | The global namespace |
Definition at line 129 of file write_stack.cpp.
|
private |
Add to the stack the elements to get to a pointer.
| expr | An expression of type pointer to construct the stack to |
| environment | The environment to evaluate any expressions in |
| ns | The global namespace |
Definition at line 60 of file write_stack.cpp.
| size_t write_stackt::depth | ( | ) | const |
Definition at line 194 of file write_stack.cpp.
|
staticprivate |
Utility function to find out which side of a binary operation has an integral type, if any.
| expr | The (binary) expression to evaluate. | |
| [out] | out_base_expr | The sub-expression which is not integral typed |
| [out] | out_integral_expr | The subexpression which is integraled typed. |
Definition at line 255 of file write_stack.cpp.
| bool write_stackt::is_top_value | ( | ) | const |
Is the stack representing an unknown value and hence can't be written to or read from.
Definition at line 225 of file write_stack.cpp.
| exprt write_stackt::offset_expression | ( | ) | const |
Definition at line 205 of file write_stack.cpp.
| exprt write_stackt::target_expression | ( | size_t | depth | ) | const |
Definition at line 199 of file write_stack.cpp.
| exprt write_stackt::to_expression | ( | ) | const |
Convert the stack to an expression that can be used to write to.
Definition at line 176 of file write_stack.cpp.
|
private |
Definition at line 78 of file write_stack.h.
|
private |
Definition at line 79 of file write_stack.h.