File tree Expand file tree Collapse file tree
src/test/resources/all/issues/silicon Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Any copyright is dedicated to the Public Domain.
2+ // http://creativecommons.org/publicdomain/zero/1.0/
3+
4+ field f: Ref
5+ field g: Ref
6+
7+ function one(): Int {1}
8+ function two(): Int {2}
9+
10+ predicate Q(x: Ref)
11+
12+ predicate P(x: Ref) {
13+ forall i: Int :: one() == two() && x.f != null ==> acc(x.g.f)
14+ }
15+
16+ predicate P2(x: Ref) {
17+ forall i: Int :: one() == two() && x.f != null ==> Q(x.g)
18+ }
19+
20+ method consumeField(x: Ref)
21+ {
22+ exhale forall i: Int :: one() == two() && x.f != null ==> acc(x.g.f)
23+ //:: ExpectedOutput(assert.failed:assertion.false)
24+ assert false
25+ }
26+
27+ method produceField(x: Ref)
28+ {
29+ inhale P(x)
30+ unfold P(x)
31+ //:: ExpectedOutput(assert.failed:assertion.false)
32+ assert false
33+ }
34+
35+ method consumePred(x: Ref)
36+ {
37+ fold P2(x)
38+ //:: ExpectedOutput(assert.failed:assertion.false)
39+ assert false
40+ }
41+
42+ method producePred(x: Ref)
43+ {
44+ inhale forall i: Int :: one() == two() && x.f != null ==> Q(x.g)
45+ //:: ExpectedOutput(assert.failed:assertion.false)
46+ assert false
47+ }
You can’t perform that action at this time.
0 commit comments