Skip to content

Commit

Permalink
Fix old imperative benchmarks breaking after assertionInjector not ru…
Browse files Browse the repository at this point in the history
…nning on unfolded functions
  • Loading branch information
gsps committed Aug 26, 2021
1 parent e90964b commit f76e4fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ object ArrayParamMutation2 {

def rec(a: Array[BigInt]): BigInt = {
require(a.length > 1 && a(0) >= 0)
if(a(0) == 0)
if(a(0) == 0)
a(1)
else {
a(0) = a(0) - 1
a(1) = a(1) + a(0)
rec(a)
}
} ensuring(res => a(0) == 0)
} ensuring(res => a.length > 0 && a(0) == 0)

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object ArrayParamMutation3 {
a(0) = a(0) - 1
even(a)
}
} ensuring(res => a(0) == 0)
} ensuring(res => a.length > 0 && a(0) == 0)

def even(a: Array[BigInt]): Boolean = {
require(a.length > 0 && a(0) >= 0)
Expand All @@ -18,6 +18,6 @@ object ArrayParamMutation3 {
a(0) = a(0) - 1
odd(a)
}
} ensuring(res => a(0) == 0)
} ensuring(res => a.length > 0 && a(0) == 0)

}

0 comments on commit f76e4fe

Please sign in to comment.