File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
src/test/resources/all/issues/silicon Expand file tree Collapse file tree 2 files changed +31
-0
lines changed 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 val: Int
5
+
6
+ function foo(refs: Set[Ref]): Bool
7
+ requires forall x: Ref :: x in refs ==> acc(x.val)
8
+
9
+ method test(refs: Set[Ref]) {
10
+ inhale forall x: Ref :: x in refs ==> acc(x.val)
11
+ inhale forall subs: Set[Ref] :: subs subset refs ==> foo(subs)
12
+ }
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
+
5
+ field f: Bool
6
+
7
+ function hfun(rs: Set[Ref]): Bool
8
+ requires (forall r: Ref :: { (r in rs) } (r in rs) ==> acc(r.f))
9
+
10
+
11
+ method test1(rs: Set[Ref])
12
+ requires (forall r: Ref :: { (r in rs) } (r in rs) ==> acc(r.f))
13
+ {
14
+ assume (forall rs2: Set[Ref] :: { (rs2 subset rs) }
15
+ (rs2 subset rs) ==> hfun(rs2))
16
+
17
+ assert (forall rs3: Set[Ref] :: { (rs3 subset rs) }
18
+ (rs3 subset rs) ==> hfun(rs3))
19
+ }
You can’t perform that action at this time.
0 commit comments