Tools for logic programming in OCaml

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?

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.

1 Like

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).

2 Likes

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

2 Likes

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

1 Like