4 ms·
Kind of offtopic, but does anyone know a good resource around implementing a simple prolog/similar language? My previous attempts at learning logic programming
by badtuple 6y ago
Kind of offtopic, but does anyone know a good resource around implementing a simple prolog/similar language? My previous attempts at learning logic programming have failed, and it just _feels_ like a thing that becomes clear after you've seen how it works under the hood.
- btwillard 6y agoCheck out miniKanren (http://minikanren.org http://minikanren.org)!
- thelazydogsback 6y agoThough as Kanren's biding-stream merging which is a bit different than Prolog's DFS backtracking, it's good to look at but doesn't work like Prolog, so one would still need to look at the latter separately.
- carapace 6y agoCheck out Paul Tarau's "A Hitchhiker's Guide to Reinventing a Prolog Machine" Slides: https://software.imdea.org/Conferences/CICLOPS2017/files/tarau_ciclops17.pdf https://software.imdea.org/Conferences/CICLOPS2017/files/tar... Paper: https://drops.dagstuhl.de/opus/volltexte/2018/8453/pdf/OASIcs-ICLP-2017-10.pdf https://drops.dagstuhl.de/opus/volltexte/2018/8453/pdf/OASIc... - - - - The canonical method is teh WAM: https://en.wikipedia.org/wiki/Warren_Abstract_Machine https://en.wikipedia.org/wiki/Warren_Abstract_Machine
- Jtsummers 6y agoAlong with @btwillard's suggestion, check out The Reasoned Schemer, it goes about explaining miniKanren and gives enough information to implement it yourself. It's a fantastic exercise.