@@ -161,7 +161,7 @@ signature module Semantic {
161
161
default string getBlockId2 ( BasicBlock bb ) { result = "" }
162
162
163
163
/**
164
- * Represents a guard in the range analysis.
164
+ * A guard in the range analysis.
165
165
*/
166
166
class Guard {
167
167
/**
@@ -180,7 +180,15 @@ signature module Semantic {
180
180
Expr asExpr ( ) ;
181
181
182
182
/**
183
- * Holds if the guard directly controls a given basic block.
183
+ * Holds if the guard directly controls a given basic block. For example in
184
+ * the following code, the guard `(x > y)` directly controls the block
185
+ * beneath it:
186
+ * ```
187
+ * if (x > y)
188
+ * {
189
+ * Console.WriteLine("x is greater than y");
190
+ * }
191
+ * ```
184
192
*
185
193
* @param controlled The basic block to check.
186
194
*/
@@ -194,7 +202,17 @@ signature module Semantic {
194
202
predicate isEquality ( Expr e1 , Expr e2 , boolean polarity ) ;
195
203
196
204
/**
197
- * Holds if there is a branch edge between two basic blocks.
205
+ * Holds if there is a branch edge between two basic blocks. For example
206
+ * in the following C code, there are two branch edges from the basic block
207
+ * containing the condition `(x > y)` to the beginnings of the true and
208
+ * false blocks that follow:
209
+ * ```
210
+ * if (x > y) {
211
+ * printf("x is greater than y\n");
212
+ * } else {
213
+ * printf("x is not greater than y\n");
214
+ * }
215
+ * ```
198
216
*
199
217
* @param bb1 The first basic block.
200
218
*/
@@ -222,7 +240,7 @@ signature module Semantic {
222
240
Type getExprType ( Expr e ) ;
223
241
224
242
/**
225
- * Represents a single static single assignment (SSA) variable.
243
+ * A single static single assignment (SSA) variable.
226
244
*/
227
245
class SsaVariable {
228
246
/**
@@ -237,15 +255,17 @@ signature module Semantic {
237
255
}
238
256
239
257
/**
240
- * Represents a phi node in the SSA form.
258
+ * A phi node in the SSA form. A phi node is a kind of node in the SSA form
259
+ * that represents a merge point where multiple control flow paths converge
260
+ * and the value of a variable needs to be selected.
241
261
*/
242
262
class SsaPhiNode extends SsaVariable {
243
263
/** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */
244
264
predicate hasInputFromBlock ( SsaVariable inp , BasicBlock bb ) ;
245
265
}
246
266
247
267
/**
248
- * Represents a single update to a variable in the SSA form.
268
+ * A single update to a variable in the SSA form.
249
269
*/
250
270
class SsaExplicitUpdate extends SsaVariable {
251
271
/**
@@ -344,7 +364,8 @@ signature module LangSig<Semantic Sem, DeltaSig D> {
344
364
345
365
signature module BoundSig< LocationSig Location, Semantic Sem, DeltaSig D> {
346
366
/**
347
- * Represents a semantic bound.
367
+ * A semantic bound, which defines a constraint on the possible values of an
368
+ * expression.
348
369
*/
349
370
class SemBound {
350
371
/**
0 commit comments