Affiliation:
1. Northeastern University, Boston, MA, USA
Abstract
We present a new approach to automated reasoning about higher-order programs by extending symbolic execution to use behavioral contracts as symbolic values, thus enabling symbolic approximation of higher-order behavior.
Our approach is based on the idea of an abstract reduction semantics that gives an operational semantics to programs with both concrete and symbolic components. Symbolic components are approximated by their contract and our semantics gives an operational interpretation of contracts-as-values. The result is an executable semantics that soundly predicts program behavior, including contract failures, for all possible instantiations of symbolic components. We show that our approach scales to an expressive language of contracts including arbitrary programs embedded as predicates, dependent function contracts, and recursive contracts. Supporting this rich language of specifications leads to powerful symbolic reasoning using existing program constructs.
We then apply our approach to produce a verifier for contract correctness of components, including a sound and computable approximation to our semantics that facilitates fully automated contract verification. Our implementation is capable of verifying contracts expressed in existing programs, and of justifying contract-elimination optimizations.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
21 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. On Model-Checking Higher-Order Effectful Programs;Proceedings of the ACM on Programming Languages;2024-01-05
2. Summary-Based Compositional Analysis for Soft Contract Verification;2022 IEEE 22nd International Working Conference on Source Code Analysis and Manipulation (SCAM);2022-10
3. Sound and Complete Concolic Testing for Higher-order Functions;Programming Languages and Systems;2021
4. Higher-order demand-driven symbolic evaluation;Proceedings of the ACM on Programming Languages;2020-08-02
5. Automatic and scalable detection of logical errors in functional programming assignments;Proceedings of the ACM on Programming Languages;2019-10-10