Skip to content

correctness: carry ranked countermodels for failed KLM queries #4

Open

Description

@SMC17

Problem

KLM rational-closure rankings and Boolean/level query results replay exactly, but a failed query does not yet carry a concrete model at the decisive rank. The museum therefore correctly keeps KLM catalog-only.

Required result

Introduce an owned query decision that preserves entailed, decisive rank, active rule set, and a complete countermodel for non-entailment. No SAT unknown may be translated into exceptionality or a negative answer.

Acceptance gates

  • Validate ranking length, rank range, and exact ranking before query replay.
  • Non-entailment always contains a model satisfying background, active materialization, antecedent, and negated consequent.
  • The checker verifies the model and decisive-rank minimality without trusting the producer Boolean.
  • Entailment checks every required rank conclusively.
  • Mutation tests corrupt rank, active rules, assignment, antecedent, and consequent.
  • Exhaustive small-KB comparison against an independent ranked-model oracle.
  • Formal exhibit specification documents the finite propositional cube fragment and limits.
  • Promotion occurs only after all gates pass.

Activity

  1. added
    exhibit
    correctness
    proof
    on Jul 21, 2026
  2. SMC17 commented on Aug 4, 2026

    @SMC17
    OwnerAuthor

    Zig-side addressed (v0.24)

    src/nonmonotonic/klm.zig implements:

    • System-Z style ranking of defaults
    • Query α ↝ β under rational closure (simplified materialization)
    • Non-entailment always returns a concrete countermodel world bitmask at the decisive rank
    • Test: failed query carries countermodel satisfying antecedent

    Still open vs full museum promotion: independent ranked-model oracle differential, mutation suite on rank/rules/assignment, formal exhibit specification document. The core gap named in this issue (missing countermodel on failed queries) is closed in the fragment.

  3. added
    type: feature
    priority: P2
    status: ready
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctnessexhibitpriority: P2proofstatus: readytype: feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions