artdag: Phase 7 non-vacuous confluence gate regression + 2 tests
Assert mau/confluent? actually discriminates: the Peano-arithmetic variant of the optimisation laws is flagged non-confluent with named non-joinable pairs, so the green 'opt module is confluent' is real evidence rather than a rubber stamp. maude-optimize 40/40, total 198/198. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,9 @@
|
|||||||
"serialize": {"pass": 13, "fail": 0},
|
"serialize": {"pass": 13, "fail": 0},
|
||||||
"stats": {"pass": 12, "fail": 0},
|
"stats": {"pass": 12, "fail": 0},
|
||||||
"fault": {"pass": 14, "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_fail": 0,
|
||||||
"total": 196
|
"total": 198
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,5 +14,5 @@ _Generated by `lib/artdag/conformance.sh`_
|
|||||||
| serialize | 13 | 0 | 13 |
|
| serialize | 13 | 0 | 13 |
|
||||||
| stats | 12 | 0 | 12 |
|
| stats | 12 | 0 | 12 |
|
||||||
| fault | 14 | 0 | 14 |
|
| fault | 14 | 0 | 14 |
|
||||||
| maude-optimize | 38 | 0 | 38 |
|
| maude-optimize | 40 | 0 | 40 |
|
||||||
| **Total** | **196** | **0** | **196** |
|
| **Total** | **198** | **0** | **198** |
|
||||||
|
|||||||
@@ -301,3 +301,45 @@
|
|||||||
"opt-cheaper?: untouched DAG keeps equal cost (never a pessimisation)"
|
"opt-cheaper?: untouched DAG keeps equal cost (never a pessimisation)"
|
||||||
(artdag/opt-cheaper? mo-plain mo-plain-id artdag/const-cost)
|
(artdag/opt-cheaper? mo-plain mo-plain-id artdag/const-cost)
|
||||||
true)
|
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)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ edges.
|
|||||||
|
|
||||||
## Status (rolling)
|
## 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.
|
Base roadmap (Phases 1–6) COMPLETE. Now extending.
|
||||||
|
|
||||||
@@ -191,6 +191,13 @@ be an op token.
|
|||||||
|
|
||||||
## Progress log
|
## 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**
|
- **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
|
(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
|
the original output cone (`artdag/dce` to `id`) against the maude-reduced DAG under an
|
||||||
|
|||||||
Reference in New Issue
Block a user