[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-39887-en":3,"doc-seo-39887-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},39887,2336464648322,"Aria","https://ap-avatar.wpscdn.com/avatar/2200025388227c56fec?_k=1778556882303663488",8,"Research & Report","Types and Programming Languages","Types and Programming Languages presents a structured, research-level treatment of type systems for programming languages, starting from untyped calculi and moving toward progressively richer typed frameworks. Core topics include syntax and semantics for arithmetic expressions and the lambda calculus, safety through progress and preservation, and formal foundations for simply typed systems, subtyping, recursive types, and polymorphism. The book also covers ML implementations, case studies like imperative objects and Featherweight Java, and advanced ideas such as type reconstruction, System F, existentials, and related metatheory.","Types and Programming Languages  \nTypes and Programming Languages  \nBenjamin C. Pierce  \nThe MIT Press Cambridge, Massachusetts London, England  \n©2002 Benjamin C. Pierce  \nAll rights reserved. No part of this book may be reproduced in any form by any electronic of mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher.  \nThis book was set in Lucida Bright by the author using the LATEX document preparation system.  \nPrinted and bound in the United States of America.  \nLibrary of Congress Cataloging-in-Publication Data  \nPierce, Benjamin C.  \nTypes and programming languages / Benjamin C. Pierce [p. cm](p. cm).  \nIncludes bibliographical references and index.  \nISBN 0-262-16209-1 (hc. : alk. paper)  \n1. Programming languages (Electronic computers) . I. Title.  \nQA76 .7 .P54 2002 005.13—dc21  \n2001044428  \nContents  \nPreface xiii  \n1 Introduction 1  \n1.1 Types in Computer Science 1  \n1.2 What Type Systems Are Good For 4  \n1.3 Type Systems and Language Design 9  \n1.4 Capsule History 10  \n1.5 Related Reading 12  \n2 Mathematical Preliminaries 15  \n2.1 Sets, Relations, and Functions 15  \n2.2 Ordered Sets 16  \n2.3 Sequences 18  \n2.4 Induction 19  \n2.5 Background Reading 20  \nI Untyped Systems 21  \n3 Untyped Arithmetic Expressions 23  \n3.1 Introduction 23  \n3.2 Syntax 26  \n3.3 Induction on Terms 29  \n3.4 Semantic Styles 32  \n3.5 Evaluation 34  \n3.6 Notes 43  \nvi Contents  \n4 An ML Implementation of Arithmetic Expressions 45  \n4.1 Syntax 46  \n4.2 Evaluation 47  \n4.3 The Rest of the Story 49  \n5 The Untyped Lambda-Calculus 51  \n5.1 Basics 52  \n5.2 Programming in the Lambda-Calculus 58  \n5.3 Formalities 68  \n5.4 Notes 73  \n6 Nameless Representation of Terms 75  \n6.1 Terms and Contexts 76  \n6.2 Shifting and Substitution 78  \n6.3 Evaluation 80  \n7 An ML Implementation of the Lambda-Calculus 83  \n7.1 Terms and Contexts 83  \n7.2 Shifting and Substitution 85  \n7.3 Evaluation 87  \n7.4 Notes 88  \nII Simple Types 89  \n8 Typed Arithmetic Expressions 91  \n8.1 Types 91  \n8.2 The Typing Relation 92  \n8.3 Safety = Progress + Preservation 95  \n9 Simply Typed Lambda-Calculus 99  \n9.1 Function Types 99  \n9.2 The Typing Relation 100  \n9.3 Properties of Typing 104  \n9.4 The Curry-Howard Correspondence 108  \n9.5 Erasure and Typability 109  \n9.6 Curry-Style vs. Church-Style 111  \n9.7 Notes 111  \n10 An ML Implementation of Simple Types 113  \n10. 1 Contexts 113  \n10. 2 Terms and Types 115  \n10. 3 Typechecking 115  \nContents vii  \n11 Simple Extensions 117  \n11.1 Base Types 117  \n11. 2 The Unit Type 118  \n11. 3 Derived Forms: Sequencing and Wildcards 119  \n11.4 Ascription 121  \n11. 5 Let Bindings 124  \n11. 6 Pairs 126  \n11. 7 Tuples 128  \n11. 8 Records 129  \n11.9 Sums 132  \n11. 10 Variants 136  \n11. 11 General Recursion 142  \n11. 12 Lists 146  \n12 Normalization 149  \n12. 1 Normalization for Simple Types 149  \n12. 2 Notes 152  \n13 References 153  \n13. 1 Introduction 153  \n13.2 Typing 159  \n13. 3 Evaluation 159  \n13.4 Store Typings 162  \n13. 5 Safety 165  \n13. 6 Notes 170  \n14 Exceptions 171  \n14.1 Raising Exceptions 172  \n14. 2 Handling Exceptions 173  \n14. 3 Exceptions Carrying Values 175  \nIII Subtyping 179  \n15 Subtyping 181  \n15. 1 Subsumption 181  \n15. 2 The Subtype Relation 182  \n15. 3 Properties of Subtyping and Typing 188  \n15.4 The Top and Bottom Types 191  \n15. 5 Subtyping and Other Features 193  \n15. 6 Coercion Semantics for Subtyping 200  \n15. 7 Intersection and Union Types 206  \n15. 8 Notes 207  \nviii Contents  \n16 Metatheory of Subtyping 209  \n16. 1 Algorithmic Subtyping 210  \n16. 2 Algorithmic Typing 213  \n16. 3 Joins and Meets 218  \n16.4 Algorithmic Typing and the Bottom Type 220  \n17 An ML Implementation of Subtyping 221  \n17.1 Syntax 221  \n17. 2 Subtyping 221  \n17.3 Typing 222  \n18 Case Study: Imperative Objects 225  \n18. 1 What Is Object-Oriented Programming? 225  \n18. 2 Objects 228  \n18. 3 Object Generators 229  \n18.4 Subtyping 229  \n18. 5 Grouping Instance Va","cbCaimFZbgb3Qf9y","https://ap.wps.com/l/cbCaimFZbgb3Qf9y","pdf",1896475,3,1,645,"English","en",105,"# Preface\n# Introduction\n## Types in Computer Science\n## What Type Systems Are Good For\n## Type Systems and Language Design\n# Untyped Systems\n## Untyped Arithmetic Expressions\n## An ML Implementation of Arithmetic Expressions\n## The Untyped Lambda-Calculus\n## Nameless Representation of Terms\n## An ML Implementation of the Lambda-Calculus\n# Simple Types\n## Typed Arithmetic Expressions\n## Simply Typed Lambda-Calculus\n## An ML Implementation of Simple Types\n## Simple Extensions\n## Normalization\n# Subtyping\n## Subtyping\n## Metatheory of Subtyping\n## An ML Implementation of Subtyping\n## Case Study: Imperative Objects\n## Case Study: Featherweight Java\n# Recursive Types\n## Recursive Types\n## Metatheory of Recursive Types\n# Polymorphism\n## Type Reconstruction\n## Universal Types\n## Existential Types","[{\"question\":\"What does the book cover in its foundational chapters?\",\"answer\":\"It develops the foundations of type systems by presenting untyped arithmetic expressions and the untyped lambda calculus, including semantic styles, evaluation, and ML implementations, before moving into typed formalisms.\"},{\"question\":\"How does the book establish correctness for simple typed systems?\",\"answer\":\"It presents safety as progress plus preservation, connecting typing rules with evaluation behavior to guarantee that well-typed programs behave as expected.\"},{\"question\":\"What are the main advanced themes beyond simple types?\",\"answer\":\"The book extends the theory to subtyping, recursive types, and polymorphism, including metatheory, algorithmic approaches, and concrete case studies such as imperative objects and Featherweight Java.\"}]",1783087703,1625,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"types-and-programming-languages","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/research-report/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/types-and-programming-languages/39887/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-18","2026-07-03",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What does the book cover in its foundational chapters?","Question",{"text":75,"@type":76},"It develops the foundations of type systems by presenting untyped arithmetic expressions and the untyped lambda calculus, including semantic styles, evaluation, and ML implementations, before moving into typed formalisms.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does the book establish correctness for simple typed systems?",{"text":80,"@type":76},"It presents safety as progress plus preservation, connecting typing rules with evaluation behavior to guarantee that well-typed programs behave as expected.",{"name":82,"@type":73,"acceptedAnswer":83},"What are the main advanced themes beyond simple types?",{"text":84,"@type":76},"The book extends the theory to subtyping, recursive types, and polymorphism, including metatheory, algorithmic approaches, and concrete case studies such as imperative objects and Featherweight Java.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]