File tree Expand file tree Collapse file tree
main/scala/viper/silver/ast/utility
test/resources/all/issues/silver Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,7 +191,9 @@ object Functions {
191191 case uf@ Unfolding (_, body) =>
192192 recordCallsAndUnfoldings (body, ufs :+ uf) // note: acc is not recursively-processed - we may want to revisit this decision
193193 case fa@ FuncApp (_, args) =>
194- result +:= (fa, ufs)
194+ if (fa.funcname == f.name){
195+ result +:= (fa, ufs)
196+ }
195197 args.foreach ((n) => recordCallsAndUnfoldings (n, ufs) )
196198 }
197199 }
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+ predicate OhHi() { true }
5+
6+ function mark(): Bool
7+ {
8+ true
9+ }
10+
11+ function make_your_own_matching_loop(n: Int): Bool
12+ requires OhHi()
13+ {
14+ n <= 0 ? true : (unfolding OhHi() in mark()) && make_your_own_matching_loop(n - 1)
15+ }
16+
17+ method main()
18+ {
19+ fold OhHi()
20+ var f: Bool := make_your_own_matching_loop(49)
21+ //:: ExpectedOutput(assert.failed:assertion.false)
22+ assert f
23+ }
You can’t perform that action at this time.
0 commit comments