/** * Check 1 of `compiled-program.md` 3.5 over `requests` and the bodies inside * it. * * A read's body holds the tables a program holds for the machine of section 3, * counted from zero, so it needs the same walk the program's own tables get and * for the same reason: every later step indexes into them, and an index out of * range that is not caught here is read past the end of an array during a bar. * * **A body that was not walked is the hole the whole verification exists to * close.** It is reached by the same interpreter, with the same instruction * list, over another instrument's history. Verifying the program and not the * expression it carries would leave exactly the failure 3.5 is written to * prevent, one level down where nobody would look for it. */ import type { ShapeCheck } from './verify-shape.js'; /** The tables a machine indexes, wherever they sit in the program. */ export interface MachineTables { readonly series: readonly unknown[]; readonly cells: readonly unknown[]; readonly states: readonly unknown[]; readonly functions: readonly unknown[]; readonly callSites: readonly unknown[]; readonly loops: readonly unknown[]; readonly slots: number; readonly libFunctions: number; } /** * Every table one machine indexes, and every index into one of them. * * Shared by the program and by every request body rather than written twice, * because two copies of this walk would be two places for a table to gain a * field and only one of them to learn about it. */ export declare function checkMachineTables(shape: ShapeCheck, prefix: string, tables: MachineTables): boolean; /** * `requests` and every body inside it, 2.16. * * `series` is the register of the **enclosing** machine that the read's value * lands in, so it is checked against the table the caller passes; everything * inside `body` is the body's own and is checked against the body's. */ export declare function checkRequests(shape: ShapeCheck, prefix: string, requests: readonly unknown[], registers: number, libFunctions: number, keys: ReadonlySet): boolean; //# sourceMappingURL=verify-requests.d.ts.map