Skip to content

Prolog and Python for the coursework of the Computational Logic for Artificial Intelligence unit.

License

Notifications You must be signed in to change notification settings

JonathanRaines/phd-computational-logic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computational Logic

This repository holds the code and report written to fulfil the coursework requirements for the unit Computational Logic for Artificial Intelligence at the University of Bristol. It is based on the repository simply-logical/ComputationalLogic. We introduced several features:

  • The modus tollens inference rule
  • (Exclusive) disjunction
  • Default rules
  • Existential quantification
  • Negative, conjunctive, and disjunctive facts

These are demonstrated by the Jupyter Notebook demo.ipynb and unit tests cli_test.py.

Installation

SWI-Prolog must be installed. For example, on macOS, you can SWI-Prolog with Homebrew:

brew install swi-prolog

In this case, the executable path for the arthurwang.vsc-prolog extension should be set to /opt/homebrew/bin/swipl:

{
  "prolog.executablePath": "/opt/homebrew/bin/swipl"
}

Testing

Python must be installed. Create a virtual environment, install the dependencies in requirements.txt, and execute:

cd prolog
swipl --goal=cli -o cli -c cli.pl
pytest

About

Prolog and Python for the coursework of the Computational Logic for Artificial Intelligence unit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Prolog 60.9%
  • TeX 20.2%
  • Python 9.7%
  • Jupyter Notebook 8.9%
  • Shell 0.3%