ePrints@IIScePrints@IISc Home | About | Browse | Latest Additions | Advanced Search | Contact | Help

Checking observational purity of procedures

Arora, H and Komondoor, R and Ramalingam, G (2019) Checking observational purity of procedures. In: 22nd International Conference on Fundamental Approaches to Software Engineering, FASE 2019, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2019, 6 April 2019 - 11 April 2019, Prague, pp. 228-243.

22ndint_FASE 2019_228-243.pdf - Published Version

Download (4MB) | Preview
Official URL: https://doi.org/10.1007/978-3-030-16722-6_13


Verifying whether a procedure is observationally pure (that is, it always returns the same result for the same input argument) is challenging when the procedure uses mutable (private) global variables, e.g., for memoization, and when the procedure is recursive. We present a deductive verification approach for this problem. Our approach encodes the procedure’s code as a logical formula, with recursive calls being modeled using a mathematical function symbol assuming that the procedure is observationally pure. Then, a theorem prover is invoked to check whether this logical formula agrees with the function symbol referred to above in terms of input-output behavior for all arguments. We prove the soundness of this approach. We then present a conservative approximation of the first approach that reduces the verification problem to one of checking whether a quantifier-free formula is satisfiable and prove the soundness of the second approach. We evaluate our approach on a set of realistic examples, using the Boogie intermediate language and theorem prover. Our evaluation shows that the invariants are easy to construct manually, and that our approach is effective at verifying observationally pure procedures.

Item Type: Conference Paper
Publication: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Publisher: Springer Verlag
Additional Information: The copyright for this article belongs to the Author(s).
Keywords: Function evaluation; Functions; Theorem proving, Deductive verification; Function symbols; Global variables; Input-output behavior; Intermediate languages; Logical formulas; Mathematical functions; Verification problems, Software engineering
Department/Centre: Division of Electrical Sciences > Computer Science & Automation
Date Deposited: 28 Oct 2022 06:05
Last Modified: 28 Oct 2022 06:05
URI: https://eprints.iisc.ac.in/id/eprint/77608

Actions (login required)

View Item View Item