cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
write_stack_entry.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Analyses Variable Sensitivity
4
5
Author: DiffBlue Limited.
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_ANALYSES_VARIABLE_SENSITIVITY_WRITE_STACK_ENTRY_H
13
#define CPROVER_ANALYSES_VARIABLE_SENSITIVITY_WRITE_STACK_ENTRY_H
14
15
#include "
abstract_object.h
"
16
17
class
abstract_environmentt
;
18
class
namespacet
;
19
20
class
write_stack_entryt
21
{
22
public
:
23
virtual
~write_stack_entryt
() =
default
;
24
virtual
std::pair<exprt, bool>
get_access_expr
()
const
= 0;
25
virtual
bool
try_squash_in
(
26
std::shared_ptr<const write_stack_entryt> new_entry,
27
const
abstract_environmentt
&enviroment,
28
const
namespacet
&ns);
29
};
30
31
class
simple_entryt
:
public
write_stack_entryt
32
{
33
public
:
34
explicit
simple_entryt
(
exprt
expr);
35
std::pair<exprt, bool>
get_access_expr
()
const override
;
36
37
private
:
38
exprt
simple_entry
;
39
};
40
41
class
offset_entryt
:
public
write_stack_entryt
42
{
43
public
:
44
explicit
offset_entryt
(
abstract_object_pointert
offset_value);
45
std::pair<exprt, bool>
get_access_expr
()
const override
;
46
bool
try_squash_in
(
47
std::shared_ptr<const write_stack_entryt> new_entry,
48
const
abstract_environmentt
&enviroment,
49
const
namespacet
&ns)
override
;
50
51
private
:
52
abstract_object_pointert
offset
;
53
};
54
55
#endif
// CPROVER_ANALYSES_VARIABLE_SENSITIVITY_WRITE_STACK_ENTRY_H
abstract_object.h
abstract_objectt is the top of the inheritance heirarchy of objects used to represent individual vari...
abstract_object_pointert
sharing_ptrt< class abstract_objectt > abstract_object_pointert
Definition
abstract_object.h:69
abstract_environmentt
Definition
abstract_environment.h:39
exprt
Base class for all expressions.
Definition
expr.h:57
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition
namespace.h:91
offset_entryt::offset_entryt
offset_entryt(abstract_object_pointert offset_value)
Definition
write_stack_entry.cpp:48
offset_entryt::get_access_expr
std::pair< exprt, bool > get_access_expr() const override
Get the expression part needed to read this stack entry.
Definition
write_stack_entry.cpp:61
offset_entryt::try_squash_in
bool try_squash_in(std::shared_ptr< const write_stack_entryt > new_entry, const abstract_environmentt &enviroment, const namespacet &ns) override
Try to combine a new stack element with the current top of the stack.
Definition
write_stack_entry.cpp:73
offset_entryt::offset
abstract_object_pointert offset
Definition
write_stack_entry.h:52
simple_entryt::get_access_expr
std::pair< exprt, bool > get_access_expr() const override
Get the expression part needed to read this stack entry.
Definition
write_stack_entry.cpp:43
simple_entryt::simple_entryt
simple_entryt(exprt expr)
Build a simple entry based off a single expression.
Definition
write_stack_entry.cpp:32
simple_entryt::simple_entry
exprt simple_entry
Definition
write_stack_entry.h:38
write_stack_entryt
Definition
write_stack_entry.h:21
write_stack_entryt::~write_stack_entryt
virtual ~write_stack_entryt()=default
write_stack_entryt::try_squash_in
virtual bool try_squash_in(std::shared_ptr< const write_stack_entryt > new_entry, const abstract_environmentt &enviroment, const namespacet &ns)
Try to combine a new stack element with the current top of the stack.
Definition
write_stack_entry.cpp:22
write_stack_entryt::get_access_expr
virtual std::pair< exprt, bool > get_access_expr() const =0
analyses
variable-sensitivity
write_stack_entry.h
Generated by
1.17.0