ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
ai_domain.h
Go to the documentation of this file.
1
3
4#ifndef CPROVER_ANALYSES_AI_DOMAIN_H
5#define CPROVER_ANALYSES_AI_DOMAIN_H
6
8#include <irep2/irep2_utils.h>
9
10// forward reference the abstract interpreter interface
11class ai_baset;
12
16{
17protected:
20 {
21 }
22
23public:
25 {
26 }
27
42
43 virtual void transform(
46 ai_baset &ai,
47 const namespacet &ns) = 0;
48
49 virtual void output(std::ostream &out) const = 0;
50
52 virtual void make_bottom() = 0;
53
56 virtual void make_top() = 0;
57
59 virtual void make_entry() = 0;
60
61 virtual bool is_bottom() const = 0;
62
63 virtual bool is_top() const = 0;
64
76
80
82 virtual bool ai_simplify(expr2tc &condition, const namespacet &ns) const = 0;
83
85 virtual bool ai_simplify_lhs(expr2tc &condition, const namespacet &ns) const;
86
89 virtual expr2tc to_predicate(void) const
90 {
91 if (is_bottom())
92 return gen_false_expr();
93 return gen_true_expr();
94 }
95};
96
97#endif
This is the basic interface of the abstract interpreter with default implementations of the core func...
Definition ai.h:27
virtual bool is_bottom() const =0
virtual void make_bottom()=0
no states
ai_domain_baset()
The constructor is expected to produce 'false' or 'bottom'.
Definition ai_domain.h:19
virtual void output(std::ostream &out) const =0
virtual void make_top()=0
all states – the analysis doesn't use this, and domains may refuse to implement it.
virtual bool ai_simplify(expr2tc &condition, const namespacet &ns) const =0
also add
virtual bool ai_simplify_lhs(expr2tc &condition, const namespacet &ns) const
Simplifies the expression but keeps it as an l-value.
Definition ai_domain.cpp:14
virtual void make_entry()=0
a reasonable entry-point state
virtual bool is_top() const =0
virtual void transform(goto_programt::const_targett from, goto_programt::const_targett to, ai_baset &ai, const namespacet &ns)=0
how function calls are treated: a) there is an edge from each call site to the function head b) there...
virtual ~ai_domain_baset()
Definition ai_domain.h:24
virtual expr2tc to_predicate(void) const
Gives a Boolean condition that is true for all values represented by the domain.
Definition ai_domain.h:89
instructionst::const_iterator const_targett
Definition goto_program.h:591
Definition namespace.h:10
irep_container< expr2t > expr2tc
Definition irep2.h:431
const expr2tc & gen_false_expr()
Definition irep2_utils.h:271
const expr2tc & gen_true_expr()
Definition irep2_utils.h:265