Skip to content

Commit

Permalink
Fixing issue #896 (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoeilers authored Feb 4, 2025
1 parent de056d6 commit ccab28c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/rules/MoreCompleteExhaleSupporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ object moreCompleteExhaleSupporter extends SymbolicExecutionRules {
case Some(v) =>
ReusedSummarisingSnapshot(v)
case None =>
val ss = v.decider.appliedFresh("ss", sort, s.functionRecorderQuantifiedVariables().map(_._1))
val ss = v.decider.appliedFresh("ss", sort, s.functionRecorderQuantifiedVariables().map(_._1) ++ s.quantifiedVariables.map(_._1))
FreshSummarisingSnapshot(ss)
}
}
Expand Down
25 changes: 25 additions & 0 deletions src/test/resources/moreCompleteExhale/0896.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/

field f: Int

predicate P(x: Ref) {
acc(x.f)
}

method foo(x: Ref, y: Ref)
{
inhale acc(x.f) && x.f == 4 && acc(y.f) && y.f == 5
fold P(x)
fold P(y)

var myseq: Seq[Ref] := Seq(x, y)

assert forall r: Ref :: {r in myseq} r in myseq ==> unfolding P(r) in r.f > 2

assert x in myseq
assert y in myseq

//:: ExpectedOutput(assert.failed:assertion.false)
assert false
}

0 comments on commit ccab28c

Please sign in to comment.