Skip to content

Commit ccab28c

Browse files
authored
Fixing issue #896 (#898)
1 parent de056d6 commit ccab28c

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

src/main/scala/rules/MoreCompleteExhaleSupporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ object moreCompleteExhaleSupporter extends SymbolicExecutionRules {
130130
case Some(v) =>
131131
ReusedSummarisingSnapshot(v)
132132
case None =>
133-
val ss = v.decider.appliedFresh("ss", sort, s.functionRecorderQuantifiedVariables().map(_._1))
133+
val ss = v.decider.appliedFresh("ss", sort, s.functionRecorderQuantifiedVariables().map(_._1) ++ s.quantifiedVariables.map(_._1))
134134
FreshSummarisingSnapshot(ss)
135135
}
136136
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Any copyright is dedicated to the Public Domain.
2+
// http://creativecommons.org/publicdomain/zero/1.0/
3+
4+
field f: Int
5+
6+
predicate P(x: Ref) {
7+
acc(x.f)
8+
}
9+
10+
method foo(x: Ref, y: Ref)
11+
{
12+
inhale acc(x.f) && x.f == 4 && acc(y.f) && y.f == 5
13+
fold P(x)
14+
fold P(y)
15+
16+
var myseq: Seq[Ref] := Seq(x, y)
17+
18+
assert forall r: Ref :: {r in myseq} r in myseq ==> unfolding P(r) in r.f > 2
19+
20+
assert x in myseq
21+
assert y in myseq
22+
23+
//:: ExpectedOutput(assert.failed:assertion.false)
24+
assert false
25+
}

0 commit comments

Comments
 (0)