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
d67c7a6f
Commit
d67c7a6f
authored
3 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[wp] test split tactic
parent
e141f8cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/wp/tests/wp_tip/oracle/split.session/script/test_step_or_ensures.json
+4
-0
4 additions, 0 deletions
...tip/oracle/split.session/script/test_step_or_ensures.json
src/plugins/wp/tests/wp_tip/split.i
+120
-0
120 additions, 0 deletions
src/plugins/wp/tests/wp_tip/split.i
with
124 additions
and
0 deletions
src/plugins/wp/tests/wp_tip/oracle/split.session/script/test_step_or_ensures.json
0 → 100644
+
4
−
0
View file @
d67c7a6f
[
{
"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"
:
[]
}
}
]
This diff is collapsed.
Click to expand it.
src/plugins/wp/tests/wp_tip/split.i
0 → 100644
+
120
−
0
View file @
d67c7a6f
/* 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
)
{}
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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