Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site yetti.UUCP Path: utzoo!utcs!mnetor!yetti!peter From: peter@yetti.UUCP (Runge) Newsgroups: net.ai Subject: Re: Re: Program Specification Languages Message-ID: <255@yetti.UUCP> Date: Fri, 13-Sep-85 15:14:03 EDT Article-I.D.: yetti.255 Posted: Fri Sep 13 15:14:03 1985 Date-Received: Fri, 13-Sep-85 17:27:22 EDT References: <638@wdl1.UUCP> <629@mmintl.UUCP> <328@chalmers.UUCP> Organization: York University Computer Science Lines: 34 > In article <629@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes: > > > >The whole idea of a specification language for a computer program is flawed. > >If the specification is good enough to really determine what the program > >does, it IS a program; only the compiler is missing. > > Not so. Many precise specifications aren't programs in any sense - the > simplest example is the integer square root function, specified by > > sqrt(n)*sqrt(n) = n & sqrt(n)>=0 I think there are probably some good arguments (but not many) for distinguishing between specification and programming languages but Chalmer's "simplest" example of a specification which is not in "any sense" a program is quite unconvincing. Specifications must be taken relative to what is assumed to be already specified. In this case, if we assume an appropriate product relation is available, Chalmer's example becomes a perfectly meaningful program. In a logic-programming environment, there is no reason why sqrt(X,N) if N > 0 and product(N,N,X) cannot evaluate N given a value for X, assuming of course that product(X,Y,Z) can be so specified that its implementation terminates when only Z is instantiated, or if lazy evaluation is available that an appropriate stream of bindings for X and Y is generated. The moral, I think, is that one should try to be as open-minded as possible as to what could constitute a program, and avoid the sterile preconceptions which result from our unfortunate education with conventional programming languages. -- Peter H. Roosen-Runge, Department of Computer Science, York University Toronto M3J 1P3 , Ontario, Canada _____________________________________________________________________________ "Eccles, is the ship sinking?" "Only below the sea." "We must try to save the ship -- help me get it into the lifeboat." _____________________________________________________________________________