Skip to content

Commit

Permalink
Merge remote-tracking branch 'mine/format-rnode' into format-rnode
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV committed Feb 10, 2025
2 parents fd2938a + 7700326 commit dfc656b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ trait FunctionCheck extends ProgramManager with DecreasesCheck with ExpTransform

if (proofMethodBody != EmptyStmt) {
val proofMethod = Method(proofMethodName, f.formalArgs, Nil, f.pres, Nil,
Option(Seqn(Seq(proofMethodBody), Seq(resultVariable))()))(info = f.info)
Option(Seqn(Seq(proofMethodBody), Seq(resultVariable, context.conditionInEx.get))()))(info = f.info)

Seq(proofMethod)
} else {
Expand Down
20 changes: 20 additions & 0 deletions src/test/resources/all/issues/silicon/0883.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/


field f: Int

@moreJoins("2")
method foo(x: Ref, xs: Set[Ref])
requires forall r: Ref :: { r in xs } r in xs ==> acc(r.f)
{
var b: Bool
inhale acc(x.f, 1/2)
if (b) {
inhale acc(x.f, 1/2)
} else {
inhale acc(x.f, 1/2)
}

assert acc(x.f)
}
10 changes: 10 additions & 0 deletions src/test/resources/all/issues/silicon/0886.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/


function foo(): Bool
decreases

function bar(): Int
decreases
ensures [foo(), true]

0 comments on commit dfc656b

Please sign in to comment.