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
544344c9
Commit
544344c9
authored
5 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[aorai] validate oracles
parent
e180d54c
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/aorai/tests/aorai/oracle/formals.res.oracle
+8
-6
8 additions, 6 deletions
src/plugins/aorai/tests/aorai/oracle/formals.res.oracle
src/plugins/aorai/tests/aorai/oracle/other.res.oracle
+8
-2
8 additions, 2 deletions
src/plugins/aorai/tests/aorai/oracle/other.res.oracle
with
16 additions
and
8 deletions
src/plugins/aorai/tests/aorai/oracle/formals.res.oracle
+
8
−
6
View file @
544344c9
...
@@ -581,24 +581,26 @@ int g(int y)
...
@@ -581,24 +581,26 @@ int g(int y)
ensures
ensures
\at(aorai_CurStates ≡ init,Pre) ∧
\at(aorai_CurStates ≡ init,Pre) ∧
aorai_CurStates ≡ aorai_reject ⇒
aorai_CurStates ≡ aorai_reject ⇒
aorai_x_0 ≡ \at(1,Pre) + 0 ∨ aorai_x_0 ≡ \at(aorai_x_0,Pre) + 0;
aorai_x_0 ≡ \at(aorai_x_0,Pre) + 0 ∨
aorai_x_0 ≡ \at((int)1,Pre) + 0;
ensures
ensures
\at(aorai_CurStates ≡ init,Pre) ∧
\at(aorai_CurStates ≡ init,Pre) ∧
aorai_CurStates ≡ aorai_reject ⇒
aorai_CurStates ≡ aorai_reject ⇒
aorai_y ≡ \at(
2
,Pre) + 0 ∨ aorai_y ≡ \at(
aorai_y
,Pre) + 0;
aorai_y ≡ \at(
aorai_y
,Pre) + 0 ∨ aorai_y ≡ \at(
(int)2
,Pre) + 0;
ensures
ensures
\at(aorai_CurStates ≡ init,Pre) ∧
\at(aorai_CurStates ≡ init,Pre) ∧
aorai_CurStates ≡ aorai_reject ⇒
aorai_CurStates ≡ aorai_reject ⇒
aorai_x ≡ \at(
1
,Pre) + 0 ∨ aorai_x ≡ \at(
aorai_x
,Pre) + 0;
aorai_x ≡ \at(
aorai_x
,Pre) + 0 ∨ aorai_x ≡ \at(
(int)1
,Pre) + 0;
ensures
ensures
\at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒
\at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒
aorai_x_0 ≡ \at(1,Pre) + 0 ∨ aorai_x_0 ≡ \at(aorai_x_0,Pre) + 0;
aorai_x_0 ≡ \at(aorai_x_0,Pre) + 0 ∨
aorai_x_0 ≡ \at((int)1,Pre) + 0;
ensures
ensures
\at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒
\at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒
aorai_y ≡ \at(
2
,Pre) + 0 ∨ aorai_y ≡ \at(
aorai_y
,Pre) + 0;
aorai_y ≡ \at(
aorai_y
,Pre) + 0 ∨ aorai_y ≡ \at(
(int)2
,Pre) + 0;
ensures
ensures
\at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒
\at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒
aorai_x ≡ \at(
1
,Pre) + 0 ∨ aorai_x ≡ \at(
aorai_x
,Pre) + 0;
aorai_x ≡ \at(
aorai_x
,Pre) + 0 ∨ aorai_x ≡ \at(
(int)1
,Pre) + 0;
*/
*/
int main(void)
int main(void)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/plugins/aorai/tests/aorai/oracle/other.res.oracle
+
8
−
2
View file @
544344c9
...
@@ -525,7 +525,12 @@ void g(void)
...
@@ -525,7 +525,12 @@ void g(void)
behavior buch_state_last_out:
behavior buch_state_last_out:
ensures 0 ≡ last;
ensures 0 ≡ last;
behavior buch_state_step1_in:
assumes 1 ≡ init ∧ x ≡ 3;
ensures 1 ≡ step1;
behavior buch_state_step1_out:
behavior buch_state_step1_out:
assumes 0 ≡ init ∨ ¬(x ≡ 3);
ensures 0 ≡ step1;
ensures 0 ≡ step1;
@/
@/
void main_pre_func(void)
void main_pre_func(void)
...
@@ -538,7 +543,9 @@ void g(void)
...
@@ -538,7 +543,9 @@ void g(void)
init_tmp = init;
init_tmp = init;
last_tmp = last;
last_tmp = last;
step1_tmp = step1;
step1_tmp = step1;
step1_tmp = 0;
if (init == 1)
if (x == 3) step1_tmp = 1; else step1_tmp = 0;
else step1_tmp = 0;
last_tmp = 0;
last_tmp = 0;
if (init == 1)
if (init == 1)
if (x != 3) init_tmp = 1; else init_tmp = 0;
if (x != 3) init_tmp = 1; else init_tmp = 0;
...
@@ -644,7 +651,6 @@ void g(void)
...
@@ -644,7 +651,6 @@ void g(void)
*/
*/
/*@ requires 1 ≡ init ∧ 0 ≡ last ∧ 0 ≡ step1;
/*@ requires 1 ≡ init ∧ 0 ≡ last ∧ 0 ≡ step1;
requires 1 ≡ init ⇒ x ≢ 3;
behavior aorai_acceptance:
behavior aorai_acceptance:
ensures 1 ≡ last;
ensures 1 ≡ last;
...
...
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