curry.backends.py.interface module

class curry.backends.py.interface.IBackend(backend=None)[source]

Bases: IBackend

property backend_name

E.g., ‘py’ or ‘cxx’.

property compile

Converts ICurry to an instance of IR.

compile_pending(moduleobj)[source]

Compiles the functions of a loaded module whose compilation the backend deferred, once every symbol of the module is registered. The Python backend compiles a step function on its first call; an expression module (compile.compile_expression) leaves the registry of the interpreter after this call, so its functions are compiled here. A backend that compiles whole modules ahead of time has nothing to do.

property create_evaluation_rts

Creates a new runtime state representing an evaluation.

property extend_plan_skeleton
find_or_create_internal_module(moduleobj)[source]
property fundamental_symbols
get_interpreter_state(interp)[source]

Gets the runtime-specific state attached to an interpreter.

getimpl(symbol)[source]

The implementation code of the step function of symbol (a CurryNodeInfo) as text; see curry.inspect.getimpl(). Raises ValueError when the backend has no code for the symbol.

init_interpreter_state(interp)[source]

Initializes an interpreter with the runtime-specific state.

property load_module

Load the contents of a Curry module.

lookup_builtin_module(modulename)[source]

Looks up the implementation for a built-in module.

property make_node
property materialize
property object_file_extension
property write_module

Write the contents of a Curry module to a stream.