Skip to content
Snippets Groups Projects
Commit 0e75d257 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[wp] do not use stmt-contract

parent de4f10b8
No related branches found
No related tags found
No related merge requests found
...@@ -6,17 +6,20 @@ ...@@ -6,17 +6,20 @@
Function complex Function complex
------------------------------------------------------------ ------------------------------------------------------------
Goal Instance of 'Pre-condition (file tests/wp_typed/unit_tset.i, line 6) in 'job'' in 'complex' at call 'job' (file tests/wp_typed/unit_tset.i, line 20) Goal Assigns (file tests/wp_typed/unit_tset.i, line 14) in 'complex':
: Call Effect at line 18
Prove: true. Prove: true.
------------------------------------------------------------ ------------------------------------------------------------
------------------------------------------------------------
Function complex with behavior default_for_stmt_2 Goal Assigns (file tests/wp_typed/unit_tset.i, line 14) in 'complex':
Call Effect at line 18
Prove: true.
------------------------------------------------------------ ------------------------------------------------------------
Goal Assigns (file tests/wp_typed/unit_tset.i, line 19) at call 'job' (file tests/wp_typed/unit_tset.i, line 20): Goal Instance of 'Pre-condition (file tests/wp_typed/unit_tset.i, line 2) in 'job'' in 'complex' at call 'job' (file tests/wp_typed/unit_tset.i, line 18)
Call Effect at line 20 :
Prove: true. Prove: true.
------------------------------------------------------------ ------------------------------------------------------------
...@@ -6,17 +6,20 @@ ...@@ -6,17 +6,20 @@
Function complex Function complex
------------------------------------------------------------ ------------------------------------------------------------
Goal Instance of 'Pre-condition (file tests/wp_typed/unit_tset.i, line 6) in 'job'' in 'complex' at call 'job' (file tests/wp_typed/unit_tset.i, line 20) Goal Assigns (file tests/wp_typed/unit_tset.i, line 14) in 'complex':
: Call Effect at line 18
Prove: true. Prove: true.
------------------------------------------------------------ ------------------------------------------------------------
------------------------------------------------------------
Function complex with behavior default_for_stmt_2 Goal Assigns (file tests/wp_typed/unit_tset.i, line 14) in 'complex':
Call Effect at line 18
Prove: true.
------------------------------------------------------------ ------------------------------------------------------------
Goal Assigns (file tests/wp_typed/unit_tset.i, line 19) at call 'job' (file tests/wp_typed/unit_tset.i, line 20): Goal Instance of 'Pre-condition (file tests/wp_typed/unit_tset.i, line 2) in 'job'' in 'complex' at call 'job' (file tests/wp_typed/unit_tset.i, line 18)
Call Effect at line 20 :
Prove: true. Prove: true.
------------------------------------------------------------ ------------------------------------------------------------
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
[kernel] Parsing tests/wp_typed/unit_tset.i (no preprocessing) [kernel] Parsing tests/wp_typed/unit_tset.i (no preprocessing)
[wp] Running WP plugin... [wp] Running WP plugin...
[wp] Warning: Missing RTE guards [wp] Warning: Missing RTE guards
[wp] 2 goals scheduled [wp] 3 goals scheduled
[wp] [Qed] Goal typed_complex_assigns : Valid [wp] [Qed] Goal typed_complex_assigns_exit : Valid
[wp] [Qed] Goal typed_complex_assigns_normal : Valid
[wp] [Qed] Goal typed_complex_call_job_requires : Valid [wp] [Qed] Goal typed_complex_call_job_requires : Valid
[wp] Proved goals: 2 / 2 [wp] Proved goals: 3 / 3
Qed: 2 Qed: 3
------------------------------------------------------------ ------------------------------------------------------------
Functions WP Alt-Ergo Total Success Functions WP Alt-Ergo Total Success
complex 2 - 2 100% complex 3 - 3 100%
------------------------------------------------------------ ------------------------------------------------------------
/* run.config_qualif /*@
OPT: requires \valid( p + (0..n-1) );
*/
/*@
requires \valid( p + (0..n-1) );
assigns p[0..n-1]; assigns p[0..n-1];
*/ */
void job(int *p,int n); void job(int *p,int n);
typedef struct S { struct S {
int size ; int size ;
int value[50] ; int value[50] ;
} ; } s ;
/*@ requires s.size < 50; */ /*@
void complex(struct S s) requires s.size < 50;
assigns s.value[1..s.size];
*/
void complex(void)
{ {
/*@ assigns s.value[1..s.size]; */
job( & s.value[1] , s.size ); job( & s.value[1] , s.size );
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment