Skip to content

Commit b89d29d

Browse files
committed
MeTTaScript 2.3.0
1 parent 3d37a2e commit b89d29d

34 files changed

Lines changed: 283 additions & 86 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ isolate-*.log
2121
# Local scratch, notes, and screenshots (never committed)
2222
/ai-notes/
2323
/ai-tmp/
24+
/ai-debug/
2425
/ai-*.md
2526
/metta-interlingua/
2627
/scratch-review/

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MeTTaScript
22

3-
MeTTaScript is a metagraph rewriting database, written in pure TypeScript. You store facts in a space, query them by pattern, and compute by writing rewrite rules over the same facts, all with the same pattern-matching mechanism.
3+
MeTTaScript is a metagraph database and reasoning engine, written in pure TypeScript. You store facts in a space, query them by pattern, derive new facts with rewrite rules, and let a query fan out to search every answer, all through one pattern-matching mechanism. Querying and computing are the same act of matching, so the library that holds your data also runs recursive inference and non-deterministic search over it.
44

55
A metagraph is the most expressive of the graph data models. A graph joins two nodes with an edge, a hypergraph joins any number of nodes, and a metagraph lets links contain other links, so a fact can be about another fact: `(Believes Tom (parent Bob Ann))` is a statement whose subject is itself a statement. Rules live in the space as atoms too, so you compute by rewriting the data itself, and a program can query and rewrite its own rules.
66

@@ -325,6 +325,13 @@ The core list operations run in linear time. `size-atom`, `map-atom`,
325325
stack, byte-identical to the prelude recursion up to variable renaming, and beat
326326
PeTTa 2.7x to 5.2x at N=100000.
327327

328+
Deep recursion scales past the native stack. A deep reducible computation runs
329+
through a heap continuation instead of the host call stack, so a reduction tens
330+
of thousands of levels deep returns a value rather than a `StackOverflow`. The
331+
depth bound is a `max-stack-depth` limit you set, deterministic and independent
332+
of the V8 stack size, so the same program cuts at the same place in every
333+
runtime.
334+
328335
The full per-program tables, memory figures, and the nondeterminism and
329336
bounded-backward-chaining benchmarks are in
330337
[`RESULTS.md`](packages/node/bench/RESULTS.md),

RELEASE_NOTES.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# MeTTaScript 2.3.0
2+
3+
Deep recursion now scales past the native stack. A reduction that nests tens of thousands of levels deep, a
4+
long grounded-operation spine or the result of a deeply recursive rule, runs on the engine's heap continuation
5+
instead of the JavaScript call stack, so it returns a value where it used to overflow. Every terminating
6+
program from 2.2.0 produces the same output, validated byte-identical across the full corpus, so upgrading is
7+
safe.
8+
9+
## Deep computation on the heap continuation
10+
11+
Before this release, a deeply nested reducible computation recursed to the term's depth through the evaluator
12+
and its term-walk predicates, and could exhaust the host stack before the language-level `max-stack-depth`
13+
bound applied. A reducible argument now hands off to the engine's heap-continuation driver at the depth-neutral
14+
boundary, where the current application has not taken a user-equation call lease or has tail-transferred into a
15+
constructor or grounded operation. The driver carries the same evaluation depth, bindings, state, and fuel, so
16+
`max-stack-depth` accounting is unchanged: recursion is still cut at exactly the limit you set, and that cut is
17+
deterministic and independent of the V8 stack size.
18+
19+
The term walks a deep result drives are now iterative rather than recursive, byte-identical to before: the
20+
normal-form and type checks, structural equality (a fast recursive path with an iterative fallback), the
21+
table-key check, and the printer. A grounded-operation spine 50,000 levels deep returns its value, and the
22+
`differential`, `deterministic-depth`, and `tail-trampoline` suites confirm the behavior is unchanged.
23+
24+
## Docs
25+
26+
The website and README are repositioned around what the engine does: a metagraph database and reasoning engine
27+
you drive from TypeScript, with rules, recursive inference, and non-deterministic search, not only a query
28+
store. The TypeScript-first examples and the getting-started path are unchanged.
29+
130
# MeTTaScript 2.2.0
231

332
Exposes the import resolver as a reusable, host-agnostic function. The transitive, cycle-safe import

compat/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/browser",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/core",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/das-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/das-client",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/das-gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/das-gateway",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/debug/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/debug",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/edsl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/edsl",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/grapher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/grapher",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)