Functions
FUNC code_interpreter
code: The Python code to execute.
FUNC local_code_interpreter
code: The Python code to execute.
Classes
CLASS ExecutionResult
Result of code execution.
Code execution can be aborted prior to spinning up an interpreter (e.g., if prohibited imports are used).
In these cases, the success flag is set to False and the skipped flag is set to True.
If code is executed, then success is set to true iff the exit code is 0, and the stdout and stderr outputs
are set to non-None values.
We also use the ExecutionResult object to communicate the result of static and dynamic analyses. Those are passed back
using the analysis_result field.
TODO: should we also be trying to pass back the value of the final expression evaluated, or the value of locals() and globals()?
Methods:
FUNC to_validationresult_reason
ExecutionResult to implement the ValidationResult interface.