@@ -106,14 +106,19 @@ class goto_programt
106
106
// / respective fields in this class:
107
107
// /
108
108
// / - GOTO:
109
- // / if `guard` then goto `targets`
109
+ // / goto `targets` if and only if `guard` is true
110
+ // / If there are multiple targets, pick one non-deterministically.
110
111
// / - RETURN:
111
112
// / Set the value returned by `code` (which shall be either nil or an
112
113
// / instance of code_returnt) and then jump to the end of the function.
114
+ // / Many analysis tools remove these instructions before they start.
113
115
// / - DECL:
114
116
// / Introduces a symbol denoted by the field `code` (an instance of
115
117
// / code_declt), the life-time of which is bounded by a corresponding DEAD
116
- // / instruction.
118
+ // / instruction. Symbols must be DECL'd before they are used.
119
+ // / - DEAD:
120
+ // / Ends the life of the symbol denoted by the field `code`.
121
+ // / After a DEAD instruction the symbol must be DECL'd again before use.
117
122
// / - FUNCTION_CALL:
118
123
// / Invoke the function denoted by field `code` (an instance of
119
124
// / code_function_callt).
@@ -124,7 +129,8 @@ class goto_programt
124
129
// / Execute the `code` (an instance of codet of kind ID_fence, ID_printf,
125
130
// / ID_array_copy, ID_array_set, ID_input, ID_output, ...).
126
131
// / - ASSUME:
127
- // / Wait for `guard` to evaluate to true.
132
+ // / This thread of execution waits for `guard` to evaluate to true.
133
+ // / Assume does not "retro-actively" affect the thread or any ASSERTs.
128
134
// / - ASSERT:
129
135
// / Using ASSERT instructions is the one and only way to express
130
136
// / properties to be verified. Execution paths abort if `guard` evaluates
@@ -134,17 +140,21 @@ class goto_programt
134
140
// / - ATOMIC_BEGIN, ATOMIC_END:
135
141
// / When a thread executes ATOMIC_BEGIN, no thread other will be able to
136
142
// / execute any instruction until the same thread executes ATOMIC_END.
143
+ // / Concurrency is not support by all analysis tools.
137
144
// / - END_FUNCTION:
138
- // / Can only occur as the last instruction of the list.
145
+ // / Must occur as the last instruction of the list and nowhere else .
139
146
// / - START_THREAD:
140
147
// / Create a new thread and run the code of this function starting from
141
148
// / targets[0]. Quite often the instruction pointed by targets[0] will be
142
149
// / just a FUNCTION_CALL, followed by an END_THREAD.
150
+ // / Concurrency is not support by all analysis tools.
143
151
// / - END_THREAD:
144
152
// / Terminate the calling thread.
153
+ // / Concurrency is not support by all analysis tools.
145
154
// / - THROW:
146
155
// / throw `exception1`, ..., `exceptionN`
147
156
// / where the list of exceptions is extracted from the `code` field
157
+ // / Many analysis tools remove these instructions before they start.
148
158
// / - CATCH, when code.find(ID_exception_list) is non-empty:
149
159
// / Establishes that from here to the next occurrence of CATCH with an
150
160
// / empty list (see below) if
@@ -156,6 +166,7 @@ class goto_programt
156
166
// / - CATCH, when empty code.find(ID_exception_list) is empty:
157
167
// / clears all the catch clauses established as per the above in this
158
168
// / function?
169
+ // / Many analysis tools remove these instructions before they start.
159
170
class instructiont final
160
171
{
161
172
public:
0 commit comments