Tools for logic programming in OCaml

logic
logic-programming

#1

I have no experience with logic programming (LP) and I have no time and reason to learn Prolog or other language that are canonical in the area of LP. By the way I’m very interested in the topic of LP and related paradigms. Could you please mention some OCaml libraries for logic programming and related things?


#2

Check out https://github.com/c-cube/choice. It’s based on the LogicT library/paper (worth a read), which is closely related to miniKanren. The ideas are similar in that you construct nondeterministic programs by manipulating streams of solutions.


#3

For a minimal typed μKanren implementation you can have a look at rel a more powerful implementation is provided by ocanren (but wanders a bit too much on the Obj side for my taste).


#4

Also https://github.com/c-cube/datalog, a Datalog implementation


#5

+1 for OCanren. As a committer to this project I’m curious about opinion of third-party users.