Practical Foundations for Programming Languages
This text develops a comprehensive theory of programming languages based ontype systems and structural operational semantics. Language concepts are preciselydefined by their static and dynamic semantics, presenting the essential tools bothintuitively and rigorously while relying on only elementary mathematics. Thesetools are used to analyze and prove properties of languages and provide theframework for combining and comparing language features. The broad range ofconcepts includes fundamental data types such as sums and products, polymorphicand abstract types, dynamic typing, dynamic dispatch, subtyping and refinementtypes, symbols and dynamic classification, parallelism and cost semantics, andconcurrency and distribution. The methods are directly applicable to languageimplementation, to the development of logics for reasoning about programs, and tothe formal verification language properties such as type safety.
This thoroughly revised second edition includes exercises at the end of nearlyevery chapter and a new chapter on type refinements.
Robert Harper is a professor in the Computer Science Department at CarnegieMellon University. His main research interest is in the application of type theory tothe design and implementation of programming languages and to the mechanizationof their meta-theory. Harper is a recipient of the Allen Newell Medal for ResearchExcellence and the Herbert A. Simon Award for Teaching Excellence, and is an Association for Computing Machinery Fellow.
32 Avenue of the Americas, New York, NY 10013
Cambridge University Press is part of the University of Cambridge.
It furthers the Universitys mission by disseminating knowledge in the pursuit of education, learning, and research at the highest international levels of excellence.
www.cambridge.org
Information on this title: www.cambridge.org/9781107150300
Robert Harper 2016
This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press.
First published 2016
Printed in the United States of America
A catalog record for this publication is available from the British Library.
Library of Congress Cataloging in Publication Data
Names: Harper, Robert, 1957
Title: Practical foundations for programming languages / Robert Harper, Carnegie Mellon University.
Description: Second edition. | New York NY : Cambridge University Press, 2016. | Includes bibliographical references and index.
Identifiers: LCCN 2015045380 | ISBN 9781107150300 (alk. paper)
Subjects: LCSH: Programming languages (Electronic computers)
Classification: LCC QA76.7 .H377 2016 | DDC 005.13dc23
LC record available at http://lccn.loc.gov/2015045380
ISBN 978-1-107-15030-0 Hardback
Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party Internet Web sites referred to in this publication and does not guarantee that any content on such Web sites is, or will remain, accurate or appropriate.
Writing the second edition to a textbook incurs the same risk as building the secondversion of a software system. It is difficult to make substantive improvements, whileavoiding the temptation to overburden and undermine the foundation on which one isbuilding. With the hope of avoiding the second system effect, I have sought to makecorrections, revisions, expansions, and deletions that improve the coherence of thedevelopment, remove some topics that distract from the main themes, add new topicsthat were omitted from the first edition, and include exercises for almost everychapter.