Denotational semantics for the lay man.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Denotational semantics for the lay man.

David Sankel
Hello All,

I've recently had the opportunity to explain in prose what denotational semantics are to a person unfamiliar with it. I was trying to get across the concept of distilling the essence out of some problem domain. I wasn't able to get the idea across so I'm looking for some simple ways to explain it.

Does anyone know of a way to explain what's the meaning and objective of "distilling the essence" without introducing more jargon. One thing that comes to mind is how Newton's equations for gravity were a distillation of the essence of the way things fall.

Thanks in advance,

David

--
David Sankel
Sankel Software
www.sankelsoftware.com

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Denotational semantics for the lay man.

caseyh
You probably want to bring up other forms of semantics.

Axiomatic semantics:
Makes no distinction between a phrase's meaning and the logical  
formulas that describe it; its meaning is exactly what can be proven  
about it in some logic.

Operational semantics:
The execution of the language is described directly (rather than by  
translation).
Operational semantics loosely corresponds to "interpretation".
Can be defined via syntactic transformations on phrases of the  
language itself.


Denotational semantics:
each phrase in the language is translated into a denotation, i.e. a  
phrase in some other language. Denotational semantics loosely  
corresponds to "compilation", although the "target language" is  
usually a mathematical formalism rather than another computer language.


Above from Wikipedia.


Quoting David Sankel <[hidden email]>:

> Hello All,
>
> I've recently had the opportunity to explain in prose what denotational
> semantics are to a person unfamiliar with it. I was trying to get across the
> concept of distilling the essence out of some problem domain. I wasn't able
> to get the idea across so I'm looking for some simple ways to explain it.
>
> Does anyone know of a way to explain what's the meaning and objective of
> "distilling the essence" without introducing more jargon. One thing that
> comes to mind is how Newton's equations for gravity were a distillation of
> the essence of the way things fall.
>
> Thanks in advance,
>
> David
>
> --
> David Sankel
> Sankel Software
> www.sankelsoftware.com
>




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Denotational semantics for the lay man.

Albert Y. C. Lai
In reply to this post by David Sankel
On 11-01-17 01:55 PM, David Sankel wrote:

> I've recently had the opportunity to explain in prose what denotational
> semantics are to a person unfamiliar with it. I was trying to get across
> the concept of distilling the essence out of some problem domain. I
> wasn't able to get the idea across so I'm looking for some simple ways
> to explain it.
>
> Does anyone know of a way to explain what's the meaning and objective of
> "distilling the essence" without introducing more jargon. One thing that
> comes to mind is how Newton's equations for gravity were a distillation
> of the essence of the way things fall.

(I'm afraid Newton's equations introduced more jargon too.)

A denotational semantics maps programs to math things. The mapping has
to be by structural recursion over program syntax.

Why math: it's the universal modelling language. Why do we model
programs by a math model: to explain and predict.

Why structural recursion over syntax: to be compositional, the same
reason we stay close to CFGs for syntax: you can build bottom-up and
analyze top-down.

It also happens that the math things are given a partial order to help
answer "what to do with loop constructs and/or cyclic definitions". A
moment of trying to re-invent denotational semantics reveals that this
is the only hard part, and so learning denotational semantics typically
takes 90% of the time on this part.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Denotational semantics for the lay man.

Gregg Reynolds-4
In reply to this post by David Sankel
On Mon, Jan 17, 2011 at 12:55 PM, David Sankel <[hidden email]> wrote:
Hello All,

I've recently had the opportunity to explain in prose what denotational semantics are to a person unfamiliar with it. I was trying to get across the concept of distilling the essence out of some problem domain. I wasn't able to get the idea across so I'm looking for some simple ways to explain it.

Does anyone know of a way to explain what's the meaning and objective of "distilling the essence" without introducing more jargon. One thing that comes to mind is how Newton's equations for gravity were a distillation of the essence of the way things fall.

A stick figure as an iconic image of a person serves as a symbol of "person"; i.e. it denotes person.  It works because of the parts and their arrangement.  Ditto for mathematical expressions: the whole is equal to the sum of its parts (and the way they are arranged.)  The individual parts (e.g. the symbol '3') are not iconic, but  the way the whole system works corresponds exactly with the way we imagine mathematical objects work.  

Google around for "correspondence theory of truth" and you might find some useful material.

It might be useful to introduce Platonism (see wikipedia.)  Also try boiling it down to compositionality, substitutability, and equality.

It might also help to draw a contrast with what is not denotational.  Denotational semantics depends essentially on the fiction of univocality, namely that every symbol has one delimited meaning: it means what it means, and nothing else.  But in fact univocality is not possible even in theory; you cannot circumscribe the the proliferation of meanings.   A simple example:  2+3 denotes (the same thing as) 5; it may also be taken to denote a computation that yields 5.  But it does not denote the energy consumed in carrying out that computation.  A horribly inefficient algorithm may have the same denotation as a very efficient one.  Another way of putting it is that denotation is about extensionality to the exclusion of intensional meanings.  Going beyond extensionality is where Category Theory enters the picture.

HTH
-Gregg Reynolds


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Denotational semantics for the lay man.

Claus Reinke
In reply to this post by Albert Y. C. Lai
>> I've recently had the opportunity to explain in prose what denotational
>> semantics are to a person unfamiliar with it. I was trying to get across
>> the concept of distilling the essence out of some problem domain. I
>> wasn't able to get the idea across so I'm looking for some simple ways
>> to explain it.

Trying to explain things to a layperson is often a useful exercise.
So here goes my attempt:

Semantics are all about relating two partially understood structures
to each other, in the hope of reaching a better understanding of both.

Often, the plan is to translate a problem systematically from a less
well-understood domain to a domain whose tools are more amenable
to solving the problem, then to translate the solution back to the
original domain (and originally, just about anything was better
understood than programming).

In the beginning, the meaning of a program was what it caused a
certain machine to do - nothing to relate to but experience. Then
there were specifications of how conforming machines were
supposed to execute a given program, so one could compare a
given machine against the specification. Mathematicians tried to
relate programs to mathematical objects (traditionally functions),
which they thought they understood better, only to learn a thing
or two about both programs and functions. Programs for concrete
machines were related to programs for abstract machines, or
concrete program runs to abstract program executions, in order
to focus only on those aspects of program executions relevant
to the problem at hand. Programs were related to conditions in
a logic, to allow reasoning about programs, or programming
from proofs. And so on..

The two main questions are always: how well do the semantics
model reality, and how well do programs express the semantics?
It helps if the mappings back and forth preserve all relevant
structure and elide any irrelevant details.

Claus

anecdotal semantics:
    "you know, once I wrote this program, and it just fried the printer.."

barometric semantics:
    I think it is getting clearer..

conventional semantics:
    usually, this means..

detonational semantics:
    what does this button do?

existential semantics:
    I'm sure it means something.

forensic semantics:
    I think this was meant to prevent..

game semantics:
    let the dice decide

historical semantics:
    I'm sure this used to work

idealistic semantics:
    this can only mean..

jovial semantics:
    oh, sure, it can mean that.

knotty semantics:
    hm, this part over here probably means..

looking glass semantics:
    when I use a program, it means just what I choose it to mean,
    neither more nor less

musical semantics:
    it don't mean a thing if it ain't got that swing.

nihilistic semantics:
    this means nothing.

optimistic semantics:
    this could mean..

probabilistic semantics:
    often, this means that..

quantum semantics:
    you can't ask what it means.

reactionary semantics:
    this means something else.

sherlockian semantics:
    since it cannot possibly mean anything else, ..

transitional semantics:
    for the moment, this means that..

utilitarian semantics:
    this means we can use it to..

venerable semantics:
    this has always meant..

weary semantics:
    <sigh> I guess that means..

xenophobic semantics:
    for us here, this means..

yogic semantics:
    we shall meditate on the meaning of this.

zen semantics:
    ah!

 

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe