1 / 16

Roadmap to Atsushi Ohori’s “ A Simple Semantics for ML Polymorphism ”

Roadmap to Atsushi Ohori’s “ A Simple Semantics for ML Polymorphism ”. Bill Harrison. ML polymorphism. Can apply polymorphic term for any type a. Know what it denotes at any instance…. …from the semantics of simply-typed - calculus. Ohori’s idea: simple semantics.

newton
Télécharger la présentation

Roadmap to Atsushi Ohori’s “ A Simple Semantics for ML Polymorphism ”

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. Roadmap to Atsushi Ohori’s“A Simple Semantics for ML Polymorphism” Bill Harrison

  2. ML polymorphism Can apply polymorphic term for any type a Know what it denotes at any instance… …from the semantics of simply-typed -calculus

  3. Ohori’s idea: simple semantics Starting from the semantics of STLC: …extend it to ML-like languages from simply-typed -calculus semantics

  4. Simple vs ? • An alternative [DamasMilner82] is to model type quantifiers with type abstraction as in System F[Girard,Reynolds] • However, this has drawbacks as the denotational semantics of System F is, well, hairy[GirardLafontTaylor]

  5. Semantics of Core-ML Semantics of Ground Core-ML Semantics Simply-typed T Overview of Ohori’s approach Introduce two languages • Core-ML: polymorphic, implicitly-typed -calculus • T: simply & explicitly-typed -calculus with “textbook” denotational • semantics …and define Core-ML in terms of T

  6. Today • Core-ML: syntactic matters • T: its syntax & semantics • In terms of frame models • Relating Core-ML to T • “Roadmap’’ handout contains the technical minutiae of the paper • Laid out in a more logical manner • Ohori’s paper is rich with material I won’t discuss today: • Comparisons with [Milner78,DamasMilner82], full abstraction, extensions to recursive terms & datatypes

  7. Core-ML types Types & Type Schemes Type assignments Type assignment schemes Substitutions

  8. Core-ML terms Raw terms Typings any ground judgment derivable in: Core-ML terms are typing schemes

  9. Type system  Note the different “” T terms Preterms explicit typing

  10. Background: Frame Models

  11. Denotational semantics of T This is a completely conventional, “textbook” semantics

  12. Relating Core-ML to T Translation from Core-ML typings to T …with the following coherence property: * Consequence of Theorem 6, Section 3.2, of Ohori89

  13. Just two more auxiliary definitions (I promise) The set of admissible type assignments under  is E.g., The set of types associated with a term is: N.b.,

  14. Denotational Semantics of Core-ML Terms: Typings:

  15. Relevance to Haskell98 (?!) where

  16. Conclusions • Simple & intuitive: make a polymorphic term denote the set of its ground instance denotations • Avoids the pitfalls of “backwards” explanations: ML polymorphism is simpler than System F, so its semantics should be simpler

More Related