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 |
|---|---|---|---|---|---|---|---|---|---|---|
Slow(this: Ref) | {
acc(this.val) &&
(this.val == 0 || (this.val == 1 || (this.val == 2 || (this.val == 3 || (this.val == 4 || (this.val == 5 || (this.val == 6 || (this.val == 7 || (this.val == 8 || (this.val == 9 || (this.val == 10 || (this.val == 11 || (this.val == 12 || (this.val == 13 || (this.val == 14 || (this.val == ... | predicate | Slow | test.resources.all.basic | src/test/resources/all/basic/disjunction_fast_20.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
havoc() returns (res:Int) | method | havoc | test.resources.all.basic | src/test/resources/all/basic/disjunction_fast_20.vpr | [] | [
"res"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test(this: Ref)
requires Slow(this)
ensures Slow(this) | {
unfold Slow(this)
var tmp: Int
tmp := havoc()
this.val := tmp
fold Slow(this)
unfold Slow(this)
tmp := havoc()
this.val := tmp
fold Slow(this)
unfold Slow(this)
tmp := havoc()
this.val := tmp
fold Slow(this)
unfold Slow(this)
tmp := havoc()
this.val := t... | method | test | test.resources.all.basic | src/test/resources/all/basic/disjunction_fast_20.vpr | [] | [
"Slow",
"havoc"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
Slow(this: Ref) | {
acc(this.val) &&
((((((((((((((((((((this.val == 0 || this.val == 1) || this.val == 2) || this.val == 3) || this.val == 4) || this.val == 5) || this.val == 6) || this.val == 7) || this.val == 8) || this.val == 9) || this.val == 10) || this.val == 11) || this.val == 12) || this.val == 13) || this.val == 1... | predicate | Slow | test.resources.all.basic | src/test/resources/all/basic/disjunction_slow_20.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1(a: Int) returns (b: Int)
requires a > 0
ensures b == 2 || b == 3 || b == 4 || b == 5 | {
if (a == 1) {
b := 2
} elseif (a == 2) {
b := 3
} elseif (a == 3) {
b := 4
} elseif (a == 4) {
b := 2
} else {
b := 5
}
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/elsif.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
valid(r: Ref) | {
acc(r.f, write) && ((r.f) == 0)
} | predicate | valid | test.resources.all.basic | src/test/resources/all/basic/fold.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1(r: Ref) returns ()
requires acc(r.f, write) | {
r.f := 0
fold acc(valid(r), write)
unfold acc(valid(r), write)
//:: ExpectedOutput(assert.failed:assertion.false)
assert false
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/fold.vpr | [] | [
"valid"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t2(r: Ref) returns ()
requires acc(r.f, write) | {
r.f := 1
//:: ExpectedOutput(fold.failed:assertion.false)
fold acc(valid(r), write)
} | method | t2 | test.resources.all.basic | src/test/resources/all/basic/fold.vpr | [] | [
"valid"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t3(r: Ref) returns ()
requires acc(r.f, write) | {
r.f := 1
//:: ExpectedOutput(unfold.failed:insufficient.permission)
unfold acc(valid(r), write)
} | method | t3 | test.resources.all.basic | src/test/resources/all/basic/fold.vpr | [] | [
"valid"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f1(): Int | { 1 } | function | f1 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f2(): Int
requires f1() > 0 | { 2 } | function | f2 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [
"f1"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f3(i: Int): Int | { i } | function | f3 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f4(): Int | { f1() + f2() } | function | f4 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [
"f1",
"f2"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f5(i: Int, b: Bool): Int | { b ? f5(2*i, false) : i } | function | f5 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f6(): Int | { f7() } | function | f6 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [
"f7"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f7(): Int | { f6() } | function | f7 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [
"f6"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f8(): Int | { f3(f1()) } | function | f8 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [
"f1",
"f3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1(b: Bool, d: Int, r: Ref) returns () | {
assert f1() == 1;
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/func.vpr | [] | [
"f1"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f1(r: Ref): Int
requires acc(r.f, wildcard) | { r.f } | function | f1 | test.resources.all.basic | src/test/resources/all/basic/func2.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f3_a(r: Ref): Int
//:: ExpectedOutput(not.wellformed:insufficient.permission)
requires ((r.f) == 2) | { 2 } | function | f3_a | test.resources.all.basic | src/test/resources/all/basic/func2.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f3_b(r: Ref): Int
requires r != null
//:: ExpectedOutput(not.wellformed:insufficient.permission)
requires ((r.f) == 2) | { 2 } | function | f3_b | test.resources.all.basic | src/test/resources/all/basic/func2.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f4(r: Ref): Int
requires acc(r.f, write)
requires (r.f) == 2 | { 2 } | function | f4 | test.resources.all.basic | src/test/resources/all/basic/func2.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f5(r: Ref): Int
requires r != null | { r.f } | function | f5 | test.resources.all.basic | src/test/resources/all/basic/func2.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f6(r: Ref): Int
requires r != null | {
//:: ExpectedOutput(application.precondition:insufficient.permission)
f4(r)
} | function | f6 | test.resources.all.basic | src/test/resources/all/basic/func2.vpr | [] | [
"f4"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1(r: Ref)
requires acc(r.f, write) | {
r.f := 1
assert f1(r) == 1;
//:: ExpectedOutput(application.precondition:assertion.false)
//:: UnexpectedOutput(assert.failed:assertion.false, /Carbon/issue/173/)
assert f4(r) > 0;
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/func2.vpr | [] | [
"f1",
"f4"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fr: Ref | field | fr | test.resources.all.basic | src/test/resources/all/basic/func3.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
f1(r: Ref): Int
requires acc(r.f, wildcard)
ensures result == (r.f) | {
r.f
} | function | f1 | test.resources.all.basic | src/test/resources/all/basic/func3.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f2(r: Ref): Int
requires acc(r.f, wildcard)
//:: ExpectedOutput(postcondition.violated:assertion.false)
ensures result == 2 | {
r.f
} | function | f2 | test.resources.all.basic | src/test/resources/all/basic/func3.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f3(r: Ref): Int
requires acc(r.f, wildcard)
requires (r.f) == 2
ensures result == 2 | {
r.f
} | function | f3 | test.resources.all.basic | src/test/resources/all/basic/func3.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
f4(r: Ref): Ref
requires acc(r.fr, wildcard) | { r.fr } | function | f4 | test.resources.all.basic | src/test/resources/all/basic/func3.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1(r: Ref)
requires acc(r.f, write) | {
r.f := 2
assert f3(r) == 2
//:: ExpectedOutput(assert.failed:assertion.false)
assert f3(r) == 1
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/func3.vpr | [] | [
"f3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t3(r: Ref)
requires acc(r.fr, wildcard) | {
var y: Ref := f4(r)
var x: Ref
x := new()
assert x != y
} | method | t3 | test.resources.all.basic | src/test/resources/all/basic/func3.vpr | [] | [
"f4"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
itemat(node: Ref, i: Int): Int
requires acc(valid(node), wildcard) && i >= 0 | {
unfolding acc(valid(node), wildcard) in ((i == 0 || node.next == null) ? node.value : itemat(node.next, i-1))
} | function | itemat | test.resources.all.basic | src/test/resources/all/basic/funcpred.vpr | [] | [
"node",
"valid"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
valid(this: Ref) | {
acc(this.next, write) &&
acc(this.value, write) &&
((this.next != null) ==> acc(valid(this.next), write))
} | predicate | valid | test.resources.all.basic | src/test/resources/all/basic/funcpred.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
a(this: Ref)
requires acc(valid(this), write) && acc(this.f, write)
ensures acc(valid(this), write) | {
unfold acc(valid(this), write)
this.value := 1
fold acc(valid(this), write)
void(this)
assert itemat(this, 0) == 1
} | method | a | test.resources.all.basic | src/test/resources/all/basic/funcpred.vpr | [] | [
"itemat",
"valid",
"void"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
void(this: Ref)
requires acc(this.f, write)
ensures acc(this.f, write) | {} | method | void | test.resources.all.basic | src/test/resources/all/basic/funcpred.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1(n: Int) returns (r: Int)
requires n > 0
//:: ExpectedOutput(postcondition.violated:assertion.false)
ensures r > 0 | {
goto lbl
r := n
label lbl
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/goto.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t0() | {
var c: Ref
c := new(f)
//:: ExpectedOutput(assert.failed:assertion.false)
assert c.f != c // This assertion was expected true in an old version of the test case, but should fail
} | method | t0 | test.resources.all.basic | src/test/resources/all/basic/heap.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1() | {
var a: Ref
var c: Ref
inhale acc(a.f, write)
c := new(f)
//assert c.f != c // This assertion was in an old version of the test case, but should fail
assume a != null
set_f(a, c)
//:: ExpectedOutput(assert.failed:assertion.false)
assert a.f != c
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/heap.vpr | [] | [
"set_f"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
set_f(monitor: Ref, value: Ref)
requires acc(monitor.f, write)
requires monitor != null && value != null
ensures acc(monitor.f, write) | {
monitor.f := value
} | method | set_f | test.resources.all.basic | src/test/resources/all/basic/heap.vpr | [] | [
"value"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t2(r: Ref) | {
if (r != null) {
assert perm(r.f) == none
} else {
assert perm(r.f) == none
/* Still expected to pass - perm(e.f) does not require e != null */
}
} | method | t2 | test.resources.all.basic | src/test/resources/all/basic/heap.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t3(r:Ref) returns (res:Ref)
requires r!=null
requires acc(r.f)
requires r.f!=null
requires acc(r.f.f) | {
res := r.f.f
} | method | t3 | test.resources.all.basic | src/test/resources/all/basic/heap.vpr | [] | [
"res"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1(r: Ref)
requires [acc(r.f, write), true] | {
r.f := 1
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/inex.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t2(r: Ref)
requires [r != null, acc(r.f, write)] | {
//:: ExpectedOutput(assignment.failed:insufficient.permission)
r.f := 1
} | method | t2 | test.resources.all.basic | src/test/resources/all/basic/inex.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t3(r: Ref) | {
t1(r) // ok, even though there are no permissions
} | method | t3 | test.resources.all.basic | src/test/resources/all/basic/inex.vpr | [] | [
"t1"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t4(r: Ref)
requires acc(r.f, write)
requires [[r.f == 2, false], true]
ensures acc(r.f, write)
//:: ExpectedOutput(postcondition.violated:assertion.false)
ensures [[r.f == 2, false], r.f == 3] | {
} | method | t4 | test.resources.all.basic | src/test/resources/all/basic/inex.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test00() | {
assert let y == (0) in y == 0
} | method | test00 | test.resources.all.basic | src/test/resources/all/basic/let.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test01(x: Int) | {
assert let y == (x + x) in y == 2*x
assert 2*x == let y == (x + x) in y
} | method | test01 | test.resources.all.basic | src/test/resources/all/basic/let.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
P(x: Ref) | { acc(x.g) && x.g == 1 } | predicate | P | test.resources.all.basic | src/test/resources/all/basic/let.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun01(x: Ref): Int
requires acc(P(x), wildcard)
ensures result > 0 | { unfolding acc(P(x), wildcard) in x.g } | function | fun01 | test.resources.all.basic | src/test/resources/all/basic/let.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test02(x: Ref) | {
inhale acc(P(x))
assert let y == (fun01(x)) in y*y+y > 0
} | method | test02 | test.resources.all.basic | src/test/resources/all/basic/let.vpr | [] | [
"fun01"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
fun02(x: Ref): Int
requires acc(x.g) | { let y == (x.g) in y + x.g } | function | fun02 | test.resources.all.basic | src/test/resources/all/basic/let.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test03(x: Ref)
requires acc(x.g) | {
assert fun02(x) == 2 * x.g
} | method | test03 | test.resources.all.basic | src/test/resources/all/basic/let.vpr | [] | [
"fun02"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test01() | {
assert let y == (0) in true
//:: ExpectedOutput(typechecker.error)
assert y == 0
} | method | test01 | test.resources.all.basic | src/test/resources/all/basic/let_consistency_resolver.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test02() | {
//:: ExpectedOutput(typechecker.error)
assert (let y == (0) in true) && y == 0
} | method | test02 | test.resources.all.basic | src/test/resources/all/basic/let_consistency_resolver.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test03(y: Int) | {
//:: ExpectedOutput(typechecker.error)
assert let y == (0) in true
} | method | test03 | test.resources.all.basic | src/test/resources/all/basic/let_consistency_resolver.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test03() | {
//:: ExpectedOutput(typechecker.error)
assert let y == (0) in let y == (true) in true
} | method | test03 | test.resources.all.basic | src/test/resources/all/basic/let_consistency_resolver.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test04() | {
//:: ExpectedOutput(typechecker.error)
assert let y == (y + 1) in true
} | method | test04 | test.resources.all.basic | src/test/resources/all/basic/let_consistency_resolver.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test01() | {
//:: ExpectedOutput(typechecker.error)
assert let y == (0) in !y
} | method | test01 | test.resources.all.basic | src/test/resources/all/basic/let_consistency_typechecker.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
val : Int | field | val | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
init: Bool | field | init | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
rel: Int | field | rel | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
acq: Bool | field | acq | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
AcqConjunct(x: Ref, idx: Int) | predicate | AcqConjunct | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [
"idx"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
parallelHeaps | {
function heap(x: Ref) : Int
function is_ghost(x:Ref) : Bool
} | domain | parallelHeaps | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [
"heap"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
reads | {
function rd() : Perm
axiom rdPositive { rd() > none }
} | domain | reads | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
read(data: Ref, count: Ref, ghost: Ref) returns (v: Int)
requires heap(data) == 0 && (heap(count) == 0 && (heap(ghost) == 0 && (is_ghost(ghost) && (acc(data.val, rd()) && (acc(ghost.val, rd()) && (acc(count.acq, wildcard) && count.acq == false && acc(AcqConjunct(count, 0), wildcard) && (acc(count.rel, wildcard) && co... | {
v := data.val
} | method | read | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [
"AcqConjunct",
"count",
"data",
"heap"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
read_erroneous(data: Ref, count: Ref, ghost: Ref) returns (v: Int)
requires heap(data) == 0 && (heap(count) == 0 && (heap(ghost) == 0 && (is_ghost(ghost) && (acc(data.val, rd()) && (acc(ghost.val, rd()) && (acc(count.acq, wildcard) && count.acq == false && acc(AcqConjunct(count, 0), wildcard) && (acc(count.rel, wildc... | {
v := data.val
} | method | read_erroneous | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [
"AcqConjunct",
"count",
"data",
"heap"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
read2(data: Ref, count: Ref, ghost: Ref) returns (v: Int)
requires
heap(data) == 0 &&
heap(count) == 0 &&
heap(ghost) == 0 &&
is_ghost(ghost) &&
acc(data.val, rd()) &&
acc(ghost.val, rd()) &&
acc(count.acq, wildcard) &&
count.acq == false &&
acc(AcqConjunct(count, 0), wildcard) &&
... | {
v := data.val
} | method | read2 | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [
"AcqConjunct",
"count",
"data",
"heap"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
read2_erroneous(data: Ref, count: Ref, ghost: Ref) returns (v: Int)
requires
heap(data) == 0 &&
heap(count) == 0 &&
heap(ghost) == 0 &&
is_ghost(ghost) &&
acc(data.val, rd()) &&
acc(ghost.val, rd()) &&
acc(count.acq, wildcard) &&
count.acq == false &&
acc(AcqConjunct(count, 0), wil... | {
v := data.val
} | method | read2_erroneous | test.resources.all.basic | src/test/resources/all/basic/many_conjuncts.vpr | [] | [
"AcqConjunct",
"count",
"data",
"heap"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t1() | {
var n: Int
//:: ExpectedOutput(call.precondition:assertion.false)
n := t3(-1)
} | method | t1 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [
"t3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t2() | {
var n: Int := -10
n := t3(1)
assert n > 0
//:: ExpectedOutput(assert.failed:assertion.false)
assert false
} | method | t2 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [
"t3"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t3(n: Int) returns (r: Int)
requires n > 0
ensures r > 0 | {
r := n
} | method | t3 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t4() | {
var a: Ref
var b: Ref
var c: Ref
a, b := t4b()
c := new()
assert a != c
//:: ExpectedOutput(assert.failed:assertion.false)
assert a != b
} | method | t4 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [
"t4b"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t4c() | {
var a: Ref
var b: Ref
var c: Ref
c := new()
a, b := t4b()
//:: ExpectedOutput(assert.failed:assertion.false)
assert a != c
} | method | t4c | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [
"t4b"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t4b() returns (a: Ref, b: Ref) | {
} | method | t4b | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t5_a(r: Ref)
//:: ExpectedOutput(not.wellformed:insufficient.permission)
requires r.f == 2
{
}
method t5_b(r: Ref)
requires r != null
//:: ExpectedOutput(not.wellformed:insufficient.permission)
requires r.f == 2 | {
} | method | t5_a | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t6_a(r: Ref)
//:: ExpectedOutput(not.wellformed:insufficient.permission)
ensures r.f == 2 | {
assume false
} | method | t6_a | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t6_b(r: Ref)
ensures r != null
//:: ExpectedOutput(not.wellformed:insufficient.permission)
ensures r.f == 2 | {
assume false
} | method | t6_b | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t7(r: Ref)
requires acc(r.f, write) | {
r.f := 2
exhale acc(r.f, wildcard)
assert (r.f) == 2
} | method | t7 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t8(r: Ref)
requires acc(r.f, write)
ensures acc(r.f, write) | {
r.f := 2
exhale acc(r.f, write)
inhale acc(r.f, write)
//:: ExpectedOutput(assert.failed:assertion.false)
assert (r.f) == 2
} | method | t8 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t9(r: Ref)
requires acc(r.f, write)
ensures acc(r.f, write) | {
r.f := 2
t8(r)
//:: ExpectedOutput(assert.failed:assertion.false)
assert (r.f) == 2
} | method | t9 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [
"t8"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t10(r: Ref, o: Ref)
requires acc(r.f, write) && acc(o.f, write)
ensures acc(r.f, write) && acc(o.f, write) | {
r.f := 2
o.f := 2
assert o != r
t9(o)
assert (r.f) == 2
//:: ExpectedOutput(assert.failed:assertion.false)
assert (o.f) == 2
} | method | t10 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [
"t9"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
t11() returns (r: Ref) | {
var x: Ref
var y: Ref
x := t11()
y := new()
assert x != y
} | method | t11 | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
bodyless() returns (r: Int)
requires true
ensures 0 <= r && r < 10 | method | bodyless | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
testBodyless() | {
var x: Int
x := bodyless()
assert 0 <= x && x < 10
} | method | testBodyless | test.resources.all.basic | src/test/resources/all/basic/methods.vpr | [] | [
"bodyless"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
n: Ref, m: Ref | field | n | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
get_refs() returns (x: Ref, y: Ref)
ensures acc(x.n) | method | get_refs | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test1() | {
var a: Ref, b: Ref
var c: Ref, d: Ref := get_refs()
var e: Ref := new(n)
c.n, e := get_refs()
c.n.n := new(n)
} | method | test1 | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [
"get_refs"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
P(x: Ref) | { acc(x.n) } | predicate | P | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
foo(x: Ref) returns (a: Ref, b: Ref)
requires P(x) | method | foo | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test2(x: Ref)
requires P(x) && acc((unfolding P(x) in x.n).n) && acc((unfolding P(x) in x.n).m) | {
(unfolding P(x) in x.n).n, (unfolding P(x) in x.n).m := foo(x)
} | method | test2 | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [
"foo"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
bar(x: Ref) returns (a: Ref)
ensures acc(x.n) | method | bar | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test3(x: Ref) | {
x.n := bar(x)
} | method | test3 | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [
"bar"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
baz(x: Ref) returns (a: Ref)
requires acc(x.n) | method | baz | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test4(x: Ref)
requires acc(x.n)
{
//:: ExpectedOutput(assignment.failed:insufficient.permission)
x.n := baz(x)
}
define Macro1(x, y, z) {
x.n, y.m := z()
}
define Macro2(z) | {
var c: Ref, d: Ref := z()
} | method | test4 | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [
"baz"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
test5() | {
var a: Ref, b: Ref
inhale acc(a.n) && acc(b.m)
Macro1(a, b, get_refs)
Macro2(get_refs)
} | method | test5 | test.resources.all.basic | src/test/resources/all/basic/multi_initialization.vpr | [] | [
"get_refs"
] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | |
n: Ref | field | n | test.resources.all.basic | src/test/resources/all/basic/multi_initialization_err.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
foo() returns (x: Ref, y: Ref, z: Int) | method | foo | test.resources.all.basic | src/test/resources/all/basic/multi_initialization_err.vpr | [] | [] | https://github.com/viperproject/silver | efc0caa6f46ad79d49f337d8d640460a49cfd757 | ||
test1() | {
//:: ExpectedOutput(typechecker.error)
var a: Int, b: Ref := a
//:: ExpectedOutput(typechecker.error)
var c: Int, d: Int := 10
//:: ExpectedOutput(typechecker.error)
c, d := a
//:: ExpectedOutput(typechecker.error)
var e: Ref, f: Ref, g: Ref := foo()
//:: ExpectedOutput(typechecker.error)
e.n, f.n... | method | test1 | test.resources.all.basic | src/test/resources/all/basic/multi_initialization_err.vpr | [] | [
"foo"
] | 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.