RE: [RIF] Extensible Design

So, what is a programming languages that allows for semantic variations. We 
need some sense in which the semantic variants do not make for different 
languages with the "same" syntax (I presume that at least syntactic commonality 
is required). In many programming langauage specifications, esp. standards, the 
language is underspecified in that some bits and behaviors are left undefined. 
However, while *programs* in such languages can be ambiguous I don't think 
this counts as semantic variation per se since the semantics is univocol: 
Whatever you want to do here.

Some versions of Lisp had an acknowledge difference betwee the semantics of 
an interpreted version of a program and a compiled one. I think this counts as a 
semantic variation.

Mercury is not a standardized language, but it is my favorite example of 
semantic variation:

http://www.cs.mu.oz.au/research/mercury/information/doc-release/
mercury_ref/Semantics.html#Semantics

They indeed put the pudding out there:

"""The University of Melbourne Mercury implementation offers eight different 
semantics, which can be selected with different combinations of the --no-
reorder-conj, --no-reorder-disj, and --fully-strict options. (The --fully-strict 
option prevents the compiler from improving completeness by optimizing away 
infinite loops or calls to require.error/1 or exception.throw/1.) """"

No other examples come to mind. There are many languages with lots of 
dialects, but parameterizable semantics (which really seems necessary in order 
to model what we're discussion) seems rare. That is, it is rare that: the same 
program (syntactically) may be correctly interpreted by distinct semantic models 
(which give different results) that are available to the programmer as deliberate 
choice (other than by switching implementation/dialect and adaption to the 
quirks of that implementation/dialect).

Not sure what rides on this :)

Cheers,
Bijan.

Received on Friday, 5 May 2006 12:49:24 UTC