Skip to content

julgitt/Prolog-Implementation-In-Ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Prolog implementation in Ocaml

Key Features:

  • Unification using Robinson's algorithm.
  • Comprehensive support for syntax, semantics, and arithmetic operations.
  • Reading the predicate base from a file
  • Queries can be sent from the console.
  • Implementation of backtracking with a state monad providing a search for multiple solutions.

Required libraries:

  • Dune
  • Menhir
  • Linenoise

Manual Installation:

sudo apt install opam
opam init
opam install dune
opam install linenoise
opam install menhir
eval $(opam config env)
dune build    
dune exec prolog

Plans for the future development:

  • Support for Prolog lists
  • Comparison operators

Preview:

image