Skip to content
Snippets Groups Projects
Commit a7405dac authored by Augustin Lemesle's avatar Augustin Lemesle
Browse files

Merge branch 'feature/wiki' into 'master'

Documentation pages

See merge request frama-c/frama-c.frama-c.com!10
parents 0de8dadb 9651209f
No related branches found
No related tags found
1 merge request!10Documentation pages
Pipeline #23470 passed
--- ---
layout: clean_page layout: clean_page
--- ---
# External plug-ins # External plug-ins
This is a list of plug-ins that you may find useful but are not This is a list of plug-ins that you may find useful but are not
...@@ -12,6 +12,27 @@ luck on the mailing list. ...@@ -12,6 +12,27 @@ luck on the mailing list.
Add your own plug-in if you think it can be useful to other and want to Add your own plug-in if you think it can be useful to other and want to
share it with the world\! share it with the world\!
## Pilat
URL: <http://steven-de-oliveira.fr/index.php?page=tool_pilat>
PILAT (for Polynomial Invariants by Linear Algebra Tool) is an invariant
generator based on the study of matrices. It processes loops with polynomial
assignments and linearize them, then searches for left eigenvectors of the
resulting matrix. Those vectors expresses invariants of the loop.
## StaDy
URL: <https://github.com/gpetiot/Frama-C-StaDy>
StaDy is an integration of the concolic test generator PathCrawler within
the software analysis platform Frama- C. When executing a dynamic analysis
of a C code, the integrated test generator also exploits its formal specification,
written in an executable fragment of the acsl specification language shared
with other analyzers of Frama-C. The test generator provides the user with
accurate verdicts, that other Frama-C plugins can reuse to improve their own
analyses.
## Jessie ## Jessie
URL: <http://krakatoa.lri.fr/> URL: <http://krakatoa.lri.fr/>
...@@ -30,7 +51,7 @@ asked about it have been gathered on their [own page](/dokuwiki/jessie.html), or ...@@ -30,7 +51,7 @@ asked about it have been gathered on their [own page](/dokuwiki/jessie.html), or
## Celia ## Celia
URL: <http://www.liafa.univ-paris-diderot.fr/celia/> URL: <https://www.irif.fr/~sighirea/celia/>
CELIA is a tool for the static analysis and verification of C programs CELIA is a tool for the static analysis and verification of C programs
manipulating dynamic (singly linked) lists. The static analyser computes manipulating dynamic (singly linked) lists. The static analyser computes
......
---
layout: clean_page
---
# Tips and Frequently asked questions
### Frequently Asked in frama-c-discuss
Éric Jenn has compiled a list of [Frequently Asked Questions](/dokuwiki/frequently_asked_questions.html) and answers based on
contributions to the
[frama-c-discuss](/mailto/frama-c-discuss@lists.gforge.inria.fr) list.
# Parsing
### Pre-processing the annotations
By default, the preprocessor does not process comments. ACSL
annotations, unfortunately, look like comments to the preprocessor. If
you use the GCC preprocessor (also known as GNU CPP), you can force the
preprocessing of annotations with the `-pp-annot` option.
frama-c -pp-annot [other options]
### Using standard headers
Since Frama-C Boron, a large part of the C99 standard library headers
are installed with Frama-C, in the `${FRAMAC_SHARE}/libc` directory. It
is better to use these headers rather than the ones that might be
present on your system, as they contain some specific information that
will help the analyses, such as in particular ACSL specifications for
some of the functions. In order to `#include` such an header file, you
can use *e.g.* the following command:
``frama-c -cpp-extra-args="-I`frama-c -print-path`/libc" [other
options]``
### Booleans
The C99 type `bool` is not automatically supported by Frama-C. To use
`bool` in your code, add this line:
typedef enum _bool { false = 0, true = 1 } bool ;
Note that C99 uses a pre-defined type `_Bool` (see paragraph 6.2.5),
that is supported by Frama-C. The standard library defines a **macro**
`bool` (that expands to `_Bool`) in `stdbool.h`.
### What do I need to be able to use the Windows Frama-C package?
You need to install a C preprocessor. Any preprocessor can be used, but
the best preprocessor to choose is the one that is supposed to be used
to preprocess the application you want to analyze.
If you just seek any C preprocessor for testing purpose, you may want to
install Cygwin and add the gcc development package or any version you
can find on the web. Page 40 of the Value analysis manual gives hints
for other preprocessors (MSVC):
frama-c-gui -cpp-command ’gcc -C -E -I . -x c ’
frama-c-gui -cpp-command ’gcc -C -E -I . -o %2 %1'
frama-c-gui -cpp-command ’copy %1 %2’
frama-c-gui -cpp-command ’cat %1 > %2’
frama-c-gui -cpp-command ’CL.exe /C /E %1 > %2’
# Jessie and WP
### Installing theorem provers
Links for installing provers are provided on [Why3's
page](http://why3.lri.fr/#provers).
Here are detailed instructions for making use of Z3:
- go to [Z3 source
homepage](http://z3.codeplex.com/SourceControl/latest#README)
- Click on the 'Download' button
- Save the zip in a local folder, say z3-sources/.
- Run the following commands:
<!-- end list -->
cd z3-sources
unzip z3[tab for completion]
cd z3[tab for completion]
autoconf
./configure
python scripts/mk_make.py
cd build
make
sudo make install
- z3 executable is installed at /usr/bin, libraries at /usr/lib, and
include files at /usr/include.
- Run `why3config --detect` (the provers, the versions and the plugins
detected can be differrent)
<!-- end list -->
Found prover Alt-Ergo version 0.95.1, Ok.
Found prover CVC3 version 2.4.1, Ok.
Found prover Spass version 3.7, Ok.
Found prover Z3 version 4.3.1, Ok.
Found prover Coq version 8.4pl1, Ok.
Warning: prover Gappa version 0.17.1 is not known to be supported, use it at your own risk!
5 provers detected and 1 provers detected with unsupported version
== Found [..]/why3/lib/why3/plugins/hypothesis_selection.cmxs ==
== Found [..]/why3/lib/why3/plugins/tptp.cmxs ==
== Found [..]/why3/lib/why3/plugins/dimacs.cmxs ==
== Found [..]/why3/lib/why3/plugins/genequlin.cmxs ==
Save config to ~/.why3.conf
### Jessie specific questions
See [Jessie's page](/dokuwiki/jessie.html).
# Graphical user interface
### Is there an Eclipse plug-in?
* An Eclipse plug-in providing equivalent functionality to gWhy (for Weakest Precondition plug-ins) is currently maintained by Nickolay V. Shmyrev and [[http://github.com/frama-c-eclipse/frama-c-eclipse|is available on GitHub]]. This plug-in works on Linux, but not yet on Windows.
* (fcdt)[http://gforge.enseeiht.fr/projects/fcdt/|fcdt] is another Eclipse plug-in, that allows to use value analysis from Eclipse
### How do I customize the GUI?
Starting with 20090901 (Beryllium), you can create a file named
frama-c-user.rc in $FRAMAC\_SHARE. An example of the syntax to use can
be found in the file $FRAMAC\_SHARE/frama-c.rc.
# Misc
### Validity of memory zones
ACSL (hence Frama-C) uses a typed memory model. That is, each block of
allocated memory is associated with a type. These can be simple types,
such as char or int, as well as structs. Therefore, the code below is
correct
struct A {
int x;
int y;
};
struct B {
struct A a;
int z;
};
/*@ requires \valid(p);
*/
void foo(struct B *p) {
p->a.x = 0;
p->z = 0;
}
Note however that arrays are considered as chunks of data of the same
type. Therefore, this example does not verify:
typedef int arr3[3];
/*@ requires \valid(a);
*/
foo(arr3 a) {
a[2] = 0;
}
Instead, the correct annotation is
typedef int arr3[3];
/*@ requires \valid(a+ (0..2));
*/
foo(arr3 a) {
a[2] = 0;
}
### Checking the alignment of some memory accesses with the value analysis
It is possible to check explicitly that a few memory accesses are
aligned with the value analysis. Check the [Explicit alignment
howto](Explicit%20alignment%20howto).
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
layout: clean_page layout: clean_page
title: Documentation title: Documentation
--- ---
# Documentation # Documentation
<!-- Is on-topic in this wiki anything that may be of help to others users of --> <!-- Is on-topic in this wiki anything that may be of help to others users of -->
...@@ -17,7 +18,7 @@ submitting a merge requests at the corresponding ...@@ -17,7 +18,7 @@ submitting a merge requests at the corresponding
[https://git.frama-c.com/frama-c/frama-c.frama-c.com](gitlab repository). [https://git.frama-c.com/frama-c/frama-c.frama-c.com](gitlab repository).
For plug-ins documentation, some pages can be found here but all of them are For plug-ins documentation, some pages can be found here but all of them are
otherwise available [/html/kernel-plugin.html](on the dedicated page). otherwise available [on the dedicated page](/html/kernel-plugin.html).
Is on-topic anything that may be of help to others users of Is on-topic anything that may be of help to others users of
Frama-C and related tools: tips, changes that you have noticed, Frama-C and related tools: tips, changes that you have noticed,
...@@ -29,49 +30,73 @@ workarounds, etc. ...@@ -29,49 +30,73 @@ workarounds, etc.
<!-- functional that it puts the authors of Frama-C's various manuals to --> <!-- functional that it puts the authors of Frama-C's various manuals to -->
<!-- shame. --> <!-- shame. -->
----- -------
# Compilation and Installation # Compilation and Installation
Current and old releases of Frama-C are available on [this Current and old releases of Frama-C are available on [this page](html/get-frama-c.html).
page](html/get-frama-c.html). It contains the official It contains the official installation instructions for supported systems.
installation instructions for supported systems.
Otherwise, [each releases](https://git.frama-c.com/pub/frama-c/blob/master/INSTALL.md) contains extra instructions Otherwise, [each releases](https://git.frama-c.com/pub/frama-c/blob/master/INSTALL.md)
for compiling from source. contains extra instructions for compiling from source.
<!-- We could copy INSTALL.md to this repo --> <!-- We could copy INSTALL.md to this repo -->
# Contributing -----
Frama-C is an open-source project which could be contrinuted through merge # Manuals and tutorials
requests at this [Gitlab repository](https://git.frama-c.com/pub/frama-c/). The
modalities are described in this [document](https://git.frama-c.com/pub/frama-c/CONTRIBUTING.md)
<!-- We could copy CONTRIBUTING.md to this repo --> ### ACSL
- [Description](/html/acsl.html)
- [Manual](/download/acsl.pdf)
- [Online](/html/acsl_tutorial_index.html) and [PDF](/download/acsl-tutorial.pdf) tutorial
### Frama-C
- [Description](/html/kernel.html)
- [Manual](/download/frama-c-user-manual.pdf)
- [ACSL implementation](/download/frama-c-acsl-implementation.pdf)
# FAQ, Tips and Tricks ### Plugins
See [this page](/dokuwiki/faq.html), or this [slightly older - Eva [Description](/fc-plugins/eva.html) - [Manual and tutorial](/download/frama-c-eva-manual.pdf)
one](/dokuwiki/frequently_asked_questions.html). - WP [Description](/fc-plugins/wp.html) - [Manual](/download/frama-c-wp-manual.pdf)
- E-ACSL [Description](/fc-plugins/e-acsl.html) - [Manual](/download/e-acsl/e-acsl-manual.pdf)
- RTE [Description](/fc-plugins/rte.html) - [Manual](/download/frama-c-rte-manual.pdf)
- Aoraï [Description](/fc-plugins/aorai.html) - [Manual](/download/frama-c-aorai-manual.pdf)
- Metrics [Description](/fc-plugins/metrics.html)
- Occurrences analysis [Description](/fc-plugins/occurrence.html)
- Scope analysis [Description](/fc-plugins/scope.html)
- Slicing [Description](/fc-plugins/slicing.html)
- Semantic constant folding [Description](/fc-plugins/semantic-constant-folding.html)
- Spare code elimination [Description](/fc-plugins/spare-code.html)
- Impact analysis [Description](/fc-plugins/impact.html)
# External plug-ins ### Plugin development
- [Manual](/download/frama-c-plugin-development-guide.pdf)
### External plug-ins
[External plug-ins](/dokuwiki/external_plugins.html) that you may find [External plug-ins](/dokuwiki/external_plugins.html) that you may find
useful are available. The plug-ins currently described are **Jessie**, useful are available. The plug-ins currently described are **Jessie**,
**Celia** and **Werror**. **Celia** and **Werror**.
# Known issues ------
- The BTS has a [list of known # Contributing
issues](http://bts.frama-c.com/view_all_bug_page.php).
- See [bug reporting guidelines](/dokuwiki/bug_reporting_guidelines.html) to
report a bug.
# Open positions Frama-C is an open-source project which could be contrinuted through merge
requests at this [Gitlab repository](https://git.frama-c.com/pub/frama-c/). The
modalities are described in this [document](https://git.frama-c.com/pub/frama-c/CONTRIBUTING.md)
<!-- We could copy CONTRIBUTING.md to this repo -->
# Known issues
[Open positions](/dokuwiki/positions.html) in the Frama-C team are - The BTS has a [list of known issues](http://bts.frama-c.com/view_all_bug_page.php).
available. - See [bug reporting guidelines](/dokuwiki/bug_reporting_guidelines.html) to report a bug.
# Works about Frama-C # Works about Frama-C
......
--- ---
layout: clean_page layout: clean_page
--- ---
# Frama-C in teaching # Frama-C in teaching
This page lists various courses that are using Frama-C in their lab This page lists various courses that are using Frama-C in their lab
...@@ -8,8 +8,6 @@ lessons. ...@@ -8,8 +8,6 @@ lessons.
## In English ## In English
- [University of Iowa: Formal Methods in Software
Engineering](http://homepage.divms.uiowa.edu/~pgaroche/181/syllabus.shtml)
- [University of Minho: Formal Methods in Software - [University of Minho: Formal Methods in Software
Engineering](http://mei.di.uminho.pt/?q=en/1112/mfes-uk) Engineering](http://mei.di.uminho.pt/?q=en/1112/mfes-uk)
- [University College London: Language-based - [University College London: Language-based
...@@ -20,12 +18,8 @@ lessons. ...@@ -20,12 +18,8 @@ lessons.
- [ENSIIE Evry: Static Analysis of Programs](/dokuwiki/ensiie.html) - [ENSIIE Evry: Static Analysis of Programs](/dokuwiki/ensiie.html)
- [École Polytechnique: Initiation to Program - [École Polytechnique: Initiation to Program
Proof](http://www.enseignement.polytechnique.fr/profs/informatique/Sylvie.Putot/Enseignement/SemantiqueValidation/TP6.html) Proof](http://www.enseignement.polytechnique.fr/profs/informatique/Sylvie.Putot/Enseignement/SemantiqueValidation/TP6.html)
- [ENSI Bourges: Specification and Test of
Applications](http://enseignement.ensi-bourges.fr/ects/modules/fiche.php?id=2513&lang=fr)
## In other languages ## In other languages
- [Humboldt University Berlin: Deductive Verification (in
German)](http://www2.informatik.hu-berlin.de/~hs/Lehre/2011-WS_SWV1/index.html)
- [Moscow State University: Formal Specification and Verification (in - [Moscow State University: Formal Specification and Verification (in
Russian)](http://sed.ispras.ru/fmprac) Russian)](http://sed.ispras.ru/fmprac)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment