[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More on Full Specification



    	From: Robert Hieb <hieb@iuvax.cs.indiana.edu>
    	
    	I think the current ``arbitrary permutation'' in the semantics
    	is terrible, since it really doesn't reflect the intent, 
    	which I understand to be that procedure calls may be evaluated in 
    	different orders within the same program, and perhaps even 
    	concurrently.
    	
    From: Eric S. Tiedemann <tiedeman@acf3.NYU.EDU>

    No, not concurrently.  E*, in the semantics, always evaluates in
    *some* order.  This isn't overspecification, as Paul Hudak suggests,
    but rather a deliberate and desirable design decision.

I wasn't around when the decision was made, so can't say whether it
was "deliberate" or not, but in what sense is it "desireable"?
Presumably the motivation for this was to allow implementation
freedom, so why only stop half-way?  My guess is that the intent was
as Robert Hieb states, except for the concurrency part (but maybe that
was in somebody's mind too).  I wonder how many current
implementations permute the arguments in different ways depending on
context?  Seems useful to me ... and fully within the motivation for
underspecification in the first place.

My bet is that Will, when designing the denotational semantics,
specified the underspecification in the simplest deterministic way he
could think of, and that's to use something like PERMUTE.  If there
was a clean way to specify non-determinism, including the
inter-leaving of evaluations, then perhaps he would have chosen that.
(Actually, there are a couple of ways to make PERMUTE dynamic, rather
than fixed, but it gets a little bit messy...)

I guess the bottom line is that we should be VERY careful about what
things we choose to underspecify, and how.  These decisions can have
radical effects on portability and correctness.  I think that the
default should be full specification, and that anything left
underspecified should have a very good rationale.

    -Paul

-------