@@ -42,9 +42,9 @@ predicate hasSize(HeuristicAllocationExpr alloc, DataFlow::Node n, int state) {
4242 * ```
4343 * In this case, the sink pair identified by the product flow library (without any additional barriers)
4444 * would be `(p, n)` (where `n` is the `n` in `p[n]`), because there exists a pointer-arithmetic
45- * instruction `pai` such that:
46- * 1. The left-hand of `pai` flows from the allocation , and
47- * 2. The right-hand of `pai` is non-strictly upper bounded by ` n` ( where `n` is the `n` in `p[n]`)
45+ * instruction `pai = a + b ` such that:
46+ * 1. the allocation flows to `a` , and
47+ * 2. `b <= n` where `n` is the `n` in `p[n]`
4848 * but because there's a strict comparison that compares `n` against the size of the allocation this
4949 * snippet is fine.
5050 */
@@ -147,8 +147,8 @@ private module InterestingPointerAddInstruction {
147147}
148148
149149/**
150- * A product-flow configuration for flow from an (allocation, size) pair to a
151- * pointer-arithmetic operation that is non-strictly upper-bounded by ` allocation + size`.
150+ * A product-flow configuration for flow from an ` (allocation, size)` pair to a
151+ * pointer-arithmetic operation `pai` such that `pai <= allocation + size`.
152152 *
153153 * The goal of this query is to find patterns such as:
154154 * ```cpp
@@ -207,7 +207,7 @@ private module Config implements ProductFlow::StateConfigSig {
207207private module AllocToInvalidPointerFlow = ProductFlow:: GlobalWithState< Config > ;
208208
209209/**
210- * Holds if `pai` is non-strictly upper bounded by `sink2 + delta` and `sink1 ` is the
210+ * Holds if `pai` is non-strictly upper bounded by `sizeSink + delta` and `allocSink ` is the
211211 * left operand of the pointer-arithmetic operation.
212212 *
213213 * For example in,
@@ -216,8 +216,8 @@ private module AllocToInvalidPointerFlow = ProductFlow::GlobalWithState<Config>;
216216 * ```
217217 * We will have:
218218 * - `pai` is `p + (size + 1)`,
219- * - `sink1 ` is `p`
220- * - `sink2 ` is `size`
219+ * - `allocSink ` is `p`
220+ * - `sizeSink ` is `size`
221221 * - `delta` is `1`.
222222 */
223223pragma [ nomagic]
@@ -237,9 +237,9 @@ private predicate pointerAddInstructionHasBounds0(
237237}
238238
239239/**
240- * Holds if `allocation` flows to `sink1 ` and `sink1 ` represents the left-hand
241- * side of the pointer-arithmetic instruction `pai`, and the right-hand side of `pai`
242- * is non-strictly upper bounded by the size of `alllocation` + ` delta`.
240+ * Holds if `allocation` flows to `allocSink ` and `allocSink ` represents the left operand
241+ * of the pointer-arithmetic instruction `pai = a + b` (i.e., `allocSink = a`), and
242+ * `b <= allocation + delta`.
243243 */
244244pragma [ nomagic]
245245predicate pointerAddInstructionHasBounds (
0 commit comments