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

Re: specification by implications and example



Per Bothner writes: 

  It is valid syntactically.  It expands to:
	  ((setter (lambda (x) x)) y V)
  But since (lambda (x) x) does not have a setter associated
  with it, you'd get a (run-time) error.

  But this is allowed:

	  (set! ((if (random) car cdr) x) v)


Now this really raises the question about a formal specification. Could you
please provide a specification of the syntax and semantics of this stuff? I
would be happy with an operational semantics (i.e. an implementation in a
Scheme with define-syntax) or a rewriting model or an extension of the
denotational model or a definitional interpreter. (I am not teasing, I am
just curious. I can imagine a model in each framework, but there are so
many variations I can think of that I don't know how one could possibly
specify a SRFI w/o doing that much.)

-- Matthias