Polymorphic Manifest Contracts, Revised and Resolved

Author:

Sekiyama Taro1,Igarashi Atsushi2,Greenberg Michael3

Affiliation:

1. Kyoto University

2. Kyoto University, Kyoto, Japan

3. Pomona College, CA, USA

Abstract

Manifest contracts track precise program properties by refining types with predicates—for example, { x :Int∣ x > 0} denotes the positive integers. Contracts and polymorphism make a natural combination: programmers can give strong contracts to abstract types, precisely stating pre- and post conditions while hiding implementation details— for instance, an abstract type of stacks might specify that the pop operation has input type { x :α Stack ∣ not (empty x )}. This article studies a polymorphic calculus with manifest contracts and establishes fundamental properties including type soundness and relational parametricity. Indeed, this is not the first work on polymorphic manifest contracts, but existing calculi are not very satisfactory. Gronski et al. developed the S age language, which introduces polymorphism through the Type:Type discipline, but they do not study parametricity. Some authors of this article have produced two separate works: Belo et al. [2011] and Greenberg [2013] studied polymorphic manifest contracts and parametricity, but their calculi have metatheoretical problems in the type conversion relations. Indeed, they depend on a few conjectures, which turn out to be false. Our calculus is the first polymorphic manifest calculus with parametricity, depending on no conjectures—it resolves the issues in prior calculi with delayed substitution on casts.

Funder

JSPS Grant-in-Aid for Scientific Research

MEXT of Japan

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Cited by 10 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Mechanizing Refinement Types;Proceedings of the ACM on Programming Languages;2024-01-05

2. Focusing on Refinement Typing;ACM Transactions on Programming Languages and Systems;2023-12-20

3. How to safely use extensionality in Liquid Haskell;Proceedings of the 15th ACM SIGPLAN International Haskell Symposium;2022-09-06

4. A dependently typed calculus with polymorphic subtyping;Science of Computer Programming;2021-08

5. Gradual typing: a new perspective;Proceedings of the ACM on Programming Languages;2019-01-02

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3