mod: Ext 15 — disjunctive (:any) conditions, 333/333
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 29s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 29s
(:any (list c1 c2 ...)) compiles to Prolog disjunction (g1 ; g2 ; ...), completing the condition boolean algebra (AND via :when list, :not, :any). cond->goal recurses so combinators nest arbitrarily; the proof tree shows the compiled disjunction verbatim. Maps onto Prolog's control constructs rather than reimplementing boolean logic in SX. +10 tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ federation extension.
|
||||
|
||||
## Status (rolling)
|
||||
|
||||
`bash lib/mod/conformance.sh` → **323/323** (roadmap + 14 extensions complete)
|
||||
`bash lib/mod/conformance.sh` → **333/333** (roadmap + 15 extensions complete)
|
||||
|
||||
## Ground rules
|
||||
|
||||
@@ -147,6 +147,11 @@ lib/mod/fed.sx
|
||||
derivation goal-by-goal with `[proved]`/`[unproved]` marks and unification
|
||||
bindings. E.g. `Report rc: escalate (rule: repeated-escalate)` … `[proved]
|
||||
report(rc, B, S), report_count(S, N), N >= 3 {B=ann, N=3, S=dave}`.
|
||||
- [x] **Ext 15 — disjunctive conditions** (`policy.sx` + `tests/disjunction.sx`,
|
||||
+10). `(:any (list c1 c2 …))` compiles to Prolog disjunction `(g1 ; g2 ; …)`,
|
||||
completing the condition boolean algebra (AND via the :when list, `:not`, `:any`).
|
||||
Composes recursively — `:any` over `:not`/`:attr`/classification, and ANDs with
|
||||
other conditions in the same rule. One rule now covers "spam OR abuse".
|
||||
- [x] **Ext 14 — decision wire format** (`lib/mod/wire.sx`, +16). The bytes that
|
||||
cross `fed/fed-send!`: `mod/decision->wire` emits a versioned pipe-delimited line
|
||||
(`MOD1|r1|hide|spam-hide`), `mod/wire->decision` parses it back (`mod/wire-valid?`
|
||||
@@ -213,6 +218,12 @@ lib/mod/fed.sx
|
||||
|
||||
## Progress log
|
||||
|
||||
- **Ext 15 — disjunctive conditions, 333/333** (+10). The condition DSL is now a
|
||||
full boolean algebra: AND (the :when list), `:not` (NAF), `:any` (Prolog `;`).
|
||||
cond->goal recurses, so the combinators nest arbitrarily — `:any` of `:not`s, an
|
||||
`:any` ANDed with a `:not`, etc. — and the proof tree shows the compiled
|
||||
disjunction verbatim. Maps directly onto Prolog's own control constructs rather
|
||||
than reimplementing boolean logic in SX.
|
||||
- **Ext 14 — decision wire format, 323/323** (+16). Fills the federation transport
|
||||
seam: decisions now serialize to a portable line and parse back, and the
|
||||
integration test runs the whole federated path end-to-end (serialize on one
|
||||
|
||||
Reference in New Issue
Block a user