Skip to content

Commit bceab0b

Browse files
committed
Add extensible predicates
1 parent ec726f5 commit bceab0b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,29 @@ extensible predicate neutralModel(
9898
string path, string kind, string provenance, QlBuiltins::ExtensionId madId
9999
);
100100

101+
/**
102+
* Holds if in a call to the function with canonical path `path`, the value referred
103+
* to by `output` is a barrier of the given `kind` and `madId` is the data
104+
* extension row number.
105+
*/
106+
extensible predicate barrierModel(
107+
string path, string output, string kind, string provenance, QlBuiltins::ExtensionId madId
108+
);
109+
110+
/**
111+
* Holds if in a call to the function with canonical path `path`, the value referred
112+
* to by `input` is a barrier guard of the given `kind` and `madId` is the data
113+
* extension row number.
114+
* the value referred to by `input` is assumed to lead to a parameter of a call
115+
* (possibly `self`), and the call is guarding the parameter.
116+
* `branch` is either `true` or `false`, indicating which branch of the guard
117+
* is protecting the parameter.
118+
*/
119+
extensible predicate barrierGuardModel(
120+
string path, string input, string branch, string kind, string provenance,
121+
QlBuiltins::ExtensionId madId
122+
);
123+
101124
/**
102125
* Holds if the given extension tuple `madId` should pretty-print as `model`.
103126
*

0 commit comments

Comments
 (0)