Skip to main content

Module extfn_def

Module extfn_def 

Source
Expand description

Definitions of external-language functions (Phase 6), as plain, serializable model data. The runtime that evaluates these lives in the improv_extfn crate; this module holds only the declaration so a Model can persist which functions a formula may CALL and how to type-check them.

External functions must be pure, typed, and declare their dimensionality (arity) so the engine can treat a CALL as an ordinary, deterministic operator (see AGENT_MASTER_STEERING §7 / AGENT_FORMULA_LANGUAGE §11.3).

Structs§

ExternalFn
A registered external function: everything needed to type-check a call and (via the improv_extfn runtime) invoke it deterministically.

Enums§

Language
The runtime language an external function targets. Each variant has a runner in the improv_extfn crate (subprocess for the scripting languages, an in-process wasmi interpreter for Wasm).