artdag: maude-bridge dag<->term adapter + 14 round-trip tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 30s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 30s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@ edges.
|
||||
|
||||
## Status (rolling)
|
||||
|
||||
`bash lib/artdag/conformance.sh` → **158/158** (10 suites: dag, analyze, plan, execute, optimize, fed, cost, serialize, stats, fault)
|
||||
`bash lib/artdag/conformance.sh` → **172/172** (11 suites: dag, analyze, plan, execute, optimize, fed, cost, serialize, stats, fault, maude-optimize)
|
||||
|
||||
Base roadmap (Phases 1–6) COMPLETE. Now extending.
|
||||
|
||||
@@ -145,7 +145,7 @@ dedup) expressed as equations, where the optimised pipeline IS the normal form
|
||||
and confluence ⇒ a stable content id. Reimplement Phase-5 optimisation
|
||||
declaratively and prove it equivalent to the hand-written `optimize.sx`.
|
||||
|
||||
- [ ] `lib/artdag/maude-bridge.sx` — adapter between an effect DAG node and a
|
||||
- [x] `lib/artdag/maude-bridge.sx` — adapter between an effect DAG node and a
|
||||
maude term: `(op, sorted-input-ids, params)` ⟷ `(mau/app op (args...))`.
|
||||
Params become constant subterms; for commutative ops use a maude AC operator
|
||||
so input order is irrelevant (mirror the content-id's order-insensitivity).
|
||||
@@ -179,6 +179,21 @@ be an op token.
|
||||
|
||||
## Progress log
|
||||
|
||||
- **2026-06-07 Phase 7 — maude-bridge** (maude-optimize suite 14/14, total 172/172).
|
||||
`lib/artdag/maude-bridge.sx`: lossless adapter between an artdag effect DAG and a
|
||||
maude term. `artdag/dag->term dag id` walks from a sink, emitting `(mau/app op
|
||||
input-terms ++ meta)` per node; the trailing `artdag:meta` subterm carries params
|
||||
(a `write-to-string` token) + a commutativity flag, so no side table is needed.
|
||||
`artdag/term->dag` synthesizes build-entries (names `mb0…`) and re-runs
|
||||
`artdag/build`, which recomputes content-ids (name-independent) and re-collapses
|
||||
shared subterms — so `artdag/mb-roundtrip` is the identity on canonical form:
|
||||
sink id, op, params, and the full node survive; commutative ids stay
|
||||
order-insensitive; a diamond's shared node de-duplicates back to one (4→4).
|
||||
Maude entry points used: `mau/app`/`mau/const`/`mau/op`/`mau/args`/`mau/app?`.
|
||||
`conformance.sh` now gates the maude PRELOADS + bridge load to the maude-optimize
|
||||
suite (other suites stay maude-free). Gotcha: `write-to-string`/`read` round-trips
|
||||
keyword dicts but may reorder keys — fine, dicts compare structurally with `=`.
|
||||
|
||||
- **Ext: public API facade** (`lib/artdag/api.sx`, total 158/158 unchanged).
|
||||
Reference index matching the datalog/persist convention: canonical load order +
|
||||
the full public surface across all 10 modules + `artdag/version`.
|
||||
|
||||
Reference in New Issue
Block a user