CBMC
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 
18 class namespacet;
19 
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 
32 {
33 public:
34  explicit simple_entryt(exprt expr);
35  std::pair<exprt, bool> get_access_expr() const override;
36 
37 private:
39 };
40 
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:
53 };
54 
55 #endif // CPROVER_ANALYSES_VARIABLE_SENSITIVITY_WRITE_STACK_ENTRY_H
abstract_objectt is the top of the inheritance heirarchy of objects used to represent individual vari...
sharing_ptrt< class abstract_objectt > abstract_object_pointert
Base class for all expressions.
Definition: expr.h:56
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:94
offset_entryt(abstract_object_pointert offset_value)
std::pair< exprt, bool > get_access_expr() const override
Get the expression part needed to read this stack entry.
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.
abstract_object_pointert offset
std::pair< exprt, bool > get_access_expr() const override
Get the expression part needed to read this stack entry.
simple_entryt(exprt expr)
Build a simple entry based off a single expression.
virtual ~write_stack_entryt()=default
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.
virtual std::pair< exprt, bool > get_access_expr() const =0