Predicate bbSuccessorEntryReachesLoopInvariant
Loop invariant for bbSuccessorEntryReaches:
succis 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 fromsuccskips the first loop where the condition is provably true upon entry.- If
predcontains the entry point of a loop where the condition is provably true upon entry, thensuccis not allowed to skip that loop (succSkipsFirstLoopAlwaysTrueUponEntry = false).
Import path
import semmle.code.cpp.controlflow.StackVariableReachabilitypredicate bbSuccessorEntryReachesLoopInvariant(BasicBlock pred, BasicBlock succ, boolean predSkipsFirstLoopAlwaysTrueUponEntry, boolean succSkipsFirstLoopAlwaysTrueUponEntry)