Skip to content
Snippets Groups Projects
Commit d67c7a6f authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[wp] test split tactic

parent e141f8cf
No related branches found
No related tags found
No related merge requests found
[ { "header": "Split", "tactic": "Wp.split", "params": {},
"select": { "select": "clause-step", "at": 1, "kind": "have",
"target": "P_P \\/ P_Q \\/ P_R", "pattern": "|P_PP_QP_R" },
"children": { "Case 1/3": [], "Case 2/3": [], "Case 3/3": [] } } ]
/* run.config
OPT: -wp-par 1 -wp-no-print -wp-prover qed,tip -wp-msg-key script -wp-session @PTEST_DIR@/oracle/@PTEST_NAME@.session
*/
/* run.config_qualif
DONT_RUN:
*/
/*@ axiomatic X {
predicate P ;
predicate Q ;
predicate R ;
predicate S ;
predicate Pi (integer x);
predicate Qi (integer x);
logic boolean LP ;
logic boolean LQ ;
}
*/
int a, b;
/*@ assigns \nothing;
@ ensures P ; */
void gen_P(void);
/*@ assigns \nothing;
@ ensures Q ; */
void gen_Q(void);
/*@ assigns \nothing;
@ ensures R ; */
void gen_R(void);
//@ ensures S ;
void test_step_branch(void) {
if (a < b) {
gen_P();
} else {
gen_Q();
}
}
/*@ requires P || Q || R ;
@ ensures S ; */
void test_step_or(void) {}
/*@ requires P && Q && R ;
@ ensures S ; */
void test_step_and(void) {}
/*@ requires LP == LQ ;
@ ensures S ; */
void test_step_eq(void) {}
/*@ requires LP != LQ ;
@ ensures S ; */
void test_step_neq(void) {}
/*@ requires (a < b) ? P : Q ;
@ ensures S ; */
void test_step_if(void) {}
/*@ requires \forall integer i ; (a < b) ? P && Pi(i) : Q && Qi(i) ;
@ ensures S ; */
void test_step_fa_if(void) {}
/*@ requires \forall integer i ; Pi(i) || P || Qi(i) || Q || R ;
@ ensures S ; */
void test_step_fa_or(void) {}
/*@ requires \forall integer i ; Pi(i) && P && Qi(i) && Q && R ;
@ ensures S ; */
void test_step_fa_and(void) {}
/*@ requires P && a <= b ;
@ ensures Q ; */
void test_inside_leq(void) {}
/*@ requires P && a < b ;
@ ensures Q ; */
void test_inside_lt(void) {}
/*@ requires P && a != b ;
@ ensures Q ; */
void test_inside_neq(void) {}
/*@ requires S ;
@ ensures P && Q && R ; */
void test_goal_and(void) {}
/*@ requires S ;
@ ensures LP == LQ ; */
void test_goal_eq(void) {}
/*@ requires S ;
@ ensures LP != LQ ; */
void test_goal_neq(void) {}
/*@ requires S ;
@ ensures (a < b) ? P : Q ; */
void test_goal_if(void) {}
/*@ requires S ;
@ ensures \exists integer i ; P && Q && Pi(i) && Qi(i) ; */
void test_goal_ex_and(void) {}
/*@ requires S ;
@ ensures \exists integer i ; P || Q || Pi(i) || Qi(i) ; */
void test_goal_ex_or(void) {}
/*@ requires S ;
@ ensures \exists integer i ; (a < b) ? Pi(i) && Qi(i) : P && Q ; */
void test_goal_ex_if(void) {}
/*@ requires S ;
@ ensures \exists integer i ; Pi(i) && Q ==> Qi(i); */
void test_goal_ex_imply(void) {}
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