Please excuse my lack of knowledge in program analysis. I just realized  that 
liveness.ml does a static analysis. I thought it prints variable names that are 
active at each statement at runtime. 

Actually, I want to do a dynamic analysis where I observe a behavior/outputs of 
a program at runtime. So I use CIL to instrument code to print out values of 
variables on the left hand side of the assignment operators and also other 
interesting information such as variable addresses. I also want to instrument 
code to observe looping execution behavior and data flow of a particular 
variable. 

I have been searching for other tools that do those things above but I couldn't 
find such a tool. Maybe I used wrong keyword. Do you know any dynamic analysis 
tools that do something similar to what I want. It seems that CIL is not the 
right tool for me(?) 

Sirinda



--- On Sun, 6/5/11, CUOQ Pascal <pascal.c...@cea.fr> wrote:

> From: CUOQ Pascal <pascal.c...@cea.fr>
> Subject: RE: [CIL users] A beginner question: How to get a value of a 
> variableat runtime
> To: "Amm" <hi_...@yahoo.com>, cil-users@lists.sourceforge.net
> Date: Sunday, June 5, 2011, 12:34 AM
> > 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