Skip to content

Commit 5c73511

Browse files
Update test oracles
1 parent 8a64435 commit 5c73511

7 files changed

Lines changed: 52 additions & 11 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[kernel] Parsing even-bad-2.c (with preprocessing)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[kernel] Parsing even-bad-3.c (with preprocessing)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# frama-c -wp -wp-rte [...]
2+
[kernel] Parsing other-bad.c (with preprocessing)
3+
[wp] Running WP plugin...
4+
[rte:annot] annotating function foo
5+
[wp] [Valid] Goal foo_exits (Cfg) (Unreachable)
6+
[wp] [Valid] Goal foo_terminates (Cfg) (Trivial)
7+
[wp] 1 goal scheduled
8+
[wp] User Error: After simplification inductive P appear ill-formed (hint: check cases premises)
9+
[wp] Warning: Goal Property: running prover Alt-Ergo:2.6.1 failed ([User Error])
10+
[wp] [Failure] typed_foo_ensures (Alt-Ergo) (No Cache)
11+
[wp] Proved goals: 2 / 3
12+
Terminating: 1
13+
Unreachable: 1
14+
Failed: 1
15+
[wp:pedantic-assigns] other-bad.c:8: Warning:
16+
No 'assigns' specification for function 'foo'.
17+
Callers assumptions might be imprecise.

code/function-contract/contract/oracle/abs-4.0.res.oracle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
[wp] [Valid] Goal abs_exits (Cfg) (Unreachable)
66
[wp] [Valid] Goal abs_terminates (Cfg) (Trivial)
77
[wp] 3 goals scheduled
8+
[wp] [Valid] typed_abs_ensures_positive_value_function_result (Qed)
89
[wp] [Valid] typed_abs_ensures (Qed)
9-
[wp] [Valid] typed_abs_ensures_2 (Qed)
1010
[wp] [Valid] typed_abs_assert_rte_signed_overflow (Qed)
1111
[wp] Proved goals: 5 / 5
1212
Terminating: 1

code/function-contract/contract/oracle/abs-5.0.res.oracle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
[wp] [Valid] Goal abs_exits (Cfg) (Unreachable)
77
[wp] [Valid] Goal abs_terminates (Cfg) (Trivial)
88
[wp] 9 goals scheduled
9+
[wp] [Valid] typed_abs_ensures_positive_value_function_result (Qed)
910
[wp] [Valid] typed_abs_ensures (Qed)
10-
[wp] [Valid] typed_abs_ensures_2 (Qed)
1111
[wp] [Valid] typed_abs_assert_rte_signed_overflow (Qed)
1212
[wp] [Valid] typed_foo_terminates (Qed)
1313
[wp] [Valid] typed_foo_exits (Qed)

code/statements/loops/oracle/check-admit-invariant.0.res.oracle

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,27 @@ Prover Qed returns Valid
3333
Goal Preservation of Invariant 'C3' (file check-admit-invariant.c, line 10):
3434
Assume {
3535
Type: is_sint32(x) /\ is_sint32(x_1) /\ is_sint32(x_2) /\ is_sint32(y) /\
36-
is_sint32(y_1).
36+
is_sint32(y_1) /\ is_sint32(y_2).
3737
(* Initializer *)
3838
Init: (Init_x_0=true).
3939
(* Initializer *)
4040
Init: x_2 = 0.
4141
(* Initializer *)
42-
Init: y_1 = 0.
42+
Init: (Init_y_0=true).
43+
(* Initializer *)
44+
Init: y_2 = 0.
4345
(* Invariant 'I1' *)
4446
Have: 0 <= x_2.
4547
(* Invariant 'A2' *)
4648
Have: x_2 <= 10.
4749
(* Invariant 'C3' *)
48-
Have: y_1 <= 20.
50+
Have: y_2 <= 20.
4951
(* Invariant 'I4' *)
50-
Have: (2 * x_2) = y_1.
52+
Have: (2 * x_2) = y_2.
5153
(* Loop assigns ... *)
52-
Have: ((Init_x_0=true) -> (Init_x_1=true)).
54+
Have: ((Init_x_1=true) <-> (Init_x_0=true)) /\
55+
(((Init_x_1=true) -> (Init_x_2=true))) /\
56+
(((Init_y_0=true) -> (Init_y_1=true))).
5357
(* Invariant 'I1' *)
5458
Have: 0 <= x_1.
5559
(* Invariant 'A2' *)
@@ -92,21 +96,25 @@ Prover Qed returns Valid
9296
Goal Preservation of Invariant 'I4' (file check-admit-invariant.c, line 11):
9397
Assume {
9498
Type: is_sint32(x) /\ is_sint32(x_1) /\ is_sint32(x_2) /\ is_sint32(y) /\
95-
is_sint32(y_1).
99+
is_sint32(y_1) /\ is_sint32(y_2).
96100
(* Initializer *)
97101
Init: (Init_x_0=true).
98102
(* Initializer *)
99103
Init: x_2 = 0.
100104
(* Initializer *)
101-
Init: y_1 = 0.
105+
Init: (Init_y_0=true).
106+
(* Initializer *)
107+
Init: y_2 = 0.
102108
(* Invariant 'I1' *)
103109
Have: 0 <= x_2.
104110
(* Invariant 'A2' *)
105111
Have: x_2 <= 10.
106112
(* Invariant 'I4' *)
107-
Have: (2 * x_2) = y_1.
113+
Have: (2 * x_2) = y_2.
108114
(* Loop assigns ... *)
109-
Have: ((Init_x_0=true) -> (Init_x_1=true)).
115+
Have: ((Init_x_1=true) <-> (Init_x_0=true)) /\
116+
(((Init_x_1=true) -> (Init_x_2=true))) /\
117+
(((Init_y_0=true) -> (Init_y_1=true))).
110118
(* Invariant 'I1' *)
111119
Have: 0 <= x_1.
112120
(* Invariant 'A2' *)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frama-c -wp -wp-rte [...]
2+
[kernel] Parsing unreachable.c (with preprocessing)
3+
[wp] Running WP plugin...
4+
[rte:annot] annotating function bar
5+
[wp] [Valid] Goal bar_assert (Cfg) (Unreachable)
6+
[wp] [Valid] Goal bar_exits (Cfg) (Unreachable)
7+
[wp] [Valid] Goal bar_terminates (Cfg) (Trivial)
8+
[wp] Warning: No goal generated
9+
[wp] Proved goals: 3 / 3
10+
Terminating: 1
11+
Unreachable: 2
12+
[wp:pedantic-assigns] unreachable.c:1: Warning:
13+
No 'assigns' specification for function 'bar'.
14+
Callers assumptions might be imprecise.

0 commit comments

Comments
 (0)