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
06b8c7fb
Commit
06b8c7fb
authored
9 years ago
by
Kostyantyn Vorobyov
Browse files
Options
Downloads
Patches
Plain Diff
Minor corrections for e-acsl-gcc.sg section in the E-ACSL user manual.
parent
80e2212d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/e-acsl/doc/manuals/e-acsl-manual.pdf
+0
-0
0 additions, 0 deletions
src/plugins/e-acsl/doc/manuals/e-acsl-manual.pdf
src/plugins/e-acsl/doc/userman/provides.tex
+35
-36
35 additions, 36 deletions
src/plugins/e-acsl/doc/userman/provides.tex
with
35 additions
and
36 deletions
src/plugins/e-acsl/doc/manuals/e-acsl-manual.pdf
-6 B (0%)
View file @
06b8c7fb
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/doc/userman/provides.tex
+
35
−
36
View file @
06b8c7fb
...
...
@@ -101,9 +101,9 @@ unsigned long const __fc_rand_max = (unsigned long)32767;
/*@
axiomatic dynamic
_
allocation
{
predicate is
_
allocable
{
L
}
(size
_
t n)
predicate is
_
allocable
{
L
}
(size
_
t n)
reads
__
fc
_
heap
_
status;
}
*/
/*@ ghost extern int
__
e
_
acsl
_
init; */
...
...
@@ -135,7 +135,7 @@ constant declarations and global \acsl annotations that are not in the initial
file
\texttt
{
first.i
}
. They are part of the included
\eacsl
monitoring
library. You can safely ignore it right now. The translated
\texttt
{
main
}
function of
\texttt
{
first.i
}
is displayed at the end. After each
\eacsl
annotation, a line has been added.
annotation, a line has been added.
\begin{ccode}
/*@ assert x == 0; */
...
...
@@ -519,9 +519,9 @@ restrictions.
The
\eacsl
plug-in may work even if there is no
\texttt
{
main
}
function.
Consider for instance the following annotated program without such a
\texttt
{
main
}
.
\texttt
{
main
}
.
\listingname
{
no
\_
main.i
}
\listingname
{
no
\_
main.i
}
\cinput
{
examples/no
_
main.i
}
The instrumented code is generated as usual, even though you get an additional
...
...
@@ -565,7 +565,7 @@ The \eacsl plug-in may also work if some functions have no implementation.
Consider for instance the following annotated program for which the
implementation of the function
\texttt
{
my
\_
pow
}
is not provided.
\listingname
{
no
\_
code.c
}
\listingname
{
no
\_
code.c
}
\cinput
{
examples/no
_
code.c
}
The instrumented code is generated as usual, even though you get an additional
...
...
@@ -575,7 +575,7 @@ warning.
[e-acsl] warning: annotating undefined function `my
_
pow':
the generated program may miss memory instrumentation
if there are memory-related annotations.
[kernel] warning: No code nor implicit assigns clause for function my
_
pow,
[kernel] warning: No code nor implicit assigns clause for function my
_
pow,
generating default assigns from the prototype
[e-acsl] translation done in project "e-acsl".
\end{shell}
...
...
@@ -647,7 +647,7 @@ even if the \eacsl plug-in keeps the maximum amount of information, the results
of already executed analyzers (such as validity status of annotations) are not
known in this new project. If you want to keep them, you have to set the option
\optiondef
{
-
}{
e-acsl-prepare
}
when the first analysis is asked for.
In this context, the
\eacsl
plug-in does not generate code for annotations
proven valid by another plug-in, except if you explicitly set the option
\optiondef
{
-
}{
e-acsl-valid
}
. For instance,
\valueplugin
~
\cite
{
value
}
is able to
...
...
@@ -678,7 +678,7 @@ plug-in is running.
\section
{
Customization
}
\label
{
sec:custom
}
There are several ways to customize the
\eacsl
plug-in.
There are several ways to customize the
\eacsl
plug-in.
First, the name of the generated project -- which is
\texttt
{
e-acsl
}
by
default -- may be changed by setting the option
\optiondef
{
-
}{
e-acsl-project
}
.
...
...
@@ -760,7 +760,7 @@ parts of the translation, as detailed below.
\begin{center}
\begin{tabular}
{
|l|l|
}
\hline
analysis
&
minimization of the instrumentation for memory-related annotation
analysis
&
minimization of the instrumentation for memory-related annotation
(section~
\ref
{
sec:memory
}
)
\\
\hline
duplication
&
duplication of functions with contracts
...
...
@@ -782,7 +782,7 @@ typing & minimization of the instrumentation for integers
\label
{
sec:eacsl-gcc
}
Due to numerous instrumentation and compile-time options generating monitored
executables using the
\eacsl
plugin can be tedious. To simplify this task we
executables using the
\eacsl
plug
-
in can be tedious. To simplify this task we
developed
\eacslgcc\
-- a convenience wrapper around
\framac
and
\gcc
allowing
to instrument programs with
\eacsl
and compile the instrumented code using a
single command and a very few parameters.
...
...
@@ -793,7 +793,7 @@ In this section we describe \eacslgcc and provide several examples of its use.
\subsection
{
Basic Use
}
\eacslgcc
instruments C files provided at input using the
\eacsl
plugin, and
\eacslgcc
instruments C files provided at input using the
\eacsl
plug
-
in, and
optionally compiles the generated code and the original sources using the
\gcc
compiler.
...
...
@@ -819,13 +819,13 @@ is enabled using the \texttt{-c} option. For instance, the command
instruments the code in
\texttt
{
foo.c
}
, outputs it to
\texttt
{
gen.c
}
and
produces 2 executables:
\texttt
{
a.out
}
and
\texttt
{
a.out.e-acsl
}
, where
\texttt
{
a.out
}
is an executable compiled from
\texttt
{
foo.c
}
, while
\texttt
{
a.out.e-acsl
}
is an executable compiled from
\texttt
{
gen.c
}
generated
by
\eacsl
.
\texttt
{
a.out
}
is an executable compiled from
\texttt
{
foo.c
}
, while
\texttt
{
a.out.e-acsl
}
is an executable compiled from
\texttt
{
gen.c
}
generated
by
\eacsl
.
Named executables can be created using the
\texttt
{
-O
}
option. This is such
that a value supplied to the
\texttt
{
-O
}
option is used to name the executable
generated from the original program and the executable generate
te
d from the
generated from the original program and the executable generated from the
\eacsl
-instrumented code is suffixed
\texttt
{
.e-acsl
}
.
For example, command
...
...
@@ -835,9 +835,9 @@ For example, command
will name the executables generated from
\texttt
{
foo.c
}
and
\texttt
{
gen.c
}
:
\texttt
{
gen
}
and
\texttt
{
gen.e-acsl
}
respectively.
The
\eacslgcc
\texttt
{
-C
}
option allows to skip instrumentation step and
The
\eacslgcc
\texttt
{
-C
}
option allows to skip
the
instrumentation step and
compile a given program as if it were already instrumented by the
\eacsl
plugin. This option is useful if one makes
some
changes to an already
plug
-
in. This option is useful if one makes changes to an already
instrumented source file by hand and only wants to recompile it.
\begin{shell}
...
...
@@ -870,7 +870,7 @@ A list of \eacslgcc options can be retrieved using the following command:
-g always use GMP integers instead of C integral types
-q suppress any output except for errors and warnings
-s <file> redirect all output to <file>
-P compile executa
t
le without debug features
-P compile executa
b
le without debug features
-I <file> specify Frama-C executable [frama-c]
-G <file> specify GCC executable [gcc]
\end{shell}
...
...
@@ -886,13 +886,12 @@ For full up-to-date documentation of \eacslgcc see its man page:
\subsection
{
Customising
\framac
and
\gcc
Invocations
}
Runs of
\framac
and
\gcc
issued by
\eacslgcc
can be customized by
using
additional flags passed the tools' invocations.
Runs of
\framac
and
\gcc
issued by
\eacslgcc
can be customized by
using
additional flags passed the tools' invocations.
Additional
\framac
flags can be passed using the
\texttt
{
-F
}
option, while
\texttt
{
-l
}
and
\texttt
{
-e
}
options allow for passing additional pre-processor
and linker flags during
\gcc
invocations.
For example, command
and linker flags during
\gcc
invocations. For example, command
\begin{shell}
\$
e-acsl-gcc.sh -c -F"-unicode" -e"-I/bar -I/baz" foo.c
...
...
@@ -905,8 +904,8 @@ are output using the UTF-8 character set. Further, during the compilation of
It is worth mentioning that
\eacslgcc
implements several convenience flags for
setting some of the
\framac
options. For instance,
\texttt
{
-E
}
can be used to
pass additional arguments to the
\framac
pre-processor and
\texttt
{
-M
}
maximizes
memory-related instrumentation.
pass additional arguments to the
\framac
pre-processor and
\texttt
{
-M
}
maximizes
memory-related instrumentation.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
@@ -916,7 +915,7 @@ By default \eacslgcc prints the executed \framac and \gcc commands and pipes
their output to the terminal. The verbosity of
\framac
output can be changed
using
\texttt
{
-v
}
and
\texttt
{
-d
}
options used to pass values to
\texttt
{
-verbose
}
and
\texttt
{
-debug
}
flags of
\framac
respectively. For
instance, to increase the verbosity of plugins but suppress the verbosity of
instance, to increase the verbosity of plug
-
ins but suppress the verbosity of
the
\framac
kernel while instrumenting
\texttt
{
foo.c
}
one can use the following
command:
...
...
@@ -924,14 +923,14 @@ command:
\$
e-acsl-gcc.sh -v5 -F"-kernel-verbose 0" foo.c
\end{shell}
Verbosity of the
output of
\eacslgcc
scrip
t can also be reduced using the
\texttt
{
-q
}
option that suppresses any output except errors or warnings issued
by
\gcc
,
\framac
or
\eacslgcc
itself.
Verbosity of the
\eacslgcc
outpu
t can also be reduced using the
\texttt
{
-q
}
option that suppresses any output except errors or warnings issued
by
\gcc
,
\framac
or
\eacslgcc
itself.
The output of
\eacslgcc
can also be redirected to a specified
log fil
e
using the
\texttt
{
-s
}
option. For example, the following command will redirect
all
output during instrumentation and compil
l
ation of
\texttt
{
foo.c
}
to the
\texttt
{
/tmp/log
}
file
.
The output of
\eacslgcc
can also be redirected to a specified
file using th
e
\texttt
{
-s
}
option. For example, the following command will redirect
all
output during instrumentation and compilation of
\texttt
{
foo.c
}
to the
file named
\texttt
{
/tmp/log
}
.
\begin{shell}
\$
e-acsl-gcc.sh -c -s/tmp/log foo.c
...
...
@@ -945,11 +944,11 @@ By default \eacslgcc uses the first \texttt{frama-c} executable found in a
system's path to instrument input programs. The name of the
\framac
executable
can be changed using the
\texttt
{
-I
}
option. For instance, to instrument a file
named
\texttt
{
foo.c
}
using the
\texttt
{
/usr/local/bin/frama-c.byte
}
executable
one can
iss
ue the following command:
one can u
s
e the following command:
\begin{shell}
\$
e-acsl-gcc.sh -I/usr/local/bin/frama-c.byte foo.c
\end{shell}
The name of a
\gcc
executable can be similarly changed using the
\texttt
{
-G
}
option.
\ No newline at end of file
The name of a
\gcc
executable can be changed similarly using the
\texttt
{
-G
}
option.
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