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
5c735edc
Commit
5c735edc
authored
9 months ago
by
Loïc Correnson
Committed by
Virgile Prevosto
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[userman] documenting external module extensions
parent
24f54900
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/userman/user-acsl.tex
+49
-1
49 additions, 1 deletion
doc/userman/user-acsl.tex
with
49 additions
and
1 deletion
doc/userman/user-acsl.tex
+
49
−
1
View file @
5c735edc
...
...
@@ -14,7 +14,7 @@ extensions coming from an unloaded plug-in can be ignored this way. For
example, if
\Eva
is not loaded,
\lstinline
|
\eva
::unroll
_
| annotations will be
ignored with a warning, whereas
\lstinline
|unroll
_
| cannot be identified as
being supported by Eva, which means that it can only be treated as a user
error.
error.
\section
{
Handling indirect calls with
\texttt
{
calls
}}
\label
{
acsl:calls
}
...
...
@@ -33,6 +33,54 @@ indicates that the pointer \lstinline|f| can point to any one of
It is in particular used by the WP plug-in (see
\cite
{
wp
}
for more information).
\section
{
External Module Importers
}
Plug-ins have the possibility to load
\acsl
module from external sources.
A typical usage is to import
\acsl
logical declarations from other
languages, eg.
\textsf
{
Coq
}
or
\textsf
{
Why3
}
.
External
\acsl
module importation is triggered by special
\verb
+
import
+
global
annotations:
\begin{lstlisting}
//@ import <loader>: <module-name> [
\as
<alias-name> ];
\end{lstlisting}
The syntax is similar to the geneal
\verb
+
import
+
annotation, except that the
module name is prefixed with the name of the loader extension. Loader names are
defined by plugin extensions and you shall refer to the documentation of your
plug-ins to know the loaders they provides.
The same external module can be imported several times under any aliases, in
which case they all refer to the same logical specifications, like regular
modules.
When printing the internal AST from
\FramaC
command line using
\verb
+
-print
+
option, externally imported modules are listed with one single clause for each,
with no aliasing in order to avoid any ambiguity. For instance:
\begin{lstlisting}
//@ import MyLoader: foo::bar::Jazz
\as
_
;
\end{lstlisting}
Alternatively, you can debug the logical definitions actually imported by any
driver by using
\verb
+
-print
+
with the
\verb
+
printer:imported-modules
+
debugging
key:
\begin{lstlisting}
> frama-c ... -print -kernel-message-key printer:imported-modules
\end{lstlisting}
With this option, the contents of the imported modules are printed like regular
module definitions, with only a comment to mention the origin of the plug-in:
\begin{lstlisting}
/*@ // import MyLoader:
module foo::bar::Jazz
{
...
}
*/
\end{lstlisting}
Notice that, when using the
\verb
+
printer:imported-modules
+
message key, the
resulting file will still compile and type-check, but the plug-in extension will
no more be aware of the external nature of those modules, and it will probably
\emph
{
not
}
work as with the original specification.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "userman"
...
...
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