Foundations of Computing
Michael Garey and Albert Meyer, editors
Complexity Issues in VLSI: Optimal Layouts for the Shuffle-Exchange Graph and Other
Networks, Frank Thomson Leighton, 1983
Equational Logic as a Programming Language, Michael J. 0 'Donnell, 1985
General Theory of Deductive Systems and Its Applications, S. Yu Maslov, 1987
Resource Allocation Problems: Algorithmic Approaches, Toshihide Ibaraki and Naoki
Katoh, 1988
Algebraic Theory of Processes, Matthew Hennessy, 1988
PX: A Computational Logic, Susumu Hayashi and Hiroshi Nakano, 1989
The Stable Marriage Problem: Structure and Algorithms, Dan Gusfield and Robert
Irving, 1989
Realistic Compiler Generation, Peter Lee, 1989
Single-Layer Wire Routing and Compaction,F. Miller Maley, 1990
Basic Category Theory for Computer Scientists, Benjamin C. Pierce, 1991
Categories, Types, and Structures: An Introduction to Category Theory for the Working
Computer Scientist, Andrea Asperti and Giuseppe Longo, 1991
Semantics of Programming Languages: Structures and Techniques, Carl A. Gunter, 1992
The Formal Semantics of Programming Languages: An Introduction, Glynn Winskel,
1993
The Formal Semantics of Programming Languages
An Introduction
Glynn Winskel
The MIT Press
Cambridge, Massachusetts
London, England
Second printing, 1994
©1993 Massachusetts Institute of Technology
All rights reserved. No part ofthis book may be reproduced in any form by any electronic
or mechanical means (including photocopying, recording, or information storage and
retrieval) without permission in writing from the publisher.
This book was printed and bound in the United States of America.
Library of Congress Cataloging-in-Publication Data
Winskel, G. (Glynn)
The formal semantics of programming languages : an introduction
Glynn Winskel.
p.
cm. -
(Foundations of computing)
Includes bibliographical references and index.
ISBN 0-262-23169-7
1. Programming languages (Electronic computers )-Semantics.
II. Series.
1. Title.
QA76.7.W555
005.13'1--dc20
1993
92-36718
CIP
To Kirsten, Sofie and Stine
Contents
Series foreword
Preface
1 Basic set theory
1.1 Logical notation
1.2 Sets
1.2.1 Sets and properties
1.2.2 Some important sets
1.2.3 Constructions on sets
1.2.4 The axiom of foundation
1.3 Relations and functions
1.3.1 Lambda notation
1.3.2 Composing relations and functions
1.3.3 Direct and inverse image of a relation
1.3.4 Equivalence relations
1.4 FUrther reading
2
Introduction to operational semantics
IMP-a simple imperative language
2.1
2.2 The evaluation of arithmetic expressions
2.3 The evaluation of boolean expressions
2.4 The execution of commands
2.5 A simple proof
2.6 Alternative semantics
2.7 FUrther reading
3
Some principles of induction
3.1 Mathematical induction
3.2 Structural induction
3.3 Well-founded induction
3.4
Induction on derivations
3.5 Definitions by induction
xiii
xv
1
1
2
3
3
4
6
6
7
7
9
9
10
11
11
13
17
19
20
24
26
27
27
28
31
35
39