6 Query Operations
| (require spindle/query) | package: spindle |
Spindle provides interactive query operations for exploring theories and understanding reasoning results.
6.1 Basic Queries
(query my-theory (simple-literal "flies"))
6.2 Theory Status
procedure
th : theory?
Definitely provable (+D)
Definitely not provable (-D)
Defeasibly provable (+d)
Defeasibly not provable (-d)
6.3 Explanations
The derivation tree (proof steps)
Sources used in the derivation
Trust chain if applicable
6.4 Why-Not Queries
Blocking conditions (what prevented derivation)
Missing premises
Defeating rules
6.5 Abductive Queries
Sets of facts that would make the literal provable
Confidence estimates
Rules that would be used
6.6 Hypothetical Reasoning
The original theory is not modified.
(what-if my-theory '((given tests-pass)) (simple-literal "ready-deploy"))
6.7 Theory Validation
procedure
th : theory?
Undefined literals in rule bodies
Invalid superiority references
Duplicate rule IDs
Strict rule cycles
Contradictory facts
6.8 REPL Integration
| (require spindle/query/repl) | package: spindle |
For interactive use, the REPL module provides convenient wrappers:
procedure
path : path-string?
(load-theory "my-theory.dfl") (repl-query 'flies) (repl-query '(not authorized))