Reasoning about Polymorphic Manifest Contracts
Taro Sekiyama, Atsushi Igarashi

TL;DR
This paper develops a simplified polymorphic manifest contract calculus, proves its correctness properties, and justifies program transformations that optimize contract checking, advancing the theoretical foundations of hybrid contract verification.
Contribution
It introduces a simpler polymorphic manifest contract calculus and proves key properties like upcast elimination and contextual equivalence, supporting static contract verification techniques.
Findings
Proves upcast elimination holds for the new calculus
Justifies transformations like selfification and static cast decomposition
Defines semityped logical relations for reasoning about ill-typed terms
Abstract
Manifest contract calculi, which integrate cast-based dynamic contract checking and refinement type systems, have been studied as foundations for hybrid contract checking. In this article, we study techniques to reasoning about a polymorphic manifest contract calculus, including a few program transformations related to static contract verification. We first define a polymorphic manifest contract calculus , which is much simpler than a previously studied one with delayed substitution, and a logical relation for it and prove that the logical relation is sound with respect to contextual equivalence. Next, we show that the upcast elimination property, which has been studied as correctness of subtyping-based static cast verification, holds for . More specifically, we give a subtyping relation (which is not part of the calculus) for types and…
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 · Formal Methods in Verification · Logic, Reasoning, and Knowledge
