Skip to content

Expert system with deductive querying and verification of constraints expressed in natural language

Notifications You must be signed in to change notification settings

arcadio/data-logic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 

Repository files navigation

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.

Dependencies

The code adheres to ISO/IEC 13211-1 and is compatible with any standard Prolog implementation.

Developed and tested using SWI-Prolog.

Usage

Within a Prolog REPL, inside the src directory:

  1. Evaluate [kb]. to load a knowledge base example describing a pancreatic anatomy model.
  2. Evaluate [spec]. to verify a set of model constraints expressed in natural language.

Design

Meta DSL layer
mdsl.pl acts 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.pl defines 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.pl allows 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.pl and spec.pl provide an example use case, defining the anatomy of the pancreas and a suite of model-specific constraints validating adherence to common physiological rules.

License

The source code is licensed under the GNU General Public License v3.0.

About

Expert system with deductive querying and verification of constraints expressed in natural language

Topics

Resources

Stars

Watchers

Forks

Languages