This module adds support for using sys.settrace to understand what happens
during a subset of code execution that's passed in. In the context of how
it's currently used, it's limited to the "blackbox" execs —
It can be used used and tested independently.
At a high level, users could:
- Use the
exec_and_record_function_calls.pyas an entry point and uses
sys.settraceto trace every bytecode execution and
_op_stack.pyto look at the bytecode stack during tracing. It translates different bytecode instructions into the corresponding Python function calls.
function_calls_to_side_effects.pyto translate the sequence of calls that were recorded into the side effects produced on nodes (mapping Python changes to graph changes).