Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1486

Re: Semantics, opt in Semantics

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end
From Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups comp.compilers
Subject Re: Semantics, opt in Semantics
Date Sun, 18 Jan 2015 10:03:47 -0500
Organization A noiseless patient Spider
Lines 29
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <15-01-029@comp.compilers> (permalink)
References <15-01-013@comp.compilers> <15-01-023@comp.compilers>
NNTP-Posting-Host news.iecc.com
Mime-Version 1.0
Content-Type text/plain
X-Trace miucha.iecc.com 1421608120 18626 2001:470:1f07:1126:0:676f:7373:6970 (18 Jan 2015 19:08:40 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Sun, 18 Jan 2015 19:08:40 +0000 (UTC)
Keywords semantics
Posted-Date 18 Jan 2015 14:08:40 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:1486

Show key headers only | View raw


> 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


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