mirror of
https://github.com/github/codeql.git
synced 2026-05-14 19:29:28 +02:00
These use the annotated, self-verifying test files to check various consistency requirements. Some of these may be expressing the same thing in different ways, but it's fairly cheap to keep them around, so I have not attempted to produce a minimal set of queries for this.
18 lines
577 B
Plaintext
18 lines
577 B
Plaintext
/**
|
|
* Stronger version of NoBackwardFlow: for consecutive annotated nodes
|
|
* A -> B that both have a single timestamp (non-loop code) and B does
|
|
* NOT dominate A (forward edge), requires max(A) < min(B).
|
|
*/
|
|
|
|
import OldCfgImpl
|
|
|
|
private module Utils = EvalOrderCfgUtils<OldCfg>;
|
|
|
|
private import Utils
|
|
private import Utils::CfgTests
|
|
|
|
from TimerCfgNode a, TimerCfgNode b, int maxA, int minB
|
|
where strictForward(a, b, maxA, minB)
|
|
select a, "Strict forward violation: $@ flows to $@", a.getTimestampExpr(maxA), "timestamp " + maxA,
|
|
b.getTimestampExpr(minB), "timestamp " + minB
|