@turing-machine-js/machine 2.0.2 → 3.0.1

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.
@@ -0,0 +1,31 @@
1
+ import State from '../classes/State';
2
+ import TapeBlock from '../classes/TapeBlock';
3
+ export type Runnable = {
4
+ state: State;
5
+ getTapeBlock: () => TapeBlock;
6
+ };
7
+ export type EquivalenceCase = string | {
8
+ reference: string;
9
+ candidate: string;
10
+ };
11
+ export type EquivalenceResult = {
12
+ case: {
13
+ reference: string;
14
+ candidate: string;
15
+ };
16
+ agree: boolean;
17
+ referenceOutput: string;
18
+ candidateOutput: string;
19
+ referenceSteps: number;
20
+ candidateSteps: number;
21
+ firstDivergenceStep: number | null;
22
+ };
23
+ export type EquivalenceReport = {
24
+ results: EquivalenceResult[];
25
+ allAgree: boolean;
26
+ };
27
+ export declare function equivalentOn(reference: Runnable, candidate: Runnable, cases: EquivalenceCase[], options?: {
28
+ compareOutputs?: (refOutput: string, candOutput: string) => boolean;
29
+ compareSnapshots?: ((refSnap: string, candSnap: string) => boolean) | null;
30
+ stepsLimit?: number;
31
+ }): EquivalenceReport;
@@ -0,0 +1,29 @@
1
+ export type GraphCommand = {
2
+ symbol: string;
3
+ movement: string;
4
+ };
5
+ export type GraphTransition = {
6
+ pattern: string;
7
+ command: GraphCommand[];
8
+ nextStateId: number;
9
+ };
10
+ export type GraphNode = {
11
+ id: number;
12
+ name: string;
13
+ isHalt: boolean;
14
+ transitions: GraphTransition[];
15
+ overrodeHaltStateId: number | null;
16
+ };
17
+ export type Graph = {
18
+ initialId: number;
19
+ alphabets: string[][];
20
+ nodes: Record<number, GraphNode>;
21
+ };
22
+ export declare function decodePatternDescription(description: string | undefined, alphabets: string[][]): string;
23
+ export declare function decodeMovement(description: string | undefined): string;
24
+ export type ParsedPattern = null | (string | null)[][];
25
+ export declare function splitUnescaped(s: string, sep: string): string[];
26
+ export declare function parsePatternString(s: string, alphabets: string[][]): ParsedPattern;
27
+ export declare function parseMovementLabel(label: string): symbol;
28
+ export declare function parseWriteSymbolLabel(label: string): string | symbol;
29
+ export declare function decodeWriteSymbol(symbol: string | symbol): string;
@@ -0,0 +1,3 @@
1
+ import { type Graph } from './graph';
2
+ export declare function toMermaid(graph: Graph): string;
3
+ export declare function fromMermaid(text: string): Graph;
@@ -0,0 +1,15 @@
1
+ import State from '../classes/State';
2
+ import TapeBlock from '../classes/TapeBlock';
3
+ import { type Graph } from './graph';
4
+ export type GraphSummary = {
5
+ stateCount: number;
6
+ transitionCount: number;
7
+ compositionEdgeCount: number;
8
+ maxCompositionDepth: number;
9
+ selfLoopCount: number;
10
+ hasCycles: boolean;
11
+ tapeCount: number;
12
+ alphabetCardinalities: number[];
13
+ };
14
+ export declare function summarizeGraph(graph: Graph): GraphSummary;
15
+ export declare function summarize(state: State, tapeBlock: TapeBlock): GraphSummary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turing-machine-js/machine",
3
- "version": "2.0.2",
3
+ "version": "3.0.1",
4
4
  "description": "A convenient Turing machine",
5
5
  "engines": {
6
6
  "npm": ">=7.0.0"
@@ -32,13 +32,7 @@
32
32
  "import": "./dist/index.mjs",
33
33
  "require": "./dist/index.cjs",
34
34
  "default": "./dist/index.mjs"
35
- },
36
- "./src": {
37
- "types": "./dist/index.d.ts",
38
- "import": "./dist/index.mjs",
39
- "require": "./dist/index.cjs",
40
- "default": "./dist/index.mjs"
41
35
  }
42
36
  },
43
- "gitHead": "54da1870a45fd78496c6ba56ce1de728d766470b"
37
+ "gitHead": "0a8d7ff87a3a73ea7ee1844f7f4602cbb23d20fe"
44
38
  }
@@ -1,50 +0,0 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _Alphabet_symbols;
13
- import { uniquePredicate } from '../utilities/functions';
14
- class Alphabet {
15
- constructor(symbols) {
16
- _Alphabet_symbols.set(this, void 0);
17
- if (symbols instanceof Alphabet) {
18
- symbols = symbols.symbols;
19
- }
20
- const uniqueSymbols = symbols.filter(uniquePredicate);
21
- if (uniqueSymbols.length < 2) {
22
- throw new Error('Invalid symbols length');
23
- }
24
- const isSymbolsValid = uniqueSymbols.every((symbol) => symbol.length === 1);
25
- if (!isSymbolsValid) {
26
- throw new Error('symbols contains invalid symbol');
27
- }
28
- __classPrivateFieldSet(this, _Alphabet_symbols, Array.from(uniqueSymbols), "f");
29
- }
30
- get symbols() {
31
- return Array.from(__classPrivateFieldGet(this, _Alphabet_symbols, "f"));
32
- }
33
- get blankSymbol() {
34
- return __classPrivateFieldGet(this, _Alphabet_symbols, "f")[0];
35
- }
36
- has(symbol) {
37
- return __classPrivateFieldGet(this, _Alphabet_symbols, "f").indexOf(symbol) >= 0;
38
- }
39
- get(index) {
40
- if (index < 0 || index >= __classPrivateFieldGet(this, _Alphabet_symbols, "f").length) {
41
- throw new Error('Invalid index');
42
- }
43
- return __classPrivateFieldGet(this, _Alphabet_symbols, "f")[index];
44
- }
45
- index(symbol) {
46
- return __classPrivateFieldGet(this, _Alphabet_symbols, "f").indexOf(symbol);
47
- }
48
- }
49
- _Alphabet_symbols = new WeakMap();
50
- export default Alphabet;
@@ -1,38 +0,0 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _Command_tapesCommands;
13
- import TapeCommand from './TapeCommand';
14
- class Command {
15
- constructor(tapesCommands) {
16
- _Command_tapesCommands.set(this, void 0);
17
- if (tapesCommands.length === 0) {
18
- throw new Error('invalid parameter');
19
- }
20
- try {
21
- __classPrivateFieldSet(this, _Command_tapesCommands, tapesCommands.map((tapeCommand) => {
22
- if (tapeCommand instanceof TapeCommand) {
23
- return tapeCommand;
24
- }
25
- return new TapeCommand(tapeCommand);
26
- }), "f");
27
- }
28
- catch (error) {
29
- void error;
30
- throw new Error('invalid tapeCommand');
31
- }
32
- }
33
- get tapesCommands() {
34
- return [...__classPrivateFieldGet(this, _Command_tapesCommands, "f")];
35
- }
36
- }
37
- _Command_tapesCommands = new WeakMap();
38
- export default Command;
@@ -1,34 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7
- if (kind === "m") throw new TypeError("Private method is not writable");
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
- };
12
- var _Lock_lockSymbol;
13
- class Lock {
14
- constructor() {
15
- _Lock_lockSymbol.set(this, null);
16
- }
17
- lock(symbol) {
18
- if (__classPrivateFieldGet(this, _Lock_lockSymbol, "f") === null) {
19
- __classPrivateFieldSet(this, _Lock_lockSymbol, symbol, "f");
20
- }
21
- }
22
- unlock(symbol) {
23
- if (__classPrivateFieldGet(this, _Lock_lockSymbol, "f") === symbol) {
24
- __classPrivateFieldSet(this, _Lock_lockSymbol, null, "f");
25
- }
26
- }
27
- check(symbol) {
28
- if (__classPrivateFieldGet(this, _Lock_lockSymbol, "f") && __classPrivateFieldGet(this, _Lock_lockSymbol, "f") !== symbol) {
29
- throw new Error('Lock check failed');
30
- }
31
- }
32
- }
33
- _Lock_lockSymbol = new WeakMap();
34
- export default Lock;
@@ -1,31 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7
- if (kind === "m") throw new TypeError("Private method is not writable");
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
- };
12
- var _Reference_referenceBinding;
13
- class Reference {
14
- constructor() {
15
- _Reference_referenceBinding.set(this, null);
16
- }
17
- get ref() {
18
- if (!__classPrivateFieldGet(this, _Reference_referenceBinding, "f")) {
19
- throw new Error('unbounded reference');
20
- }
21
- return __classPrivateFieldGet(this, _Reference_referenceBinding, "f");
22
- }
23
- bind(state) {
24
- if (__classPrivateFieldGet(this, _Reference_referenceBinding, "f") == null) {
25
- __classPrivateFieldSet(this, _Reference_referenceBinding, state, "f");
26
- }
27
- return __classPrivateFieldGet(this, _Reference_referenceBinding, "f");
28
- }
29
- }
30
- _Reference_referenceBinding = new WeakMap();
31
- export default Reference;
@@ -1,113 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7
- if (kind === "m") throw new TypeError("Private method is not writable");
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
- };
12
- var _State_id, _State_name, _State_overrodeHaltState, _State_symbolToDataMap;
13
- import Command from './Command';
14
- import Reference from './Reference';
15
- import TapeCommand from './TapeCommand';
16
- import { id } from '../utilities/functions';
17
- export const ifOtherSymbol = Symbol('other symbol');
18
- class State {
19
- constructor(stateDefinition = null, name) {
20
- _State_id.set(this, id(this));
21
- _State_name.set(this, void 0);
22
- _State_overrodeHaltState.set(this, null);
23
- _State_symbolToDataMap.set(this, new Map());
24
- if (stateDefinition) {
25
- const keys = Object.getOwnPropertyNames(stateDefinition);
26
- if (keys.length) {
27
- throw new Error(`invalid state definition while constructing state #${__classPrivateFieldGet(this, _State_id, "f")}`);
28
- }
29
- const symbols = Object.getOwnPropertySymbols(stateDefinition);
30
- if (symbols.length === 0) {
31
- throw new Error(`invalid state definition while constructing state #${__classPrivateFieldGet(this, _State_id, "f")}`);
32
- }
33
- symbols.forEach((symbol) => {
34
- const { nextState } = stateDefinition[symbol];
35
- const nextStateLocal = nextState !== null && nextState !== void 0 ? nextState : this;
36
- if (!(nextStateLocal instanceof State) && !(nextStateLocal instanceof Reference)) {
37
- throw new Error('invalid nextState');
38
- }
39
- let { command } = stateDefinition[symbol];
40
- if (command == null) {
41
- command = new Command([
42
- new TapeCommand({}),
43
- ]);
44
- }
45
- if (!(command instanceof Command) && !Array.isArray(command)) {
46
- command = [command];
47
- }
48
- let commandLocal = command;
49
- if (Array.isArray(command)) {
50
- try {
51
- commandLocal = new Command(command);
52
- }
53
- catch (error) {
54
- void error;
55
- }
56
- }
57
- if (!(commandLocal instanceof Command)) {
58
- throw new Error('invalid command');
59
- }
60
- __classPrivateFieldGet(this, _State_symbolToDataMap, "f").set(symbol, {
61
- command: commandLocal,
62
- nextState: nextStateLocal,
63
- });
64
- });
65
- }
66
- __classPrivateFieldSet(this, _State_name, name !== null && name !== void 0 ? name : `id:${__classPrivateFieldGet(this, _State_id, "f")}`, "f");
67
- }
68
- get id() {
69
- return __classPrivateFieldGet(this, _State_id, "f");
70
- }
71
- get name() {
72
- return __classPrivateFieldGet(this, _State_name, "f");
73
- }
74
- get isHalt() {
75
- return __classPrivateFieldGet(this, _State_id, "f") === 0;
76
- }
77
- get overrodeHaltState() {
78
- return __classPrivateFieldGet(this, _State_overrodeHaltState, "f");
79
- }
80
- get ref() {
81
- return this;
82
- }
83
- getSymbol(tapeBlock) {
84
- const symbol = [...__classPrivateFieldGet(this, _State_symbolToDataMap, "f").keys()].find((currentSymbol) => tapeBlock.isMatched({
85
- symbol: currentSymbol,
86
- }));
87
- if (symbol) {
88
- return symbol;
89
- }
90
- return ifOtherSymbol;
91
- }
92
- getCommand(symbol) {
93
- if (__classPrivateFieldGet(this, _State_symbolToDataMap, "f").has(symbol)) {
94
- return __classPrivateFieldGet(this, _State_symbolToDataMap, "f").get(symbol).command;
95
- }
96
- throw new Error(`No command for symbol at state named ${__classPrivateFieldGet(this, _State_name, "f")}`);
97
- }
98
- getNextState(symbol) {
99
- if (__classPrivateFieldGet(this, _State_symbolToDataMap, "f").has(symbol)) {
100
- return __classPrivateFieldGet(this, _State_symbolToDataMap, "f").get(symbol).nextState;
101
- }
102
- throw new Error(`No nextState for symbol at state named ${__classPrivateFieldGet(this, _State_id, "f")}`);
103
- }
104
- withOverrodeHaltState(overrodeHaltState) {
105
- const state = new State(null, `${this.name}>${overrodeHaltState.name}`);
106
- __classPrivateFieldSet(state, _State_symbolToDataMap, __classPrivateFieldGet(this, _State_symbolToDataMap, "f"), "f");
107
- __classPrivateFieldSet(state, _State_overrodeHaltState, overrodeHaltState, "f");
108
- return state;
109
- }
110
- }
111
- _State_id = new WeakMap(), _State_name = new WeakMap(), _State_overrodeHaltState = new WeakMap(), _State_symbolToDataMap = new WeakMap();
112
- export default State;
113
- export const haltState = new State(null);
@@ -1,95 +0,0 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _Tape_alphabet, _Tape_symbols, _Tape_position, _Tape_viewportWidth;
13
- import Alphabet from './Alphabet';
14
- class Tape {
15
- constructor({ alphabet, symbols = [], position = 0, viewportWidth = 1, }) {
16
- _Tape_alphabet.set(this, void 0);
17
- _Tape_symbols.set(this, void 0);
18
- _Tape_position.set(this, void 0);
19
- _Tape_viewportWidth.set(this, void 0);
20
- const isSymbolsValid = symbols.every((symbol) => alphabet.has(symbol));
21
- if (!isSymbolsValid) {
22
- throw new Error('symbolList contains invalid symbol');
23
- }
24
- __classPrivateFieldSet(this, _Tape_alphabet, new Alphabet(alphabet), "f");
25
- __classPrivateFieldSet(this, _Tape_position, position, "f");
26
- __classPrivateFieldSet(this, _Tape_viewportWidth, viewportWidth, "f");
27
- const symbolsCopy = Array.from(symbols);
28
- if (symbolsCopy.length === 0) {
29
- symbolsCopy.push(__classPrivateFieldGet(this, _Tape_alphabet, "f").blankSymbol);
30
- }
31
- __classPrivateFieldSet(this, _Tape_symbols, symbolsCopy.map((symbol) => __classPrivateFieldGet(this, _Tape_alphabet, "f").index(symbol)), "f");
32
- }
33
- get alphabet() {
34
- return __classPrivateFieldGet(this, _Tape_alphabet, "f");
35
- }
36
- get extraCellsCount() {
37
- return (__classPrivateFieldGet(this, _Tape_viewportWidth, "f") - 1) / 2;
38
- }
39
- get position() {
40
- return __classPrivateFieldGet(this, _Tape_position, "f");
41
- }
42
- get symbol() {
43
- return __classPrivateFieldGet(this, _Tape_alphabet, "f").get(__classPrivateFieldGet(this, _Tape_symbols, "f")[__classPrivateFieldGet(this, _Tape_position, "f")]);
44
- }
45
- set symbol(symbol) {
46
- if (!__classPrivateFieldGet(this, _Tape_alphabet, "f").has(symbol)) {
47
- throw new Error('Invalid symbol');
48
- }
49
- __classPrivateFieldGet(this, _Tape_symbols, "f")[__classPrivateFieldGet(this, _Tape_position, "f")] = __classPrivateFieldGet(this, _Tape_alphabet, "f").index(symbol);
50
- }
51
- get symbols() {
52
- return __classPrivateFieldGet(this, _Tape_symbols, "f")
53
- .map((index) => __classPrivateFieldGet(this, _Tape_alphabet, "f").get(index));
54
- }
55
- get viewport() {
56
- const startIx = __classPrivateFieldGet(this, _Tape_position, "f") - this.extraCellsCount;
57
- const endIx = __classPrivateFieldGet(this, _Tape_position, "f") + this.extraCellsCount + 1;
58
- return __classPrivateFieldGet(this, _Tape_symbols, "f")
59
- .slice(startIx, endIx)
60
- .map((index) => __classPrivateFieldGet(this, _Tape_alphabet, "f").get(index));
61
- }
62
- get viewportWidth() {
63
- return __classPrivateFieldGet(this, _Tape_viewportWidth, "f");
64
- }
65
- set viewportWidth(width) {
66
- let finalWidth = width;
67
- if (finalWidth < 1) {
68
- throw new Error('Invalid viewportWidth');
69
- }
70
- if (finalWidth % 2 === 0) {
71
- finalWidth += 1;
72
- }
73
- __classPrivateFieldSet(this, _Tape_viewportWidth, finalWidth, "f");
74
- this.normalise();
75
- }
76
- left() {
77
- __classPrivateFieldSet(this, _Tape_position, __classPrivateFieldGet(this, _Tape_position, "f") - 1, "f");
78
- this.normalise();
79
- }
80
- normalise() {
81
- while (__classPrivateFieldGet(this, _Tape_position, "f") - this.extraCellsCount < 0) {
82
- __classPrivateFieldGet(this, _Tape_symbols, "f").unshift(0);
83
- __classPrivateFieldSet(this, _Tape_position, __classPrivateFieldGet(this, _Tape_position, "f") + 1, "f");
84
- }
85
- while (__classPrivateFieldGet(this, _Tape_position, "f") + this.extraCellsCount >= __classPrivateFieldGet(this, _Tape_symbols, "f").length) {
86
- __classPrivateFieldGet(this, _Tape_symbols, "f").push(0);
87
- }
88
- }
89
- right() {
90
- __classPrivateFieldSet(this, _Tape_position, __classPrivateFieldGet(this, _Tape_position, "f") + 1, "f");
91
- this.normalise();
92
- }
93
- }
94
- _Tape_alphabet = new WeakMap(), _Tape_symbols = new WeakMap(), _Tape_position = new WeakMap(), _Tape_viewportWidth = new WeakMap();
95
- export default Tape;