openpectus.engine.method_manager
Attributes
Classes
Module Contents
- openpectus.engine.method_manager.logger
- class openpectus.engine.method_manager.MethodManager(uod_command_names, interpreter_context)
- Parameters:
uod_command_names (list[str])
interpreter_context (openpectus.lang.exec.pinterpreter.InterpreterContext)
- _uod_command_names
- _interpreter_context
- _method
- _program
- _inject_parser
- _interpreter: openpectus.lang.exec.pinterpreter.PInterpreter
- _create_interpreter(program)
- Parameters:
program (openpectus.lang.model.ast.ProgramNode)
- Return type:
- property interpreter: openpectus.lang.exec.pinterpreter.PInterpreter
- Return type:
- property program: openpectus.lang.model.ast.ProgramNode
- Return type:
- property program_is_started: bool
Determine whether the method is started, i.e. the first non-ProgramNode has started executing.
- Return type:
bool
- set_method(method)
User saved method. The new method just replaces the existing method. Use when no run is active.
- Parameters:
method (openpectus.protocol.models.Method)
- reset_interpreter()
- merge_method(_new_method)
- Parameters:
_new_method (openpectus.protocol.models.Method)
- _merge_method(new_method)
User saved method while a run was active. The new method is replacing an existing method whose state should be merged over.
- Parameters:
new_method (openpectus.protocol.models.Method)
- Return type:
tuple[openpectus.lang.model.parser.ParserMethod, openpectus.lang.model.ast.ProgramNode]
- parse_inject_code(pcode)
- Parameters:
pcode (str)
- Return type:
- get_method_state()
- Return type:
- _get_method_state(program)
- Parameters:
program (openpectus.lang.model.ast.ProgramNode)
- Return type:
- _apply_analysis(program)
- Parameters:
program (openpectus.lang.model.ast.ProgramNode)
- _serialize(obj)
Serialize data for debugging
- Return type:
str