@metta-ts/core 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +147 -38
  2. package/dist/index.js +2602 -331
  3. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -96,11 +96,22 @@ type GroundedExec = (args: readonly Atom[]) => readonly Atom[];
96
96
  type GroundedMatch = (other: Atom) => readonly unknown[];
97
97
  /** Structural equality of grounded values (LeaTTa `Ground.BEq`). */
98
98
  declare function groundEq(a: Ground, b: Ground): boolean;
99
+ declare function canInternExprItems(items: readonly Atom[]): boolean;
99
100
  /** Interned symbol atom: equal names share one object (reference equality, low allocation). */
100
101
  declare function sym(name: string): SymAtom;
101
102
  /** Variable atom. Not interned: freshening needs distinct identities. */
102
103
  declare function variable(name: string): VarAtom;
103
104
  declare function expr(items: readonly Atom[]): ExprAtom;
105
+ interface InternTable {
106
+ readonly buckets: Map<number, Atom | Atom[]>;
107
+ readonly variables: Map<string, VarAtom>;
108
+ readonly expressions: WeakSet<ExprAtom>;
109
+ readonly hasUnsafeGrounded: WeakMap<ExprAtom, boolean>;
110
+ }
111
+ declare function createInternTable(): InternTable;
112
+ declare function internAtom(table: InternTable | undefined, a: Atom): Atom;
113
+ declare function internExpr(table: InternTable | undefined, a: ExprAtom): ExprAtom;
114
+ declare function internBuiltExpr(table: InternTable | undefined, a: ExprAtom): ExprAtom;
104
115
  /** The built-in type atom for a grounded value (LeaTTa `getTypes` on grounded). */
105
116
  declare function groundType(v: Ground): Atom;
106
117
  declare function gnd(value: Ground, typ?: Atom, exec?: GroundedExec, match?: GroundedMatch): GndAtom;
@@ -111,6 +122,8 @@ declare const gstr: (s: string) => GndAtom;
111
122
  declare const gbool: (b: boolean) => GndAtom;
112
123
  declare const gunit: GndAtom;
113
124
  declare function metaType(a: Atom): MetaType;
125
+ declare const mixHash: (h: number, x: number) => number;
126
+ declare const strHash: (s: string) => number;
114
127
  /** A 32-bit structural hash: equal structures hash equal. O(1) amortised for a fresh atom whose subterms
115
128
  * are already hashed. Collisions are possible, so callers verify a match with `atomEq`. */
116
129
  declare function hashOf(a: Atom): number;
@@ -156,40 +169,61 @@ declare function removeVal(b: Bindings, x: string): Bindings;
156
169
  declare function hasLoop(b: Bindings): boolean;
157
170
  /** Bind `$x ← a`, dropping any previous value binding for `$x`. Raw: no consistency check. */
158
171
  declare function addValRaw(b: Bindings, x: string, a: Atom): Bindings;
172
+ /** Prepend `$x ← a` when the caller has already proved `$x` has no direct value binding. */
173
+ declare function prependValRaw(b: Bindings, x: string, a: Atom): Bindings;
159
174
  /** Add the alias `$x = $y` (a no-op when `x = y`). Raw: no consistency check. */
160
175
  declare function addEqRaw(b: Bindings, x: string, y: string): Bindings;
176
+ /** Build a single value relation. The canonical `ValRel` constructor for callers outside this module. */
177
+ declare function makeValRel(x: string, a: Atom): ValRel;
178
+ /** Build a binding set from an explicit list of relations (newest-first). */
179
+ declare function fromRelations(rels: readonly BindingRel[]): Bindings;
180
+ /** Number of relations in the set. */
181
+ declare function size(b: Bindings): number;
182
+ /** Whether the set has no relations. */
183
+ declare function isEmpty(b: Bindings): boolean;
184
+ /** Every relation, newest-first (the order `merge` folds them in). */
185
+ declare function relations(b: Bindings): Iterable<BindingRel>;
186
+ /** Each current value binding as `[var, atom]`. */
187
+ declare function valEntries(b: Bindings): Iterable<readonly [string, Atom]>;
188
+ /** Whether any value binding satisfies `pred`. */
189
+ declare function someVal(b: Bindings, pred: (x: string, a: Atom) => boolean): boolean;
190
+ /** Whether the set carries any `eq` alias. */
191
+ declare function hasEq(b: Bindings): boolean;
192
+ /** Each `eq` alias relation, newest-first. */
193
+ declare function eqRelations(b: Bindings): Iterable<EqRel>;
161
194
 
162
- interface Leaf<V> {
163
- readonly kind: "leaf";
164
- readonly key: string;
165
- readonly val: V;
166
- }
167
- interface Collision<V> {
168
- readonly kind: "collision";
169
- readonly entries: ReadonlyArray<Leaf<V>>;
170
- }
171
- type Branch<V> = ReadonlyArray<PNode<V>>;
172
- type PNode<V> = Leaf<V> | Collision<V> | Branch<V> | null;
173
- /** A persistent string -> V map. `null` is the empty map. */
174
- type PMap<V> = Branch<V> | null;
175
-
176
- /** Distinct ground atoms sharing one 32-bit hash, each with its multiplicity in the log. */
177
- type Bucket = ReadonlyArray<{
178
- readonly atom: Atom;
179
- readonly count: number;
180
- }>;
181
195
  interface LogNode {
182
196
  readonly atom: Atom;
183
197
  readonly prev: AtomLog;
184
198
  readonly size: number;
185
- /** Exact-match index over the ground atoms in this log (and all earlier nodes). */
186
- readonly groundIdx: PMap<Bucket>;
187
199
  /** Count of non-ground atoms in this log; the index fast path is valid only when this is 0. */
188
200
  readonly nonGround: number;
189
201
  }
190
202
  /** An atom log: `null` is empty; otherwise the most recently appended atom and the rest. */
191
203
  type AtomLog = LogNode | null;
192
204
 
205
+ declare function canCompactAtom(a: Atom): boolean;
206
+ declare class FlatAtomSpace {
207
+ private readonly table;
208
+ private readonly ranges;
209
+ private readonly dead;
210
+ readonly liveCount: number;
211
+ readonly nonGroundCount: number;
212
+ private constructor();
213
+ static empty(): FlatAtomSpace;
214
+ static fromAtoms(atoms: readonly Atom[]): FlatAtomSpace | undefined;
215
+ get size(): number;
216
+ appendAll(atoms: readonly Atom[]): FlatAtomSpace;
217
+ removeOne(atom: Atom): FlatAtomSpace;
218
+ exactCount(atom: Atom): number;
219
+ candidatesFor(patternHead: string | undefined): Iterable<Atom>;
220
+ toArray(): Atom[];
221
+ roundTrip(atom: Atom): Atom;
222
+ private decodeFact;
223
+ private visibleFactIds;
224
+ private factVisible;
225
+ }
226
+
193
227
  type ReduceResult = {
194
228
  readonly tag: "ok";
195
229
  readonly results: readonly Atom[];
@@ -228,23 +262,61 @@ declare class Tup {
228
262
  constructor(v: readonly IntVal[]);
229
263
  }
230
264
  type FrameVal = IntVal | Tup;
231
- type Ty = "int" | "bool" | `tuple${number}`;
232
- /** A compiled function. `run` is filled after the whole dependency group is compiled, so mutual
265
+ type Ty = "int" | "bool" | "sym" | `tuple${number}` | `symtuple${number}`;
266
+ /** A compiled pure function. `run` is filled after the whole dependency group is compiled, so mutual
233
267
  * recursion resolves through the holder object. */
234
- interface CompiledHolder {
268
+ interface FunctionalHolder {
269
+ kind: "functional";
235
270
  arity: number;
236
271
  retType: Ty;
237
272
  paramTypes: Ty[];
238
273
  run: (vals: FrameVal[]) => FrameVal | boolean;
239
274
  }
275
+ interface CompiledAtomResult {
276
+ readonly atom: Atom;
277
+ readonly bnd: Bindings;
278
+ }
279
+ interface CompiledRunResult {
280
+ readonly results: readonly CompiledAtomResult[];
281
+ readonly counterDelta: number;
282
+ readonly state?: St;
283
+ }
284
+ interface RewriteHolder {
285
+ kind: "rewrite";
286
+ arity: number;
287
+ retType: Ty;
288
+ paramTypes: Ty[];
289
+ ruleCount: number;
290
+ run: (partAtoms: readonly Atom[]) => CompiledRunResult | undefined;
291
+ }
292
+ interface SymbolicHolder {
293
+ kind: "symbolic";
294
+ arity: number;
295
+ clauseCount: number;
296
+ run: (partAtoms: readonly Atom[], counter: number) => CompiledRunResult | undefined;
297
+ }
298
+ interface CompiledImpureOps {
299
+ readonly addAtom: (env: MinEnv, st: St, space: Atom, atom: Atom) => St | undefined;
300
+ }
301
+ type ImpEval = {
302
+ readonly value: Atom;
303
+ readonly st: St;
304
+ } | typeof BAIL;
305
+ interface ImperativeHolder {
306
+ kind: "imperative";
307
+ arity: number;
308
+ clauseCount: number;
309
+ run: (partAtoms: readonly Atom[], st: St, ops: CompiledImpureOps, discard?: boolean) => ImpEval;
310
+ }
311
+ type CompiledHolder = FunctionalHolder | RewriteHolder | SymbolicHolder | ImperativeHolder;
240
312
  type CompiledFns = Map<string, CompiledHolder>;
241
313
  /** Compile every compilable pure single-clause function in `env` to a memoised native closure.
242
314
  * Phase 1 infers return types (fixpoint, optimistic over recursion). Phase 2 compiles bodies with
243
315
  * those types and drops any that fail end-to-end (a call to an uncompilable function fails too). */
244
316
  declare function compileEnv(env: MinEnv): CompiledFns;
245
- /** Run a compiled function for a ground-int call, returning the result atom, or `undefined` to fall
246
- * back to the interpreter (not compiled, non-int args, or a runtime bail). */
247
- declare function runCompiled(env: MinEnv, op: string, partAtoms: readonly Atom[]): Atom | undefined;
317
+ /** Run a compiled function, returning an ordered result bag, or `undefined` to fall back to the interpreter
318
+ * when the call falls outside the proven subset. */
319
+ declare function runCompiled(env: MinEnv, op: string, partAtoms: readonly Atom[], st: St, ops?: CompiledImpureOps, discard?: boolean): CompiledRunResult | undefined;
248
320
 
249
321
  /** A grounded operation that runs asynchronously, for the async runner. */
250
322
  type AsyncGroundFn = (args: readonly Atom[]) => Promise<ReduceResult>;
@@ -271,6 +343,7 @@ interface Item {
271
343
  interface MinEnv {
272
344
  ruleIndex: Map<string, Array<[Atom, Atom]>>;
273
345
  varRules: Array<[Atom, Atom]>;
346
+ varRulesVar: Array<[Atom, Atom]>;
274
347
  sigs: Map<string, Atom[]>;
275
348
  gt: GroundingTable;
276
349
  atoms: Atom[];
@@ -281,6 +354,10 @@ interface MinEnv {
281
354
  agt: Map<string, AsyncGroundFn>;
282
355
  /** Per-runner `with-mutex` locks (a Promise chain per key), so mutexes do not leak across runners. */
283
356
  mutexes: Map<string, Promise<void>>;
357
+ /** Optional per-run hash-cons table for immutable terms. */
358
+ intern?: InternTable;
359
+ /** Ground expressions already observed to reduce to themselves for the current rule set. */
360
+ evaluatedAtoms: WeakSet<Atom>;
284
361
  factIndex: Map<string, Atom[]>;
285
362
  argIndex: Map<string, Atom[]>;
286
363
  nonGroundAtPos: Map<string, Atom[]>;
@@ -301,13 +378,21 @@ interface MinEnv {
301
378
  * is pure and the space carries no runtime additions, so it is identical to evaluating in line. */
302
379
  parEval?: (branchSrcs: string[], firstOnly: boolean) => (Atom[] | null)[];
303
380
  /** Compiled pure deterministic functions (the int/bool functional core); undefined when disabled. */
304
- compiled?: CompiledFns;
381
+ compiled?: CompiledFns | undefined;
305
382
  /** Set when an equation changed, so the compiler re-runs before the next query. */
306
- compileDirty?: boolean;
383
+ compileDirty?: boolean | undefined;
307
384
  /** Opt-in PeTTa-style auto-currying, enabled by `(import! &self curry)`. When set, a symbol-headed
308
385
  * call applied to fewer arguments than the function's arity reduces to `(partial fn (args))` instead
309
386
  * of staying irreducible. Off by default, so the Hyperon oracle baseline is unaffected. */
310
387
  curry?: boolean;
388
+ /** Opt-in trail-based matching (`experimental.trail`): the conjunctive `match` enumerates on a WAM-style
389
+ * trail (zero per-solution allocation) instead of the immutable `Bindings`/`merge` threading. Off by
390
+ * default; byte-identical to the reference matcher (differential-gated), falling back to it per query for
391
+ * cases the trail cannot reproduce (custom grounded matchers). */
392
+ useTrail?: boolean;
393
+ /** Opt-in compact runtime `&self` atomspace. Off by default; when on, runtime additions are stored as flat
394
+ * term ids and decoded only when a query or observable operation needs tree atoms. */
395
+ useFlatAtomspace?: boolean;
311
396
  }
312
397
  /** An empty environment for grounding table `gt`. Grow it with `addAtomToEnv`. */
313
398
  declare function emptyEnv(gt: GroundingTable): MinEnv;
@@ -316,11 +401,13 @@ declare function emptyEnv(gt: GroundingTable): MinEnv;
316
401
  * gated by the 270/270 oracle. */
317
402
  declare function addAtomToEnv(env: MinEnv, x: Atom): void;
318
403
  declare function buildEnv(atoms: Atom[], gt: GroundingTable): MinEnv;
404
+ type NamedSpace = AtomLog;
319
405
  interface World {
320
- spaces: Map<string, Atom[]>;
406
+ spaces: Map<string, NamedSpace>;
321
407
  store: Map<number, Atom>;
322
408
  tokens: Map<string, Atom>;
323
409
  selfExtra: AtomLog;
410
+ flatSelfExtra: FlatAtomSpace | undefined;
324
411
  selfRules: Map<string, Array<[Atom, Atom]>>;
325
412
  selfVarRules: ReadonlyArray<[Atom, Atom]>;
326
413
  maxStackDepth: number;
@@ -358,11 +445,23 @@ interface Relation<V> {
358
445
  readonly vars: readonly string[];
359
446
  readonly tuples: ReadonlyArray<ReadonlyMap<string, V>>;
360
447
  }
361
- /** The worst-case-optimal join (generic join / leapfrog-triejoin family): all bindings of every variable
362
- * satisfying all relations. Each relation is indexed once into a trie over its variables in the join
363
- * order, so binding a variable intersects the relations' current trie levels by key lookup rather than
364
- * rescanning every tuple. That avoids the naive generic join's repeated tuple scans. `key` maps a
365
- * value to a comparable string; pass `varOrder` to fix the elimination order (first-seen otherwise). */
448
+ /** Hooks for streaming the join: `onDescend`/`onAscend` bracket each variable binding as the search descends
449
+ * and backtracks, and `onLeaf` fires at each full solution. The caller keeps whatever state it needs (a
450
+ * partial map, or a trail synced to the descent) so the join itself never materializes the answer set. */
451
+ interface WcoFoldHooks<V> {
452
+ onDescend(variable: string, value: V): void;
453
+ onAscend(variable: string): void;
454
+ onLeaf(): void;
455
+ }
456
+ /** The worst-case-optimal join (generic join / leapfrog-triejoin family) as a streaming fold: it drives the
457
+ * same trie-cursor intersection as the textbook join but, instead of collecting binding maps, brackets each
458
+ * variable binding with `onDescend`/`onAscend` and calls `onLeaf` per solution. Each relation is indexed
459
+ * once into a trie over its variables in the join order, so binding a variable intersects the relations'
460
+ * current trie levels by key lookup. A consumer that only needs an aggregate (COUNT/EXISTS) keeps a trail
461
+ * synced to the descent and never materializes the answer set (MORK's `trie_join_count` kernel). `key` maps
462
+ * a value to a comparable string; pass `varOrder` to fix the elimination order (first-seen otherwise). */
463
+ declare function wcoJoinFold<V>(rels: ReadonlyArray<Relation<V>>, key: (v: V) => string, hooks: WcoFoldHooks<V>, varOrder?: readonly string[]): void;
464
+ /** Collect every join solution as a fresh binding map: a thin materializing wrapper over `wcoJoinFold`. */
366
465
  declare function wcoJoin<V>(rels: ReadonlyArray<Relation<V>>, key: (v: V) => string, varOrder?: readonly string[]): Array<Map<string, V>>;
367
466
 
368
467
  /** A substitution: an association list of variable name to atom. */
@@ -414,7 +513,7 @@ declare function bindingsToSubst(b: Bindings): Subst;
414
513
  * that conversion was pure allocation on the hot substitution path (instantiate dominated the emit
415
514
  * profile). A new term is built only where a child changed; the empty binding and closed subterms
416
515
  * short-circuit to sharing. */
417
- declare function instantiate(b: Bindings, a: Atom, suffix?: string): Atom;
516
+ declare function instantiate(b: Bindings, a: Atom, suffix?: string, intern?: InternTable): Atom;
418
517
 
419
518
  declare function alphaEq(a: Atom, b: Atom): boolean;
420
519
 
@@ -466,6 +565,14 @@ interface QueryResult {
466
565
  declare const DEFAULT_FUEL = 100000;
467
566
  interface RunOptions {
468
567
  readonly tabling?: boolean;
568
+ readonly experimental?: {
569
+ readonly hashCons?: boolean;
570
+ readonly streamEmit?: boolean;
571
+ readonly tableBackchain?: boolean;
572
+ readonly trieSpace?: boolean;
573
+ readonly flatAtomspace?: boolean;
574
+ readonly trail?: boolean;
575
+ };
469
576
  readonly maxStackDepth?: number;
470
577
  readonly parEvalImpl?: (rulesSrc: string, branchSrcs: string[], firstOnly: boolean) => (string[] | null)[];
471
578
  }
@@ -479,7 +586,7 @@ declare function runProgram(src: string, fuel?: number, imports?: Map<string, At
479
586
  /** Async sequential evaluation: like `runProgram`, but `!`-queries are awaited, so async grounded
480
587
  * operations (registered in `asyncOps`) can perform I/O. Sync programs give identical results to
481
588
  * `runProgram`; the async path only differs when an async op is actually reached. */
482
- declare function runProgramAsync(src: string, asyncOps?: Map<string, AsyncGroundFn>, fuel?: number, imports?: Map<string, Atom[]>): Promise<QueryResult[]>;
589
+ declare function runProgramAsync(src: string, asyncOps?: Map<string, AsyncGroundFn>, fuel?: number, imports?: Map<string, Atom[]>, opts?: RunOptions): Promise<QueryResult[]>;
483
590
  /** Module names referenced by top-level `import!` statements (so a caller can pre-read them). */
484
591
  declare function collectImports(src: string): string[];
485
592
  /** An oracle assertion passes iff its query evaluates to exactly the unit atom `()`. */
@@ -615,6 +722,8 @@ declare class Trail {
615
722
  bind(name: string, a: Atom): void;
616
723
  /** Follow variable bindings to the representative: a non-variable, or an unbound variable. */
617
724
  deref(a: Atom): Atom;
725
+ /** The atom currently bound to `$name`, if any (the direct binding, not dereferenced). */
726
+ get(name: string): Atom | undefined;
618
727
  /** Resolve `a` against the current bindings, one pass (the same discipline as the immutable
619
728
  * `instantiate`/`applySubst`): a variable becomes its bound value as-is; the value's own variables are
620
729
  * not re-resolved, and an expression's children are resolved. This matches the evaluator exactly,
@@ -629,4 +738,4 @@ declare class Trail {
629
738
  * values must be equal, two expressions must have equal arity and unify pointwise. */
630
739
  declare function unifyTrail(tr: Trail, l0: Atom, r0: Atom): boolean;
631
740
 
632
- export { type AsyncGroundFn, AsyncInSyncError, type Atom, BAIL, type BindingRel, type Bindings, CONCURRENCY_MODULE_SRC, CURRY_MODULE_SRC, type CompiledFns, type CompiledHolder, DEFAULT_FUEL, type EqRel, type ExprAtom, FlatKB, type Frame, type GndAtom, type Ground, type GroundFn, type GroundMatcher, type GroundedExec, type GroundedMatch, type GroundingTable, type HeavyPattern, IMPURE_OPS, InMemorySpace, type IntVal, Interner, type Item, type MetaType, type MinEnv, type QueryResult, type ReduceResult, type Relation, type Ret, type RunOptions, STDLIB_SRC, type Space, type St, type Stack, type StackCons, type Subst, type SymAtom, TAG_ARITY, TAG_NEWVAR, TAG_SYMBOL, TAG_VARREF, type TokenConstructor, Tokenizer, type TopAtom, Trail, type ValRel, type VarAtom, type World, _internals, addAtomToEnv, addEqRaw, addInt, addValRaw, addVarBinding, addVarEquality, alphaEq, analyzePurity, applySubst, atomEq, atomSize, atomVars, baseTable, bindingsToSubst, buildEnv, builtinModules, callGrounded, canonInt, cmpIntVal, collectImports, collectVars, compileEnv, decodeAt, decodeAtom, emptyBindings, emptyEnv, emptyExpr, emptySubst, encodeAtom, encodeInto, encodePattern, eraseSubst, evalAtom, evalSequential, expr, extendSubst, format, freshenRule, gbool, getTypes, gfloat, gint, gnd, groundEq, groundType, gstr, gunit, hasLoop, hashOf, initSt, instantiate, intAbs, intDiv, intMod, isErrorAtom, isExpr, isGnd, isOraclePass, isSym, isVar, isZero, keyWellFormed, lookupSubst, lookupVal, matchAtoms, matchAtomsScoped, matchAtomsWith, matchFlatAt, merge, metaType, mettaEval, mettaEvalAsync, mulInt, occurs, oracleReport, parse, parseAll, pettaOpNames, preludeAtoms, removeVal, runCompiled, runProgram, runProgramAsync, setOutputSink, setRawSink, standardTokenizer, stdTable, stdlibAtoms, subInt, sym, tableKey, toF64, unifiable, unifyTop, unifyTrail, variable, wcoJoin, williamTopK, withBuiltinModules };
741
+ export { type AsyncGroundFn, AsyncInSyncError, type Atom, BAIL, type BindingRel, type Bindings, CONCURRENCY_MODULE_SRC, CURRY_MODULE_SRC, type CompiledFns, type CompiledHolder, type CompiledImpureOps, type CompiledRunResult, DEFAULT_FUEL, type EqRel, type ExprAtom, FlatAtomSpace, FlatKB, type Frame, type GndAtom, type Ground, type GroundFn, type GroundMatcher, type GroundedExec, type GroundedMatch, type GroundingTable, type HeavyPattern, IMPURE_OPS, InMemorySpace, type IntVal, type InternTable, Interner, type Item, type MetaType, type MinEnv, type QueryResult, type ReduceResult, type Relation, type Ret, type RunOptions, STDLIB_SRC, type Space, type St, type Stack, type StackCons, type Subst, type SymAtom, TAG_ARITY, TAG_NEWVAR, TAG_SYMBOL, TAG_VARREF, type TokenConstructor, Tokenizer, type TopAtom, Trail, type ValRel, type VarAtom, type WcoFoldHooks, type World, _internals, addAtomToEnv, addEqRaw, addInt, addValRaw, addVarBinding, addVarEquality, alphaEq, analyzePurity, applySubst, atomEq, atomSize, atomVars, baseTable, bindingsToSubst, buildEnv, builtinModules, callGrounded, canCompactAtom, canInternExprItems, canonInt, cmpIntVal, collectImports, collectVars, compileEnv, createInternTable, decodeAt, decodeAtom, emptyBindings, emptyEnv, emptyExpr, emptySubst, encodeAtom, encodeInto, encodePattern, eqRelations, eraseSubst, evalAtom, evalSequential, expr, extendSubst, format, freshenRule, fromRelations, gbool, getTypes, gfloat, gint, gnd, groundEq, groundType, gstr, gunit, hasEq, hasLoop, hashOf, initSt, instantiate, intAbs, intDiv, intMod, internAtom, internBuiltExpr, internExpr, isEmpty, isErrorAtom, isExpr, isGnd, isOraclePass, isSym, isVar, isZero, keyWellFormed, lookupSubst, lookupVal, makeValRel, matchAtoms, matchAtomsScoped, matchAtomsWith, matchFlatAt, merge, metaType, mettaEval, mettaEvalAsync, mixHash, mulInt, occurs, oracleReport, parse, parseAll, pettaOpNames, preludeAtoms, prependValRaw, relations, removeVal, runCompiled, runProgram, runProgramAsync, setOutputSink, setRawSink, size, someVal, standardTokenizer, stdTable, stdlibAtoms, strHash, subInt, sym, tableKey, toF64, unifiable, unifyTop, unifyTrail, valEntries, variable, wcoJoin, wcoJoinFold, williamTopK, withBuiltinModules };