diff --git a/lib/artdag/scoreboard.json b/lib/artdag/scoreboard.json index a862f3a6..bbc68281 100644 --- a/lib/artdag/scoreboard.json +++ b/lib/artdag/scoreboard.json @@ -10,9 +10,9 @@ "serialize": {"pass": 13, "fail": 0}, "stats": {"pass": 12, "fail": 0}, "fault": {"pass": 14, "fail": 0}, - "maude-optimize": {"pass": 38, "fail": 0} + "maude-optimize": {"pass": 40, "fail": 0} }, - "total_pass": 196, + "total_pass": 198, "total_fail": 0, - "total": 196 + "total": 198 } diff --git a/lib/artdag/scoreboard.md b/lib/artdag/scoreboard.md index ef186336..957c003c 100644 --- a/lib/artdag/scoreboard.md +++ b/lib/artdag/scoreboard.md @@ -14,5 +14,5 @@ _Generated by `lib/artdag/conformance.sh`_ | serialize | 13 | 0 | 13 | | stats | 12 | 0 | 12 | | fault | 14 | 0 | 14 | -| maude-optimize | 38 | 0 | 38 | -| **Total** | **196** | **0** | **196** | +| maude-optimize | 40 | 0 | 40 | +| **Total** | **198** | **0** | **198** | diff --git a/lib/artdag/tests/maude-optimize.sx b/lib/artdag/tests/maude-optimize.sx index e018b86b..2269303b 100644 --- a/lib/artdag/tests/maude-optimize.sx +++ b/lib/artdag/tests/maude-optimize.sx @@ -301,3 +301,45 @@ "opt-cheaper?: untouched DAG keeps equal cost (never a pessimisation)" (artdag/opt-cheaper? mo-plain mo-plain-id artdag/const-cost) true) + +; ---- the confluence gate is meaningful, not vacuous ---- +; the Peano-arithmetic variant of the same laws is KNOWN non-confluent (M+0 sticks, +; (A+B)+C vs A+(B+C) don't join). Assert the checker actually catches it, so the +; green "opt module is confluent" above is real evidence, not a checker that passes +; everything. + +(define + mo-peano-module + (mau/parse-module + (str + "fmod ARTDAGPEANO is\n" + " sorts Img Num .\n" + " op src : -> Img .\n" + " op 0 : -> Num .\n" + " op s_ : Num -> Num .\n" + " op _+_ : Num Num -> Num .\n" + " op blur : Img Num -> Img .\n" + " op bright : Img Num -> Img .\n" + " op id : Img -> Img .\n" + " op over : Img Img -> Img [comm] .\n" + " vars I J : Img .\n" + " vars M N : Num .\n" + " eq 0 + N = N .\n" + " eq s M + N = s (M + N) .\n" + " eq id(I) = I .\n" + " eq blur(I, 0) = I .\n" + " eq bright(I, 0) = I .\n" + " eq blur(blur(I, M), N) = blur(I, M + N) .\n" + " eq bright(bright(I, M), N) = bright(I, M + N) .\n" + " eq over(I, I) = I .\n" + "endfm"))) + +(artdag-test + "confluence gate is real: Peano variant is flagged non-confluent" + (mau/confluent? mo-peano-module) + false) + +(artdag-test + "confluence gate is real: Peano variant names its non-joinable pairs" + (> (len (mau/non-joinable-pairs mo-peano-module)) 0) + true) diff --git a/plans/artdag-on-sx.md b/plans/artdag-on-sx.md index c4a8c3b8..14615b7b 100644 --- a/plans/artdag-on-sx.md +++ b/plans/artdag-on-sx.md @@ -31,7 +31,7 @@ edges. ## Status (rolling) -`bash lib/artdag/conformance.sh` → **196/196** (11 suites: dag, analyze, plan, execute, optimize, fed, cost, serialize, stats, fault, maude-optimize) +`bash lib/artdag/conformance.sh` → **198/198** (11 suites: dag, analyze, plan, execute, optimize, fed, cost, serialize, stats, fault, maude-optimize) Base roadmap (Phases 1–6) COMPLETE. Now extending. @@ -191,6 +191,13 @@ be an op token. ## Progress log +- **2026-06-19 Phase 7 — confluence gate is non-vacuous** (maude-optimize 40/40, total + 198/198). Added a regression proving `mau/confluent?` actually discriminates: the + Peano-arithmetic variant of the same laws (`0 + N = N`, `s M + N = s(M+N)` instead of + `_+_ [assoc comm id: 0]`) is asserted **non-confluent** with named non-joinable pairs, + so the green "opt module is confluent" is real evidence, not a checker that rubber-stamps + everything. Documents the exact AC-vs-Peano design choice as an executable contrast. + - **2026-06-19 Phase 7 — cost-directed: optimisation is never a pessimisation** (maude-optimize 38/38, total 196/196). `artdag/opt-improvement dag id cost-fn` compares the original output cone (`artdag/dce` to `id`) against the maude-reduced DAG under an