import { type Event, type Spec, type World } from "../spec/index.ts"; import { type Choice, type Counterexample } from "./steps.ts"; export interface WalkFinding { id: string; root: number; choices: Choice[]; } export interface WalkResult { runs: number; steps: number; deepest: number; findings: WalkFinding[]; errors: { message: string; root: number; choices: Choice[]; }[]; /** The first run that got stuck, if any. */ stuck?: { root: number; choices: Choice[]; }; } /** How often a run picks each kind of step, when it can: mostly the system's fair steps, some people, rarely an unfair step (a fault). */ export declare const WEIGHTS: { system: number; people: number; unfair: number; }; /** mulberry32: small, fast, and the same everywhere. */ export declare function seeded(seed: number): () => number; /** The same choice in another world: the pending event that carries the same thing, if any. */ export declare function rebind(spec: Spec, was: World, world: World, choice: Choice): Choice | null; /** Drop steps one at a time while the property still breaks; at most `budget` replays. `before`: the steps that led to `initial`, which `never` properties count. */ export declare function shrink(spec: Spec, initial: World, found: WalkFinding, replayed: Counterexample, before?: readonly Event[], budget?: number): Counterexample;