mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
Currently we only instantiate them with the old CFG library, but in the future we'll want to do this with the new library as well. Co-authored-by: yoff <yoff@github.com>
20 lines
645 B
Plaintext
20 lines
645 B
Plaintext
/**
|
|
* Checks that time never flows backward between consecutive timer annotations
|
|
* in the CFG. For each pair of consecutive annotated nodes (A -> B), there must
|
|
* exist timestamps a in A and b in B with a < b.
|
|
*/
|
|
|
|
import python
|
|
import TimerUtils
|
|
import OldCfgImpl
|
|
|
|
private module Utils = EvalOrderCfgUtils<OldCfg>;
|
|
|
|
private import Utils
|
|
private import Utils::CfgTests
|
|
|
|
from TimerCfgNode a, TimerCfgNode b, int minA, int maxB
|
|
where noBackwardFlow(a, b, minA, maxB)
|
|
select a, "Backward flow: $@ flows to $@ (max timestamp $@)", a.getTimestampExpr(minA),
|
|
minA.toString(), b, b.getNode().toString(), b.getTimestampExpr(maxB), maxB.toString()
|