Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] can we collect referenced variables with frama-c?

On 2/16/11, Deng, Xu <xu.deng at> wrote:
> Can we use frama-c to collect the referenced (used/modified) global
> variables of a function, including the global variables referenced by the
> functions called in this function? says:

"the list of global variables that a function is supposed to read or
write to is a formal specification. Frama-C can compute this
information automatically from the source code of the function"

> For example:
> The func() actually has modified S.a, S.p and S.a, can frama-c support
> collecting this information?

Your program does not compile, but if it did, "frama-c -out -input t.c
-main func" would tell you that func actually reads s1.p and writes
s1; s0.a; and p.


For what it's worth, here is the program I actually analyzed with the
command above:

struct S0{

  int a;

  int b;


struct S{

  int a;

  struct S0 *p;


struct S s1;

struct S0 s0;

void func()




  struct S0 *p = s1.p;



void func2(struct S0 *p)


   p->a = 0;