import { type TClaimBoundVariable, type TPremiseBoundVariable, type TCoreArgument, type TCoreClaim, type TCorePremise, type TCorePropositionalExpression, type TCorePropositionalVariable, type TOptionalChecksum } from "../schemata/index.js"; import type { TCoreArgumentEvaluationOptions, TCoreArgumentEvaluationResult, TCoreArgumentRoleState, TCoreExpressionAssignment, TCoreValidationResult, TCoreValidityCheckOptions, TCoreValidityCheckResult, TCoreVariableAssignment } from "../types/evaluation.js"; import type { TCoreChecksumConfig } from "../types/checksum.js"; import type { TCorePositionConfig } from "../utils/position.js"; import type { TInvariantValidationResult } from "../types/validation.js"; import type { TCoreMutationResult } from "../types/mutation.js"; import type { TReactiveSnapshot } from "../types/reactive.js"; import { HierarchicalChecksumCache } from "./checksum-cache.js"; import type { TExpressionInput } from "./expression-manager.js"; import { type TPopulateResult } from "../grammar/populate-from.js"; import type { TGrammarTier, TViolation } from "../grammar/types.js"; import type { TCoreClaimConnection } from "../schemata/claim-connection.js"; import type { TClaimConnectionLookup } from "./interfaces/library.interfaces.js"; import { PremiseEngine } from "./premise-engine.js"; import type { TPremiseEngineSnapshot } from "./premise-engine.js"; import type { TVariableManagerSnapshot } from "./variable-manager.js"; import type { TPremiseCrud, TVariableManagement, TArgumentExpressionQueries, TArgumentRoleState, TArgumentEvaluation, TArgumentLifecycle, TArgumentIdentity, TDisplayable, THierarchicalChecksummable, TClaimLookup } from "./interfaces/index.js"; /** Default ID generator using the Web Crypto API (Node.js 20+, all modern browsers). */ export declare const defaultGenerateId: () => string; export type TLogicEngineOptions = { checksumConfig?: TCoreChecksumConfig; positionConfig?: TCorePositionConfig; /** * Engine behavior. Controls whether the auto-normalization (AN) rule * set runs as a post-hook after every successful Structural mutation. * * - `'assistive'` (default): AN runs after every successful Structural * mutation. AN preserves Presentable — if the pre-mutation state was * Presentable, the post-mutation state is Presentable. * - `'permissive'`: AN does not run. The engine accepts mutations that * leave the argument outside the Presentable/Derivable/Evaluable * tiers (down to but not including Structural, which is always * guaranteed). * * Switchable at runtime via `engine.setBehavior(...)`. See * `docs/Proposit_Grammar.md` §4 for the full contract. * * @since 1.0.0 */ behavior?: "assistive" | "permissive"; /** UUID generator for new entity IDs. Defaults to `globalThis.crypto.randomUUID()`. */ generateId?: () => string; }; export type TArgumentEngineSnapshot = { argument: TOptionalChecksum; variables: TVariableManagerSnapshot; premises: TPremiseEngineSnapshot[]; conclusionPremiseId?: string; config?: TLogicEngineOptions; }; /** * Manages a propositional logic argument composed of premises, variable * assignments, and logical roles (supporting premises and a conclusion). * * Provides premise CRUD, role management, evaluation of individual * assignments, and exhaustive validity checking via truth-table enumeration. */ export declare class ArgumentEngine extends HierarchicalChecksumCache implements TPremiseCrud, TVariableManagement, TArgumentExpressionQueries, TArgumentRoleState, TArgumentEvaluation, TArgumentLifecycle, TArgumentIdentity, TDisplayable, THierarchicalChecksummable<"premises" | "variables"> { private argument; private premises; private variables; private claimLibrary; private conclusionPremiseId; private checksumConfig?; private positionConfig?; private engineBehavior; private generateId; private restoringFromSnapshot; private applyingAN; private cachedPremisesCollectionChecksum; private cachedVariablesCollectionChecksum; private expressionIndex; private listeners; private reactiveDirty; private cachedReactiveSnapshot; constructor(argument: TOptionalChecksum, claimLibrary: TClaimLookup, options?: TLogicEngineOptions); private createCircularityCheck; private wouldCreateCycle; private wireCircularityCheck; private wireEmptyBoundPremiseCheck; private generateUniqueSymbol; subscribe: (listener: () => void) => (() => void); protected notifySubscribers(): void; private finalizeChanges; private static readonly skipValidationResult; private suppressPremiseValidation; private restorePremiseValidation; protected withValidation(fn: () => T): T; getSnapshot: () => TReactiveSnapshot; protected buildReactiveSnapshot(): TReactiveSnapshot; private buildVariablesRecord; private buildAllPremisesRecord; private buildPremiseRecord; private markReactiveDirty; /** * Current engine behavior setting. Controls whether the * auto-normalization (AN) rule set runs as a post-hook after every * successful Structural mutation. See the JSDoc on * `TLogicEngineOptions.behavior` for the full contract. * * @since 1.0.0 */ get behavior(): "assistive" | "permissive"; /** * Access to the engine's ID generator function. Used by in-package * helpers that build new entity trees and need fresh IDs (e.g. the * `populateFromGrounding` factory in * `src/lib/grammar/populate-from.ts`). The generator is captured * once at construction (default `crypto.randomUUID`) and stays * immutable for the engine's lifetime; this accessor returns the * same function reference on every call. * * Replaces the prior `(engine as unknown as { generateId: () => * string }).generateId` cast in `populate-from.ts`. The accessor is * marked `@internal` so it is not surfaced in generated API docs / * type bundles — the in-package factory callers are its intended * consumers; external programmatic-construction use cases should * supply their own generator rather than borrowing the engine's. * * @internal * @since 1.0.0 */ get idGenerator(): () => string; /** * Switches the engine's behavior at runtime. Going `permissive → * assistive` does **not** auto-run a global `normalize()` pass; the * UI is expected to prompt the user before invoking `normalize()` * explicitly. * * As of v1.0 behavior is enforced entirely via the AN * post-mutation hook in `runAssistiveNormalization` — the legacy * per-flag `grammarConfig` plumbing that bridged behavior to * premise-level enforcement is gone. Switching `permissive → * assistive` makes the next successful Structural mutation trigger * the AN pass; switching the other direction stops the AN pass * from running until the user opts back in. * * @since 1.0.0 */ setBehavior(b: "assistive" | "permissive"): void; /** * Acquire the AN re-entrance guard. Returns `true` iff the guard * was acquired (i.e. AN is not already running for this engine); * the caller is then obligated to call `endApplyAN()` after the * AN sweep. Returns `false` if AN is already in progress, in * which case the caller short-circuits to avoid nested AN * sweeps. * * Used by `applyANToFixedPoint` in `src/lib/grammar/an-rules.ts` * (the single chokepoint for both `runAssistiveNormalization` * and `normalizeArgument`). The post-mutation hook in * `setOnMutate` calls `runAssistiveNormalization(this)` which * delegates to `applyANToFixedPoint`; AN's own mutations re-fire * `setOnMutate`, which would otherwise recurse. This guard * breaks the recursion. * * @internal * @since 1.0.0 */ beginApplyAN(): boolean; /** * Release the AN re-entrance guard. Pairs with `beginApplyAN()`. * * @internal * @since 1.0.0 */ endApplyAN(): void; getArgument(): TArg; getExtras(): Record; setExtras(extras: Record): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; updateExtras(updates: Record): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; toDisplayString(): string; /** @internal Normalized options bag used internally by createPremise/createPremiseWithId. */ private static parsePremiseArgsInternal; createPremise(): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; createPremise(extras: Record | undefined, symbol: string): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; createPremise(extras: Record, symbol?: string): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; createPremise(options: { type?: "freeform" | "derivation"; derivedClaimId?: string; extras?: Record; symbol?: string; }): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; createPremiseWithId(id: string, extras?: Record, symbol?: string): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; createPremiseWithId(id: string, options: { type?: "freeform" | "derivation"; derivedClaimId?: string; extras?: Record; symbol?: string; }): TCoreMutationResult, TExpr, TVar, TPremise, TArg>; removePremise(premiseId: string): TCoreMutationResult; getPremise(premiseId: string): PremiseEngine | undefined; hasPremise(premiseId: string): boolean; listPremiseIds(): string[]; listPremises(): PremiseEngine[]; addVariable(variable: TOptionalChecksum & Record): TCoreMutationResult; /** * Ensures a claim-bound variable for the given claim exists in this * argument. If one already exists, returns it. Otherwise creates a new * claim-bound variable with a fresh UUID, the current version of the claim * from the ClaimLibrary, and an auto-generated symbol. * * @throws InvariantViolationError(CLAIM_NOT_FOUND) when the claim is not in * the library. * * @since 0.11.0 */ ensureClaimBoundVariable(claimId: string): TClaimBoundVariable; bindVariableToPremise(variable: TOptionalChecksum & Record): TCoreMutationResult; /** Adds a premise-bound variable that references a premise in a different argument. */ bindVariableToExternalPremise(variable: TOptionalChecksum & Record): TCoreMutationResult; /** Adds a premise-bound variable that references another argument's conclusion premise. */ bindVariableToArgument(variable: Omit, "boundPremiseId"> & Record, conclusionPremiseId: string): TCoreMutationResult; updateVariable(variableId: string, updates: Record): TCoreMutationResult; private removeVariableCore; removeVariable(variableId: string): TCoreMutationResult; getVariables(): TVar[]; getVariable(variableId: string): TVar | undefined; /** * Look up a claim by `(id, version)` in the engine's claim library. * Returns `undefined` if the claim is not present. Exposed for * repair primitives and other tooling that needs to inspect a * claim's `type` discriminator at a particular version pinned by * a claim-bound variable. * * @since 1.0.0 */ getClaim(claimId: string, claimVersion: number): TClaim | undefined; hasVariable(variableId: string): boolean; getVariableBySymbol(symbol: string): TVar | undefined; buildVariableIndex(keyFn: (v: TVar) => K): Map; getVariablesBoundToPremise(premiseId: string): TVar[]; getExpression(expressionId: string): TExpr | undefined; hasExpression(expressionId: string): boolean; getExpressionPremiseId(expressionId: string): string | undefined; findPremiseByExpressionId(expressionId: string): PremiseEngine | undefined; getAllExpressions(): TExpr[]; getExpressionsByVariableId(variableId: string): TExpr[]; listRootExpressions(): TExpr[]; /** * Patches application-specific fields onto an expression across all * premises, then marks the expression and its ancestors dirty so the * next checksum flush recomputes from the patched values. * * This is the public API for consumers that need to attach app-level * metadata (e.g. `creatorId`, `createdOn`) to expressions synthesized * by the engine's auto-normalization. It resolves the owning premise * internally, applies the patch in place, and marks the expression * dirty — callers cannot patch without marking (stale checksum) or mark * without patching (no-op). A field whose value is `undefined` is * **deleted** rather than assigned, so clearing one restores the shape and * the checksum the entity had before it was set. * * @param expressionId - The ID of the expression to patch. * @param fields - Fields to merge into the expression. * @throws If no expression with the given ID exists. * * @since 2.3.1 */ patchExpressionAppFields(expressionId: string, fields: Partial): void; /** * Construct (or no-op on) the per-claim derivation premise's * antecedent from a citation lookup. Factory + naked-Q-only: * * - 0 connections → no-op (naked-Q stays). * - 1 connection → `IMPLIES(citation-var, Q)`. * - ≥ 2 connections → `IMPLIES(OR(c1, …, cn), Q)`. In * `'assistive'` mode the per-mutation AN-1 post-hook inserts a * formula buffer between IMPLIES and OR; in `'permissive'` the * OR sits directly under IMPLIES (a P-1 violation surfaces via * `validate('presentable')`). * * **No throw on already-populated.** Per the Structural-only * mutation throw rule, if the target derivation premise is not in * the naked-Q form the factory returns `{ kind: 'no-op', state: * }` without mutating. UI/caller is responsible for * explicit user consent + clearing the antecedent via a repair * primitive before re-calling. Preserves the no-changes-without- * consent principle. * * Throws only when no derivation premise exists for the given * `derivedClaimId` (legitimate entity-not-found Structural check). * * @since 1.0.0 */ populateFromCitations(derivedClaimId: string, citationLookup: TClaimConnectionLookup): TPopulateResult; /** * Mirror of `populateFromCitations` for axiom connections. Same * factory contract: naked-Q-only, no throw on already-populated. * * @since 1.0.0 */ populateFromAxioms(derivedClaimId: string, axiomLookup: TClaimConnectionLookup): TPopulateResult; /** * Repair primitive: resolve E-3 violations by deleting each * unresolvable claim- or premise-bound variable, cascading the * removal across all premises. Returns the violations resolved * (for UX confirmation / undo / "we made N changes" feedback). * * **User-initiated; never auto-runs.** Respects `behavior`: in * `'assistive'` mode, the AN post-hook fires after each cascade * mutation; in `'permissive'` no AN runs. * * @since 1.0.0 */ removeUnresolvableVariables(): readonly TViolation[]; /** * Repair primitive: resolve E-1 violations (operators with < 2 * children) by running the AN-3 cleanup pass globally. Returns the * violations resolved. The repair is non-meaning-changing — it * only removes empty operators and promotes single-child operators * — but lives alongside `normalize()` so the UI can present a * focused "Remove N orphan operators" action with a precise return * value. * * **User-initiated; never auto-runs.** Bypasses `behavior` — * cleanup runs even in permissive mode (the user has already * accepted the action by clicking the repair button). * * @since 1.0.0 */ removeOrphanOperators(): readonly TViolation[]; /** * Repair primitive: resolve E-6 violations (claim has > 1 * derivation premise) by keeping one premise per `derivedClaimId` * and deleting the rest. Strategy controls which premise is kept: * * - `'keep-first'` (default): keep the premise with the * lexicographically smallest id; delete the rest. Deterministic * and snapshot-stable. * - `'keep-largest-antecedent'`: keep the premise whose antecedent * subtree has the most claim-bound variable expressions; tie-break * by id. * * **User-initiated; never auto-runs.** Respects `behavior`. * * @since 1.0.0 */ removeDuplicateDerivationPremises(strategy?: "keep-first" | "keep-largest-antecedent"): readonly TViolation[]; /** * Repair primitive: resolve D-3 violations (mixed-grounding * antecedent — axioms + citations in one derivation) by deleting * every axiom-bound variable expression from the offending * antecedent subtree. The remaining citation-bound variables stay, * giving the derivation a homogeneous citation-grounded antecedent. * * **User-initiated; never auto-runs.** Respects `behavior`. In * `'assistive'` mode, AN may collapse a resulting single-child OR * via AN-3; in `'permissive'` the OR may persist with one child * (a downstream D-2 violation — follow up with * `removeOrphanOperators()` if desired). * * @since 1.0.0 */ dropAxiomsFromMixedAntecedent(): readonly TViolation[]; /** * Global normalize pass per spec §6. Runs the AN rule set * (AN-1..AN-4) everywhere it can fire, converging the argument * toward `tier` (defaults to `'presentable'`). * * `normalize` is non-destructive in the logical-meaning sense — it * does not delete variables, change claim references, or modify * operator semantics. Recovery from Evaluable or Derivable violations * requires user intent and is exposed via the repair primitives. * * In v1.0 every AN rule targets a Presentable invariant, so calls * with `tier` ∈ {'structural', 'evaluable', 'derivable'} are * effectively no-ops. The parameter exists as forward-compatible * API surface for a future submit/finalize gate. * * **Bypasses `behavior`.** `normalize()` is user-initiated (the UI * invokes it after the user confirms a Tidy / Normalize action), so * cleanup runs regardless of whether the engine is in `'assistive'` * or `'permissive'` mode. The engine's `behavior` setting is not * mutated by this call. * * @since 1.0.0 */ normalize(tier?: TGrammarTier): void; getRoleState(): TCoreArgumentRoleState; setConclusionPremise(premiseId: string): TCoreMutationResult; clearConclusionPremise(): TCoreMutationResult; getConclusionPremise(): PremiseEngine | undefined; listSupportingPremises(): PremiseEngine[]; snapshot(): TArgumentEngineSnapshot; /** Creates a new ArgumentEngine from a previously captured snapshot. */ static fromSnapshot(snapshot: TArgumentEngineSnapshot, claimLibrary: TClaimLookup, checksumVerification?: "ignore" | "strict", generateId?: () => string): ArgumentEngine; /** * Creates a new ArgumentEngine from flat arrays of entities, as typically * stored in a relational database. Expressions are grouped by their * `premiseId` field and loaded in BFS order (roots first, then children * of already-added nodes) to satisfy parent-existence requirements. */ static fromData(argument: TOptionalChecksum, claimLibrary: TClaimLookup, variables: TOptionalChecksum[], premises: TOptionalChecksum[], expressions: TExpressionInput[], roles: TCoreArgumentRoleState, config?: TLogicEngineOptions, checksumVerification?: "ignore" | "strict"): ArgumentEngine; /** * Verifies that all checksum fields in the snapshot match the recomputed * checksums on the restored engine. Throws on the first mismatch. */ private static verifySnapshotChecksums; /** * Verifies that all checksum fields in the input data match the recomputed * checksums on the restored engine. Throws on the first mismatch. */ private static verifyDataChecksums; rollback(snapshot: TArgumentEngineSnapshot): void; private rollbackInternal; getCollectionChecksum(name: "premises" | "variables"): string | null; flushChecksums(): void; private markDirty; /** Invalidate all premise checksums (e.g. after variable changes). */ private markAllPremisesDirty; private attachVariableChecksum; collectReferencedVariables(): { variableIds: string[]; byId: Record; bySymbol: Record; }; private validateAfterPremiseMutation; /** * Four-tier grammar validation per spec §4. Returns the union of * violations from Structural up through `tier` — `'structural'` * returns S-rule violations only, `'evaluable'` returns S + E, * `'derivable'` returns S + E + D, `'presentable'` returns the full * union. Empty array means the argument is at the requested tier * or stricter. Never throws on grammar issues. * * For the legacy pre-1.0 invariant sweep (schema conformance, * reference integrity, ownership, conclusion ref, circularity, * checksums) use {@link validateInvariants} instead. The pre-1.0 * no-arg overload of `validate()` has been removed. */ validate(tier: TGrammarTier): readonly TViolation[]; /** * Legacy invariant sweep — schema conformance, reference integrity, * ownership, conclusion-ref + circularity, checksum stability, and * per-premise validation. Returns a `TInvariantValidationResult`. * Used internally by mutation-rollback and snapshot-load paths and * exposed publicly for library-wide invariant checks (see * `ArgumentLibrary.validate` and `PropositCore.validate`). * * Distinct from {@link validate}, which runs the four-tier grammar * validator (`Structural ⊇ Evaluable ⊇ Derivable ⊇ Presentable`) * and returns a `readonly TViolation[]`. The two are * complementary — grammar tiers cover AST-shape rules; this method * covers schema/reference/structural-bookkeeping invariants that * sit outside the tier hierarchy. * * @since 1.0.0 — replaces the legacy `validate()` no-arg overload, * which has been removed. */ validateInvariants(): TInvariantValidationResult; /** * Construct the pure-data `TValidatorContext` consumed by the * grammar-tier validators. Claims are gathered by walking the * engine's claim-bound variables and looking each one up in the * claim library — the `TClaimLookup` contract doesn't expose * iteration, so we materialize the referenced subset only. */ private asGrammarValidatorContext; validateEvaluability(): TCoreValidationResult; /** * Returns the derivation-specific subset of `validateEvaluability` checks. * Apps can pre-check derivation premise structures before invoking the full * evaluation pipeline. * * Violations carry the underlying `DERIVATION_STRUCTURE_INVALID` code * (per the derivation-validation utility). The pre-1.0 * `DERIVATION_STRUCTURE_INVALID_AT_EVALUATION` override was removed * alongside the legacy `validate()` no-arg overload — naked-Q * is a valid Derivable state (per spec §4.2) and is skipped by * evaluation rather than thrown. * * @since 0.11.0 */ validateDerivationStructures(): TInvariantValidationResult; private collectDerivationStructureIssues; private collectDerivationViolations; private asValidationContext; private asEvaluationContext; /** * Walks `this.variables.toArray()` once and returns every claim-bound * variable whose bound claim has type `"axiomatic"`. Shared between * `applyAxiomaticForcedAssignments` (the evaluate-time pre-pass) and * `getAxiomaticBoundVariableIds` (the checkValidity carve-out). */ private collectAxiomaticBoundVariables; /** * For each claim-bound variable in this argument, look up the bound claim's * type. If the type is "axiomatic": * - Reject any caller-provided assignment for the variable * (AXIOM_VARIABLE_ASSIGNMENT_FORBIDDEN). Key presence is checked via * `Object.hasOwn` so an explicit `undefined` value is also rejected. * - Force the variable's effective assignment to `true`. * Returns the rewritten assignment map; non-axiomatic variables pass through. */ private applyAxiomaticForcedAssignments; /** * Returns IDs of claim-bound variables whose bound claim has type * `"axiomatic"` — these are forced-true at evaluation time. */ private getAxiomaticBoundVariableIds; /** * Returns IDs of every grounded claim-bound variable — axiomatic *and* * citation — for `checkValidity`'s carve-out. * * Deliberately wider than `getAxiomaticBoundVariableIds`, and the two must * stay separate. Validity asks a structural question about the argument and * generates its own rows, so a cited claim is what its source says: it gets * no free column and is pinned true. Evaluation asks the *reader's* * question, where a citation is merely seeded true by the default * assignment and the reader may assign it either way — so * `applyAxiomaticForcedAssignments` keeps the narrow set. Widening that * pre-pass to this one would make a reader's assignment on any * citation-backed claim throw `AXIOM_VARIABLE_ASSIGNMENT_FORBIDDEN`. */ private getGroundedBoundVariableIds; evaluate(assignment: TCoreExpressionAssignment, options?: TCoreArgumentEvaluationOptions): TCoreArgumentEvaluationResult; checkValidity(options?: TCoreValidityCheckOptions): TCoreValidityCheckResult; /** * Returns the IDs of every claim-bound variable bound to `claimId` in this * argument, in the engine's id-sorted variable order, or `[]` when none is. * Pure lookup — it never creates a variable (contrast * `ensureClaimBoundVariable`). * * A claim may bind more than one variable: `addVariable` enforces no * per-claim uniqueness, so an argument can carry several variables * standing for the same proposition, each reached — and valued — * independently by evaluation. Any translation that must not lose one of * them (reading propagated values back onto a claim, say) belongs here * rather than on the singular accessor. * * @since 4.1.0 */ getVariableIdsForClaim(claimId: string): string[]; /** * Returns the ID of the lowest-id claim-bound variable bound to `claimId` * in this argument, or `undefined` if no variable is. Pure lookup — it * never creates a variable (contrast `ensureClaimBoundVariable`). * * The engine's evaluation surface is variable-keyed, but consumers key * their review/UI state by `claimId`; this accessor (with its inverse * `getClaimIdForVariable`) is the documented seam for translating between * the two. * * **It answers for one variable, and a claim may bind several.** The pick * is deterministic and snapshot-stable — variables enumerate sorted by id * — but arbitrary with respect to the claim: it is not "the authored one" * or "the one an evaluation settled". When a claim may bind more than one * and losing the others would be wrong, use `getVariableIdsForClaim`. * * @since 3.1.0 */ getVariableIdForClaim(claimId: string): string | undefined; /** * Returns the `claimId` a claim-bound variable is bound to, or `undefined` * when the variable is unknown or premise-bound (premise-bound variables * have no claim). Inverse of `getVariableIdForClaim`. * * @since 3.1.0 */ getClaimIdForVariable(variableId: string): string | undefined; /** * Returns `true` iff the variable is claim-bound to a citation or * axiomatic claim — the "grounded" claim types that a default assignment * seeds `true`. * * Two callers, and they are not interchangeable with the narrower * axiomatic-only collector: the default assignment seeds every grounded * variable `true`, and `checkValidity` excludes every grounded variable * from its enumeration. Evaluation's forced-assignment pre-pass uses the * *narrow* set on purpose — grounded is not the same as unassignable. */ private isGroundedVariable; /** * Derives a default truth-value assignment for every variable in the * argument, from claim type and immediate support structure alone. Values * are `true` or `null` (unknown) — **never `false`**. * * `D(claim)` for the variable backing claim `c`: * 1. `c` is a citation or axiomatic claim → `true`. * 2. `c` is a normal claim: locate its derivation premise (the inference * whose consequent is `c`'s variable). Seed each variable referenced in * that premise's immediate antecedent `true` iff it is itself bound to a * citation/axiomatic claim, else `null`, and Kleene-evaluate the * antecedent once. Antecedent `true` → `true`; otherwise `null`. **No * recursion** — only the immediate antecedent claims' types are * inspected, never their own supports. * 3. Anything else (no derivation premise, naked-Q derivation, a * premise-bound variable) → `null`. * * The returned map is **variable-keyed**; use `getVariableIdForClaim` / * `getClaimIdForVariable` to translate to/from `claimId`. * * Consistency with the axiomatic pre-pass: `evaluate` force-sets * axiomatic-bound variables `true` and **rejects** any explicit assignment * for them (`AXIOM_VARIABLE_ASSIGNMENT_FORBIDDEN`). This map reports those * same variables as `true` (the two agree), but the axiom keys must not be * passed to `evaluate` directly. Feed the map through `evaluateWithDefaults` * (which drops them), or strip axiomatic-bound keys before calling * `evaluate` yourself. * * @since 3.1.0 */ deriveDefaultAssignment(): TCoreVariableAssignment; /** * Convenience: merge caller `overrides` over `deriveDefaultAssignment()` * and `evaluate` in one call. Default-sourced **axiomatic-bound** keys are * dropped before evaluation — the engine's pre-pass force-sets them `true` * and rejects explicit axiom assignments, so passing the default `true` * through would throw `AXIOM_VARIABLE_ASSIGNMENT_FORBIDDEN`. Dropping them * keeps `deriveDefaultAssignment` (which reports axioms as `true`) and the * pre-pass in agreement without double-applying. An `override` that names * an axiomatic variable is left intact, so `evaluate` still enforces the * one-way rule. * * **Citations are different from axioms.** The engine does *not* force * citation-bound variables `true` and does *not* reject an explicit * citation assignment — a citation is a free variable, so its default * `true` is *kept* here (dropping it would leave the citation unknown at * evaluation). Both citations and axioms read as `true` under defaults, but * only the axiom `true` comes from the engine; the citation `true` is * supplied by this map. That also makes citation defaults reviewer- * overridable, whereas axioms stay locked. * * @since 3.1.0 */ evaluateWithDefaults(overrides?: TCoreVariableAssignment, options?: TCoreArgumentEvaluationOptions): TCoreArgumentEvaluationResult; /** * Override point for subclasses to prevent forking. When this returns * `false`, `forkArgument` will throw. */ canFork(): boolean; /** * Override point for subclasses to restrict cross-argument bindings. * When this returns `false`, `bindVariableToExternalPremise` will throw. */ protected canBind(_boundArgumentId: string, _boundArgumentVersion: number): boolean; } //# sourceMappingURL=argument-engine.d.ts.map