2

I am trying to compute the variable dependencies in a project with different c files. Each of those files has a main function, and they are not calling each other. However they have shared variables and I need to calculate the final dependencies between them.

For example I have two c files: "File1.c" and "File2.c" and a Header file "Header.h" defining three global variables.

File1.c

#include "header.h"

 void main1(){
   var1 = var2;
 }

File2.c

  #include "header.h"

    void main2(){
      var2 = var3;
    }

Header.h

int var1=1;
int var2=2;
int var3=3;

If I call the dependencies module on frama-c I have to specify the entry Point, and therefore choose main1 or main2 as entry Points, so either I get the dependencies of main1.c:

var1 FROM var2

or dependencies from main2.c:

var2 FROM var3

instead I would like to get the dependencies between both files:

var1 FROM var3

I also tried to wrap the two mains calling them from another function but frama says literally "NO EFFECTS". I hope what I want to get is possible with frama-c.

J. Abe
  • 45
  • 6

0 Answers0