IBM / pyflowgraph

Flow graphs for Python
Apache License 2.0
25 stars 8 forks source link

Static analysis of variable access and assignment #26

Closed epatters closed 5 years ago

epatters commented 5 years ago

Use static analysis to capture variable access and assignment, as a supplement to tracking objects by memory address. Specifically:

  1. Rewrite the AST to add hooks for variable access and assignment
  2. Emit trace events from the tracer on variable access and assignment
  3. Use these events in the flow graph builder to maintain a mapping from variable names to nodes in the flow graph

This feature constitutes the last major step in implementing #18 and fixing #17.