Re: Semantics, opt in Semantics

Stefan Monnier <>
Sun, 18 Jan 2015 10:03:47 -0500

          From comp.compilers

Related articles
Semantics, opt in Semantics (Seima Rao) (2015-01-15)
Re: Semantics, opt in Semantics (2015-01-16)
Re: Semantics, opt in Semantics (Kaz Kylheku) (2015-01-16)
Re: Semantics, opt in Semantics (Hans Aberg) (2015-01-16)
Re: Semantics, opt in Semantics (2015-01-16)
Re: Semantics, opt in Semantics (glen herrmannsfeldt) (2015-01-17)
Re: Semantics, opt in Semantics (Stefan Monnier) (2015-01-18)
| List of all articles for this month |

From: Stefan Monnier <>
Newsgroups: comp.compilers
Date: Sun, 18 Jan 2015 10:03:47 -0500
Organization: A noiseless patient Spider
References: 15-01-013 15-01-023
Keywords: semantics
Posted-Date: 18 Jan 2015 14:08:40 EST

> As to the first question the complexity of semanticsx has resulted in a
> large variety of notations: the van Wijngaarden two level grammar, the
> Vienna Definition Language/Vienna Development Method, Denotational
> semantics, attribute grammars,etc.

The most commonly used formalism nowadays in the programming languages
community is operational semantics (either "small step" or "big

While denotational semantics can be thought of as "compiling the
language to set-theory" (or to some kind of pure lambda calculus),
operational semantics looks more like an interpreter.

Its popularity is probably largely due to the fact that it's defined
in 2 steps: first define the "machine" you use to represent the
intermediate states, and then define the transition rules. So you can
define the machine according to your needs.

As for "optional", I'm not sure what you (the OP) meant by that.
Already in the syntax case, it's not clear whether you meant "optional
syntax" to mean "syntax which the implementation can choose to support
or not" or "syntax which the user can decide to use or not". In the
BNF usually you get the second rather than the first, but the
equivalent for semantics ("semantics which the user can choose to use
or not") is generally implicit (which is a common reason why compilers
can't perform particular optimizations or need sophisticated analyses
before they can).


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.