Live data from Hacker News

Who killed Prolog?

vanemden.wordpress.com

31–40 of 57 posts

Re: Who killed Prolog?

#31

That was a fun read, especially the history of Admiral Inman setting up MCC. He was on the board of directors for my company and for years I had to pitch to him and a small committee to get IR&D funds. I also got a brief tour of MCC from him when it was getting set up. He was in a really good mood because he had just arranged the hire of Douglas Lenat. As mentioned in the article, Feigenbaum's and McCorduck's book on…

> I view Prolog as almost a scripting language

Me too. I want to take this idea and run with it - it would probably work better as an embedded scripting language, like Lua or Tcl.

Re: Who killed Prolog?

#32
post #8

I doubt whether this is the actual reason that Prolog was killed off. AFAIK during the 90s there was still research going on with Prolog and parallelization. However, this seems to have been killed off during the end of the 90s because of lack of results. IMO the thing that killed Prolog is that there has never been a good way to do parallelization without having to massively rewite Prolog programs.

There's still some active research in Parallel Prolog implementation. See this fabulous survey paper of the implementation approaches: http://portal.acm.org/citation.cfm?id=504083.504085 Gupta, G., Pontelli, E., Ali, K. A., Carlsson, M., and Hermenegildo, M. V. 2001. Parallel execution of prolog programs: a survey. ACM Trans. Program. Lang. Syst. 23, 4 (Jul. 2001), 472-602.

Hermenegildo, in particular, continues active research in this area and is quite visible and active in the broad programming languages community.

Re: Who killed Prolog?

#34
post #15
post #12

Earlier quoted context omitted.

Erlang is the only object-oriented language.

Clearly you're looking for someone to say Uh - what?! So I'll do so.

I think there's something to that, though - "Object-Oriented" has been used to mean many things.

Alan Kay's definition, more or less: "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them."

Erlang has processes with local state communicating via messages, and can do late-binding with pattern matching and hot code loading. It just disposes of classes and other such baggage.

Re: Who killed Prolog?

#35
post #15

Earlier quoted context omitted.

Clearly you're looking for someone to say Uh - what?! So I'll do so.

I think there's something to that, though - "Object-Oriented" has been used to mean many things. Alan Kay's definition, more or less: "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them." Erlang has processes wit…

Ok, but there are plenty of things that aren't message passing in Erlang, whereas, say, in Smalltalk, pretty much everything goes through messages, no?

Re: Who killed Prolog?

#36
Prolog is not dead, it just has a niche following. Similar to Lisp and Smalltalk, two other languages mentioned in the article. Prolog suffers even more because it requires programmers to think differently -- Lisp and Smalltalk programs can still be written in a procedural style.

Prolog offers at lot of the same things that Lisp also does: symbolic processing, meta-programming, among others. One of the tricks of Lisp programmers is to implement Prolog in Lisp and use it for the areas it is strong. Just read "Paradigms of Artificial Intelligence" to see how this is done.

Re: Who killed Prolog?

#37
post #9

What people wanted Prolog to do, it couldn't do. People wanted to step away from the control flow specification of imperative language, the message-passing of OOP, and let the compiler solve your problem for you by feeding it a specification of the constraints the completed system would follow. Prolog did not, and cannot do this, because it is not strong AGI. When people realized this, they gave up on it, because it…

Several Prologs have extensions for constraint programming, which give it much smarter hueristics. Instead of trying every possible combination of choices and failing/backtracking as early as possible (generate-and-test), it can use constraints to narrow the intervals / sets of possible choices - which usually sets off a chain reaction and further constrains the search space.

Once constraint propagation can't narrow things any further, it can copy the search space, use various search hueristics (such as splitting each copy of the narrowest interval in half), and see if that triggers further constraint propagation (or hits a dead end). It usually greatly reduces the amount of depth-first search. There are other ways of implementing constraints besides propagator-networks and space copying, but that's the way I understand best.

Generate-and-test is great for prototyping, but doesn't scale up to larger problems. Constraint programming fares much better.

Re: Who killed Prolog?

#38

Earlier quoted context omitted.

Very much true. During my education I was massively disappointed in Prolog, because the programming process was something like this: 1) write it declaratively 2) figure out that your program will take days to complete 3) add ugly procedural hacks (cuts) to make it more efficient To an extent, you have this process in any language (write->measure->optimize) but typically not in a way that it forces you at gunpoint to…

An excellent point - Prolog fans (usually those who never actually programmed anything) would describe it as a declarative language. However, any "real" Prolog program that I ever saw was really using it as a slightly odd procedural language.

It doesn't fail on all occasions. Our research group wrote a robust natural language parsing system written in Prolog (with some C extensions). The (aptly named) unification grammar, lexicon, and most of the productive lexicon are written in a declarative manner.

This really paid off when in a new research project, which goal is to write a sentence realizer for the same system. With nearly no modifications we could reuse the grammar, lexicon, and productive lexicon. Both the parser and the sentence realizer use the same grammar and lexicon now.

I understand that this may seem somewhat trivial, as it may seem that the lexicon and grammar are plain data. However this is not true:

- The grammar is written as a declarative manner, where goals are mostly operators that manipulate attribute-value structures. These rules are later compiled to plain Prolog terms via term expansion (DCG-like) for efficiency. - You don't want to perform some unifications immediately, even when two terms are unified. Most Prolog implementations offer blocked goals, where a goal is blocked until a variable becomes instantiated.

However, I am the first to admit that Prolog makes some classes of problems trivial (unification grammars, parsers). There are also many things that you do not want to do in Prolog, because it is a waste of time, or very inefficient. For instance, in our system the following components are implemented in C or C++:

* Finite state automata for quick lookup of subcategorization frames.

* Part-of-speech tagger for restricting the number of frames for each word before parsing.

* N-gram models that are used as a feature in fluency estimation.

* Tokenization transducer.

* Bit arrays (comparable to Bloom filters) for excluding useless paths in parsing.

Conclusion: use the right tool for the job. Unification, structure sharing, and (some) pattern matching are cheap and easy to use in (WAM) Prolog. Most other things are prohibitively expensive and clumsy in Prolog.

Re: Who killed Prolog?

#39

Prolog is not dead, it just has a niche following. Similar to Lisp and Smalltalk, two other languages mentioned in the article. Prolog suffers even more because it requires programmers to think differently -- Lisp and Smalltalk programs can still be written in a procedural style. Prolog offers at lot of the same things that Lisp also does: symbolic processing, meta-programming, among others. One of the tricks of Lisp…

Or the "Reasoned Schemer". Unfortunately, most such implementations are slow compared to Prolog AMs.

Re: Who killed Prolog?

#40
post #35

Earlier quoted context omitted.

I think there's something to that, though - "Object-Oriented" has been used to mean many things. Alan Kay's definition, more or less: "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them." Erlang has processes wit…

Ok, but there are plenty of things that aren't message passing in Erlang, whereas, say, in Smalltalk, pretty much everything goes through messages, no?

Sure, I'm just saying fogus is making a real point (even though "only" sounds like trolling).
Post reply on HN