Data flow refinement type inference

Author:

Pavlinovic Zvonimir1,Su Yusen2,Wies Thomas3

Affiliation:

1. New York University, USA / Google, USA

2. New York University, USA / University of Waterloo, Canada

3. New York University, USA

Abstract

Refinement types enable lightweight verification of functional programs. Algorithms for statically inferring refinement types typically work by reduction to solving systems of constrained Horn clauses extracted from typing derivations. An example is Liquid type inference, which solves the extracted constraints using predicate abstraction. However, the reduction to constraint solving in itself already signifies an abstraction of the program semantics that affects the precision of the overall static analysis. To better understand this issue, we study the type inference problem in its entirety through the lens of abstract interpretation. We propose a new refinement type system that is parametric with the choice of the abstract domain of type refinements as well as the degree to which it tracks context-sensitive control flow information. We then derive an accompanying parametric inference algorithm as an abstract interpretation of a novel data flow semantics of functional programs. We further show that the type system is sound and complete with respect to the constructed abstract semantics. Our theoretical development reveals the key abstraction steps inherent in refinement type inference algorithms. The trade-off between precision and efficiency of these abstraction steps is controlled by the parameters of the type system. Existing refinement type systems and their respective inference algorithms, such as Liquid types, are captured by concrete parameter instantiations. We have implemented our framework in a prototype tool and evaluated it for a range of new parameter instantiations (e.g., using octagons and polyhedra for expressing type refinements). The tool compares favorably against other existing tools. Our evaluation indicates that our approach can be used to systematically construct new refinement type inference algorithms that are both robust and precise.

Funder

National Science Foundation

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference67 articles.

1. An indexed model of recursive types for foundational proof-carrying code

2. Completeness of Abstract Domains for String Analysis of JavaScript Programs

3. The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems

4. Bruno Blanchet Patrick Cousot Radhia Cousot Jérôme Feret Laurent Mauborgne Antoine Miné David Monniaux and Xavier Rival. 2007. A Static Analyzer for Large Safety-Critical Software. CoRR abs/cs/0701193 ( 2007 ). arXiv:cs/0701193 http://arxiv.org/abs/cs/0701193 Bruno Blanchet Patrick Cousot Radhia Cousot Jérôme Feret Laurent Mauborgne Antoine Miné David Monniaux and Xavier Rival. 2007. A Static Analyzer for Large Safety-Critical Software. CoRR abs/cs/0701193 ( 2007 ). arXiv:cs/0701193 http://arxiv.org/abs/cs/0701193

5. ICE-Based Refinement Type Discovery for Higher-Order Functional Programs

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

1. Generative Type Inference for Python;2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE);2023-09-11

2. Higher-Order Property-Directed Reachability;Proceedings of the ACM on Programming Languages;2023-08-30

3. HFL(Z) Validity Checking for Automated Program Verification;Proceedings of the ACM on Programming Languages;2023-01-09

4. A Hoare logic style refinement types formalisation;Proceedings of the 7th ACM SIGPLAN International Workshop on Type-Driven Development;2022-09-06

5. Static inference meets deep learning;Proceedings of the 44th International Conference on Software Engineering;2022-05-21

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

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

www.globalauthorid.com

TOP

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