An expert system to build, formalize, and reason about knowledge bases. Provides domain-specific languages (DSLs), deductive querying facilities, and verification of model constraints expressed in a natural language subset. Inspired by many ideas from The Art of Prolog and Paradigms of Artificial Intelligence Programming.
The code adheres to ISO/IEC 13211-1 and is compatible with any standard Prolog implementation.
Developed and tested using SWI-Prolog.
Within a Prolog REPL, inside the src directory:
- Evaluate
[kb].to load a knowledge base example describing a pancreatic anatomy model. - Evaluate
[spec].to verify a set of model constraints expressed in natural language.
- Meta DSL layer
mdsl.placts as a semantic foundation of the system, ensuring that any knowledge defined in higher layers follows strict correctness rules. It uses term expansion to intercept and validate operator definitions.- DSL layer
dsl.pldefines taxonomy and partonomy operators and rules, as well as recursive logic to calculate transitive properties, such as inheritance in the taxonomy or nested structural components in the partonomy.- Constraint specification language
csl.plallows for the formalization and verification of model constraints using a subset of natural language, handling universal and existential quantifiers by mapping them to logical goals.- Knowledge base and specification
kb.plandspec.plprovide an example use case, defining the anatomy of the pancreas and a suite of model-specific constraints validating adherence to common physiological rules.
The source code is licensed under the GNU General Public License v3.0.