Abstract
Various program verification problems for functional programs can be reduced to the validity checking problem for formulas of a fixpoint logic. Recently, Kobayashi et al. have shown that the unfold/fold transformation originally developed for logic programming can be extended and applied to prove the validity of fixpoint logic formulas. In the present paper, we refine their unfold/fold transformation, so that each predicate can be unfolded a different number of times in an asynchronous manner. Inspired by the work of Lee et al. on size change termination, we use a variant of size change graphs to find an appropriate number of unfoldings of each predicate. We have implemented an unfold/fold transformation tool based on the proposed method, and evaluated its effectiveness.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Actually, because of the negative occurrences of \(\mathrm {Div6}\), we have to check some sanity conditions: see [5] for the sanity condition and the reason why \(=_\mu \) can be replaced with \(=_\nu \).
- 2.
In the original paper on size change termination [8], each label is called a size change graph; here we call the whole graph a size change graph.
- 3.
Similarly for the case \(\varphi \equiv X_1(t_{1,1},\ldots ,t_{1,k_1})\wedge \cdots \wedge X_n(t_{n,1},\ldots ,t_{n,k_n})\).
References
Asada, K., Sato, R., Kobayashi, N.: Verifying relational properties of functional programs by first-order refinement. Sci. Comput. Program. 137, 2–62 (2017). https://doi.org/10.1016/j.scico.2016.02.007
Brotherston, J., Simpson, A.: Sequent calculi for induction and infinite descent. J. Log. Comput. 21(6), 1177–1216 (2011)
De Angelis, E., Fioravanti, F., Pettorossi, A., Proietti, M.: Solving Horn clauses on inductive data types without induction. TPLP 18(3–4), 452–469 (2018). https://doi.org/10.1017/S1471068418000157
Hu, Z., Iwasaki, H., Takeichi, M., Takano, A.: Tupling calculation eliminates multiple data traversals. In: Proceedings of the ICFP, pp. 164–175 (1997)
Kobayashi, N., Fedyukovich, G., Gupta, A.: Fold/unfold transformations for fixpoint logic. In: TACAS 2020. LNCS, vol. 12079, pp. 195–214. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45237-7_12
Kobayashi, N., Nishikawa, T., Igarashi, A., Unno, H.: Temporal verification of programs via first-order fixpoint logic. In: Chang, B.-Y.E. (ed.) SAS 2019. LNCS, vol. 11822, pp. 413–436. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-32304-2_20
Kurita, T., Aoto, T.: Automated proofs of horn-clause inductive theorems for conditional term rewriting systems. Comput. Softw. 36(2), 261–275 (2019). https://doi.org/10.11309/jssst.36.2_61. (in Japanese)
Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: Hankin, C., Schmidt, D. (eds.) Conference Record of POPL 2001: The 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, London, UK, 17–19 January 2001, pp. 81–92. ACM (2001). https://doi.org/10.1145/360204.360210
de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Seki, H.: On inductive and coinductive proofs via unfold/fold transformations. In: De Schreye, D. (ed.) LOPSTR 2009. LNCS, vol. 6037, pp. 82–96. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-12592-8_7
Seki, H.: Proving properties of co-logic programs by unfold/fold transformations. In: Vidal, G. (ed.) LOPSTR 2011. LNCS, vol. 7225, pp. 205–220. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32211-2_14
Tamaki, H., Sato, T.: Unfold/fold transformation of logic programs. In: Tärnlund, S. (ed.) Proceedings of the Second International Logic Programming Conference, Uppsala University, Uppsala, Sweden, 2–6 July 1984, pp. 127–138. Uppsala University (1984)
Unno, H., Torii, S., Sakamoto, H.: Automating induction for solving horn clauses. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10427, pp. 571–591. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63390-9_30
Acknowledgments
We would like to thank anonymous referees for useful comments. This work was supported by JSPS KAKENHI Grant Numbers JP20H05703.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Faisal Al Ameen, M., Kobayashi, N., Sato, R. (2022). Asynchronous Unfold/Fold Transformation for Fixpoint Logic. In: Hanus, M., Igarashi, A. (eds) Functional and Logic Programming. FLOPS 2022. Lecture Notes in Computer Science, vol 13215. Springer, Cham. https://doi.org/10.1007/978-3-030-99461-7_3
Download citation
DOI: https://doi.org/10.1007/978-3-030-99461-7_3
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-99460-0
Online ISBN: 978-3-030-99461-7
eBook Packages: Computer ScienceComputer Science (R0)