Skip to content

Instantly share code, notes, and snippets.

@mantognini
Created December 15, 2017 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mantognini/ccbee3c64f929ddb182907fbb7ed8e3e to your computer and use it in GitHub Desktop.
Save mantognini/ccbee3c64f929ddb182907fbb7ed8e3e to your computer and use it in GitHub Desktop.
import stainless.lang._
object Eval {
def foo: Int = {
// assert(false)
43
} ensuring { _ + 58 == 100 }
def goo = 1
def bar = { "hello, stainless!" } ensuring { _ => 0 < goo }
def foobar = { "failure in foo's PC" } ensuring { _ => 0 < foo }
def loop = {
var x = 0
while (x < 10) {
// x += 1
}
true
}.holds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment