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
fe04c520
Commit
fe04c520
authored
6 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[ACSL] Accept ACSL keywords as C identifiers as volatile or logic reads zones
parent
0316472c
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/kernel_internals/parsing/logic_parser.mly
+6
-2
6 additions, 2 deletions
src/kernel_internals/parsing/logic_parser.mly
tests/spec/kw.c
+11
-0
11 additions, 0 deletions
tests/spec/kw.c
with
17 additions
and
2 deletions
src/kernel_internals/parsing/logic_parser.mly
+
6
−
2
View file @
fe04c520
...
@@ -879,6 +879,10 @@ full_zones:
...
@@ -879,6 +879,10 @@ full_zones:
|
enter_kw_c_mode
zones
exit_kw_c_mode
{
$
2
}
|
enter_kw_c_mode
zones
exit_kw_c_mode
{
$
2
}
;
;
full_ne_zones
:
|
enter_kw_c_mode
zones
exit_kw_c_mode
{
$
2
}
;
full_ne_lexpr_list
:
full_ne_lexpr_list
:
enter_kw_c_mode
ne_lexpr_list
exit_kw_c_mode
{
$
2
}
enter_kw_c_mode
ne_lexpr_list
exit_kw_c_mode
{
$
2
}
;
;
...
@@ -1476,7 +1480,7 @@ decl_list:
...
@@ -1476,7 +1480,7 @@ decl_list:
decl
:
decl
:
|
GLOBAL
INVARIANT
any_identifier
COLON
full_lexpr
SEMICOLON
|
GLOBAL
INVARIANT
any_identifier
COLON
full_lexpr
SEMICOLON
{
LDinvariant
(
$
3
,
$
5
)
}
{
LDinvariant
(
$
3
,
$
5
)
}
|
VOLATILE
ne_zones
volatile_opt
SEMICOLON
{
LDvolatile
(
$
2
,
$
3
)
}
|
VOLATILE
full_
ne_zones
volatile_opt
SEMICOLON
{
LDvolatile
(
$
2
,
$
3
)
}
|
type_annot
{
LDtype_annot
$
1
}
|
type_annot
{
LDtype_annot
$
1
}
|
model_annot
{
LDmodel_annot
$
1
}
|
model_annot
{
LDmodel_annot
$
1
}
|
logic_def
{
$
1
}
|
logic_def
{
$
1
}
...
@@ -1652,7 +1656,7 @@ logic_decl_loc:
...
@@ -1652,7 +1656,7 @@ logic_decl_loc:
reads_clause
:
reads_clause
:
|
/*
epsilon
*/
{
None
}
|
/*
epsilon
*/
{
None
}
|
READS
zones
{
Some
$
2
}
|
READS
full_ne_
zones
{
Some
$
2
}
;
;
typedef
:
typedef
:
...
...
This diff is collapsed.
Click to expand it.
tests/spec/kw.c
+
11
−
0
View file @
fe04c520
...
@@ -23,3 +23,14 @@ model{L}(l1,ll1) ==> model(Cons(0,l1),Cons(0,ll1));
...
@@ -23,3 +23,14 @@ model{L}(l1,ll1) ==> model(Cons(0,l1),Cons(0,ll1));
} */
} */
/*@ axiomatic foo {
logic integer func(integer i) reads behavior;
}
*/
volatile
int
assigns
;
int
ensures
(
volatile
int
*
a
)
{
return
*
a
;
}
void
requires
(
volatile
int
*
a
,
int
v
)
{
*
a
=
v
;
}
/*@ volatile assigns reads ensures writes requires; */
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