@@ -106,14 +106,20 @@ class goto_programt
106106 // / respective fields in this class:
107107 // /
108108 // / - 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.
110112 // / - RETURN:
111113 // / Set the value returned by `code` (which shall be either nil or an
112114 // / instance of code_returnt) and then jump to the end of the function.
115+ // / Many analysis tools remove these instructions before they start.
113116 // / - DECL:
114117 // / Introduces a symbol denoted by the field `code` (an instance of
115118 // / 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.
117123 // / - FUNCTION_CALL:
118124 // / Invoke the function denoted by field `code` (an instance of
119125 // / code_function_callt).
@@ -124,27 +130,33 @@ class goto_programt
124130 // / Execute the `code` (an instance of codet of kind ID_fence, ID_printf,
125131 // / ID_array_copy, ID_array_set, ID_input, ID_output, ...).
126132 // / - 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.
128135 // / - ASSERT:
129136 // / 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.
132140 // / - SKIP, LOCATION:
133141 // / No-op.
134142 // / - ATOMIC_BEGIN, ATOMIC_END:
135143 // / When a thread executes ATOMIC_BEGIN, no thread other will be able to
136144 // / execute any instruction until the same thread executes ATOMIC_END.
145+ // / Concurrency is not supported by all analysis tools.
137146 // / - 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 .
139148 // / - START_THREAD:
140149 // / Create a new thread and run the code of this function starting from
141150 // / targets[0]. Quite often the instruction pointed by targets[0] will be
142151 // / just a FUNCTION_CALL, followed by an END_THREAD.
152+ // / Concurrency is not supported by all analysis tools.
143153 // / - END_THREAD:
144154 // / Terminate the calling thread.
155+ // / Concurrency is not supported by all analysis tools.
145156 // / - THROW:
146157 // / throw `exception1`, ..., `exceptionN`
147158 // / where the list of exceptions is extracted from the `code` field
159+ // / Many analysis tools remove these instructions before they start.
148160 // / - CATCH, when code.find(ID_exception_list) is non-empty:
149161 // / Establishes that from here to the next occurrence of CATCH with an
150162 // / empty list (see below) if
@@ -156,6 +168,7 @@ class goto_programt
156168 // / - CATCH, when empty code.find(ID_exception_list) is empty:
157169 // / clears all the catch clauses established as per the above in this
158170 // / function?
171+ // / Many analysis tools remove these instructions before they start.
159172 class instructiont final
160173 {
161174 public:
0 commit comments