I want to query the value analysis plugin in Frama-C for instructions to get their value. For each array, it returns the value range of the whole array. For example, if the instruction is array[i] = 1;
, I got result = {1}
for array[i]
from value analysis plugin. Now, for e.g. array[i]
, I would like to get the variable name i
and its value from value analysis.
Below is a sample of my code
class print_VA_result out = object
inherit Visitor.frama_c_inplace
(**..*)
method vstmt_aux s =
if Db.Value.is_computed () then
match s.skind with
| Instr i ->
begin
match i with
| Set(lval,_,_) ->
print_value lval s
|_ -> "<>"
...
Can anybody help me for this? Thanks a lot in advance.