From 445b82b4e12260120c2300e4a41bb65bede5cfb4 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:06:37 +0000 Subject: [PATCH] Shared: Explain 'guard'. --- shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll b/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll index 8a6d1f246c5..619ce9b1095 100644 --- a/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll +++ b/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll @@ -189,6 +189,8 @@ signature module Semantic { * Console.WriteLine("x is greater than y"); * } * ``` + * `branch` indicates whether the basic block is entered when the guard + * evaluates to `true` or when it evaluates to `false`. */ predicate directlyControls(BasicBlock controlled, boolean branch); @@ -211,6 +213,8 @@ signature module Semantic { * printf("x is not greater than y\n"); * } * ``` + * `branch` indicates whether the second basic block is the one entered + * when the guard evaluates to `true` or when it evaluates to `false`. */ predicate hasBranchEdge(BasicBlock bb1, BasicBlock bb2, boolean branch); }