> What I want to do is pretty similar to what liveness.ml does
> which is printing variables that are live at each statement and also values 
> of those variables. 

It looks like you want a static analysis (liveness.ml implements
a static analysis) that tells you the set of possible values
for variables. Some people call this a value analysis.

There isn't any that I know of in CIL itself, but there is one
in Frama-C, the front-end of which is based on CIL:

http://frama-c.com/try_out_value.html

> I want to track a value changing of a particular variable at runtime. 

You make it sound like what you want is a static analysis that
is precise enough that you can see any subtle variation
in the run-time values of the variable. I am afraid that you are
going to be disappointed. The more precise the format in
which you request static information (e.g. a variable has
more possible values than liveness statuses) the more you
are likely to notice that the information was approximated in
order to be computed statically.

With less precise analyses,
you may not provide the source code of some functions and
won't even notice. With a value analysis of any kind,
if the source code of some functions is missing, results
are immediately both approximated and potentially unsound
(because an unknown function may change the value of any
variable of external scope).

So if you really want a static analysis that indicates the values
of variables, fine, that exists, but the question is really whether
you are willing to limit yourself to the cases where it works :
provide the entire source code of the analyzed program
including library functions and accept trade-offs between
the quality (and size in memory) of results and time it takes
to compute them.

Pascal

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to