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