Registry
opulse.core.registry ¶
In-memory collection of operators with the lookups the generators need.
OperatorRegistry ¶
Operators indexed by func_id and by (symbol, arity, position).
base_marker ¶
base_marker(base: int) -> Operator | None
The prefix symbol that marks a numeral written in base.
select ¶
select(
*,
n_ary: int | None = None,
unary_position: str | None = None,
max_layer: int | None = None,
layer: int | None = None,
include_base: bool = False,
min_n_ary: int | None = None,
) -> list[Operator]
Filter operators. include_base=False drops numeral-base operators.
The returned list is shared by later calls with the same filters; do not modify it.
call_form ¶
call_form(**filters) -> list[Operator]
Operators with three or more arguments (written symbol(a, b, c)).
dependencies_of ¶
dependencies_of(
compute_source: str, own_func_id: str | None = None
) -> list[str]
func ids called by compute_source (sorted, without the operator itself).
recursive_layer_of ¶
recursive_layer_of(operator: Operator) -> int
0 without dependencies; recursion adds one layer on top of its callees.
topological_order ¶
topological_order() -> list[Operator]
Operators sorted so that every operator follows its dependencies.