Skip to content

Commit 497d707

Browse files
committed
MeTTaScript 2.5.1
1 parent db4c1be commit 497d707

29 files changed

Lines changed: 280 additions & 39 deletions

File tree

RELEASE_NOTES.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# MeTTaScript 2.5.1
2+
3+
A `metta check` accuracy fix. The static analyzer stopped reporting false arity errors on overloaded doc
4+
atoms and on operators used as data, and it now resolves `import!` targets the way `run` does, so a clean
5+
multi-file program checks clean. The engine is unchanged: no program's evaluation or output differs, only
6+
the diagnostics `metta check` reports.
7+
8+
## Overloaded doc atoms check clean
9+
10+
The standard library declares `@param` and `@return` twice, an informal one-argument form and a formal
11+
two-argument form, and `@doc` with both a short and a long arity. The checker compared each call against a
12+
single kept signature, so the one-argument `(@param "...")` and `(@return "...")` the stdlib itself uses
13+
everywhere were flagged as arity errors. A call is now well-formed when its argument count matches any
14+
declared overload, the same rule `check_if_function_type_is_applicable` follows when it tries every
15+
function type of an operator.
16+
17+
## Operators carried as data are not checked as calls
18+
19+
An argument a form leaves unevaluated is data, not a call: a `case` clause pattern, an `if` branch, a
20+
`let` binding pattern, a `match` or `unify` pattern, a quoted term. The interpreter never applies it, so
21+
its head is never arity-checked, even when that head is a stdlib operator reused as an object-language
22+
symbol such as `(forall)`, `(and ...)`, or `(* ...)`. The checker now reads each operator's own signature
23+
to find these positions, the `Atom`, `Variable`, and `Expression` parameter slots the spec's `metta`
24+
returns as-is, and skips them, so it flags exactly what the interpreter would evaluate.
25+
26+
## Cross-file signatures are resolved
27+
28+
`metta check` now resolves a file's `import!` targets and analyzes it against the imported declarations,
29+
the same import graph `run` builds. A call to an operator whose type lives in another module is checked
30+
against that real signature instead of reading as an untyped head whose arguments all evaluate, so a
31+
formula carried in an imported operator's `Atom`-typed parameter is correctly treated as data. An
32+
unreadable import contributes nothing, and the check degrades to the single-file result.
33+
134
# MeTTaScript 2.5.0
235

336
Four engine changes: repeated queries over a knowledge base that has not changed now reuse their

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.5.0",
3+
"version": "2.5.1",
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.5.0",
3+
"version": "2.5.1",
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.5.0",
3+
"version": "2.5.1",
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.5.0",
3+
"version": "2.5.1",
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.5.0",
3+
"version": "2.5.1",
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.5.0",
3+
"version": "2.5.1",
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.5.0",
3+
"version": "2.5.1",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/hyperon/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/hyperon",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/libraries/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/libraries",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)