Path: utzoo!attcan!uunet!mcvax!enea!kth!sics!sics.se!alf From: alf@sics.se (Thomas Sj|land) Newsgroups: comp.lang.prolog Subject: The meaning of "declarative" Message-ID: Date: 2 Oct 88 17:44:30 GMT Sender: news@sics.se Distribution: comp.lang.prolog Organization: Swedish Institute of Computer Science, Kista Lines: 57 This is somewhat philosophical, but it turns up in all Prolog classes when you try to motivate the language with something else than its pragmatic virtues. (Please submit explanatory followups only.) Statement 1, (commonly accepted, it seems, although the meaning is unclear): "Prolog is a declarative language" Statement 2, (viewpoint held by some experts who agree to statement 1): "functional languages are NOT declarative, while logic programming and equational languages are if they have completeness" My view: "(declarative programming <-> programming without added intension)" -> Prolog allows declarative programming but doesn't guarantee it. Indeterminism of the theorem prover which gives completeness has nothing to do with the "declarativeness". My intuition leads me to think of soundness rather than completeness when I hear the term "declarative". Functional programs which are pure lambda expressions are declarative, even when they are "higher order" in contrast to first order logic programs, which are declarative only when the intension coincides with the Herbrand interpretation. This view rules out the use of difference structures a.o.t. from "declarative logic programs". The phrase "declarative programming" makes sense if your intension of the program is understood as a database for a theorem prover and not as a coded algorithm, i.e. any fact you intended to express in the database can be concluded by the interpreter. Consider the difference between the completeness for first order predicate calculus and the incompleteness of arithmetic as expressed by the Peano axioms as a first order theory. Coded algorithms in logic programs seems to me to have a similar relation to the underlying theorem prover for horn clauses as arithmetic to the underlying first order theory used to code them. A difference is perhaps that logic programming assumes a particular model, the Herbrand interpretation. Question: Does "declarative" refer to the completeness of the theorem prover used to run the programming language or does it refer to the intension of the program ? -- Thomas Sj|land SICS, PO Box 1263, S-164 28 KISTA, SWEDEN Tel: +46 8 752 15 42 Ttx: 812 61 54 SICS S Fax: +46 8 751 72 30 Internet: alf@sics.se or {mcvax,munnari,ukc,unido}!enea!sics.se!alf