Skip to content
EN FR

FPLN Evaluation Strategy

Documentation status: architecture — see Maturity and evidence.

The logiCells evaluation engine treats expressions as state-driven execution protocols. An expression does not have to be evaluated by one monolithic call: it can prepare context, request a subexpression, resume with an intermediate value, update the environment, and then complete.

This architecture gives control flow, functional application, collections, value access, pattern matching, and more advanced operations a common execution model.

What is confirmed in the current engine

The current implementation provides:

  • an execution table indexed by expression type and evaluation state;
  • distinct paths for dynamic and local evaluation environments;
  • registration of complete automata for expression families;
  • specialized protocols for pre/post evaluation, functional application, push-down automata, and pattern matching;
  • execution and data stacks attached to the evaluation context;
  • state-level tracing that can support engine diagnostics.

These are engine architecture properties. Private class and function names that implement them are not part of the public contract.

Mental model

expression
  -> state 0: prepare
  -> subexpression / data / context
  -> state 1: resume
  -> state n: specialized processing
  -> value or observable effect
  -> complete

A strategy can therefore suspend while a dependency is evaluated and resume at the appropriate logical state.

Two important dimensions

Expression type

Each syntactic or semantic family has an expression identity known by the engine.

Evaluation state

The same expression can move through several states. The count and meaning of those states depend on the protocol for that expression family.

This separation avoids encoding all semantics in one giant interpreter loop and makes strategies composable.

Context modes

The engine distinguishes several evaluation contexts, including functional, pure functional, semantic, and pure semantic contexts. It also supports local and dynamic environment variants.

These modes are not separate languages: they alter resolution and context-propagation rules inside the same multiparadigm engine.

Documented automata

Documentation status

This section describes observable architecture and language forms confirmed by the current grammar and engine. It is not documentation of private engine classes.