Questions tagged [frama-c]

Frama-C is an Open Source suite of tools dedicated to the analysis of C source code.

Frama-C offers ready-to-use analyses for C programs: call graph, value analysis, functional dependencies, Program Dependence Graph, runtime monitoring, etc. It also allows the verification of functional properties, temporal logic, and much more. Results can be expressed in plain text, in SARIF, or in Frama-C's graphical interface.

Each analysis is implemented as a plug-in, and plug-ins inside the platform can use the results of one another. Frama-C is Open Source and extensible: new analyses can be implemented in OCaml as additional plug-ins that take advantage of existing ones. They communicate using the ACSL specification language, which also enables describing what the program is supposed to do.

Most provided analyses in Frama-C are sound: used within a delimited perimeter, all the behaviors that can happen at run-time are included in the behaviors statically predicted by Frama-C. Notwithstanding the possibility of bugs, plug-ins must be used as documented for the property to hold. This makes it possible to use Frama-C for the formal verification of C programs.

447 questions
0
votes
1 answer

How to prove this assign clause?

/*@ @ requires \valid(p); @ assigns \nothing; */ void foo(int *p) { int *pb; pb = p; *pb = 1; return; } void main(){ int a = 0; foo(&a); return; } As I understand the assigns clause for a function contract only…
ratt
  • 115
  • 5
0
votes
0 answers

Does frama-c satisfy the ISO 26262 standard of the Automotive sector?

The Question arises because we want to apply the frama-C's Plugin "Value Analysis" in this industry.
J. Abe
  • 45
  • 6
0
votes
1 answer

How to install Frama-c on a computer without internet connection

I am trying to install Frama-c on a computer which can not connect to the internet because of the security but I can copy needed files to this computer using USB. The current operating system of this computer is Windows. However, I had some…
Thuy Nguyen
  • 353
  • 2
  • 10
0
votes
1 answer

Getting quick help information for Frama-C

How to get quick help information for Frama-C (without having to resort to the manuals)? Typing "frama-c -help" displays very little useful data.
anol
  • 8,264
  • 3
  • 34
  • 78
0
votes
2 answers

Frama-c execution time & heap memory bounds proof

Does Frama-C provide any tools for proving the run-time characteristics of a function such as execution time (possibly as instruction count) and heap memory space (counted as bytes allocated)?
0
votes
1 answer

Equivalence between C/frama-c and Spark-ada

I'm studying the framework Frama-c, and I'm wondering if there is an equivalence between C/Frama-c and Spark Ada. I know that it can seem quite odd to compare such different languages, but after reading David A. Wheeler's article, Johannes Kanig's…
Eliott.CH
  • 25
  • 3
0
votes
1 answer

Frama-c: Function calls and static variables

I'm currently discovering frama-c's features, and especially WP & Value's analysis tools. My final goal is to be able to use frama-c on larger codes that involves several layers with: a lot of function calls use of complex data structures static…
Eliott.CH
  • 25
  • 3
0
votes
1 answer

Unbounded function in EACSL Frama-C plugin

I am trying to generate contracts in C with E-ACSL plugin from FRAMA-C for the following program: struct lnode { int value; struct lnode *next; }; struct set { int capacity; int size; struct lnode *elems; }; struct set* new(int…
0
votes
1 answer

How can be C files linked when using E-ACSL plugin?

I am trying to generate an annotated file with Frama-C E-ACSL plugin. I created the following files: Insert.c: contains all the structures to create a linked list. AxiomTest.c: includes the main function where the asserts it must fulfil are…
0
votes
1 answer

Frama-C warning: Missing assigns clause (assigns 'everything' instead)

I'm testing this small program with frama-c and I keep getting the same error. I'm not sure what it means. I'm particularly confused on what assigns everything means. Here is the code in question with ACSL annotations: // assuming n is nonnegative…
the_martian
  • 632
  • 1
  • 9
  • 21
0
votes
1 answer

I can not open any .C files with Frama-c and only receive "Invalid User Input" Errors

I am new to Frama-c and quite new to programming in general. I installed Frama-C on my Mac. I am using OSX. From the Command Line I enter Frama-C-Gui which opens fine at which time I select "New Project" Frama-C GUI then adding a new Project I…
0
votes
0 answers

Compilation of FromInt.v failing on MacOS (trying to use wp plugin with Coq)

If I try: frama-c -val -wp -wp-rte -wp-prover coq acsl-case-study.c then I get the following error: File "/var/folders/m5/pq77jvw12md76t51_6t51vfwhptwwy/T/wp7149b4.dir/coqwp/real/FromInt.v", line 22, characters 15-32: Error: The reference…
Dominic Mulligan
  • 456
  • 2
  • 10
0
votes
1 answer

Frama-c: save plugin analysis results in c file

I'am new in frama-c. So I apologize in advance for my question. I would like to make a plugin that will modify the source code, clone some functions, insert some functions calls and I would like my plugin to generate a second file that will contain…
R. Fomba
  • 79
  • 8
0
votes
0 answers

Array size in Frama-C

I'm new in frama-c plugin development. I would like to ask if there is a way to get array size value and array elements type from Frama-C, either a static or dynamic created array. For example float *A = (float*)malloc(ni * nk * sizeof(float));…
R. Fomba
  • 79
  • 8
0
votes
1 answer

cant analysis openmp code with frama-c

I'm new in frama-c. I tried to run value analysis plugin on the following c code with openmp directives : static void kernel_2mm(int ni, int nj, int nk, int nl, float alpha, float beta, float *tmp, float *A, float *B, float *C, float *D) { int…
R. Fomba
  • 79
  • 8