@@ -27,7 +27,7 @@ class ai_baset;
27
27
class ai_domain_baset
28
28
{
29
29
protected:
30
- // The constructor is expected to produce 'false' or 'bottom'
30
+ // / The constructor is expected to produce 'false' or 'bottom'
31
31
ai_domain_baset ()
32
32
{
33
33
}
@@ -39,20 +39,20 @@ class ai_domain_baset
39
39
40
40
typedef goto_programt::const_targett locationt;
41
41
42
- // how function calls are treated:
43
- // a) there is an edge from each call site to the function head
44
- // b) there is an edge from the last instruction (END_FUNCTION)
45
- // of the function to the instruction _following_ the call site
46
- // (this also needs to set the LHS, if applicable)
47
- //
48
- // "this" is the domain before the instruction "from"
49
- // "from" is the instruction to be interpretted
50
- // "to" is the next instruction (for GOTO, FUNCTION_CALL, END_FUNCTION)
51
- //
52
- // PRECONDITION(from.is_dereferenceable(), "Must not be _::end()")
53
- // PRECONDITION(to.is_dereferenceable(), "Must not be _::end()")
54
- // PRECONDITION(are_comparable(from,to) ||
55
- // (from->is_function_call() || from->is_end_function())
42
+ // / how function calls are treated:
43
+ // / a) there is an edge from each call site to the function head
44
+ // / b) there is an edge from the last instruction (END_FUNCTION)
45
+ // / of the function to the instruction _following_ the call site
46
+ // / (this also needs to set the LHS, if applicable)
47
+ // /
48
+ // / "this" is the domain before the instruction "from"
49
+ // / "from" is the instruction to be interpretted
50
+ // / "to" is the next instruction (for GOTO, FUNCTION_CALL, END_FUNCTION)
51
+ // /
52
+ // / PRECONDITION(from.is_dereferenceable(), "Must not be _::end()")
53
+ // / PRECONDITION(to.is_dereferenceable(), "Must not be _::end()")
54
+ // / PRECONDITION(are_comparable(from,to) ||
55
+ // / (from->is_function_call() || from->is_end_function())
56
56
57
57
virtual void transform (
58
58
locationt from,
@@ -69,47 +69,47 @@ class ai_domain_baset
69
69
70
70
virtual xmlt output_xml (const ai_baset &ai, const namespacet &ns) const ;
71
71
72
- // no states
72
+ // / no states
73
73
virtual void make_bottom () = 0;
74
74
75
- // all states -- the analysis doesn't use this,
76
- // and domains may refuse to implement it.
75
+ // / all states -- the analysis doesn't use this,
76
+ // / and domains may refuse to implement it.
77
77
virtual void make_top () = 0;
78
78
79
- // a reasonable entry-point state
79
+ // / a reasonable entry-point state
80
80
virtual void make_entry () = 0;
81
81
82
82
virtual bool is_bottom () const = 0;
83
83
84
84
virtual bool is_top () const = 0;
85
85
86
- // also add
87
- //
88
- // bool merge(const T &b, locationt from, locationt to);
89
- //
90
- // This computes the join between "this" and "b".
91
- // Return true if "this" has changed.
92
- // In the usual case, "b" is the updated state after "from"
93
- // and "this" is the state before "to".
94
- //
95
- // PRECONDITION(from.is_dereferenceable(), "Must not be _::end()")
96
- // PRECONDITION(to.is_dereferenceable(), "Must not be _::end()")
97
-
98
- // This method allows an expression to be simplified / evaluated using the
99
- // current state. It is used to evaluate assertions and in program
100
- // simplification
101
-
102
- // return true if unchanged
86
+ // / also add
87
+ // /
88
+ // / bool merge(const T &b, locationt from, locationt to);
89
+ // /
90
+ // / This computes the join between "this" and "b".
91
+ // / Return true if "this" has changed.
92
+ // / In the usual case, "b" is the updated state after "from"
93
+ // / and "this" is the state before "to".
94
+ // /
95
+ // / PRECONDITION(from.is_dereferenceable(), "Must not be _::end()")
96
+ // / PRECONDITION(to.is_dereferenceable(), "Must not be _::end()")
97
+
98
+ // / This method allows an expression to be simplified / evaluated using the
99
+ // / current state. It is used to evaluate assertions and in program
100
+ // / simplification
101
+
102
+ // / return true if unchanged
103
103
virtual bool ai_simplify (exprt &condition, const namespacet &ns) const
104
104
{
105
105
return true ;
106
106
}
107
107
108
- // Simplifies the expression but keeps it as an l-value
108
+ // / Simplifies the expression but keeps it as an l-value
109
109
virtual bool ai_simplify_lhs (exprt &condition, const namespacet &ns) const ;
110
110
111
- // Gives a Boolean condition that is true for all values represented by the
112
- // domain. This allows domains to be converted into program invariants.
111
+ // / Gives a Boolean condition that is true for all values represented by the
112
+ // / domain. This allows domains to be converted into program invariants.
113
113
virtual exprt to_predicate (void ) const
114
114
{
115
115
if (is_bottom ())
0 commit comments