Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornell!travelers.mail.cornell.edu!news.kei.com!news.mathworks.com!satisfied.elf.com!wizard.pn.com!Germany.EU.net!EU.net!uknet!festival!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: CL grammar ambiguities?
Message-ID: <D4DB6H.L4M@cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: bute.aiai.ed.ac.uk
Organization: AIAI, University of Edinburgh, Scotland
References: <3ia6hi$509@lyra.csx.cam.ac.uk> <D4B5nv.17A@cogsci.ed.ac.uk> <3ida0e$eap@lyra.csx.cam.ac.uk>
Date: Tue, 21 Feb 1995 20:49:29 GMT
Lines: 92

In article <3ida0e$eap@lyra.csx.cam.ac.uk> gjm11@owl.pmms.cam.ac.uk (Gareth McCaughan) writes:
>In article <D4B5nv.17A@cogsci.ed.ac.uk>,
>Jeff Dalton <jeff@aiai.ed.ac.uk> wrote:
>>In article <3ia6hi$509@lyra.csx.cam.ac.uk> gjm11@can.pmms.cam.ac.uk (Gareth McCaughan) writes:
>
>>>> According to Godel's Theorem, no sufficiently powerful formal system can be
>>>> defined with absolute precision.
>>>
>>>Errrrm. The sort of systems we're talking about here are nowhere near
>>>to being "sufficiently powerful", surely.
>>
>>Actually, I'm pretty sure they are.  A denotational semantics is
>>rather like an interpreter in lambda-calculus.
>
>I think we may be slightly at cross-purposes here.

Well, I didn't bring in the Godel stuff (it was Barmar).

>The trouble is that the remark I quoted and commented on (>>> above) is
>ambiguous; it might be about
> 1/ what is valid syntax in the system,
>or about
> 2/ what the system "does" with a given piece of valid syntax.
>
>[...]
>
>And there's another ambiguity: suppose we take meaning 2/; what does
>defining a system actually mean? It might be
> 1/ describing the process by which input is processed,
>or
> 2/ giving a simple (meaning primitive recursive, or something)
>    description of what output results from given input.
>
>With meaning 1/, obviously any computer language can be defined with
>complete precision (provide an implementation of the language, and
>define the language in terms of the implementation);

You might define language A by an implementation in A.
This used to be done (e.g. so-called "definitional interpreters")
and has some problems (such as multiple fixed points).  And if
you define language A by an implementation in language B, which
is more or less what a formal definition does, you need a
precise definition of B.

(Actually, I like definitional interpreters and I know about
Henry Baker's paper on defining CL macros and forms in terms
of other ones -- I say this only to head off some postings
that would otherwise be called for.)

>   with meaning 2/,
>things are rather different. Godel-type problems only arise with
>(2/, case 2/), or with languages whose *syntax* is Turing-powerful,
>so to speak.

Like Algol 68.  ^_^

>Now, I thought the sort of thing we were discussing was [originally]
>the way the CL reader deals with its inputs, and [later] specifications
>of computer languages in standards.

Right.  And when specs in standards try to be absolutely precise,
they resport to formal definitions of the syntax and a semantics.
But actual standards tend to leave some things undefined even then
(e.g. the order of arg evaluation in Scheme).

>In either case, it is possible to specify the behaviour completely
>and precisely, by (for instance) providing an actual implementation
>and decreeing that correct behaviour is behaviour identical to that
>which the specified implementation exhibits.

I don't know of any standard that works that way unless the
"actual implementation" is in some formal system such as VDM
or denotational semantics.

But let's consider a different example.  An actual implementation in,
say, C isn't enough because the C standard isn't absolutely precise
and the implementation may be use implemention-defined parts of
the language.  So how about an implementation in C, but compiled
and run on specified hardware?  You'll have to go at least that
far.

>So what I should really have said was that Godel's theorem isn't
>really relevant. The statements Godel's theorem *does* refute are
>statements like
>  It is possible to determine, for any program in language X, whether
>  it will run forever, and what output it will produce.
>
>But I don't think anyone was suggesting anything of that sort.

I'm not sure exactly what Barmar had in mind by bringing in Godel.

--jeff
