Predicate bbSuccessorEntryReachesLoopInvariant
Loop invariant for bbSuccessorEntryReaches
:
succ
is a successor ofpred
.predSkipsFirstLoopAlwaysTrueUponEntry
: whether the path frompred
(viasucc
) skips the first loop where the condition is provably true upon entry.succSkipsFirstLoopAlwaysTrueUponEntry
: whether the path fromsucc
skips the first loop where the condition is provably true upon entry.- If
pred
contains the entry point of a loop where the condition is provably true upon entry, thensucc
is not allowed to skip that loop (succSkipsFirstLoopAlwaysTrueUponEntry = false
).
Import path
import semmle.code.cpp.controlflow.StackVariableReachability
predicate bbSuccessorEntryReachesLoopInvariant(BasicBlock pred, BasicBlock succ, boolean predSkipsFirstLoopAlwaysTrueUponEntry, boolean succSkipsFirstLoopAlwaysTrueUponEntry)