Skip to content

Commit bfacd23

Browse files
committed
Dataflow: Adjust documentation.
1 parent 5951ae7 commit bfacd23

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/ql-libraries/dataflow/dataflow.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,19 @@ call-graph should be defined as a predicate:
150150
```ql
151151
DataFlowCallable viableCallable(DataFlowCall c)
152152
```
153+
Furthermore, each `Node` must be associated with exactly one callable and this
154+
relation should be defined as:
155+
```ql
156+
DataFlowCallable nodeGetEnclosingCallable(Node n)
157+
```
153158

154159
In order to connect data-flow across calls, the 4 `Node` subclasses
155160
`ArgumentNode`, `ParameterNode`, `ReturnNode`, and `OutNode` are used.
156161
Flow into callables from arguments to parameters are matched up using an
157-
integer position, so these two classes must define:
162+
integer position, so these two predicates must be defined:
158163
```ql
159164
ArgumentNode::argumentOf(DataFlowCall call, int pos)
160-
ParameterNode::isParameterOf(DataFlowCallable c, int pos)
165+
predicate isParameterNode(ParameterNode p, DataFlowCallable c, int pos)
161166
```
162167
It is typical to use `pos = -1` for an implicit `this`-parameter.
163168

0 commit comments

Comments
 (0)