For Implementers¶
This section covers what you need to build a conformant Lace executor or validator.
What is a Lace implementation?¶
A Lace implementation consists of two packages:
- Validator -- lexer, parser, semantic checks, canonical error codes. Zero network dependencies. Exposes
parseandvalidateCLI subcommands. - Executor -- HTTP runtime, assertion evaluation, cookie jars, extension dispatch, body storage. Depends on the validator. Exposes
parse,validate, andrunCLI subcommands.
See Packaging for the separation rules and rationale.
Steps to Build a Conformant Executor¶
1. Implement the Parser¶
- Parse
.lacesource text against the formal grammar (lacelang.g4is the authoritative ANTLR4 grammar). - Produce an internal AST matching the AST schema.
- See Grammar Notes for intentional divergences between the ANTLR4 grammar and the spec EBNF.
2. Implement the Validator¶
- Enforce all validation rules from the spec (section 12).
- Emit canonical error codes -- cross-implementation conformance depends on matching codes.
- Report all errors before execution (do not stop at the first error).
- Distinguish errors (block activation) from warnings (allow execution with notice).
3. Implement the Executor¶
- Execute calls sequentially, evaluate chain methods, apply the failure cascade.
- Produce a ProbeResult matching the result schema.
- Implement all core features: variables, null semantics, cookie jars, body storage,
prevaccess. - Implement the extension interface (hook dispatch, schema additions, rule body language) for full conformance -- or declare
omit: extensionsfor partial conformance.
4. Pass the Testkit¶
Run the conformance suite:
The testkit ships a bundled HTTP/HTTPS test server and test vectors covering every behavioural item in the core checklist. Exit code 0 means conformant.
See Conformance Levels for partial conformance options.
Key Resources¶
- Core Checklist -- every item your executor must satisfy
- Extension Checklist -- extension system requirements
- Packaging Rules -- validator/executor separation
- Conformance Levels -- omission options and outcome labels
- Grammar Notes -- ANTLR4 grammar implementation notes
- Extension Notes -- extension format conventions