Graduality from Embedding-projection Pairs (Extended Version)
Max S. New, Amal Ahmed

TL;DR
This paper introduces a semantic reformulation of the gradual guarantee called graduality, using embedding-projection pairs to analyze type dynamism and prove properties of gradually typed languages.
Contribution
It develops a novel logical relation based on embedding-projection pairs to prove graduality, linking type dynamism to ep pairs and providing a new semantic foundation.
Findings
Embedding-projection pairs characterize casts between types of different dynamism.
A new logical relation for proving graduality is introduced.
Type dynamism rules are interpreted as compositional constructions on ep pairs.
Abstract
Gradually typed languages allow statically typed and dynamically typed code to interact while maintaining benefits of both styles. The key to reasoning about these mixed programs is Siek-Vitousek-Cimini-Boyland's (dynamic) gradual guarantee, which says that giving components of a program more precise types only adds runtime type checking, and does not otherwise change behavior. In this paper, we give a semantic reformulation of the gradual guarantee called graduality. We change the name to promote the analogy that graduality is to gradual typing what parametricity is to polymorphism. Each gives a local-to-global, syntactic-to-semantic reasoning principle that is formulated in terms of a kind of observational approximation. Utilizing the analogy, we develop a novel logical relation for proving graduality. We show that embedding-projection pairs (ep pairs) are to graduality what…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Model-Driven Software Engineering Techniques · Software Engineering Research
