Get the latest tech news
Implementing Logic Programming
I just think it's neat!
If you’ve ever lost your marbles trying to model complex relationships between various concepts as objects with bi-directional pointers to each other and derived properties that need to be cached and all that jazz, then that’s a great example of a problem where you should have used logic programming instead (looking at you OMG and your fancy SysML v2 standard). If you really want to implement Prolog specifically, you have to follow its execution semantics, which are based on SLD resolution using depth-first search and backtracking. We also store the variables here to make the API a bit nicer and to allow us to safely use reference equality later on for better performance.
Or read this on Hacker News