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] How to get the defined locations or varinfos of a corresponding statement by using the value state programatically?


  • Subject: [Frama-c-discuss] How to get the defined locations or varinfos of a corresponding statement by using the value state programatically?
  • From: abiao.yang at gmail.com (David Yang)
  • Date: Thu, 9 Jan 2014 22:48:54 +0800

Dear all,

Here I want to know how to get the defined locations or variables of a
corresponding statement.
For example in the following function:

We can easily get that the variable or location S_sum is defined in
the statement 5: *sum += A[i];

int main(int *A, int size, int *sum)
{
    *sum = 0;
    for(int i = 0; i < size; i++) {
        *sum += A[i]; /* stmt 5 */
    }
}

But I don't know how to get such varibles from the value state of this
statement programatically. Besides, I can't find any API function from
the API document.

Thanks.

-david