Prolog Interpreter in Ocaml

Built a basic Prolog (Logic Programming) Interpreter using Ocaml (Objective-Caml) which is a functional programming language.

As part of my Programming Languages course in my 6th Semester, our team built a Prolog (Programming with Logic) like interpreter in Ocaml (Objective-Caml) which is a funcitonal programming language. The implementation contained four main components:

  • Lexical Analyzer - Used for Tokenization, Built using Ocamllex
  • Syntactic Analyzer - Used for checking grammar syntax of input program, Built using Ocamlyacc
  • Unification - Used for Unifying variables, a key concept in Logic Programming.
  • Recursive Proof Searching - Used for Query Computation.

For more details, please refer to our report. The set of slides used for presenting this project is here. It gives a general idea behind the features, implementation mechanisms and methods of interaction with our interpreter.