speckl/compiler
tef-engine 313be7997e feat(lagrangia): action functional + ToggleSwitch stationary-point test
Implements spec §2.3/§2.4 of the Lagrangia reducer probe
(~/.hermes/plans/2026-07-18-lagrangia-reducer-spec.md).

- compiler/lagrangia/src/score.rs: three scoring functions
  (complexity, invariant_distance, byte_entropy) + action() with
  v0 weights w1=1.0, w2=100.0, w3=0.1.
- compiler/lagrangia/tests/toggle_switch.rs: N=20 candidate search
  with deterministic LCG, hill descent (top-5 × 5 perturbations ×
  3 rounds), argmin selection with id-based tiebreak.
- Asserts: nonzero score variance (manifold not flat), stationary
  candidate holds invariants, argmin well-defined.

Test result: 8 passed (7 unit + 1 integration). Stationary point
found at S=43.47 (complexity=43, inv_dist=0, entropy=4.71) — the
gold ToggleSwitch codegen output, as expected.

Note: invariant_distance uses a static proxy (gold=holds, perturbed
=fails with depth). Full Z3 wiring is a follow-up.
2026-07-18 22:10:38 -07:00
..
__tests__ fix: test path resolution — use __dirname instead of process.cwd() (cycle 74) 2026-06-29 19:09:47 -07:00
dist fix: test path resolution — use __dirname instead of process.cwd() (cycle 74) 2026-06-29 19:09:47 -07:00
lagrangia feat(lagrangia): action functional + ToggleSwitch stationary-point test 2026-07-18 22:10:38 -07:00
node_modules wip: working copy state at jj git init 2026-07-18 22:10:38 -07:00
specs feat(compiler): self-hosting spec + generator multi-enum support 2026-05-03 14:42:03 -07:00
src fix: test path resolution — use __dirname instead of process.cwd() (cycle 74) 2026-06-29 19:09:47 -07:00
test-output wip: working copy state at jj git init 2026-07-18 22:10:38 -07:00
test-output-rust/TigerBeetleLedger feat(rust): Rust codegen backend (speckl#24) 2026-05-09 23:24:40 -07:00
.gitignore Add .gitignore for compiler dependencies and build artifacts 2026-04-29 15:12:37 -07:00
.last-build fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
check-dist.sh fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
package-lock.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
package.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
test-ast.mjs fix(z3): preserve implies args, multi-level field access, len(), nil, distinct operator 2026-06-29 17:31:31 -07:00
test-parser.mjs fix(z3): preserve implies args, multi-level field access, len(), nil, distinct operator 2026-06-29 17:31:31 -07:00
tsconfig.json Add SpeckDL compiler scaffold 2026-04-29 15:12:08 -07:00