Skip to content

Commit da2f36f

Browse files
authored
Merge pull request #774 from viperproject/meilers_fix_773
Fixing issue #773
2 parents cabada8 + 9da0777 commit da2f36f

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

src/main/scala/rules/Executor.scala

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,8 @@ object executor extends ExecutionRules {
253253
phase1data = phase1data :+ (s1,
254254
v1.decider.pcs.after(mark),
255255
v1.decider.freshFunctions /* [BRANCH-PARALLELISATION] */)
256-
v1.decider.prover.comment("Loop head block: Check well-definedness of edge conditions")
257-
edgeConditions.foldLeft(Success(): VerificationResult) {
258-
case (result, _) if !result.continueVerification => result
259-
case (intermediateResult, eCond) =>
260-
intermediateResult combine executionFlowController.locally(s1, v1)((s2, v2) => {
261-
eval(s2, eCond, WhileFailed(eCond), v2)((_, _, _) =>
262-
Success())})}})})
256+
Success()
257+
})})
263258
combine executionFlowController.locally(s, v)((s0, v0) => {
264259
v0.decider.prover.comment("Loop head block: Establish invariant")
265260
consumes(s0, invs, LoopInvariantNotEstablished, v0)((sLeftover, _, v1) => {
@@ -276,8 +271,19 @@ object executor extends ExecutionRules {
276271
Success()
277272
else {
278273
execs(s3, stmts, v2)((s4, v3) => {
274+
val edgeCondWelldefinedness = {
275+
v1.decider.prover.comment("Loop head block: Check well-definedness of edge conditions")
276+
edgeConditions.foldLeft(Success(): VerificationResult) {
277+
case (result, _) if !result.continueVerification => result
278+
case (intermediateResult, eCond) =>
279+
intermediateResult combine executionFlowController.locally(s4, v3)((s5, v4) => {
280+
eval(s5, eCond, WhileFailed(eCond), v4)((_, _, _) =>
281+
Success())
282+
})
283+
}
284+
}
279285
v3.decider.prover.comment("Loop head block: Follow loop-internal edges")
280-
follows(s4, sortedEdges, WhileFailed, v3, joinPoint)(Q)})}})}})}))
286+
edgeCondWelldefinedness combine follows(s4, sortedEdges, WhileFailed, v3, joinPoint)(Q)})}})}})}))
281287

282288
case _ =>
283289
/* We've reached a loop head block via an edge other than an in-edge: a normal edge or

0 commit comments

Comments
 (0)