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
c9e4643d
Commit
c9e4643d
authored
5 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] User manual: slightly rewrites FAQ about loop unrolling.
parent
34988345
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/value/main.tex
+10
-14
10 additions, 14 deletions
doc/value/main.tex
with
10 additions
and
14 deletions
doc/value/main.tex
+
10
−
14
View file @
c9e4643d
...
...
@@ -5249,23 +5249,19 @@ return \lstinline|6| and \lstinline|36| respectively.
\question
{
Which option should I use to improve the handling of loops
in my program?
}
The recommended way is to use
\lstinline
|loop unroll| annotations
, which are
the most precise and stable mechanism currently in
\Eva
{}
.
The recommended way is to use
\lstinline
|loop unroll| annotations
on a case by
case basis, which is
the most precise and stable mechanism currently in
\Eva
{}
.
Alternatively, using
\lstinline
|-eva-slevel| is the next best approach.
This option is more costly, often hard to predict, and can only be specified
globally or at the function level (via
\lstinline
|-eva-slevel-function|).
However, it works for loops that are built using
\lstinline
|goto|s instead of
\lstinline
|for| or
\lstinline
|while|, and it also improves precision when
evaluating
\lstinline
|if| or
\lstinline
|switch| conditionals (but it is consumed
by them, which can be confusing for the user).
Both approaches do have a minor drawback, in that they do not allow to observe
a specific iteration step of the loop.
In fact, they may even be a little
confusing for the user when the program contains loops for which the
analysis cannot decide easily the truth value of the condition,
nested loops, or if-then-else
statements
\footnote
{
if-then-else statements are ``unrolled''
in a manner similar to loops
}
. The main advantage of these options are
that they leave the source code unchanged. Also,
\lstinline
|-eva-slevel| works
with loops that are built using
\lstinline
|goto|s instead of
\lstinline
|for|
or
\lstinline
|while|.
\lstinline
|-eva-slevel| also improves precision when evaluating
\lstinline
|if|
or
\lstinline
|switch| conditionals (but it is consumed by them).
a specific iteration step of the loop. The main advantage of these options are
that they leave the source code unchanged.
The Frama-C kernel has an option
\lstinline
|-ulevel|, which performs a
syntactic modification of the analyzed source code. Its advantage is that,
...
...
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