proposit-core
    Preparing search index...

    Interface TArgumentLifecycle<TArg, TPremise, TExpr, TVar>

    Snapshot, rollback, and reactive subscription lifecycle. Static factory methods (fromSnapshot, fromData) are class-level only.

    interface TArgumentLifecycle<
        TArg extends TCoreArgument = TCoreArgument,
        TPremise extends TCorePremise = TCorePremise,
        TExpr extends TCorePropositionalExpression = TCorePropositionalExpression,
        TVar extends TCorePropositionalVariable = TCorePropositionalVariable,
    > {
        getSnapshot(): TReactiveSnapshot<TArg, TPremise, TExpr, TVar>;
        normalize(
            tier?: "structural" | "evaluable" | "derivable" | "presentable",
        ): void;
        rollback(
            snapshot: TArgumentEngineSnapshot<TArg, TPremise, TExpr, TVar>,
        ): void;
        snapshot(): TArgumentEngineSnapshot<TArg, TPremise, TExpr, TVar>;
        subscribe(listener: () => void): () => void;
        validate(
            tier: "structural" | "evaluable" | "derivable" | "presentable",
        ): readonly {
            argumentId?: string;
            claimId?: string;
            code:
                | "S-1"
                | "S-2"
                | "S-3"
                | "S-4"
                | "S-5"
                | "S-6"
                | "S-7"
                | "S-8"
                | "S-9"
                | "S-10"
                | "S-11"
                | "S-12"
                | "S-13"
                | "S-14"
                | "S-15"
                | "E-1"
                | "E-3"
                | "E-4"
                | "E-5"
                | "E-6"
                | "E-7"
                | "E-8"
                | "E-9"
                | "E-10"
                | "D-1"
                | "D-2"
                | "D-3"
                | "D-4"
                | "D-5"
                | "D-6"
                | "P-1"
                | "P-2"
                | "P-3"
                | "P-4"
                | "P-5"
                | "P-6";
            expressionId?: string;
            message: string;
            premiseId?: string;
            tier: "structural"
            | "evaluable"
            | "derivable"
            | "presentable";
            variableId?: string;
        }[];
        validateInvariants(): TInvariantValidationResult;
    }

    Type Parameters

    Implemented by

    Index

    Methods

    • Global normalize pass. 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.

      Every AN rule currently targets a Presentable invariant, so calls with tier ∈ {'structural', 'evaluable', 'derivable'} are effectively no-ops. The parameter is reserved so lower-tier rules can be added without an API break.

      Bypasses behavior: cleanup runs regardless of whether the engine is in 'assistive' or 'permissive' mode.

      Parameters

      • Optionaltier: "structural" | "evaluable" | "derivable" | "presentable"

      Returns void

      1.0.0

    • Registers a listener that is called after every mutation.

      Parameters

      • listener: () => void

        The callback to invoke on mutation.

      Returns () => void

      An unsubscribe function that removes the listener.

    • Four-tier grammar validation. 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 invariant sweep (schema/reference/checksums) see TArgumentLifecycle.validateInvariants.

      Parameters

      • tier: "structural" | "evaluable" | "derivable" | "presentable"

      Returns readonly {
          argumentId?: string;
          claimId?: string;
          code:
              | "S-1"
              | "S-2"
              | "S-3"
              | "S-4"
              | "S-5"
              | "S-6"
              | "S-7"
              | "S-8"
              | "S-9"
              | "S-10"
              | "S-11"
              | "S-12"
              | "S-13"
              | "S-14"
              | "S-15"
              | "E-1"
              | "E-3"
              | "E-4"
              | "E-5"
              | "E-6"
              | "E-7"
              | "E-8"
              | "E-9"
              | "E-10"
              | "D-1"
              | "D-2"
              | "D-3"
              | "D-4"
              | "D-5"
              | "D-6"
              | "P-1"
              | "P-2"
              | "P-3"
              | "P-4"
              | "P-5"
              | "P-6";
          expressionId?: string;
          message: string;
          premiseId?: string;
          tier: "structural"
          | "evaluable"
          | "derivable"
          | "presentable";
          variableId?: string;
      }[]