The Power of Prolog
metalevel.at
The Power of Prolog
1–10 of 164 posts
Re: The Power of Prolog
#2- You can do logic programming using minikanren in scheme. (you can also extend the minikanren system if you find a feature missing).
- Minikanren was implemented in clojure and called core.logic.
- It was also ported to python by Matthew Rocklin I think, called logpy.
- There is also datalog, with pydatalog it's python equivalent.
- Also pyke. And so on.
Plus logic programming has very important (arguably necessary) extensions in the form of constraint-logic-programming (CLP), inductive-logic-programming (ILP), and so on.
It's a huge area.
EDIT: ILP at an advanced level starts making connections with PGMs (probabilistic graphical models) and hence machine learning, but its a long way to go for me (in terms of learning) before I start to make sense of all these puzzle pieces.
EDIT 2: You can have a taste of logic programming without leaving your favorite programming language. Just try to solve the zebra puzzle [1] (without help if you can, esp. through any of Norvig posts or videos; they're addictive).
[1] https://en.wikipedia.org/wiki/Zebra_Puzzle
EDIT 3: An "expert system" (a term from the 1980s) is largely a logic programming system paired up with a huge database of facts (and probably some way of growing the database by providing an entry method to non-programmer domain experts).
EDIT 4: In other words, logic programming (along with other things like graph search etc) is at the core of GOFAI (good old fashioned AI), the pre-machine-learning form of AI, chess engine being a preeminent example of it.
Re: The Power of Prolog
#3http://www.redditmirror.cc/cache/websites/web.archive.org_84...
Re: The Power of Prolog
#4fib(X,X):- Xfib(X,Y1+Y2):- fib(X-1,Y1),fib(X-2,Y2).
I tried to get answer to this kwestion in reddit, but all I got was personal insults.
Re: The Power of Prolog
#5Re: The Power of Prolog
#6Never understood why natural numbers (or some set of N) is not in the search space: fib(X,X):- X fib(X,Y1+Y2):- fib(X-1,Y1),fib(X-2,Y2). I tried to get answer to this kwestion in reddit, but all I got was personal insults.
Re: The Power of Prolog
#7One of the nicest examples of the power of prolog is that Windows NT contained a prolog implementation to take care of network configuration, replacing the previous codebase: http://www.redditmirror.cc/cache/websites/web.archive.org_84...
Re: The Power of Prolog
#8Roughly half the 'power of prolog' comes from the 'power of logic programming' and prolog is by far not the only logic programming language, e.g., - You can do logic programming using minikanren in scheme. (you can also extend the minikanren system if you find a feature missing). - Minikanren was implemented in clojure and called core.logic. - It was also ported to python by Matthew Rocklin I think, called logpy. - T…
Interesting puzzle. I copied the puzzle text to a separate text file so that one does not accidentally read anything else in the Wikipedia article.
Re: The Power of Prolog
#9One of the nicest examples of the power of prolog is that Windows NT contained a prolog implementation to take care of network configuration, replacing the previous codebase: http://www.redditmirror.cc/cache/websites/web.archive.org_84...
Lets you automate arbitrary boring code submission prerequisite checks (e.g. "you must have a 'Verified' from a maintainer and a 'Code-Review +1' from 1 other person. If you are not the author and the author's email address doesn't end in @example.com you must have an 'IP-Reviewed' from a manager")
https://gerrit-review.googlesource.com/Documentation/prolog-...
Re: The Power of Prolog
#10Roughly half the 'power of prolog' comes from the 'power of logic programming' and prolog is by far not the only logic programming language, e.g., - You can do logic programming using minikanren in scheme. (you can also extend the minikanren system if you find a feature missing). - Minikanren was implemented in clojure and called core.logic. - It was also ported to python by Matthew Rocklin I think, called logpy. - T…