1 / 13

15-814 Type Refinements

15-814 Type Refinements. Robert Harper Fall Semester, 2003. Type Refinements. Goal : increase expressive power of type systems. Languages, not tools. Checkable, live with the code. A little goes a long way. Methods : refinement checking, constraints, polymorphism, sub-structural logics.

Download Presentation

15-814 Type Refinements

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 15-814 Type Refinements Robert Harper Fall Semester, 2003

  2. Type Refinements • Goal: increase expressive power of type systems. • Languages, not tools. • Checkable, live with the code. • A little goes a long way. • Methods: refinement checking, constraints, polymorphism, sub-structural logics. 15-814 Type Refinements

  3. Course Structure • This is a graduate research seminar. • Must have taken PL core or equivalent. • This is not a lecture course! • Must actively participate. • I know only slightly more than you do (in most cases, even less in some cases). • You must present one or two lectures. • Scheduled as we go along. • Must prepare slides in advance. 15-814 Type Refinements

  4. Readings, Schedule • Course page:http://www.cs.cmu.edu/~rwh/courses/refinements. • Reading list: • An attempt to find some interesting connected components. • I expect that you will have to chase down further references. 15-814 Type Refinements

  5. Readings, Schedule • Schedule: • First cut allocation on web page. • Will adjust as we go along. • I need volunteers immediately for the next two lectures (after mine). • Expect the schedule to slip. • Hard to predict how long things will take. 15-814 Type Refinements

  6. Background on Types • Ontological type discipline. • Aka Church-style, or endogenous, type theory. • Type structure determines the language and constrains the interpretation. • Eg, cbv or cbn for simple types. • Closely related to systems of logic and classes of categories. • E.g., implicational logic, CCC’s. 15-814 Type Refinements

  7. Background on Types • Epistemological type discipline. • Aka Curry-style, or exogenous. • Types describe operational behavior of programs in a pre-existing language. • Classically, types are sets of lambda terms closed under beta-reduction. • Type structure closer to programming logics. • Eg, intersection and union types, sub-structural reasoning. 15-814 Type Refinements

  8. Background on Types • These are not incompatible! • Church-style type system determines language. • D  D! D for untyped -calculus • Curry-style type system provides an exogenous logic for this language • M 2 A! B Æ C! D 15-814 Type Refinements

  9. Background on Types • Logical relations: each type determines a property possessed by all expressions of that type. • Intuitively, the universal property for that type. • Defined by induction on type structure. • Foundation for type safety: well-formed implies safe execution. 15-814 Type Refinements

  10. Background on Types • Classically, Curry-style type systems are concerned with I/O behavior. • Types describe behavior under some interpretation. • Eg, succ 2 ev ! od Æ od ! ev • More recently, emphasis is placed on state change. • Eg, adherence to locking protocols 15-814 Type Refinements

  11. Main Topics • Refinement types. • Starting with Freeman/Pfenning and Yardeni/Shapiro. • Continuing with Davies, Dunfield, others. • Regular tree grammars. • Central techniques for refinement checking. 15-814 Type Refinements

  12. Main Topics • Dependent Refinements • Constraint-based value range invariants. • eg, x in {0,…,10} • Type checking reduces to constraint solving. • Constraint Domains • Best developed: integers. 15-814 Type Refinements

  13. Main Topics • Soft Typing • Related to type refinements. • Start with a un(i)typed language. • Consider types as predicates over untyped domain. • Effects Systems • Extend type systems to reason about state change. 15-814 Type Refinements

More Related