Skip to content

Commit 3e0b2a5

Browse files
author
martin
committed
Doxygen the comments describing the abstract domain interface.
1 parent 4f8d445 commit 3e0b2a5

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed

src/analyses/ai_domain.h

+39-39
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ai_baset;
2727
class ai_domain_baset
2828
{
2929
protected:
30-
// The constructor is expected to produce 'false' or 'bottom'
30+
/// The constructor is expected to produce 'false' or 'bottom'
3131
ai_domain_baset()
3232
{
3333
}
@@ -39,20 +39,20 @@ class ai_domain_baset
3939

4040
typedef goto_programt::const_targett locationt;
4141

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())
5656

5757
virtual void transform(
5858
locationt from,
@@ -69,47 +69,47 @@ class ai_domain_baset
6969

7070
virtual xmlt output_xml(const ai_baset &ai, const namespacet &ns) const;
7171

72-
// no states
72+
/// no states
7373
virtual void make_bottom() = 0;
7474

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.
7777
virtual void make_top() = 0;
7878

79-
// a reasonable entry-point state
79+
/// a reasonable entry-point state
8080
virtual void make_entry() = 0;
8181

8282
virtual bool is_bottom() const = 0;
8383

8484
virtual bool is_top() const = 0;
8585

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
103103
virtual bool ai_simplify(exprt &condition, const namespacet &ns) const
104104
{
105105
return true;
106106
}
107107

108-
// Simplifies the expression but keeps it as an l-value
108+
/// Simplifies the expression but keeps it as an l-value
109109
virtual bool ai_simplify_lhs(exprt &condition, const namespacet &ns) const;
110110

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.
113113
virtual exprt to_predicate(void) const
114114
{
115115
if(is_bottom())

0 commit comments

Comments
 (0)