openpectus.engine.method_manager

Attributes

logger

Classes

MethodManager

Module Contents

openpectus.engine.method_manager.logger
class openpectus.engine.method_manager.MethodManager(uod_command_names, interpreter_context)
Parameters:
_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:

openpectus.lang.exec.pinterpreter.PInterpreter

property interpreter: openpectus.lang.exec.pinterpreter.PInterpreter
Return type:

openpectus.lang.exec.pinterpreter.PInterpreter

property program: openpectus.lang.model.ast.ProgramNode
Return type:

openpectus.lang.model.ast.ProgramNode

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:

openpectus.lang.model.ast.ProgramNode

get_method_state()
Return type:

openpectus.protocol.models.MethodState

_get_method_state(program)
Parameters:

program (openpectus.lang.model.ast.ProgramNode)

Return type:

openpectus.protocol.models.MethodState

_apply_analysis(program)
Parameters:

program (openpectus.lang.model.ast.ProgramNode)

_serialize(obj)

Serialize data for debugging

Return type:

str