|
| 1 | +# MeTTa TS 1.1.6 |
| 2 | + |
| 3 | +MeTTa TS 1.1.6 reduces the cold and loaded cost of compiled nondeterministic |
| 4 | +proof search. It also adds Hyperon-style structural inequality to the core and |
| 5 | +TypeScript EDSL. |
| 6 | + |
| 7 | +## Deferred proof output |
| 8 | + |
| 9 | +The nondeterministic compiler can now prove that one result field is an |
| 10 | +unbound output projection which does not affect clause choice, matching, |
| 11 | +guards, or recursive call arguments. For those relations, generated search |
| 12 | +code carries only the control fields. It constructs the deferred field after |
| 13 | +all child searches succeed. Result fields already projected from call inputs |
| 14 | +are recovered at the consumer instead of being passed through every recursive |
| 15 | +continuation. |
| 16 | + |
| 17 | +The analysis uses result and input projections from the existing compiler. It |
| 18 | +does not recognize `obc`, theorem names, or benchmark source. Runtime admission |
| 19 | +requires the projected input to be unbound and unaliased, and requires a |
| 20 | +natural-number descent field for the existing bounded-recursion guard. If any |
| 21 | +proof fails, the ordinary compiled search runs with unchanged ordered-bag |
| 22 | +semantics. Groups with no deferred plan retain the 1.1.5 generated module shape |
| 23 | +and skip the deferred attempt entirely. |
| 24 | + |
| 25 | +Large generated clause matchers are emitted as separate JavaScript functions, |
| 26 | +while small recurrence clauses stay inline. This reduces V8 compilation work |
| 27 | +for large rule groups without changing source-order dispatch. |
| 28 | + |
| 29 | +An alternating same-host A/B against the untouched 1.1.5 build compared exact |
| 30 | +ordered output on every run. On Node 22.22.1, `jarr` improved from 127.9 ms to |
| 31 | +111.9 ms over 51 cold pairs and from 3.32 ms to 2.97 ms over 401 loaded pairs. |
| 32 | +`loowoz` improved from 892.0 ms to 754.8 ms cold and from 922.3 ms to 705.3 ms |
| 33 | +loaded. |
| 34 | + |
| 35 | +The cold `jarr` comparison was also repeated on three Node majors: |
| 36 | + |
| 37 | +| Runtime | 1.1.5 | 1.1.6 | Speedup | |
| 38 | +| ------------ | -------: | -------: | ------: | |
| 39 | +| Node 20.20.2 | 86.0 ms | 69.4 ms | 1.24x | |
| 40 | +| Node 22.22.1 | 127.9 ms | 111.9 ms | 1.14x | |
| 41 | +| Node 24.18.0 | 56.6 ms | 54.3 ms | 1.04x | |
| 42 | + |
| 43 | +The clean 15-run subprocess comparison on an AMD Ryzen 9 9950X used PeTTa |
| 44 | +`6f5639a` on SWI-Prolog 9.2.9. Times include process startup and use the normal |
| 45 | +MeTTa TS evaluator: |
| 46 | + |
| 47 | +| Program | PeTTa | MeTTa TS | Speedup | |
| 48 | +| ------------ | --------: | -------: | ------: | |
| 49 | +| BFC `jarr` | 136.5 ms | 113.6 ms | 1.20x | |
| 50 | +| BFC `loowoz` | 2466.3 ms | 743.6 ms | 3.32x | |
| 51 | + |
| 52 | +Maximum sampled MeTTa TS process-tree RSS was 91.4 MiB for `jarr` and 100.0 |
| 53 | +MiB for `loowoz`. The benchmark validates both `jarr` proofs and all three |
| 54 | +`loowoz` proofs in exact order. |
| 55 | + |
| 56 | +## Inequality |
| 57 | + |
| 58 | +MeTTa TS now provides `!=` as a core grounded operation. It is the Boolean |
| 59 | +complement of Hyperon's structural `==` for non-error operands, including |
| 60 | +integer/float promotion and NaN behavior. Both operators use the same |
| 61 | +`(-> $t $t Bool)` type, arity checks, argument evaluation, and error |
| 62 | +propagation. The TypeScript EDSL exports the matching `neq(a, b)` builder. |
| 63 | + |
| 64 | +## Verification |
| 65 | + |
| 66 | +The release candidate was checked on Linux with Node 22 and pnpm 11. |
| 67 | + |
| 68 | +- All 116 executed test files pass: 1,164 tests passed and 38 optional live |
| 69 | + integration tests were skipped. |
| 70 | +- The checked 270-assertion oracle passes all 23 corpus files. |
| 71 | +- Core/ST conformance is byte-identical to 1.1.5 at 431 passed, 77 established |
| 72 | + failures, 60 manifest expected failures, and zero skips. |
| 73 | +- The standard benchmark, all six nondeterminism cases, concurrency checks, |
| 74 | + and all 33 scale cases pass. |
| 75 | +- The documentation site builds, and all ten package tarballs install together |
| 76 | + in a clean npm project. The packed evaluator, EDSL, `jarr`, GIF renderer, and |
| 77 | + TypeScript declarations pass their smoke checks. |
| 78 | +- Browser and grapher base entries import from a clean install without Sharp or |
| 79 | + `gifenc`. The production dependency audit reports no known vulnerabilities. |
| 80 | + |
| 81 | +## Packages |
| 82 | + |
| 83 | +All public packages use version `1.1.6`: |
| 84 | + |
| 85 | +```bash |
| 86 | +npm install @metta-ts/core@1.1.6 |
| 87 | +npm install -g @metta-ts/node@1.1.6 |
| 88 | +``` |
| 89 | + |
| 90 | +Optional host packages use the same version: |
| 91 | + |
| 92 | +```bash |
| 93 | +npm install @metta-ts/py@1.1.6 pythonia |
| 94 | +npm install @metta-ts/prolog@1.1.6 |
| 95 | +``` |
| 96 | + |
1 | 97 | # MeTTa TS 1.1.5 |
2 | 98 |
|
3 | 99 | MeTTa TS 1.1.5 adds a programmatic reduction-GIF API for plain Node.js. It |
|
0 commit comments