Reference for Evaluators with Execution Limits

Identify each evaluator, read outcome classes, and look up resource fields, the WASM interface, and stored records.

You can use this reference to choose an evaluator and interpret its result files. It lists the exact identifiers, resource fields, and lifecycle for Native embed integration. Both evaluators count work and memory and stop at their limits, so they are called resource-controlled evaluators.

Read the outcome first

The complete embed example runs a decision rule with integer input 14. Its inspection JSON includes these fields.

JSON
{
  "category": "semantic-complete",
  "code": "complete",
  "semantic_profile_id": "lispex/r7rs-rule-embedded-core/1"
}

With eval_work set to 0, the same prepared rule produces category: "semantic-exhausted" and code: "eval_work". The result file records a resource stop. The CLI exits with code 0 when it successfully writes either outcome.

Evaluation outcomeDecision evaluator categoryFull evaluator category
Completedsemantic-completecomplete
Runtime errorsemantic-faultsemantic-fault
Resource stopsemantic-exhaustedexhausted
Request refusedrequest-refusalrequest-refusal
Engine faultengine-faultengine-fault

Select one of two evaluators

The decision evaluator accepts the operation set in its bundle. The full evaluator provides all 205 primitive procedures, with none marked Deferred in its registry. Native selects it explicitly through embed full.

PropertyDecision evaluatorFull evaluator
Command prefixlispex embedlispex embed full
Language profilelispex/r7rs-rule-embedded-core/1lispex/r7rs-rule-current-profile-bounded/1
Work and allocation modellispex-vm-meter/1lispex-full-vm-meter/1
Artifact headerLPXART01LPXFAR01
Initial WASM memory pages1819
Maximum WASM memory pages256256

The full component identifier is lispex-evaluator/rust-vm-current-profile/1. The bundle manifest, a file listing the bundle's contents and metadata, identifies each evaluator by its exact WASM SHA-256. That hash identifies the same bytes in release archives and applications.

The evaluators share these v1 formats.

FormatIdentifier
Value codec, the binary encoding of valueslispex.embed-value/v1
Transcript, the ordered evaluation eventslispex.embed-transcript/v1
WASM binary calling interfacelispex.embed-wasm-abi/v1
Portable core, a transferable record of one executionlispex.embed-receipt-core/v1

Set separate preparation and evaluation limits

Both CLI limit files use logical_allocation. The binary request distinguishes prepare_logical_allocation from eval_logical_allocation.

Preparation request fieldResource
raw_source_bytesSubmitted source bytes
prepare_workPreparation work units
prepare_logical_allocationPreparation allocation units
syntax_depthSyntax nesting depth
Evaluation request fieldResource
canonical_input_bytesInput bytes in the prescribed value encoding
eval_workEvaluation work units
eval_logical_allocationEvaluation allocation units
semantic_framesActive semantic continuation frames
traversal_depthValue traversal depth
output_bytesProgram output bytes
diagnostic_bytesDiagnostic bytes
transcript_bytesEncoded event bytes
transcript_eventsNumber of recorded events
result_bytesEncoded result bytes

A continuation frame stores what remains to do after a call. Proper tail calls reuse the current semantic continuation.

Each resource model defines the cost of work and the units of logical allocation. The evaluator charges before an effect. It uses the full unsigned 64-bit range and stops at the first reservation that would exceed a limit. See Execution Conditions for repeatability.

Call the WASM interface

Each module has zero imports and one memory. It exports allocation, deallocation, interface-version, prepare, and evaluate functions, alongside the standard globals that mark memory boundaries. Requests encode field lengths and unsigned integers in big-endian order. The caller supplies the resource limits.

Each preparation or evaluation creates a fresh Wasmtime Store and Instance. Memory, allocator, program heap, symbol storage, mutable cells, continuations, work counter, transcript, and result buffer are new for that operation. An application can share the immutable compiled Module when it has the exact same WASM identifier.

Preserve execution identities and results

The portable core binds the submitted source, canonical source, semantic rule, canonical input, resource limits, request, evaluator artifact, evaluation, transcript, and result. Canonical means one prescribed byte representation. The lispex.evaluation-identity/v1 construction hashes length-delimited fields with SHA-256.

Terminal classStored information
Deterministic semantic outcomeResult, transcript, and portable core
Deterministic request refusalRefusal, transcript, and portable core
Operational interruptionTerminal engine status
Engine faultTerminal engine status and diagnostics

Issuers can sign completed portable-core bytes through decision exchange and Lispex Vouch workflows. Signing and application permission are separate steps.

Use a Native decision directory

The decision-rule guide shows a complete rule run, rule inspect, rule verify, and rule replay workflow. rule run accepts source and strict JSON input files, plus separate preparation and evaluation limits.

JSON inputLispex value
ObjectRecord
ArrayVector
String, boolean, exact integerThe corresponding value kind
nullEmpty list

A completed run creates five files in a new output directory.

FileContents
prepared.lpxembedPrepared rule
canonical-input.lpxvalueInput in the prescribed binary encoding
result.lpxembedOutcome and its request binding
receipt-core.lpxreceiptPortable core
summary.jsonReadable JSON summary of those files

rule inspect summarizes the directory. rule verify checks its member set and byte bindings. rule replay evaluates the recorded request in a fresh instance and checks the result and portable core.

Keep application responsibilities explicit

Native includes the evaluator's exact bytes. Releases also supply the WASM bundle, manifest, test vectors, verification material, and software bill of materials. They include dependency handling decisions, safety evidence, and an append-only graph of release records. Retained evaluator bytes keep historical records readable.

The calling application retains source and manages network access, business policy, freshness, duplicate-use prevention, and external actions. Decision exchange carries signed issuer records and applies recipient policy. Lispex Vouch authenticates signed evidence and checks the local decision gate. Topaz components retain their own compiler and acceptance-check identifiers.