needed-libraries icon indicating copy to clipboard operation
needed-libraries copied to clipboard

Embedded logic programming

Open zah opened this issue 5 years ago • 1 comments

Nim can feature a logic programming engine embedded into the language as a DSL (it's possible to make it work both at compile-time and run-time). A popular minimalistic approach available in other languages is the miniKanren engine:

https://github.com/clojure/core.logic https://github.com/logpy/logpy

A more sophisticated engines are also possible, but may require more work. See the following explanation for the differences between Kanren and a fully-featured Prolog engine:

https://stackoverflow.com/questions/28467011/what-are-the-main-technical-differences-between-prolog-and-minikanren-with-resp

zah avatar Dec 29 '18 14:12 zah

Maybe this can be done in yield/generators implementation described here: http://yieldprolog.sourceforge.net/

I don't test it, maybe coroutines implements backtracking in a parallel can be tried as implementation base.

ponyatov avatar Aug 21 '19 19:08 ponyatov