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
e181aca8
Commit
e181aca8
authored
2 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[doc] minor
parent
5863e3c4
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
doc/frama-c-book.cls
+15
-22
15 additions, 22 deletions
doc/frama-c-book.cls
doc/metrics/metrics.tex
+1
-1
1 addition, 1 deletion
doc/metrics/metrics.tex
doc/userman/user-analysis.tex
+7
-7
7 additions, 7 deletions
doc/userman/user-analysis.tex
with
23 additions
and
30 deletions
doc/frama-c-book.cls
+
15
−
22
View file @
e181aca8
...
@@ -430,7 +430,7 @@
...
@@ -430,7 +430,7 @@
\def\lp
@string
{
\color
{
frama-c-dark-green
}}
\def\lp
@ident
{}
\def\lp
@string
{
\color
{
frama-c-dark-green
}}
\def\lp
@ident
{}
\def\lp
@number
{
\rmfamily\tiny\color
{
lstnum
}
\noncopynumber
}
\def\lp
@number
{
\rmfamily\tiny\color
{
lstnum
}
\noncopynumber
}
\lstdefinestyle
{
frama-c-style
}{
%
\lstdefinestyle
{
frama-c-
basic-
style
}{
%
captionpos=b,
%
captionpos=b,
%
columns=flexible,
%
columns=flexible,
%
basicstyle=
\lp
@inline,
%
basicstyle=
\lp
@inline,
%
...
@@ -448,28 +448,22 @@
...
@@ -448,28 +448,22 @@
framerule=1pt,
%
framerule=1pt,
%
rulecolor=
\color
{
frama-c-orange!60
}
,
%
rulecolor=
\color
{
frama-c-orange!60
}
,
%
backgroundcolor=
\color
{
frama-c-bronze!10
}
,
%
backgroundcolor=
\color
{
frama-c-bronze!10
}
,
%
literate=
{
\
}{
\
}
1,
% ^~~~~ Without this, spaces starting a line does not have the right size ...
}
\lstdefinestyle
{
frama-c-style
}{
%
style=frama-c-basic-style,
%
moredelim=
{
*[s]
{
/*@
}{
*/
}}
,
%
moredelim=
{
*[s]
{
/*@
}{
*/
}}
,
%
moredelim=
{
*[l]
{
//@
}}
,
%
moredelim=
{
*[l]
{
//@
}}
,
%
morecomment=
{
[il]
{
//NOPP-LINE
}}
,
% invisible comment until end of line
morecomment=
{
[il]
{
//NOPP-LINE
}}
,
% invisible comment until end of line
morecomment=
{
[is]
{
//NOPP-BEGIN
}{
NOPP-END
\^
^
M
}}
,
% no space after NOPP-END
morecomment=
{
[is]
{
//NOPP-BEGIN
}{
NOPP-END
\^
^
M
}}
,
% no space after NOPP-END
mathescape=true,
mathescape=true,
escapechar=`,
literate=
{
\
}{
\
}
1
% ^~~~~ Without this, spaces starting a line does not have the right size ...
}
}
% Code styles
% Code styles
% --------------------------------------------------------------------------
% --------------------------------------------------------------------------
\lstdefinestyle
{
framac-code-style
}{
%
basicstyle=
\lp
@inline,
%
keywordstyle=[1]
\sffamily\color
{
lstmodule
}
,
%
keywordstyle=[2]
\sffamily\color
{
lstspecial
}
,
%
keywordstyle=[3]
\sffamily\bfseries
,
%
identifierstyle=
\rmfamily
,
%
stringstyle=
\ttfamily\color
{
frama-c-orange
}
,
%
commentstyle=
\rmfamily\bfseries\color
{
lsttxt
}
,
%
}
\lstdefinestyle
{
framac-shell-style
}{
%
\lstdefinestyle
{
framac-shell-style
}{
%
mathescape=false,
%
mathescape=false,
%
basicstyle=
\lp
@basic,
%
basicstyle=
\lp
@basic,
%
...
@@ -529,20 +523,19 @@
...
@@ -529,20 +523,19 @@
% --------------------------------------------------------------------------
% --------------------------------------------------------------------------
\lstdefinestyle
{
framac-code
}
%
\lstdefinestyle
{
framac-code
}
%
{
language=
{
[ANSI]C
}
,alsolanguage=ACSL,style=frama
c
-c
ode
-style,basicstyle=
\lp
@basic
}
{
language=
{
[ANSI]C
}
,alsolanguage=ACSL,style=frama-c-style,basicstyle=
\lp
@basic
}
\newcommand
{
\cinput
}
[2][]
%
\newcommand
{
\cinput
}
[2][]
%
{
\lstinputlisting
[
{
\lstinputlisting
[
language=
{
[ANSI]C
}
,
language=
{
[ANSI]C
}
,
alsolanguage=ACSL,
alsolanguage=ACSL,
style=framac-code-style,basicstyle=
style=frama-c-style,#1]
{
#2
}
\lp
@basic,#1]
{
#2
}
}
}
\newcommand
{
\cinline
}
[1]
%
\newcommand
{
\cinline
}
[1]
%
{
\lstinline
[style=framac-code]
{
#1
}}
{
\lstinline
[style=framac-code]
{
#1
}}
\lstnewenvironment
{
ccode
}
[1][]
%
\lstnewenvironment
{
ccode
}
[1][]
%
{
\lstset
{
language=
{
[ANSI]C
}
,alsolanguage=ACSL,style=frama
c
-c
ode
-style,basicstyle=
\lp
@basic,#1
}}{}
{
\lstset
{
language=
{
[ANSI]C
}
,alsolanguage=ACSL,style=frama-c-style,basicstyle=
\lp
@basic,#1
}}{}
% Configure
% Configure
% --------------------------------------------------------------------------
% --------------------------------------------------------------------------
...
@@ -566,7 +559,7 @@
...
@@ -566,7 +559,7 @@
{
à
}{{
\`
a
}}
1
%
{
à
}{{
\`
a
}}
1
%
{
é
}{{
\'
e
}}
1
%
{
é
}{{
\'
e
}}
1
%
,
,
style=frama
c
-c
ode
-style,
%
style=frama-c-style,
%
morekeywords=
{
morekeywords=
{
action, alias, as, deps, dune, executable, files, flags, from,
action, alias, as, deps, dune, executable, files, flags, from,
generate
_
opam
_
files, install, lang, libraries, library, name, optional,
generate
_
opam
_
files, install, lang, libraries, library, name, optional,
...
@@ -582,7 +575,7 @@
...
@@ -582,7 +575,7 @@
\lstdefinestyle
{
dune-basic
}{
%
\lstdefinestyle
{
dune-basic
}{
%
language=Dune,
%
language=Dune,
%
style=framac-
code
-style,
%
style=frama
-
c-
basic
-style,
%
basicstyle=
\lp
@inline,
%
basicstyle=
\lp
@inline,
%
}
}
...
@@ -614,7 +607,7 @@
...
@@ -614,7 +607,7 @@
\lstdefinestyle
{
make-basic
}{
%
\lstdefinestyle
{
make-basic
}{
%
language=Makefile,
%
language=Makefile,
%
style=framac-
code
-style,
%
style=frama
-
c-
basic
-style,
%
basicstyle=
\lp
@inline,
%
basicstyle=
\lp
@inline,
%
}
}
...
@@ -631,7 +624,7 @@
...
@@ -631,7 +624,7 @@
% --------------------------------------------------------------------------
% --------------------------------------------------------------------------
\lstdefinelanguage
{
Ocaml
}
[Objective]
{
Caml
}{
%
\lstdefinelanguage
{
Ocaml
}
[Objective]
{
Caml
}{
%
style=framac-
code
-style,
%
style=frama
-
c-
basic
-style,
%
deletekeywords=
{
when,module,struct,sig,begin,end
}
,
%
deletekeywords=
{
when,module,struct,sig,begin,end
}
,
%
morekeywords=[2]
{
failwith,raise,when
}
,
%
morekeywords=[2]
{
failwith,raise,when
}
,
%
morekeywords=[3]
{
module,struct,sig,begin,end
}
,
%
morekeywords=[3]
{
module,struct,sig,begin,end
}
,
%
...
@@ -702,7 +695,7 @@
...
@@ -702,7 +695,7 @@
\lstdefinestyle
{
why-style
}{
%
\lstdefinestyle
{
why-style
}{
%
language=Why,
%
language=Why,
%
style=framac-
code
-style,
%
style=frama
-
c-
basic
-style,
%
basicstyle=
\lp
@inline,
%
basicstyle=
\lp
@inline,
%
}
}
...
...
This diff is collapsed.
Click to expand it.
doc/metrics/metrics.tex
+
1
−
1
View file @
e181aca8
...
@@ -114,7 +114,7 @@ this purpose. }.
...
@@ -114,7 +114,7 @@ this purpose. }.
\end{shell}
\end{shell}
\begin{figure}
\begin{figure}
\centering
\centering
\lstinputlisting
[language={[ANSI]
C
}
,alsolanguage=ACSL,style=frama
c
-c
ode
-style,
\lstinputlisting
[language={[ANSI]
C
}
,alsolanguage=ACSL,style=frama-c-style,
basicstyle=
\lp
@basic,firstline=5]
basicstyle=
\lp
@basic,firstline=5]
{
../../tests/metrics/
\pgname
}
{
../../tests/metrics/
\pgname
}
\caption
{
Source code for
\pgname
}
\caption
{
Source code for
\pgname
}
...
...
This diff is collapsed.
Click to expand it.
doc/userman/user-analysis.tex
+
7
−
7
View file @
e181aca8
...
@@ -56,12 +56,12 @@ All \FramaC plug-ins define the following set of common options.
...
@@ -56,12 +56,12 @@ All \FramaC plug-ins define the following set of common options.
\optionidxdef
{
-
}{
<plug-in>-msg-key
}
\optionidxdef
{
-
}{
<plug-in>-msg-key
}
\optionidxdef
{
-
}{
kernel-msg-key
}
\optionidxdef
{
-
}{
kernel-msg-key
}
sets the categories of
sets the categories of
messages that must be output for the plugin.
\texttt
{
keys
}
is a
messages that must be output for the plugin.
\texttt
{
keys
}
is a
comma-separated list of names. The list of available categories can be
comma-separated list of names. The list of available categories can be
obtained with
\texttt
{
-<plug-in shortname>-msg-key help
}
. To enable all
obtained with
\texttt
{
-<plug-in shortname>-msg-key help
}
. To enable all
categories, use the wildcard
\texttt
{
'*'
}
%
categories, use the wildcard
\texttt
{
'*'
}
%
\footnote
{
Be sure to enclose it in single quotes or your shell might
\footnote
{
Be sure to enclose it in single quotes or your shell might
expand it, leading to unexpected results.
}
. Categories can have
expand it, leading to unexpected results.
}
. Categories can have
subcategories, defined by a colon in their names. For instance,
\texttt
{
a:b:c
}
subcategories, defined by a colon in their names. For instance,
\texttt
{
a:b:c
}
is a subcategory
\texttt
{
c
}
of
\texttt
{
a:b
}
, itself a
is a subcategory
\texttt
{
c
}
of
\texttt
{
a:b
}
, itself a
subcategory of
\texttt
{
a
}
. Enabling a category will also enable all its
subcategory of
\texttt
{
a
}
. Enabling a category will also enable all its
...
@@ -216,13 +216,13 @@ short truncate(int n) {
...
@@ -216,13 +216,13 @@ short truncate(int n) {
}
}
\end{ccode}
\end{ccode}
If
\texttt
{
-warn-signed-downcast
}
is set, analyzers report an error on
If
\texttt
{
-warn-signed-downcast
}
is set, analyzers report an error on
{
\lstset
{
language=C,style=frama
c
-c
ode
-style
}
\lstinline
|(short) n|
}
{
\lstset
{
language=C,style=frama-c-style
}
\lstinline
|(short) n|
}
which downcasts a signed integer to a signed
which downcasts a signed integer to a signed
short. Without it, no error is reported.
short. Without it, no error is reported.
\item
\optiondef
{
-
}{
warn-unsigned-downcast
}
is the same as
\item
\optiondef
{
-
}{
warn-unsigned-downcast
}
is the same as
\texttt
{
-warn-signed-downcast
}
for downcasts to unsigned integers. This option
\texttt
{
-warn-signed-downcast
}
for downcasts to unsigned integers. This option
is also
\emph
{
not
}
set by default.
is also
\emph
{
not
}
set by default.
\item
\optiondef
{
-
}{
warn-signed-overflow
}
may be used to check that the
\item
\optiondef
{
-
}{
warn-signed-overflow
}
may be used to check that the
analyzed code does not overflow on integer operations. If the opposite option
analyzed code does not overflow on integer operations. If the opposite option
...
@@ -240,7 +240,7 @@ int abs(int x) {
...
@@ -240,7 +240,7 @@ int abs(int x) {
By default, analyzers detect an error on
By default, analyzers detect an error on
\lstinline
|-x| since this operation overflows when
\lstinline
|MININT| is the
\lstinline
|-x| since this operation overflows when
\lstinline
|MININT| is the
argument of the function. But, with the
\texttt
{
-no-warn-signed-overflow
}
argument of the function. But, with the
\texttt
{
-no-warn-signed-overflow
}
option, no error is detected.
option, no error is detected.
\item
\optiondef
{
-
}{
warn-unsigned-overflow
}
is the same as
\item
\optiondef
{
-
}{
warn-unsigned-overflow
}
is the same as
\texttt
{
-warn-signed-overflow
}
for operations over unsigned integers. This
\texttt
{
-warn-signed-overflow
}
for operations over unsigned integers. This
...
@@ -280,4 +280,4 @@ option, no error is detected.
...
@@ -280,4 +280,4 @@ option, no error is detected.
% TeX-master: "userman.tex"
% TeX-master: "userman.tex"
% ispell-local-dictionary: "english"
% ispell-local-dictionary: "english"
% compile-command: "make"
% compile-command: "make"
% End:
% End:
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