Abstract
Logically constrained rewrite systems constitute a very general rewriting formalism that can capture simplification processes in various domains as well as computation in imperative programs. In both of these contexts, nontermination is a critical source of errors. We present new criteria to find loops in logically constrained rewrite systems which are implemented in the tool Ctrl. We illustrate the usefulness of these criteria in three example applications: to find loops in LLVM peephole optimizations, to detect looping executions of C programs, and to establish nontermination of integer transition systems.
This work is partially supported by JSPS KAKENHI Grant Number JP18K11160 and FWF (Austrian Science Fund) project T789.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)
Borralleras, C., Brockschmidt, M., Larraz, D., Oliveras, A., Rodríguez-Carbonell, E., Rubio, A.: Proving termination through conditional termination. In: Legay, A., Margaria, T. (eds.) TACAS 2017. Heidelberg, vol. 10205, pp. 99–117. Springer, Cham (2017). https://doi.org/10.1007/978-3-662-54577-5_6
Brockschmidt, M., Cook, B., Ishtiaq, S., Khlaaf, H., Piterman, N.: T2: Temporal property verification. In: Chechik, M., Raskin, J.-F. (eds.) TACAS 2016. LNCS, vol. 9636, pp. 387–393. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49674-9_22
Falke, S., Kapur, D.: A term rewriting approach to the automated termination analysis of imperative programs. In: Schmidt, R.A. (ed.) CADE 2009. LNCS (LNAI), vol. 5663, pp. 277–293. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02959-2_22
Falke, S., Kapur, D., Sinz, C.: Termination analysis of C programs using compiler intermediate languages. In: Proceedings of the 22nd RTA, Leibniz International Proceedings in Informatics, vol. 10, pp. 41–50 (2011). https://doi.org/10.4230/LIPIcs.RTA.2011.41
Fuhs, C., Giesl, J., Plücker, M., Schneider-Kamp, P., Falke, S.: Proving termination of integer term rewriting. In: Treinen, R. (ed.) RTA 2009. LNCS, vol. 5595, pp. 32–47. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02348-4_3
Fuhs, C., Kop, C., Nishida, N.: Verifying procedural programs via constrained rewriting induction. ACM TOCL 18(2), 14:1–14:50 (2017). https://doi.org/10.1145/3060143
Ganesh, V., Berezin, S., Dill, D.: A decision procedure for fixed-width bit-vectors. Technical report, Stanford University (2005)
Giesl, J., et al.: Analyzing program termination and complexity automatically with AProVE. JAR 58(1), 3–31 (2017). https://doi.org/10.1007/s10817-016-9388-y
Gupta, A., Henzinger, T., Majumdar, R., Rybalchenko, A., Xu, R.G.: Proving non-termination. SIGPLAN Not. 43(1), 147–158 (2008). https://doi.org/10.1145/1328897.1328459
Hoder, K., Khasidashvili, Z., Korovin, K., Voronkov, A.: Preprocessing techniques for first-order clausification. In: Proceedings of the 12th FMCAD, pp. 44–51 (2012)
Kop, C., Nishida, N.: Term rewriting with logical constraints. In: Fontaine, P., Ringeissen, C., Schmidt, R.A. (eds.) FroCoS 2013. LNCS (LNAI), vol. 8152, pp. 343–358. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40885-4_24
Kop, C., Nishida, N.: Constrained term rewriting tooL. In: Davis, M., Fehnker, A., McIver, A., Voronkov, A. (eds.) LPAR 2015. LNCS, vol. 9450, pp. 549–557. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48899-7_38
Lopes, N., Menendez, D., Nagarakatte, S., Regehr, J.: Provably correct peephole optimizations with Alive. In: Proceedings of the 36th PLDI, pp. 22–32 (2015). https://doi.org/10.1145/2737924.2737965
Lopes, N., Menendez, D., Nagarakatte, S., Regehr, J.: Practical verification of peephole optimizations with Alive. Commun. ACM 61(2), 84–91 (2018). https://doi.org/10.1145/3166064
Menendez, D., Nagarakatte, S.: Termination-checking for LLVM peephole optimizations. In: Proceedings of the 38th International Conference on Software Engineering, pp. 191–202 (2016). https://doi.org/10.1145/2884781.2884809
Nadel, A.: Bit-vector rewriting with automatic rule generation. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 663–679. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08867-9_44
Nishida, N., Sakai, M., Hattori, T.: On disproving termination of constrained term rewriting systems. In: Proceedings of the 11th WST (2010)
Payet, É.: Loop detection in term rewriting using the eliminating unfoldings. Theor. Comput. Sci. 403(2–3), 307–327 (2008). https://doi.org/10.1016/j.tcs.2008.05.013
Acknowledgements
The authors thank the anonymous referees for their helpful comments.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Nishida, N., Winkler, S. (2018). Loop Detection by Logically Constrained Term Rewriting. In: Piskac, R., Rümmer, P. (eds) Verified Software. Theories, Tools, and Experiments. VSTTE 2018. Lecture Notes in Computer Science(), vol 11294. Springer, Cham. https://doi.org/10.1007/978-3-030-03592-1_18
Download citation
DOI: https://doi.org/10.1007/978-3-030-03592-1_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-03591-4
Online ISBN: 978-3-030-03592-1
eBook Packages: Computer ScienceComputer Science (R0)