import type { TCorePropositionalVariable } from "../schemata/index.js"; import type { TLogicEngineOptions } from "./argument-engine.js"; import type { TInvariantValidationResult } from "../types/validation.js"; export type TVariableManagerSnapshot = { variables: TVar[]; config?: TLogicEngineOptions; }; /** * Registry for propositional variables within an argument, shared across * all premises. * * Enforces uniqueness of both variable IDs and symbols. This class is an * internal building block owned by {@link ArgumentEngine} and passed by * reference to each {@link PremiseEngine}. It is not part of the public API. */ export declare class VariableManager { private variables; private variablesBySymbol; private config?; constructor(config?: TLogicEngineOptions); /** Returns all registered variables sorted by ID for deterministic output. */ toArray(): TVar[]; /** * Registers a variable. * * @throws If the symbol is already in use. * @throws If the ID already exists. */ addVariable(variable: TVar): void; /** * Removes a variable by ID. * @returns The removed variable, or `undefined` if not found. */ removeVariable(variableId: string): TVar | undefined; /** Returns `true` if a variable with the given ID is registered. */ hasVariable(variableId: string): boolean; /** Returns the variable with the given ID, or `undefined` if not found. */ getVariable(variableId: string): TVar | undefined; /** Returns the variable with the given symbol, or `undefined` if not found. */ getVariableBySymbol(symbol: string): TVar | undefined; /** * Changes the symbol of an existing variable. * * @throws If the variable does not exist. * @throws If the new symbol is already in use by a different variable. */ renameVariable(variableId: string, newSymbol: string): void; /** * Updates fields on an existing variable. * Handles `symbol` updates via the symbol index; all other provided * fields are spread onto the stored variable. * * @throws If the new symbol is already in use by a different variable. * @returns The updated variable, or `undefined` if not found. */ updateVariable(variableId: string, updates: Partial): TVar | undefined; /** * Validates all managed variables, collecting every invariant violation. * Checks: schema conformance, duplicate IDs, duplicate symbols, and * checksum integrity. */ validate(): TInvariantValidationResult; /** Returns a serializable snapshot of the current state. */ snapshot(): TVariableManagerSnapshot; /** Creates a new VariableManager from a previously captured snapshot. */ static fromSnapshot(snapshot: TVariableManagerSnapshot): VariableManager; } //# sourceMappingURL=variable-manager.d.ts.map