Skip to content

Commit 5b1cca2

Browse files
committed
Format release sources
1 parent 5ec7857 commit 5b1cca2

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ A reproducible benchmark ([`packages/node/bench/corpus-bench.mjs`](packages/node
286286

287287
A representative slice (wall-clock, subprocess including startup; `speedup` = PeTTa / MeTTa TS):
288288

289-
| Program | PeTTa | MeTTa TS | Speedup |
290-
| ------------------ | ------: | -------: | -------: |
289+
| Program | PeTTa | MeTTa TS | Speedup |
290+
| ------------------ | ------: | -------: | --------: |
291291
| `peano` | 1588 ms | 306 ms | **5.19×** |
292292
| `fib` | 454 ms | 88 ms | **5.14×** |
293293
| `fibadd` | 451 ms | 100 ms | **4.53×** |

packages/core/src/flat-atomspace.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ describe("FlatAtomSpace runtime store", () => {
114114
fc.integer({ min: 0, max: 5 }).map(gint),
115115
fc.constantFrom("x", "y").map(variable),
116116
);
117-
const factArb = fc.tuple(head, fc.array(leaf, { minLength: 1, maxLength: 3 })).map(
118-
([h, args]) => A(sym(h), ...args),
119-
);
117+
const factArb = fc
118+
.tuple(head, fc.array(leaf, { minLength: 1, maxLength: 3 }))
119+
.map(([h, args]) => A(sym(h), ...args));
120120
const opArb = fc.oneof(
121121
factArb.map((atom) => ({ tag: "add" as const, atom })),
122122
factArb.map((atom) => ({ tag: "remove" as const, atom })),

packages/core/src/table-space.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ export class TokenTrie<V> {
104104
if (!removed) return [false, false];
105105
if (pruneChild) node.children!.delete(tokens[i]!);
106106
}
107-
return [true, node.value === undefined && (node.children === undefined || node.children.size === 0)];
107+
return [
108+
true,
109+
node.value === undefined && (node.children === undefined || node.children.size === 0),
110+
];
108111
};
109112
return del(this.root, 0)[0];
110113
}

packages/core/src/tabling.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ describe("purity analysis", () => {
6666
const tables = new TableSpace();
6767
const call = expr([sym("fib"), gint(30)]);
6868
expect(tables.key("ground", call, 0).tokens).toEqual(tables.key("ground", call, 0).tokens);
69-
expect(tables.key("ground", call, 0).tokens).not.toEqual(
70-
tables.key("ground", call, 1).tokens,
71-
);
69+
expect(tables.key("ground", call, 0).tokens).not.toEqual(tables.key("ground", call, 1).tokens);
7270
expect(keyWellFormed(call)).toBe(true);
7371
expect(keyWellFormed(expr([sym("g"), gfloat(1.5)]))).toBe(false);
7472
});

packages/core/src/tabling.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ function callHeads(a: Atom, out: Set<string>): void {
138138
/** How many calls in `a` target any functor in `targets`. */
139139
export function functorCallCount(a: Atom, targets: ReadonlySet<string>): number {
140140
if (a.kind !== "expr" || a.items.length === 0) return 0;
141-
let n =
142-
a.items[0]!.kind === "sym" && targets.has((a.items[0] as { name: string }).name) ? 1 : 0;
141+
let n = a.items[0]!.kind === "sym" && targets.has((a.items[0] as { name: string }).name) ? 1 : 0;
143142
for (const it of a.items) n += functorCallCount(it, targets);
144143
return n;
145144
}

0 commit comments

Comments
 (0)