@@ -160,31 +160,26 @@ class Content extends TContent {
160160}
161161
162162/**
163- * A node that controls whether other nodes are evaluated.
163+ * A guard that validates some expression.
164+ *
165+ * To use this in a configuration, extend the class and provide a
166+ * characteristic predicate precisely specifying the guard, and override
167+ * `checks` to specify what is being validated and in which branch.
168+ *
169+ * It is important that all extending classes in scope are disjoint.
164170 */
165- class GuardNode extends CfgNodes:: ExprCfgNode {
166- ConditionBlock conditionBlock ;
171+ abstract class BarrierGuard extends CfgNodes:: ExprCfgNode {
172+ private ConditionBlock conditionBlock ;
167173
168- GuardNode ( ) { this = conditionBlock .getLastNode ( ) }
174+ BarrierGuard ( ) { this = conditionBlock .getLastNode ( ) }
169175
170176 /** Holds if this guard controls block `b` upon evaluating to `branch`. */
171- predicate controlsBlock ( BasicBlock bb , boolean branch ) {
177+ private predicate controlsBlock ( BasicBlock bb , boolean branch ) {
172178 exists ( SuccessorTypes:: BooleanSuccessor s | s .getValue ( ) = branch |
173179 conditionBlock .controls ( bb , s )
174180 )
175181 }
176- }
177182
178- /**
179- * A guard that validates some expression.
180- *
181- * To use this in a configuration, extend the class and provide a
182- * characteristic predicate precisely specifying the guard, and override
183- * `checks` to specify what is being validated and in which branch.
184- *
185- * It is important that all extending classes in scope are disjoint.
186- */
187- abstract class BarrierGuard extends GuardNode {
188183 /**
189184 * Holds if this guard validates `expr` upon evaluating to `branch`.
190185 * For example, the following code validates `foo` when the condition
0 commit comments