statement stringlengths 1 11.2k | proof stringlengths 0 11.2k | type stringclasses 6
values | symbolic_name stringlengths 1 117 | library stringclasses 106
values | filename stringlengths 31 86 | imports listlengths 0 0 | deps listlengths 0 32 | docstring stringclasses 1
value | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
mNestedFunc6(r: Ref)
requires acc(r.f) && r.f > -20 | {
assume isGreaterOne35(r)
//:: ExpectedOutput(assert.failed:assertion.false)
assert r.f > 1
} | method | mNestedFunc6 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"isGreaterOne35"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fac1(i: Int): Int | {
i <= 1 ? 1 : i * fac1(i - 1)
}
@opaque() | function | fac1 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fac2(i: Int): Int | {
i <= 1 ? 1 : i * fac2(i - 1)
}
@opaque() | function | fac2 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fac3(i: Int): Int | {
i <= 1 ? 1 : i * (@reveal() fac3(i - 1))
} | function | fac3 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac1_1() | {
var tmp : Int
tmp := fac1(3)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 6
} | method | mFac1_1 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac1"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac1_2() | {
var tmp : Int
tmp := fac1(3)
assert tmp == 3 * fac1(2)
assert tmp == 3 * 2 * fac1(1)
assert tmp == 6
} | method | mFac1_2 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac1"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac2_1() | {
var tmp : Int
tmp := fac2(3)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 6
} | method | mFac2_1 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac2"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac2_2() | {
var tmp : Int
tmp := fac2(3)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 3 * fac2(2)
} | method | mFac2_2 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac2"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac2_3() | {
var tmp : Int
tmp := @reveal() fac2(3)
assert tmp == 3 * @reveal() fac2(2)
assert tmp == 3 * 2 * @reveal() fac2(1)
assert tmp == 6
} | method | mFac2_3 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac2"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac2_4() | {
var tmp : Int
tmp := @reveal() fac2(3)
assert tmp == 3 * fac2(2)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 3 * 2 * fac2(1)
} | method | mFac2_4 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac2"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac3_1() | {
var tmp : Int
tmp := fac3(3)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 6
} | method | mFac3_1 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac3_2() | {
var tmp : Int
tmp := fac3(3)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 3 * fac3(2)
} | method | mFac3_2 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac3_3() | {
var tmp : Int
tmp := @reveal() fac3(3)
assert tmp == 3 * @reveal() fac3(2)
assert tmp == 3 * 2 * @reveal() fac3(1)
assert tmp == 6
} | method | mFac3_3 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac3_4() | {
var tmp : Int
tmp := @reveal() fac3(3)
assert tmp == 3 * fac3(2)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 3 * 2 * fac3(1)
} | method | mFac3_4 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFac3_5() | {
var tmp : Int
tmp := @reveal() fac3(3)
//:: ExpectedOutput(assert.failed:assertion.false)
assert tmp == 6
} | method | mFac3_5 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"fac3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
P(x: Ref) | {
acc(x.f)
}
@opaque() | predicate | P | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
funP(x: Ref): Int
requires P(x) | {
unfolding P(x) in x.f
} | function | funP | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
funP2(x: Ref): Int
requires P(x) | {
unfolding P(x) in x.f
} | function | funP2 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFold(r: Ref)
requires acc(r.f) | {
var tmp: Int
tmp := r.f
fold P(r)
//:: ExpectedOutput(assert.failed:assertion.false)
assert funP(r) == tmp
} | method | mFold | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"funP"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFold2(r: Ref)
requires acc(r.f) | {
var tmp: Int
tmp := r.f
fold P(r)
assert @reveal() funP(r) == tmp
} | method | mFold2 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"funP"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
mFold3(r: Ref)
requires acc(r.f) | {
var tmp: Int
tmp := r.f
fold P(r)
assert funP2(r) == tmp
} | method | mFold3 | test.resources.all.annotation | src/test/resources/all/annotation/opaque.vpr | [] | [
"funP2"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fplusone(x: Ref, y: Ref): Int
requires acc(x.f) | {
asserting (x != null) in (x.f + 1)
} | function | fplusone | test.resources.all.asserting | src/test/resources/all/asserting/function.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fplusone2(x: Ref, y: Ref): Int
requires acc(x.f) | {
asserting (x != y) in (x.f + 1)
} | function | fplusone2 | test.resources.all.asserting | src/test/resources/all/asserting/function.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
main() | {
var x: Ref
x := new(f)
var hmm: Int
hmm := fplusone(x, x)
hmm := asserting (hmm == x.f + 1) in hmm
} | method | main | test.resources.all.asserting | src/test/resources/all/asserting/function.vpr | [] | [
"fplusone"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
main2() | {
var x: Ref
x := new(f)
var hmm: Int
hmm := fplusone(x, x)
//:: ExpectedOutput(assignment.failed:assertion.false)
hmm := asserting (hmm == x.f) in hmm
} | method | main2 | test.resources.all.asserting | src/test/resources/all/asserting/function.vpr | [] | [
"fplusone"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
x: Int | field | x | test.resources.all.asserting | src/test/resources/all/asserting/other-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test1() | {
//:: ExpectedOutput(assert.failed:division.by.zero)
assert asserting (1 / 0 == 0) in true
} | method | test1 | test.resources.all.asserting | src/test/resources/all/asserting/other-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test2() | {
//:: ExpectedOutput(assert.failed:division.by.zero)
assert asserting (true) in (1 / 0 == 0)
} | method | test2 | test.resources.all.asserting | src/test/resources/all/asserting/other-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test3(r: Ref) | {
//:: ExpectedOutput(assert.failed:insufficient.permission)
assert asserting (true && acc(r.x)) in true
} | method | test3 | test.resources.all.asserting | src/test/resources/all/asserting/other-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
m1(s: Set[Ref])
requires |s| > 0 | {
inhale forall x: Ref :: x in (asserting(|s| > 0) in s) ==> acc(x.f)
} | method | m1 | test.resources.all.asserting | src/test/resources/all/asserting/qp.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
m1Fail(s: Set[Ref]) | {
//:: ExpectedOutput(inhale.failed:assertion.false)
inhale forall x: Ref :: x in (asserting(|s| > 0) in s) ==> acc(x.f)
} | method | m1Fail | test.resources.all.asserting | src/test/resources/all/asserting/qp.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
m2(s: Set[Ref])
requires |s| > 0
requires !(null in s) | {
inhale forall x: Ref :: x in s ==> acc((asserting (x != null) in x).f)
} | method | m2 | test.resources.all.asserting | src/test/resources/all/asserting/qp.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
m2Fail(s: Set[Ref])
requires |s| > 0 | {
//:: ExpectedOutput(inhale.failed:assertion.false)
inhale forall x: Ref :: x in s ==> acc((asserting (x != null) in x).f)
} | method | m2Fail | test.resources.all.asserting | src/test/resources/all/asserting/qp.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
m3(s: Set[Ref])
requires |s| > 0
requires !(null in s) | {
inhale forall x: Ref :: x in s ==> acc(x.f, asserting (x != null) in write)
} | method | m3 | test.resources.all.asserting | src/test/resources/all/asserting/qp.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
m3Fail(s: Set[Ref])
requires |s| > 0 | {
//:: ExpectedOutput(inhale.failed:assertion.false)
inhale forall x: Ref :: x in s ==> acc(x.f, asserting (x != null) in write)
} | method | m3Fail | test.resources.all.asserting | src/test/resources/all/asserting/qp.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
assign() | {
//:: ExpectedOutput(assignment.failed:assertion.false)
var x: Int := asserting (false) in 0
} | method | assign | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
assign2(i: Int) | {
//:: ExpectedOutput(assignment.failed:assertion.false)
var x: Int := asserting (i > 0) in 0
} | method | assign2 | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
assign3(i: Int)
requires i > 5 | {
var x: Int := asserting (i > 0) in 0
} | method | assign3 | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
pres()
//:: ExpectedOutput(not.wellformed:assertion.false)
requires asserting (false) in false | {
assert false
} | method | pres | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
pres2(x: Ref)
//:: ExpectedOutput(not.wellformed:insufficient.permission)
requires asserting (acc(x.f)) in false | {
assert false
} | method | pres2 | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
pres3(x: Ref)
requires acc(x.f)
requires asserting (acc(x.f)) in false | {
assert false
} | method | pres3 | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun(): Int | {
asserting (false) in 0
} | function | fun | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun2(x: Ref): Int | {
asserting (acc(x.f) && x.f > 0) in 0
} | function | fun2 | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun3(x: Ref): Int
requires acc(x.f) | {
asserting (acc(x.f) && x.f > 0) in 0
} | function | fun3 | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun4(x: Ref): Int
requires acc(x.f) && x.f > 8 | {
asserting (acc(x.f) && x.f > 0) in 0
} | function | fun4 | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
stateUnchanged(x: Ref)
requires acc(x.f) | {
var y: Int := asserting (acc(x.f)) in x.f
assert acc(x.f)
} | method | stateUnchanged | test.resources.all.asserting | src/test/resources/all/asserting/simple-fail.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
trigger(i: Int): Bool | {
true
} | function | trigger | test.resources.all.asserting | src/test/resources/all/asserting/trigger.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
triggerUse(s: Seq[Int])
requires |s| > 0
requires forall i: Int :: {trigger(i)} 0 <= i < |s| ==> s[i] > 0 | {
assert asserting (trigger(0)) in s[0] > 0
} | method | triggerUse | test.resources.all.asserting | src/test/resources/all/asserting/trigger.vpr | [] | [
"trigger"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
triggerUse2(s: Seq[Int])
requires |s| > 0
requires forall i: Int :: {trigger(i)} 0 <= i < |s| ==> s[i] > 0 | {
//:: ExpectedOutput(assert.failed:assertion.false)
assert s[0] > 0
} | method | triggerUse2 | test.resources.all.asserting | src/test/resources/all/asserting/trigger.vpr | [] | [
"trigger"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
g: Int | field | g | test.resources.all.asserting | src/test/resources/all/asserting/wand.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test0(x: Ref) | {
package acc(x.f) && (asserting (acc(x.f)) in (x.f == 0)) --* acc(x.f) {}
} | method | test0 | test.resources.all.asserting | src/test/resources/all/asserting/wand.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test1(x: Ref) | {
//:: ExpectedOutput(package.failed:insufficient.permission)
package acc(x.f) && (asserting (acc(x.g)) in (x.f == 0)) --* acc(x.f) {}
} | method | test1 | test.resources.all.asserting | src/test/resources/all/asserting/wand.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f: Ref | field | f | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
fun01(x: Ref): Int
ensures 0 < result | function | fun01 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test01(x: Ref) | {
assert fun01(x) >= 0
//:: ExpectedOutput(assert.failed:assertion.false)
assert fun01(x) == 0
} | method | test01 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"fun01"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test02(x: Ref, y: Ref) | {
var r: Int := fun01(x)
assert fun01(x) == r
//:: ExpectedOutput(assert.failed:assertion.false)
assert fun01(x) == fun01(y)
} | method | test02 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"fun01"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun02(x: Ref): Bool
requires acc(x.f)
ensures x == x.f ==> result | function | fun02 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test03(x: Ref, y: Ref) | {
inhale acc(x.f)
inhale x == x.f
assert fun02(x)
x.f := y
//:: ExpectedOutput(assert.failed:assertion.false)
assert fun02(x)
} | method | test03 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"fun02"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun03(x: Ref): Bool
requires acc(x.f)
ensures x == x.f ==> !result | { !fun02(x) } | function | fun03 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"fun02"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test04(x: Ref, y: Ref) | {
inhale acc(x.f)
inhale x == x.f
assert !fun03(x)
assert fun03(x) == !fun02(x)
x.f := y
//:: ExpectedOutput(assert.failed:assertion.false)
assert !fun03(x)
} | method | test04 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"fun02",
"fun03"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
file(id: Int) | predicate | file | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"id"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
file_open(id: Int)
ensures acc(file(id)) | { assume false} | method | file_open | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"file",
"id"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
file_close(id: Int)
requires acc(file(id)) | {} | method | file_close | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"file",
"id"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
client(id: Int) | {
file_open(id)
file_close(id)
//:: ExpectedOutput(call.precondition:insufficient.permission)
file_close(id)
} | method | client | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds.vpr | [] | [
"file_close",
"file_open",
"id"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
foo() | predicate | foo | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds_consistency.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
fun(): Bool | { true } | function | fun | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds_consistency.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test01() | {
//:: ExpectedOutput(typechecker.error)
fold acc(foo())
//:: ExpectedOutput(typechecker.error)
unfold acc(foo())
} | method | test01 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds_consistency.vpr | [] | [
"foo"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test02() | {
//:: ExpectedOutput(typechecker.error)
assert unfolding acc(foo()) in true
} | method | test02 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds_consistency.vpr | [] | [
"foo"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun01(): Bool
requires acc(foo()) | {
//:: ExpectedOutput(typechecker.error)
unfolding acc(foo()) in true
} | function | fun01 | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds_consistency.vpr | [] | [
"foo"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
bar() | {
acc(foo())
//:: ExpectedOutput(typechecker.error)
&& unfolding acc(foo()) in true
} | predicate | bar | test.resources.all.basic | src/test/resources/all/basic/abstract_funcs_and_preds_consistency.vpr | [] | [
"foo"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1() returns () | {
assert (1 == (1 * 1))
assert (2 == (1 + 1))
assert (1 == (3 % 2))
assert (-1 == (0 - 1))
assert (1 == 1)
assert (0 == (1 \ 2))
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t2() | {
var i: Int
i := 1 \ 2
//:: ExpectedOutput(assignment.failed:division.by.zero)
i := 1 \ 0
} | method | t2 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t3() | {
var i: Int
i := 1 % 2
//:: ExpectedOutput(assignment.failed:division.by.zero)
i := 1 % 0
} | method | t3 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t4() | {
var i: Perm
i := 1 / 2
//:: ExpectedOutput(assignment.failed:division.by.zero)
i := 1 / 0
} | method | t4 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t5() | {
assert 2/3 == 0 // 2/3 is interpreted as integer division
//:: ExpectedOutput(assert.failed:assertion.false)
assert 2/3 == none
} | method | t5 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t6() | {
assert 2/3 == 3/4 + 0 // / is interpreted as integer division
assert 2\3 == 3/4 // / is interpreted as integer division
//:: ExpectedOutput(assert.failed:assertion.false)
assert 2/3 == 3/4 // / is interpreted as Perm-typed division
} | method | t6 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t7(p: Perm) | {
var r1 : Perm
var r2: Perm
var one: Perm
one := (1/1)
r1 := p / one
r2 := p / (2/1)
assert r1 == p
assert (2/1) * r2 == p
//:: ExpectedOutput(assert.failed:assertion.false)
assert r2 == p
} | method | t7 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [
"one"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t8(p: Perm) | {
var r1 : Perm
//:: ExpectedOutput(assignment.failed:division.by.zero)
r1 := (1/2) / p
} | method | t8 | test.resources.all.basic | src/test/resources/all/basic/arithmetic.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test: Bool | field | test | test.resources.all.basic | src/test/resources/all/basic/assert.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
t1(b: Bool, d: Int, r: Ref) returns ()
requires b && acc(r.test, write) | {
r.test := b
assert b == (r.test)
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/assert.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
myBV interpretation (SMTLIB: "(_ BitVec 32)", Boogie: "bv32") | {
function toBV32(i: Int): myBV interpretation "(_ int2bv 32)"
} | domain | myBV | test.resources.all.basic | src/test/resources/all/basic/backend_types.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
myFloat interpretation (Boogie: "float24e8", SMTLIB: "(_ FloatingPoint 8 24)") | {
function tofp(bv: myBV): myFloat interpretation "(_ to_fp 8 24)"
function fp_eq(myFloat, myFloat): Bool interpretation "fp.eq"
function fp_min(f1: myFloat, f2: myFloat): myFloat interpretation "fp.min"
function fp_max(f1: myFloat, f2: myFloat): myFloat interpretation "fp.max"
function add(d1: myFloat, f2: ... | domain | myFloat | test.resources.all.basic | src/test/resources/all/basic/backend_types.vpr | [] | [
"add",
"f1",
"f2",
"myBV"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
ff: myFloat | field | ff | test.resources.all.basic | src/test/resources/all/basic/backend_types.vpr | [] | [
"myFloat"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test() | {
var tmp: myBV
tmp := toBV32(1081081856)
var r: Ref
r := new(ff)
r.ff := tofp(toBV32(1103888384))
var fs : Seq[myFloat]
fs := Seq(tofp(toBV32(1081081856)))
assert fp_eq(fp_min(tofp(tmp), r.ff), fs[0]) &&
fp_eq(fp_max(tofp(toBV32(1081081856)), tofp(toBV32(1103888384))), tofp(toBV32(1103888384)))
... | method | test | test.resources.all.basic | src/test/resources/all/basic/backend_types.vpr | [] | [
"ff",
"myBV",
"myFloat"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
testOp() | {
var first: myFloat
var second: myFloat
var res: myFloat
var zero: myFloat
first := tofp(toBV32(1081081856))
second := tofp(toBV32(1103888384))
res := tofp(toBV32(1105854464))
zero := tofp(toBV32(0))
var addition: myFloat
addition := add(first, second)
var result_addition:... | method | testOp | test.resources.all.basic | src/test/resources/all/basic/backend_types.vpr | [] | [
"add",
"first",
"myFloat",
"res"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
myBV interpretation (FantasyBackend: "(_ BitVec 32)", DoesntExist: "bv32") | {
function toBV32(i: Int): myBV interpretation "(_ int2bv 32)"
} | domain | myBV | test.resources.all.basic | src/test/resources/all/basic/backend_types_consistency.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chain(i1: Int, i2: Int, i3: Int, i4: Int)
requires i1 < i2 <= i3 > i4 | {
assert i1 < i2
assert i2 <= i3
assert i3 > i4
//:: ExpectedOutput(assert.failed:assertion.false)
assert i2 < i3
} | method | chain | test.resources.all.basic | src/test/resources/all/basic/comparisons.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chain1In(s1: Seq[Int], s2: Seq[Seq[Int]], s3: Seq[Seq[Seq[Int]]], s4: Set[Seq[Seq[Seq[Int]]]])
requires s1 in s2 in s3 in s4 | {
assert s1 in s2
assert s3 in s4
assert s2 in s3
//:: ExpectedOutput(assert.failed:assertion.false)
assert 3 in s1
} | method | chain1In | test.resources.all.basic | src/test/resources/all/basic/comparisons.vpr | [] | [
"s1",
"s2",
"s3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chainEq(i1: Int, i2: Int, i3: Int, i4: Int)
requires i1 < i2 == i3 > i4 | {
//:: ExpectedOutput(assert.failed:assertion.false)
assert i1 < i2
} | method | chainEq | test.resources.all.basic | src/test/resources/all/basic/comparisons.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
nonChain(i1: Int, i2: Int, i3: Int, i4: Int)
requires i1 < i2 && i3 > i4 | {
assert i1 < i2
assert i3 > i4
//:: ExpectedOutput(assert.failed:assertion.false)
assert i2 <= i3
} | method | nonChain | test.resources.all.basic | src/test/resources/all/basic/comparisons.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chainParen(i1: Int, i2: Multiset[Int], i3: Int, i4: Int)
requires (i1 in i2) <= i3 > i4 | {
assert i3 > i4
assume (i1 in i2) == 3
assert 3 <= i3
} | method | chainParen | test.resources.all.basic | src/test/resources/all/basic/comparisons.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chainParen2(i1: Int, i2: Int, i3: Int, i4: Multiset[Int])
requires i1 < i2 <= (i3 in i4) | {
assert i1 < i2
assume (i3 in i4) == 3
assert i2 <= 3
} | method | chainParen2 | test.resources.all.basic | src/test/resources/all/basic/comparisons.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chain(i1: Int, i2: Ref, i3: Int, i4: Int)
//:: ExpectedOutput(typechecker.error)
requires i1 < i2 <= i3 > i4 | {
} | method | chain | test.resources.all.basic | src/test/resources/all/basic/comparisons_fail.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chain1In(s1: Seq[Int], s2: Seq[Seq[Int]], s3: Seq[Seq[Seq[Ref]]], s4: Set[Seq[Seq[Seq[Int]]]])
//:: ExpectedOutput(typechecker.error)
requires s1 in s2 in s3 in s4 | {
} | method | chain1In | test.resources.all.basic | src/test/resources/all/basic/comparisons_fail.vpr | [] | [
"s1",
"s2",
"s3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chainParen(i1: Int, i2: Int, i3: Int, i4: Int)
//:: ExpectedOutput(typechecker.error)
requires (i1 < i2) <= i3 > i4 | {
} | method | chainParen | test.resources.all.basic | src/test/resources/all/basic/comparisons_fail.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
chainParen2(i1: Int, i2: Int, i3: Int, i4: Int)
//:: ExpectedOutput(typechecker.error)
requires i1 < i2 <= (i3 > i4) | {
} | method | chainParen2 | test.resources.all.basic | src/test/resources/all/basic/comparisons_fail.vpr | [] | [
"i1",
"i2",
"i3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
next: Ref | field | next | test.resources.all.basic | src/test/resources/all/basic/consistency1.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
deeper(r:Ref) | {
acc(r.f)
&& acc(r.next)
//:: ExpectedOutput(consistency.error)
&& ((r.next != null) ==> acc(deeper(r.next)) && (unfolding deeper(r.next) in (acc(r.next.f) && acc(r.next.next))))
} | predicate | deeper | test.resources.all.basic | src/test/resources/all/basic/consistency1.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
strange(r:Ref) | {
acc(r.f)
&& acc(r.next)
//:: ExpectedOutput(consistency.error)
&& ((r.next != null) ==> acc(strange(r)) && (unfolding deeper(r) in (acc(r.next.f) && acc(r.next.next))))
} | predicate | strange | test.resources.all.basic | src/test/resources/all/basic/consistency1.vpr | [] | [
"deeper"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
val: Int | field | val | test.resources.all.basic | src/test/resources/all/basic/disjunction_fast_20.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.