Finding the variables (read or write)

servekarimi at servekarimi at
Mon Jan 14 20:48:08 CET 2013

I'd like to develop a small debugging tool for python programs.In Dynamic Slicing How can I find the variables that are accessed in a statement? And find the type of access (read or write) for those variables (in Python).
### Write: A statement can change the program state.
### Read : A statement can read the program state .
**For example in these 4 lines we have:
(1) x = a+b    => write{x} & read{a,b} 
(2) y=6        => write{y} & read{} 
(3) while(n>1) => write{} & read{n} 
(4) n=n-1      => write{n} & read{n}

@@If I use dis(disassembler) How can I get output of dis in python as dictionary?


More information about the Python-list mailing list