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
daeabe46
Commit
daeabe46
authored
6 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[tests] update ACSL kw test and oracles
parent
ded1c3e3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/spec/kw.c
+6
-1
6 additions, 1 deletion
tests/spec/kw.c
tests/spec/oracle/behavior_names.res.oracle
+1
-1
1 addition, 1 deletion
tests/spec/oracle/behavior_names.res.oracle
tests/spec/oracle/kw.res.oracle
+27
-0
27 additions, 0 deletions
tests/spec/oracle/kw.res.oracle
with
34 additions
and
2 deletions
tests/spec/kw.c
+
6
−
1
View file @
daeabe46
...
@@ -9,6 +9,7 @@ assert behavior = 0;
...
@@ -9,6 +9,7 @@ assert behavior = 0;
ensures behavior >= 0;
ensures behavior >= 0;
*/
*/
int
main
()
{
int
main
()
{
//@ slevel 4;
behavior
++
;
behavior
++
;
return
0
;
return
0
;
}
}
...
@@ -31,6 +32,10 @@ model{L}(l1,ll1) ==> model(Cons(0,l1),Cons(0,ll1));
...
@@ -31,6 +32,10 @@ model{L}(l1,ll1) ==> model(Cons(0,l1),Cons(0,ll1));
volatile
int
assigns
;
volatile
int
assigns
;
int
ensures
(
volatile
int
*
a
)
{
return
*
a
;
}
int
ensures
(
volatile
int
*
a
)
{
return
*
a
;
}
void
requires
(
volatile
int
*
a
,
int
v
)
{
*
a
=
v
;
}
int
requires
(
volatile
int
*
a
,
int
v
)
{
*
a
=
v
;
return
v
;
}
/*@ volatile assigns reads ensures writes requires; */
/*@ volatile assigns reads ensures writes requires; */
int
slevel
=
1000000
;
//@ lemma bar: slevel >= 0;
This diff is collapsed.
Click to expand it.
tests/spec/oracle/behavior_names.res.oracle
+
1
−
1
View file @
daeabe46
...
@@ -78,7 +78,7 @@ void j(void)
...
@@ -78,7 +78,7 @@ void j(void)
behavior while:
behavior while:
ensures while: \true;
ensures while: \true;
behavior
normal
:
behavior
ensures
:
ensures ensures: \true;
ensures ensures: \true;
behavior logic:
behavior logic:
...
...
This diff is collapsed.
Click to expand it.
tests/spec/oracle/kw.res.oracle
+
27
−
0
View file @
daeabe46
...
@@ -12,6 +12,7 @@ assert behavior = 0;
...
@@ -12,6 +12,7 @@ assert behavior = 0;
int main(void)
int main(void)
{
{
int __retres;
int __retres;
/*@ slevel 4; */
behavior ++;
behavior ++;
__retres = 0;
__retres = 0;
return __retres;
return __retres;
...
@@ -25,6 +26,32 @@ inductive model{L}(List<ℤ> root, List<ℤ> logic_list) {
...
@@ -25,6 +26,32 @@ inductive model{L}(List<ℤ> root, List<ℤ> logic_list) {
case cons{L}: ∀ List<ℤ> l1, List<ℤ> ll1;
case cons{L}: ∀ List<ℤ> l1, List<ℤ> ll1;
model(l1, ll1) ⇒ model(Cons(0, l1), Cons(0, ll1));
model(l1, ll1) ⇒ model(Cons(0, l1), Cons(0, ll1));
}
}
*/
/*@ axiomatic foo {
logic ℤ func{L}(ℤ i)
reads behavior;
}
*/
int volatile assigns;
int ensures(int volatile *a)
{
int __retres;
__retres = *a;
return __retres;
}
int requires(int volatile *a, int v)
{
*a = v;
return v;
}
/*@ volatile assigns reads ensures writes requires;
*/
int slevel = 1000000;
/*@ lemma bar{L}: slevel ≥ 0;
*/
*/
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