Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/julgitt/prolog-implementation-in-ocaml

Prolog parser, lexer and interpreter in Ocaml
https://github.com/julgitt/prolog-implementation-in-ocaml

backtracking functional-programming monads ocaml prolog prolog-implementation state-monad

Last synced: about 1 month ago
JSON representation

Prolog parser, lexer and interpreter in Ocaml

Awesome Lists containing this project

README

        

# 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:**
```console
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](https://github.com/julgitt/Prolog-Implementation-In-Ocaml/assets/95649808/106a20b1-e1bc-4f92-a540-263290df2533)