Extending Liquid Types to Arrays
-
Published:2020-04-30
Issue:2
Volume:21
Page:1-41
-
ISSN:1529-3785
-
Container-title:ACM Transactions on Computational Logic
-
language:en
-
Short-container-title:ACM Trans. Comput. Logic
Author:
Montenegro Manuel1ORCID,
Nieva Susana1,
Peña Ricardo1ORCID,
Segura Clara1
Affiliation:
1. Universidad Complutense de Madrid, Madrid, Spain
Abstract
A liquid type is an ordinary Hindley-Milner type annotated with a logical predicate that states the properties satisfied by the elements of that type. Liquid types are a powerful tool for program verification, as programmers can use them to specify pre- and post conditions of their programs, whereas the predicates of intermediate variables and auxiliary functions are inferred automatically. Type inference is feasible in this context, as the logical predicates within liquid types are constrained to a quantifier-free logic to maintain decidability.
In this article, we extend liquid types by allowing them to contain quantified properties on arrays so that they can be used to infer invariants on array-related programs (e.g., implementations of sorting algorithms). Although quantified logic is, in general, undecidable, we restrict properties on arrays to a decidable subset introduced by Bradley et al. We describe in detail the extended type system, the verification condition generator, and the iterative weakening algorithm for inferring invariants. After proving the correctness and completeness of these two algorithms, we apply them to find invariants on a set of algorithms involving array manipulations.
Funder
EIE Funds of the EU
Comunidad de Madrid as part of the program
Spanish Ministry of Economy and Competitiveness, State Research Agency, and the European Regional Development Fund
Publisher
Association for Computing Machinery (ACM)
Subject
Computational Mathematics,Logic,General Computer Science,Theoretical Computer Science
Reference38 articles.
1. Lecture Notes in Computer Science;Bakst Alexander
2. Lecture Notes in Computer Science;Barnett Michael
Cited by
1 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Grammar Inference for Ad Hoc Parsers;Companion Proceedings of the 2022 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity;2022-11-29