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

Frama-C: Add Annotation in Plugin

I am writing a Frama-C-plugin. In this plugin, I want to add annotations to functions (e.g. if function name = "test", add a requires clause, saying parameter == 1). I found the function Annotations.add_requires, but I don't know some of the…
Thomas Böhm
  • 1,456
  • 1
  • 15
  • 27
0
votes
1 answer

Frama-C: Getting the values of statement

I want to develop a Frama-C-Plugin, where I get the values of the current statement. With the help of this post Frama-C Plugin development: Getting result of value-analysis I was able to print the values of the statements, but Pointers were not…
Thomas Böhm
  • 1,456
  • 1
  • 15
  • 27
0
votes
1 answer

Frama-C Plugin-Development: Getting the values of value analysis of different calls

I am developing a Frama-C-Plugin this should print the values of the variables after each statement. In the Frama-C-Gui, in the tab Values, I can see the values of the analysis over the whole program, and after different function calls (with the…
Thomas Böhm
  • 1,456
  • 1
  • 15
  • 27
0
votes
1 answer

Frama-C make errors (Ubuntu 16.04 LTS): Error: Unbound module Dgraph

This Frama-C Magnesium-20151002, compilation environment is Ubuntu 16.04 (Xenial). Ocamlc src/plugins/gui/debug_manager.cmi Ocamlc src/plugins/gui/help_manager.cmi Ocamlc src/plugins/gui/property_navigator.cmi Ocamlc …
Peter Teoh
  • 6,337
  • 4
  • 42
  • 58
0
votes
1 answer

bogus warning on write to pointer

I am a very newbie with Frama-c and have a very short program which causes frama-c to claim that 'out of bounds write. assert\valid(iptr): f4.c:33:[kernel] warning: out of bounds write. assert \valid(iptr); f4.c:34:[value] Assigning imprecise value…
NotCharlie
  • 43
  • 2
  • 9
0
votes
1 answer

ACSL - Can't prove function

I'm trying to prove this function, but in vain. I'm also using another function, but I proved it. Could anyone help me? I'm using Frama-C Sodium version with Alt-ergo 3 as prover. Given a not-empty string x. An integer number p such…
echo
  • 84
  • 1
  • 8
0
votes
1 answer

Automatic widening in frama-c value analysis

I am looking for a method to perform widening on loops with no user hints. I'll explain using an example: int z; void main(void) { int r = Frama_C_interval(0, MAX_INT); z = 0; for (int y=0; y
Maor Veitsman
  • 1,544
  • 9
  • 21
0
votes
1 answer

frama-c [kernel] user error: Invalid symbol

When am trying to get pdg of a code i am getting this invalid symbol error wiht no line numbers for help. Can any one suggest what this error means? note that code compiles and runs with g++ Question is how to get exact line number for this…
0
votes
0 answers

Frama-C and ACSL implementation on C stack

i have some trouble to implement the precondition and postcondition in ACSL into my code. I'd like to complete an exercise, i have implemented a stack (like the informal specification in the comment) and now i need to implement the precondition and…
FedeXu
  • 50
  • 3
0
votes
0 answers

Frama-C Install Errors

I have the newest Frama-C .zip file from the website, unpacked it and ran ./configure. That seems to have gone alright but when I run sudo make I get: $ sudo make Ocamlc external/unz.cmo File "external/unz.ml", line 39, characters…
Adam
  • 33
  • 7
0
votes
1 answer

Frama-C Graph of Full File

I have been trying to use the pdg-dot plugin to help create a good graph of my software.The problem is different files don't have main so Frama-C complains. When I use the -main tag and specify a function to start it, it only creates a .dot file for…
Adam
  • 33
  • 7
0
votes
0 answers

Printing the results of the method find_simple_stmt_nodes (Module Db.Pdg)

How could i print the results of this function find_simple_stmt_nodes : (t -> Cil_types.stmt -> PdgTypes.Node.t list) Pervasives.ref.Is there a method to do that? If anybody could help me... I tried something like that: let listeStatement=…
0
votes
1 answer

To get the node corresponding the declaration of a local variable with Db.Pdg.find_decl_var_node

*I wrote this script in order to get the node corresponding the declaration of a local variable, in my case "val" which is in a little program C but i get the error Unexpected error (Not_found). I think that i did not give the right arguments to my…
0
votes
2 answers

How can i use the modules written for Frama-C' s plugin?

Build is a module which has been developed in order to build the PDG. I wrote a script which uses this module Build but when i try to launch this script with: frama-c -load-script test.ml I get the mistake: Unbound module Build. Is there a way to…