3 ms·
Very nice, Prolog is a vastly under rated language which is very useful for a lot of logic and decision making programming problems.
by ses 16y ago
Very nice, Prolog is a vastly under rated language which is very useful for a lot of logic and decision making programming problems.
- swannodette 16y agoThis includes program verification, there's some fascinating work about combining Prolog w/ Smalltalk to: * check whether a piece of source code matches a certain pattern * find all pieces of source code that match a pattern * search for all occurrences of a given pattern that were used to program a piece of source code * detect violations of the usage of a pattern * enforce the consistent use of some pattern throughout a program * generate code that matches a certain pattern More about Logic Meta Programming here, http://soft.vub.ac.be/SOUL/ http://soft.vub.ac.be/SOUL/
- Homunculiheaded 16y agoI just started learning Prolog recently and I strongly agree with it's status as being 'underrated'. One thing I've found worth noting is the increasing interest semantic web technologies with no noticeable uptick in the interest in logic programming. This is especially odd when you consider that it's not much of a stretch to look at RDF triples simply as facts and rules in Prolog. I have a feeling that just as Rails rediscovered the mvc work in the late 70s smalltalk community, the semweb world will rediscover prolog along with the larger world of constraint/logic programming.
- silentbicycle 16y agoOne problem with Prolog is that the "standard" doesn't include a lot of useful functionality that implementations typically provide. Not all Prologs have packaging systems or constraint programming extensions, for example, yet they make Prolog dramatically more useful. SWI Prolog (http://www.swi-prolog.org/ http://www.swi-prolog.org/) and GNU Prolog (http://www.gprolog.org/ http://www.gprolog.org/) are pretty good. (Daniel Diaz, GNU Prolog's primary author, also has some excellent research papers on implementing constraint programming.) Also, for anyone curious about Prolog, I found experimenting with Erlang made many aspects of Prolog make more sense, and vice versa. Erlang was originally a Prolog DSL, and many minor details carried over.
- swannodette 16y agoI also highly recommend The Reasoned Schemer as another route to understanding the concepts behind Prolog - you essentially build the heart of a Prolog system in a couple hundred lines of Scheme. The level of density in such a short text as well the ability to work through it without having to sit in front of a computer is invigorating (I've had to reread the first 80 pages or so about 5 times now, of course it might just be that I'm slow ;). It certainly succeeds at showing the beauty of a system that elegantly intertwines FP w/ LP. Oleg (of Haskell fame) has some excellent further resources, http://kanren.sourceforge.net/ http://kanren.sourceforge.net/ and William Byrd's thesis is a treasure trove of things to consider: http://gradworks.umi.com/33/80/3380156.html http://gradworks.umi.com/33/80/3380156.html
- silentbicycle 16y agoWilliam Clocksin's _Clause and Effect_ is a similarly styled book, using Prolog. It also has a couple good case studies. I also highly recommend Sterling and Shapiro's _The Art of Prolog_.
- swannodette 16y agoI've also heard only good things about the Bratko book, Prolog Programming for Artificial Intelligence. I'm curious as to what put you off about TRS? The only thing I found initially frustrating was the lack of hand-holding to be found in the earlier books in the Schemer series. But then I starting working out everything I found confusing w/ pencil and paper and found the going much easier.
- silentbicycle 16y agoI'm probably going to give it another try eventually, but I sold it - I preferred learning logic programming ideas through Prolog itself, rather than Scheme / KANREN. I've heard good stuff about the Bratko book, too - there's a new edition being published in a few months, I'm planning on checking it out then.