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
af67d277
Commit
af67d277
authored
4 years ago
by
Valentin Perrelle
Committed by
David Bühler
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] revert syntax from 'loop unroll full' to 'loop unroll'
parent
7c86536d
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/value/utils/eva_annotations.ml
+4
-4
4 additions, 4 deletions
src/plugins/value/utils/eva_annotations.ml
tests/value/partitioning-annots.c
+4
-2
4 additions, 2 deletions
tests/value/partitioning-annots.c
with
8 additions
and
6 deletions
src/plugins/value/utils/eva_annotations.ml
+
4
−
4
View file @
af67d277
...
@@ -178,7 +178,7 @@ module Unroll = Register (struct
...
@@ -178,7 +178,7 @@ module Unroll = Register (struct
let
is_loop_annot
=
true
let
is_loop_annot
=
true
let
parse
~
typing_context
=
function
let
parse
~
typing_context
=
function
|
[
{
lexpr_node
=
PLvar
"full"
}
]
->
UnrollFull
|
[]
->
UnrollFull
|
[
t
]
->
|
[
t
]
->
let
open
Logic_typing
in
let
open
Logic_typing
in
UnrollAmount
UnrollAmount
...
@@ -186,16 +186,16 @@ module Unroll = Register (struct
...
@@ -186,16 +186,16 @@ module Unroll = Register (struct
|
_
->
raise
Parse_error
|
_
->
raise
Parse_error
let
export
=
function
let
export
=
function
|
UnrollFull
->
Ext_terms
[
Logic_const
.
tstring
"full"
]
|
UnrollFull
->
Ext_terms
[]
|
UnrollAmount
t
->
Ext_terms
[
t
]
|
UnrollAmount
t
->
Ext_terms
[
t
]
let
import
=
function
let
import
=
function
|
Ext_terms
[
{
term_node
=
TConst
(
LStr
"full"
)}
]
->
UnrollFull
|
Ext_terms
[]
->
UnrollFull
|
Ext_terms
[
t
]
->
UnrollAmount
t
|
Ext_terms
[
t
]
->
UnrollAmount
t
|
_
->
assert
false
|
_
->
assert
false
let
print
fmt
=
function
let
print
fmt
=
function
|
UnrollFull
->
Format
.
pp_print_string
fmt
"full"
|
UnrollFull
->
()
|
UnrollAmount
t
->
Printer
.
pp_term
fmt
t
|
UnrollAmount
t
->
Printer
.
pp_term
fmt
t
end
)
end
)
...
...
This diff is collapsed.
Click to expand it.
tests/value/partitioning-annots.c
+
4
−
2
View file @
af67d277
...
@@ -40,10 +40,12 @@ void test_unroll()
...
@@ -40,10 +40,12 @@ void test_unroll()
// At the end, we must have both arrays a and b to be fully initialized at 42
// At the end, we must have both arrays a and b to be fully initialized at 42
// Small loops can be unrolled with
the annotatio
n
"
unroll
full"
.
// Small loops can be unrolled with
out giving a
n unroll
amount
.
// The actual limit of the number of iterations can be overriden with
// The actual limit of the number of iterations can be overriden with
// the option -eva-default-loop-unroll
// the option -eva-default-loop-unroll
//@ loop unroll full;
// Here -eva-default-loop-unroll is set to a value not high enough to
// completely unroll the loop thus a warning should be emitted.
//@ loop unroll;
for
(
int
i
=
0
;
i
<
2
*
N
;
i
++
)
for
(
int
i
=
0
;
i
<
2
*
N
;
i
++
)
c
[
i
]
=
i
%
2
;
c
[
i
]
=
i
%
2
;
...
...
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