proposit-core
    Preparing search index...

    Function forkArgumentEngine

    • Creates an independent copy of an argument engine under a new argument ID.

      Every premise, expression, and variable receives a fresh ID. All internal cross-references are remapped.

      This function does NOT call engine.canFork() — callers are responsible for checking fork eligibility.

      Type Parameters

      • TArg extends {
            checksum: string;
            combinedChecksum: string;
            descendantChecksum: string | null;
            id: string;
            version: number;
        } = {
            checksum: string;
            combinedChecksum: string;
            descendantChecksum: string | null;
            id: string;
            version: number;
        }
      • TPremise extends
            | {
                argumentId: string;
                argumentVersion: number;
                checksum: string;
                combinedChecksum: string;
                descendantChecksum: string
                | null;
                id: string;
                type: "freeform";
            }
            | {
                argumentId: string;
                argumentVersion: number;
                checksum: string;
                combinedChecksum: string;
                derivedClaimId: string;
                descendantChecksum: string
                | null;
                id: string;
                type: "derivation";
            } =
            | {
                argumentId: string;
                argumentVersion: number;
                checksum: string;
                combinedChecksum: string;
                descendantChecksum: string
                | null;
                id: string;
                type: "freeform";
            }
            | {
                argumentId: string;
                argumentVersion: number;
                checksum: string;
                combinedChecksum: string;
                derivedClaimId: string;
                descendantChecksum: string
                | null;
                id: string;
                type: "derivation";
            }
      • TExpr extends TCorePropositionalExpression = TCorePropositionalExpression
      • TVar extends
            | {
                argumentId: string;
                argumentVersion: number;
                checksum: string;
                claimId: string;
                claimVersion: number;
                id: string;
                symbol: string;
            }
            | {
                argumentId: string;
                argumentVersion: number;
                boundArgumentId: string;
                boundArgumentVersion: number;
                boundPremiseId: string;
                checksum: string;
                id: string;
                symbol: string;
            } =
            | {
                argumentId: string;
                argumentVersion: number;
                checksum: string;
                claimId: string;
                claimVersion: number;
                id: string;
                symbol: string;
            }
            | {
                argumentId: string;
                argumentVersion: number;
                boundArgumentId: string;
                boundArgumentVersion: number;
                boundPremiseId: string;
                checksum: string;
                id: string;
                symbol: string;
            }
      • TClaim extends {
            checksum: string;
            frozen: boolean;
            id: string;
            type: "normal" | "citation" | "axiomatic";
            version: number;
        } = {
            checksum: string;
            frozen: boolean;
            id: string;
            type: "normal" | "citation" | "axiomatic";
            version: number;
        }

      Parameters

      Returns {
          engine: ArgumentEngine<TArg, TPremise, TExpr, TVar, TClaim>;
          remapTable: TForkRemapTable;
      }

      The forked engine and a remap table mapping original to new entity IDs.