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
0 answers

Frama-c loop invariant

I just tried to prove a sort function in frama-c. However, when I proved the outer loop. loop invariant 0 <= i \forall int a,b; 0<=b <=l-i-1 <=a < l ==> t[a]>=t[b]; There is always with the orange bullets. I refer…
Haiyin
  • 1
  • 1
0
votes
1 answer

How to avoid detecting uninitialized variables when using the impact analysis of Frama-C

I find that if there is an uninitialized left-value (variable X for example) in the program, Frama-C asserts that X has been initialized, but then the assertion gets the final status invalid. It seems that Frama-C stops the analysis after detecting…
0
votes
1 answer

Slicing with Frama-c

I installed frama-c with opam on my MacOs. I need to slice Hello World by manually. I mean not with Gui. I searched on the internet but I could not understand how do it. My english is not well enough. So can somebody help me to slice HelloWorld.c ?
0
votes
1 answer

Frama-c installation- configure: error: Cannot find ocamlfind

xhy0908deMacBook-Pro:frama-c-Phosphorus-20170501 xhy0908$ ./configure configure: ****************** configure: * CONFIGURE MAKE * configure: ****************** checking for make... make checking version of make... 3.81 configure:…
Haiyin
  • 1
  • 1
0
votes
0 answers

static analyzer with frama-c

I am working on static analyzer for C codes, as far as I understand, frama-c used Clang for its AST tree assume that in your code, you have some system function calls such ast strcpy or strcmp in this case, is that possible to predict (in static…
Hamid
  • 31
  • 4
0
votes
2 answers

Assertion on pointer to array

I have defined the following function which is well proved by frama-c: //ensures array <= \result < array+length && *\result == element; /*@ requires 0 < length; requires \valid_read(array + (0 .. length-1)); assigns \nothing; behavior…
0
votes
2 answers

How to force a memory location to be valid in ACSL?

I define device accesses as thus volatile struct mydevice * const dev = (struct mydevice *)MY_DEVICE_ADDRESS; I've modeled the accesses using @ volatile dev->somereg reads somereg_read writes somereg_write; Now the problem is that when I enable…
Yifan
  • 4,867
  • 5
  • 25
  • 24
0
votes
1 answer

Frama-c to generate a graph object instead of dot files

I am trying to find if two programs are gamma-isomorphic or not for which I am taking the help of Jgrapht library. Now, I have to generate program dependence graphs of the programs and capture it as a graph object. Using frama-c we can generate…
Jab
  • 119
  • 1
  • 2
  • 17
0
votes
0 answers

import core.std to plugin of frama-c

I have other problem, I have tried change Makefile for include Core.Std, I would like to use it, for the module List. This is my MakeFile. FRAMAC_SHARE :=$(shell frama-c-config -print-share-path) FRAMAC_LIBDIR :=$(shell frama-c-config…
0
votes
1 answer

could not install frama-c-Phosphorus using opam

I had successfully installed frama-c-Silicon using opam by the instructions, but when I want to upgrade to Phosphorus, opam does not work. I used the command: opam pin add frama-c Downloads/frama-c-Phosphorus20170501.tar.gz it said that: [NOTE]…
0
votes
1 answer

Adding Code of missing functions in frama-c

Forgive my ignorance. I need to do calculate backward slices for a project. After some searching, I came across frama-c. I downloaded the package on my ubuntu system which got me Frama-c Version: Fluorine-20130601. I am trying to use it for the…
Jina Lee
  • 119
  • 2
  • 10
0
votes
0 answers

I try to get values of -deps but other way

I edit the question, because I have advanced with the program. It still does not do what I want. So the problem is due to ignorance of Ocaml, the variable "aux2" is of type: "Function_From.Deps.t -> Function_From.Deps.t". C How could I access each…
0
votes
1 answer

frama-c: all VCs fail

When I run frama-c -jessie -jessie-atp simplify max-anno.c I get the following: [kernel] preprocessing with "gcc -C -E -I. -dD max-anno.c" [jessie] Starting Jessie translation [jessie] Producing Jessie files in subdir max-anno.jessie [jessie] File…
Adriano Carvalho
  • 143
  • 2
  • 10
0
votes
1 answer

Coq: Cannot find library Jessie_memory_model in loadpath

After running the following command frama-c -jessie max-anno.c, the GUI starts correctly, but then, when running Coq, I get the following output: Welcome to Coq 8.4pl4 (July 2014) Warning: Cannot open /usr/local/lib/why3/coq-tactic File…
Adriano Carvalho
  • 143
  • 2
  • 10
0
votes
1 answer

"No child processes" error thrown by OCaml Sys.command function

I am trying to use Frama-c via python application. This python application sets some env variables and system path. From this application, I am calling Frama-c as a python process as following: cmd = ['/usr/local/bin/frama-c', '-wp', '-wp-print',…
Gunjan Aggarwal
  • 710
  • 5
  • 19