Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1486
| From | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Semantics, opt in Semantics |
| Date | 2015-01-18 10:03 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <15-01-029@comp.compilers> (permalink) |
| References | <15-01-013@comp.compilers> <15-01-023@comp.compilers> |
> 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
step").
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).
Stefan
Back to comp.compilers | Previous | Next — Previous in thread | Find similar | Unroll thread
Semantics, opt in Semantics Seima Rao <seimarao@gmail.com> - 2015-01-15 17:42 +0530
Re: Semantics, opt in Semantics rpw3@rpw3.org (Rob Warnock) - 2015-01-16 16:11 +0000
Re: Semantics, opt in Semantics Kaz Kylheku <kaz@kylheku.com> - 2015-01-16 16:28 +0000
Re: Semantics, opt in Semantics glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-01-17 18:42 +0000
Re: Semantics, opt in Semantics Hans Aberg <haberg-news@telia.com> - 2015-01-16 18:20 +0100
Re: Semantics, opt in Semantics wclodius@earthlink.net (William Clodius) - 2015-01-16 12:22 -0700
Re: Semantics, opt in Semantics Stefan Monnier <monnier@iro.umontreal.ca> - 2015-01-18 10:03 -0500
csiph-web