PROLOG-REQUEST@SU-SCORE.ARPA (Chuck Restivo, The Moderator) (02/10/86)
PROLOG Digest Monday, 10 Feb 1986 Volume 4 : Issue 8 Today's Topics: Puzzles - Shoppers & NL, LP Philosophy - Expressive Power & Fires ---------------------------------------------------------------------- Date: 4 Feb 1986 13:07:42 EST (Tue) From: Dan Hoey <hoey@nrl-aic.ARPA> Subject: Shoppers and Boodle Shoppers ======== Date: 30 Jan 1986 05:58-EST From: Gregory.Stein@K.CS.CMU.EDU I have found a solution to the puzzle posted by Paul Weiss in Volume 4, #3 of the Digest. I solved it, too, but I really would rather see a Prolog program that does it. If anyone would like this, I wrote down a trace of the reasoning needed to solve the problem. Paul Weiss mentioned failing to solve the problem ``in a ZEBRA like fashion.'' Is that a programming method, a logic method, or both? ...Anyone who likes a puzzle - this is it - it's a real toughy. Takes hours. It probably takes days or weeks if you insist on writing a program to do it. Boodle Phil Moiven? =================== I was somewhat more intrigued by the ``natural language'' puzzle posted in V4#3. I invented a somewhat plausible model for the problem, but I'm curious what the standard model is. Has anyone translated the problem? Does anyone recognize the language? Is it a real language? Does anyone know where the problem came from? The apparent sender of the problem claims the message was forged. Anyway, here is my glossary of ``Fear and Loathing in Prolog''. The language is straightforward, but the relations are only guesses. Language Relations kips = therefore sod'n pho = is friendly with myt = and bink ptui = is paranoid of boodle = who does pock matoo = is jealous of nar = only moiven = despises I hope the real problem isn't quite as ugly. Then again, from the standpoint of Rorschach, perhaps I hope it is. -- Dan Hoey ------------------------------ Date: Thu, 6 Feb 86 11:33:53 GMT From: William Clocksin <wfc%computer-lab.cambridge.ac.uk> Subject: Expressive Power I am not normally given to making ad hominum remarks, but Carl Hewitt's message in Prolog Digest 4(7) is irresistable. I apologise for the intemperate nature of what follows; no insults are intended. I am finally able to understand his argument strategy: ignore the arguments of others, change the terminology slightly each time, and state opinions louder each time, using capital letters if necessary. In Digest 4(7) he introduces (not for the first time) a "magic ingredient X" argument (discredited around 1500 years ago): because Prolog does not have something about constructing local objects, whatever they are, then Prolog is deficient and hence defective. Or as Hewitt would say in his too too subtle way, "DEFECTIVE". How about a reply in kind to the effect that, because Lisp does not have the ability to insert variables in data structures (as Prolog can) then Lisp is deficient and hence defective. Using Hewitt's terminology again, then we would say that this ability is "fundamental" because (in Prolog) it is used for passing arguments (both input and output), matching patterns, selecting /updating data structures, and performing a certain class of inference (instantiation). But it does not matter who says this about what language, it is silly to attribute any more than plain old engineering criteria to such abilities. It is wrong to seek "foundations" for A.I. in the form of languages, and I wish people would not contribute pseudophilosophical discussions of "expressive power" and related illdefined concepts in this Digest. (Fernando is excused because he was trying (in vain) to straighten out Carl's terminology). Saying that Lisp (or any other language or technique) is a foundation for A.I. is like saying that sulfuric acid is a foundation for chemical engineering. I use both Lisp and Prolog (separately). If I cannot write a program cleanly in Prolog, I would rather write it dirtily in Lisp than dirtily in Prolog. There are also programs for which plain old backtracking is very useful (such as intabulating figured bass notation), and a clean Prolog solution is nicer (and faster) than the Lisp one on this I/O-ridden example. What does this prove? Not much, and that's my point: programming languages are artifacts for which engineering criteria apply. There is nothing special about Lisp and Prolog that excuses them from this. ------------------------------ Date: Tue, 4 Feb 86 18:56:53 -0200 From: Ehud Shapiro <Udi%wisdom.bitnet@WISCVM.WISC.EDU> Subject: Hewitt's small challenge In response to what might be called "Hewitt's small challenge" (in contrast to "Hewitt's big challenge", which was under discussion for a while) I enclose an abstract of a paper of mine, which answers positively the question of the "machine expressiveness" of Concurrent Prolog with repect to computers composed of a network of communicating processors. -- Ehud Shapiro P.S. I find capitalizaing condencending adjectives an amusing typographic technique On Evaluating General-Purpose Programming Languages Weizmann Institute Technical Report CS86-01 Abstract A method for evaluating the expressiveness and efficiency of a general-prupose high-level language for a given machine is proposed. It is based on implementing a simulator for the machine language in the high-level language, and establishing that the simulator executes efficiently on that machine. Using this method it is possible to show that one programming language can implement any algorithm and simulate any other programming language on a given machine model with a small overhead. The method is applied to Concurrent Prolog and two machine models: a RAM and a network of RAMs. ------------------------------ Date: Tue 4 Feb 86 11:02:18-PST From: Fernando Pereira <Pereira@SRI-CANDIDE.ARPA> Subject: Expressive power In my recent contribution on this topic, I made the mistake of trying to draw a few general observations from my experience with Prolog and Lisp, and that of the people I work with every day. My recent experience of taking a large system written in Prolog, replacing completely its bottom part (information representation) and top part (control flow) without touching the great bulk of the system obviously blinded me to the glaring lack of modularity in Prolog, to the uselessness of backtracking, to the magic of communicating systems and to the horrors inherent in the asserts and retracts I did not use. I was particularly misled by having taken a large program [a grammar] which was written as a checker [parser] and turning in into a (partial) generator, the few changes required having to do with tightening underspecified constraints in the original. I apologize again for the infantile blunder of relying on personal experience to derive my opinions. -- Fernando Pereira P.S.: Somehow, I can't help thinking of that fable of a vain king, a subtle tailor, the king's subjects and a child... ------------------------------ Date: Tue, 4 Feb 86 23:36:07 GMT From: Jeff Dalton <Jeff%aiva.edinburgh.ac.uk@cs.ucl.ac.uk> Subject: Expressive power I would like to respond to Fernando's message from Vol 4, Issue 5. Maybe so. I find, however, that I prefer assembly language to some higher-level languages, such as some dialects of Basic, not because I can do a MOVE instruction if the machine has one but because I can implement certain abstractions more easily. Just to be clear on this point, one can express abstractions in Lisp without having to delve into the peculiarities, &c. Moreover, advocates of Lisp programming are also in favor of "abstraction power". That is one reason why we don't program in assembler. So most programmers cannot keep abstractions alive in Lisp, to judge by their products? I'm not sure what evidence there's supposed to be for this. Is it just something "everyone knows"? I have not found that products written in Prolog are in general more maintainable, reusable, &c than those written in Lisp. Obviously, there are some tasks that are more easily expressed in Prolog, and for those things a Prolog program may well be better than one written in Lisp. But there are also some things more easily expressed in Lisp. I take it then that Lisp, as a "machine power" language, is eventually supposed to be of only historical interest. I would like to know how far this condemnation of lanuages goes. Does it include Pascal, Ada, Modula, CLU, Hope, ML, all non-declarative languages, all languages not based on logic, or just Lisp and assembler? Therefore, in this view, Lisp represents a discreditied programming practice, doomed to historical oblivion, and so on. A waste of effort in itself, perhaps. Again, I would like to know what the evidence is for this. There are, of course, problems with large software systems that have not been solved in current Lisp practice. But this does not mean that they cannot be dealt with, much less that Lisp has no facilities for dealing with them. Lisp does have means for dealing with modularity, for example, and so far they seem superior to those in Prolog. Apparently this counts for nothing. It is unfortunate that there is, or at least seems to be, hostility between some parts of the Lisp and Prolog communities. However, although I disagree with what Fernando has said about Lisp, I don't want to continue the argument to attack Prolog or to say that Prolog should change to imitate Lisp (has anyone actually been advocating that it should?). To me, Ken Kahn's message in Vol 3, Issue 43, and in particular his comments on object-oriented programming and on the single-paradigm approach as a research strategy, presents a reasonable view of the relationship between Lisp and Prolog. And I would like to stop there rather than to encourage further polemics. -- Jeff Dalton ------------------------------ End of PROLOG Digest ********************