Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
e54e0a67
"src/plugins/e-acsl/tests/gmp/oracle/arith.1.res.oracle" did not exist on "cd0acaf07839dba7d85dddd36abd128e44c23566"
Commit
e54e0a67
authored
8 months ago
by
Cécile Ruet-Cros
Browse files
Options
Downloads
Patches
Plain Diff
[wp] vset add test oracles
parent
011af158
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/wp/share/why3/frama_c_wp/vset.mlw
+10
-10
10 additions, 10 deletions
src/plugins/wp/share/why3/frama_c_wp/vset.mlw
src/plugins/wp/tests/wp_acsl/oracle/vset.res.oracle
+28
-31
28 additions, 31 deletions
src/plugins/wp/tests/wp_acsl/oracle/vset.res.oracle
with
38 additions
and
41 deletions
src/plugins/wp/share/why3/frama_c_wp/vset.mlw
+
10
−
10
View file @
e54e0a67
...
...
@@ -36,7 +36,7 @@ theory Vset
function member_bool 'a (set 'a) : bool
predicate eqset (a : set 'a) (b : set 'a) =
forall x : 'a. (mem
ber
x a) <-> (mem
ber
x b)
forall x : 'a. (mem x a) <-> (mem x b)
function range int int : set int (* [a..b] *)
function range_sup int : set int (* [a..] *)
...
...
@@ -46,19 +46,19 @@ theory Vset
(* -------------------------------------------------------------------------- *)
axiom member_bool : forall x:'a. forall s:set 'a [member_bool x s].
if mem
ber
x s then member_bool x s = True else member_bool x s = False
if mem x s then member_bool x s = True else member_bool x s = False
axiom member_range : forall x:int,a:int,b:int [mem
ber
x (range a b)].
mem
ber
x (range a b) <-> (a <= x /\ x <= b)
axiom member_range : forall x:int,a:int,b:int [mem x (range a b)].
mem x (range a b) <-> (a <= x /\ x <= b)
axiom member_range_sup : forall x:int,a:int [mem
ber
x (range_sup a)].
mem
ber
x (range_sup a) <-> (a <= x)
axiom member_range_sup : forall x:int,a:int [mem x (range_sup a)].
mem x (range_sup a) <-> (a <= x)
axiom member_range_inf : forall x:int,b:int [mem
ber
x (range_inf b)].
mem
ber
x (range_inf b) <-> (x <= b)
axiom member_range_inf : forall x:int,b:int [mem x (range_inf b)].
mem x (range_inf b) <-> (x <= b)
axiom member_range_all : forall x:int [mem
ber
x range_all].
mem
ber
x range_all
axiom member_range_all : forall x:int [mem x range_all].
mem x range_all
(* -------------------------------------------------------------------------- *)
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/tests/wp_acsl/oracle/vset.res.oracle
+
28
−
31
View file @
e54e0a67
...
...
@@ -19,8 +19,8 @@ Prove: true.
Goal Lemma 'indirect_equal_constants':
Assume Lemmas: 'indirect_not_in_constants' 'indirect_in_constants'
'direct_in_singleton' 'direct_in'
Prove: mem
ber
(1, L_Set1) /\ mem
ber
(2, L_Set1) /\ mem
ber
(3, L_Set1) /\
(forall i : Z. (mem
ber
(i, L_Set1) -> ((i = 1) \/ (i = 2) \/ (i = 3)))).
Prove: mem(1, L_Set1) /\ mem(2, L_Set1) /\ mem(3, L_Set1) /\
(forall i : Z. (mem(i, L_Set1) -> ((i = 1) \/ (i = 2) \/ (i = 3)))).
------------------------------------------------------------
...
...
@@ -36,8 +36,8 @@ Assume {
Have: is_sint32(int2_0).
Have: is_sint32(int3_0).
}
Prove: mem
ber
(int1_0, a) /\ mem
ber
(int2_0, a) /\ mem
ber
(int3_0, a) /\
(forall i : Z. (mem
ber
(i, a) ->
Prove: mem(int1_0, a) /\ mem(int2_0, a) /\ mem(int3_0, a) /\
(forall i : Z. (mem(i, a) ->
((i = int1_0) \/ (i = int2_0) \/ (i = int3_0)))).
------------------------------------------------------------
...
...
@@ -47,14 +47,14 @@ Assume Lemmas: 'indirect_not_in_logical' 'indirect_in_logical'
'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Prove: mem
ber
(1, L_Set3) /\ mem
ber
(2, L_Set3) /\ mem
ber
(3, L_Set3) /\
(forall i : Z. (mem
ber
(i, L_Set3) -> ((i = 1) \/ (i = 2) \/ (i = 3)))).
Prove: mem(1, L_Set3) /\ mem(2, L_Set3) /\ mem(3, L_Set3) /\
(forall i : Z. (mem(i, L_Set3) -> ((i = 1) \/ (i = 2) \/ (i = 3)))).
------------------------------------------------------------
Goal Lemma 'indirect_in_constants':
Assume Lemmas: 'direct_in_singleton' 'direct_in'
Prove: mem
ber
(2, L_Set1).
Prove: mem(2, L_Set1).
------------------------------------------------------------
...
...
@@ -65,7 +65,7 @@ Assume Lemmas: 'indirect_not_equal_logical' 'indirect_equal_logical'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Assume { Have: is_sint32(int2_0). }
Prove: mem
ber
(int2_0, L_Set2(int3_0, int2_0, int1_0)).
Prove: mem(int2_0, L_Set2(int3_0, int2_0, int1_0)).
------------------------------------------------------------
...
...
@@ -73,16 +73,15 @@ Goal Lemma 'indirect_in_logical':
Assume Lemmas: 'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Prove: mem
ber
(2, L_Set3).
Prove: mem(2, L_Set3).
------------------------------------------------------------
Goal Lemma 'indirect_not_equal_constants':
Assume Lemmas: 'indirect_equal_constants' 'indirect_not_in_constants'
'indirect_in_constants' 'direct_in_singleton' 'direct_in'
Prove: (!member(0, L_Set1)) \/ (!member(1, L_Set1)) \/
(!member(2, L_Set1)) \/
(exists i : Z. (i != 0) /\ (i != 1) /\ (i != 2) /\ member(i, L_Set1)).
Prove: (!mem(0, L_Set1)) \/ (!mem(1, L_Set1)) \/ (!mem(2, L_Set1)) \/
(exists i : Z. (i != 0) /\ (i != 1) /\ (i != 2) /\ mem(i, L_Set1)).
------------------------------------------------------------
...
...
@@ -91,15 +90,14 @@ Assume Lemmas: 'indirect_equal_logical' 'indirect_not_in_logical'
'indirect_in_logical' 'indirect_not_equal_constants'
'indirect_equal_constants' 'indirect_not_in_constants'
'indirect_in_constants' 'direct_in_singleton' 'direct_in'
Prove: (!member(0, L_Set3)) \/ (!member(1, L_Set3)) \/
(!member(2, L_Set3)) \/
(exists i : Z. (i != 0) /\ (i != 1) /\ (i != 2) /\ member(i, L_Set3)).
Prove: (!mem(0, L_Set3)) \/ (!mem(1, L_Set3)) \/ (!mem(2, L_Set3)) \/
(exists i : Z. (i != 0) /\ (i != 1) /\ (i != 2) /\ mem(i, L_Set3)).
------------------------------------------------------------
Goal Lemma 'indirect_not_in_constants':
Assume Lemmas: 'indirect_in_constants' 'direct_in_singleton' 'direct_in'
Prove: !mem
ber
(4, L_Set1).
Prove: !mem(4, L_Set1).
------------------------------------------------------------
...
...
@@ -107,7 +105,7 @@ Goal Lemma 'indirect_not_in_logical':
Assume Lemmas: 'indirect_in_logical' 'indirect_not_equal_constants'
'indirect_equal_constants' 'indirect_not_in_constants'
'indirect_in_constants' 'direct_in_singleton' 'direct_in'
Prove: !mem
ber
(0, L_Set3).
Prove: !mem(0, L_Set3).
------------------------------------------------------------
...
...
@@ -118,7 +116,7 @@ Assume Lemmas: 'rec_iota' 'rec_iota_gt0' 'rec_iota_le0' 'iota_ind0'
'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Prove: mem
ber
(0, L_iota(0)).
Prove: mem(0, L_iota(0)).
------------------------------------------------------------
...
...
@@ -132,8 +130,8 @@ Assume Lemmas: 'iota3_compute_equal_constants' 'iota3_compute_2in_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Let a = L_iota(1).
Prove: mem
ber
(0, a) /\ mem
ber
(1, a) /\
(forall i : Z. (mem
ber
(i, a) -> ((i = 0) \/ (i = 1)))).
Prove: mem(0, a) /\ mem(1, a) /\
(forall i : Z. (mem(i, a) -> ((i = 0) \/ (i = 1)))).
------------------------------------------------------------
...
...
@@ -145,7 +143,7 @@ Assume Lemmas: 'iota0_compute_0in_constants' 'rec_iota' 'rec_iota_gt0'
'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Prove: mem
ber
(0, L_iota(3)).
Prove: mem(0, L_iota(3)).
------------------------------------------------------------
...
...
@@ -157,7 +155,7 @@ Assume Lemmas: 'iota3_compute_0in_constants' 'iota0_compute_0in_constants'
'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Prove: mem
ber
(2, L_iota(3)).
Prove: mem(2, L_iota(3)).
------------------------------------------------------------
...
...
@@ -171,9 +169,8 @@ Assume Lemmas: 'iota3_compute_2in_constants' 'iota3_compute_0in_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Let a = L_iota(3).
Prove: member(0, a) /\ member(1, a) /\ member(2, a) /\ member(3, a) /\
(forall i : Z. (member(i, a) ->
((i = 0) \/ (i = 1) \/ (i = 2) \/ (i = 3)))).
Prove: mem(0, a) /\ mem(1, a) /\ mem(2, a) /\ mem(3, a) /\
(forall i : Z. (mem(i, a) -> ((i = 0) \/ (i = 1) \/ (i = 2) \/ (i = 3)))).
------------------------------------------------------------
...
...
@@ -185,7 +182,7 @@ Assume Lemmas: 'indirect_equal_ghost' 'indirect_in_ghost'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Let a = L_iota(n). Assume { Have: n <= 0. }
Prove: mem
ber
(0, a) /\ (forall i : Z. (mem
ber
(i, a) -> (i = 0))).
Prove: mem(0, a) /\ (forall i : Z. (mem(i, a) -> (i = 0))).
------------------------------------------------------------
...
...
@@ -196,8 +193,8 @@ Assume Lemmas: 'rec_iota_gt0' 'rec_iota_le0' 'iota_ind0'
'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Assume { Have: mem
ber
(i, L_iota(n)). }
Prove: (n = i) \/ mem
ber
(i, L_iota(n - 1)).
Assume { Have: mem(i, L_iota(n)). }
Prove: (n = i) \/ mem(i, L_iota(n - 1)).
------------------------------------------------------------
...
...
@@ -208,8 +205,8 @@ Assume Lemmas: 'rec_iota_le0' 'iota_ind0' 'indirect_equal_ghost'
'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Assume { Have: 0 < n. Have: mem
ber
(i, L_iota(n)). }
Prove: (n = i) \/ mem
ber
(i, L_iota(n - 1)).
Assume { Have: 0 < n. Have: mem(i, L_iota(n)). }
Prove: (n = i) \/ mem(i, L_iota(n - 1)).
------------------------------------------------------------
...
...
@@ -220,7 +217,7 @@ Assume Lemmas: 'iota_ind0' 'indirect_equal_ghost' 'indirect_in_ghost'
'indirect_not_equal_constants' 'indirect_equal_constants'
'indirect_not_in_constants' 'indirect_in_constants' 'direct_in_singleton'
'direct_in'
Assume { Have: n <= 0. Have: mem
ber
(i, L_iota(n)). }
Assume { Have: n <= 0. Have: mem(i, L_iota(n)). }
Prove: i = 0.
------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment