Path: utzoo!mnetor!uunet!mcvax!ukc!its63b!csnjr From: csnjr@its63b.ed.ac.uk (Nick Rothwell) Newsgroups: comp.lang.misc Subject: Re: func & logic langs Message-ID: <1068@its63b.ed.ac.uk> Date: 11 Mar 88 12:37:56 GMT References: <698@btnix.UUCP> Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: LFCS, University of Edinburgh Lines: 45 Keywords: functional logic programming Summary: I think they're different In article <698@btnix.UUCP> psanders@btnix.UUCP (Chameleon) writes: >>If we assume that the following definitions are valid: > >1. Functional and logic language programs consist of assertions, and the >computation proceeds by a process of deduction from these assertions. In a functional language, programs are built from a set of data objects, some of which just happen to be functions, and can therefore be applied to other objects... >1. In Functional programming the assertions consist of equations A function is a partial mapping from data objects to data objects. I view the "equational" feature of functional languages as simply specifying the domain of a function. An important point is that, since functions only have to map from a domain (i.e. they aren't relations), you get higher-order functions naturally (once you've decided on the semantics for environments and closures) - you don't have to worry about the relational aspect. >3. For functional programming the subject of discourse is functions and for >logic programming it is relations As I said above - functional languages (I admit, I'm thinking of ML here...) provide a variety of data objects, some of which happen to be functions. Admittedly, interesting things can't happen unless you use functions... >then is functional programming a subclass of logic programming ? I think they have some things in common, but not very much, since there are serious theoretical points concerning the features which make sense in either domain (e.g. higher-order functions, negation, equality, decidability, unification, backtracking, termination, ...). >Paul Sanders. >E-mail (UUCP) PSanders@axion.bt.co.uk (...!ukc!btnix!psanders) >Organisation British Telecom Research Laboratories, Ipswich UK. -- Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick%lfcs.ed.ac.uk@nss.cs.ucl.ac.uk !mcvax!ukc!lfcs!nick ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ...while the builders of the cages sleep with bullets, bars and stone, they do not see your road to freedom that you build with flesh and bone.