Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456 Syntax and Semantics
In this lecture, we shall use natural semantics to give a formal
semantics to two central notions in all modern programming languages,
viz. blocks and procedures. A central topic of this lecture is that of
scope rules. In particular, we shall focus on the notions of
dynamic and static binding for both variables and
procedures, and examine three possible combinations of scope
rules. These are:
dynamic scope for variables and procedures;
dynamic scope for variables, but static scope for procedures;
static scope for variables and procedures.
In connection with our discussion of these scope rules, we shall
introduce a new important model for program states, viz. the
environment-store model. This model will allow us to describe
the aforementioned scope rules by telling us what bindings for
procedures and variables we need to use to evaluate the final state of
a program execution.
The environment-store model is the theoretical concept that underlies
important notions in compiler construction. An environment corresponds
precisely to the symbol tables used in compiler construction.
Time and Location
Thursday, 12 December, 2002 at 8:15 in room 331.
Reading Material
Primary Reading: Pages 50-56 (excluded the section on
Static Scope for Procedures) in Section 2.5 of Hanne Riis Nielson, Flemming Nielson: Semantics with
Applications: A Formal Introduction. Wiley Professional
Computing, (240 pages, ISBN 0 471 92980 8), Wiley, 1992. (postscript)
[Important] Complete the exercises you have left over
from the previous exercise session.
Exercises 2.37(*), 2.38 and 2.39 in Hanne Riis Nielson, Flemming Nielson: Semantics with
Applications: A Formal Introduction. Wiley Professional
Computing, (240 pages, ISBN 0 471 92980 8), Wiley, 1992.