runner ¶
Environment ¶
This class contains the API for configuring the host platform interface used by MeTTa
config_dir ¶
custom_env ¶
Returns an EnvBuilder object that can be used to init a MeTTa runner, if you need multiple environments to coexist in the same process
Source code in python/hyperon/runner.py
init_common_env ¶
init_common_env(working_dir=None, config_dir=None, create_config=None, is_test=None, include_paths=[])
Initialize the common environment with the supplied args
Source code in python/hyperon/runner.py
test_env ¶
Returns an EnvBuilder object specifying a unit-test environment, that can be used to init a MeTTa runner
MeTTa ¶
This class represents the runner to execute MeTTa programs
Source code in python/hyperon/runner.py
__eq__ ¶
load_module_at_path ¶
Loads a module into the runner directly from resource at a file system path, trying the formats from the runner's environment in succession
Source code in python/hyperon/runner.py
load_module_direct_from_func ¶
Loads a module into the runner using a loader function, with the specified name and scope
Source code in python/hyperon/runner.py
load_module_direct_from_pymod ¶
Loads a module into the runner directly from a Python module, with the specified name and scope
Source code in python/hyperon/runner.py
parse_all ¶
Parse an entire program from text into atoms, using the Tokenizer of the runner's top module
parse_single ¶
register_atom ¶
register_token ¶
run ¶
Runs the MeTTa code from the program string containing S-Expression MeTTa syntax
Source code in python/hyperon/runner.py
space ¶
tokenizer ¶
ModuleDescriptor ¶
RunContext ¶
An accessor object for the API used by the executable atoms inside a MeTTa program
Source code in python/hyperon/runner.py
import_dependency ¶
Imports a loaded module as a dependency of the running module
init_self_module ¶
Must be called exactly once from within a module loader to initialize the module being loaded
load_module ¶
Resolves a module by name in the context of the running module, and loads it into the runner
metta ¶
register_atom ¶
register_token ¶
space ¶
RunnerState ¶
The state for an in-flight MeTTa interpreter handling the interpretation and evaluation of atoms in a given grounding space.
Source code in python/hyperon/runner.py
__del__ ¶
current_results ¶
Returns the current in-progress results from an in-flight program evaluation
Source code in python/hyperon/runner.py
is_complete ¶
Returns True if the runner has concluded, or False if there are more steps remaining to execute
run_step ¶
Executes the next step in the interpretation plan, or begins interpretation of the next atom in the stream of MeTTa code.