Gradual typing has emerged as the tonic for programmers wanting a mixture of static and dynamic typing, hoping to achieve the best of both. Sound gradual typing is the most potent brew, providing static type-checking and dynamic assertions. Contracts provide a lightweight form of gradual typing as they can be implemented as a library, rather than requiring a gradual type system.
Intersection and union types are well suited to dynamic languages: intersection encodes overloaded functions; union encodes uncertain data arising from branching code. We extend the untyped lambda calculus with contracts for monitoring higher-order intersection and union types, giving a uniform treatment to both. Each operator requires a single reduction rule that does not depend on the constituent types, or the context of the operator, unlike existing work.
We present a new method for defining contract satisfaction based on blame behaviour. A value positively satisfies a type if applying a contract of that type can never elicit positive blame. A continuation negatively satisfies a type if applying a contract of that type can never elicit negative blame. We supplement our definition of satisfaction with a series of monitoring properties that satisfying values and continuations should have. These properties ensure that the semantics of contracts are in alignment with the static types they represent.
Thu 8 NovDisplayed time zone: Guadalajara, Mexico City, Monterrey change
10:30 - 12:00 | |||
10:30 22mTalk | Horn-ICE Learning for Synthesizing Invariants and Contracts OOPSLA Deepak D'Souza , Ezudheen P , Pranav Garg University of Illinois at Urbana-Champaign, Daniel Neider Max Planck Institute for Software Systems, P. Madhusudan University of Illinois at Urbana-Champaign | ||
10:52 22mTalk | Gradual Liquid Type Inference OOPSLA Niki Vazou IMDEA Software Institute, Éric Tanter University of Chile & Inria Paris, David Van Horn University of Maryland, USA | ||
11:15 22mTalk | Collapsible Contracts: Fixing a Pathology of Gradual Typing OOPSLA Daniel Feltey Northwestern University, USA, Ben Greenman Northeastern University, USA, Christophe Scholliers Universiteit Gent, Belgium, Robert Bruce Findler Northwestern University, USA, Vincent St-Amour Northwestern University | ||
11:37 22mTalk | The Root Cause of Blame: Contracts for Intersection and Union Types OOPSLA Jack Williams University of Edinburgh, UK, J. Garrett Morris University of Kansas, USA, Philip Wadler University of Edinburgh, UK |