Skip to content
Snippets Groups Projects
Commit bf5ffd5d authored by François Bobot's avatar François Bobot
Browse files

[WP] Add tests for EVA model

parent d6dfbc2f
No related branches found
No related tags found
No related merge requests found
[kernel] Parsing tests/wp_eva/simple.c (with preprocessing)
[eva:alarm] tests/wp_eva/simple.c:14: Warning: assertion got status unknown.
[eva:alarm] tests/wp_eva/simple.c:19: Warning: assertion got status unknown.
[wp] Running WP plugin...
[wp] tests/wp_eva/simple.c:28: Warning:
Ignored 'terminates' specification:
\false
[wp] Warning: Missing RTE guards
------------------------------------------------------------
Function f
------------------------------------------------------------
Goal Assertion (file tests/wp_eva/simple.c, line 14):
Let x = read_sint32(MVar_z_0, 0).
Let x_1 = 1 + x.
Assume { Type: is_sint32(x) /\ is_sint32(x_1). }
Prove: P_P(x_1).
------------------------------------------------------------
------------------------------------------------------------
Function g
------------------------------------------------------------
Goal Assertion (file tests/wp_eva/simple.c, line 19):
Let x = read_sint32(MVar_x_0, 0).
Let x_1 = read_sint32(MVar_y_0, 0).
Let x_2 = read_sint32(MVar_z_0, 0).
Let x_3 = 1 + x.
Assume {
Type: is_sint32(x) /\ is_sint32(x_1) /\ is_sint32(x_2) /\ is_sint32(x_3).
}
Prove: P_P(x_1) /\ P_P(x_2) /\ P_P(x_3).
------------------------------------------------------------
#include "__fc_builtin.h"
/*@
axiomatic P {
predicate P(int x);
}
@*/
int z;
void f (int *x, int *y){
*x = *x+1;
/*@ assert P(*x) && P(*y) && P(z); @*/
}
void g (int *x, int *y){
*x = *x+1;
/*@ assert P(*x) && P(*y) && P(z); @*/
}
void main(){
int x = Frama_C_interval(2,1000);
int y = Frama_C_interval(2,1000);
z = Frama_C_interval(2,1000);
f(&z,&z);
g(&x,&y);
}
CMD: @frama-c@ -no-autoload-plugins -load-module eva,scope -eva -load-module wp -eva-no-print -eva-verbose 0
OPT: -then -wp -wp-print -wp-prover none -wp-share ./share -wp-msg-key shell -wp-model value
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