Abstract
Loop structure is widely adopted in many applications, e.g. collaborative applications, social network applications, and edge computing. And the termination of the loop is of great significance to the correctness of the program. Most of the previous relative studies focused on determining the termination of a loop program by synthesizing the ranking functions, but not every ranking function can be synthesized. Although a class of linear loop program termination has been proven to be decidable, it is always difficult to analyze the termination of a multi-path linear loop. Xie et al. [20] presented Loopster to quickly check the termination of the multi-path loop program by analyzing the termination of each path and the dependency between paths. But it relies on the monotonicity of variables which is very complicated to check when the variables increase.
To this end, we extend Loopster, named Loopster++, to analyze the termination of multi-path linear loops. In Loopster++, 1) we convert the iterable path into a single path linear loop to analyze its termination. 2) We also propose a novel method to analyze the dependency between linear loop paths. 3) For the cycle constituted by alternate execution between paths, we classify all cycles and give the termination method of the corresponding category cycle. We finally evaluate Loopster++ by analyzing the termination of the benchmarks from the competition on software verification and compare it with the state-of-the-art tools. The empirical results demonstrate the superiority of Loopster++ by achieving high accuracy of 83% in the shortest time.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
9th competition on software verification (2020). https://sv-comp.sosy-lab.org/2020/
CVE-2009-1890 (2020). https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1890
Ben-Amram, A.M., Genaim, S.: On the linear ranking problem for integer linear-constraint loops. SIGPLAN Not. 48(1), 51–62 (2013). https://doi.org/10.1145/2480359.2429078
Beyer, D., Henzinger, T.A., Théoduloz, G.: Configurable software verification: concretizing the convergence of model checking and program analysis. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 504–518. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73368-3_51
Braverman, M.: Termination of integer linear programs. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 372–385. Springer, Heidelberg (2006). https://doi.org/10.1007/11817963_34
Chen, H., David, C., Kroening, D., Schrammel, P., Wachter, B.: Synthesising interprocedural bit-precise termination proofs (t). In: 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 53–64 (2015)
Colón, M.A., Sipma, H.B.: Practical methods for proving program termination. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 442–454. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45657-0_36
Colóon, M.A., Sipma, H.B.: Synthesis of linear ranking functions. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, pp. 67–81. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45319-9_6
Dams, D., Gerth, R., Grumberg, O.: A heuristic for the automatic generation of ranking functions. In: Workshop on Advances in Verification, pp. 1–8 (2000)
Gurfinkel, A., Kahsai, T., Navas, J.A.: SeaHorn: a framework for verifying C programs (competition contribution). In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 447–450. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_41
Heizmann, M., Hoenicke, J., Podelski, A.: Termination analysis by learning terminating programs. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 797–813. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08867-9_53
Larraz, D., Oliveras, A., Rodriguez-Carbonell, E., Rubio, A.: Proving termination of imperative programs using Max-SMT. In: 2013 Formal Methods in Computer-Aided Design, FMCAD 2013, pp. 218–225 (2013)
Lattner, C., Adve, V.: LLVM: a compilation framework for lifelong program analysis transformation. In: International Symposium on Code Generation and Optimization, CGO 2004, pp. 75–86 (2004)
Leike, J., Heizmann, M.: Ranking templates for linear loops. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 172–186. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54862-8_12
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
Ouaknine, J., Pinto, J.A.S., Worrell, J.: On termination of integer linear loops. In: Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, pp. 957–969. Society for Industrial and Applied Mathematics, USA (2015)
Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 239–251. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24622-0_20
Tiwari, A.: Termination of linear programs. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 70–82. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-27813-9_6
Xie, X., Chen, B., Liu, Y., Le, W., Li, X.: Proteus: computing disjunctive loop summary via path dependency analysis. In: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2016, pp. 61–72. Association for Computing Machinery, New York (2016). https://doi.org/10.1145/2950290.2950340
Xie, X., Chen, B., Zou, L., Lin, S.W., Liu, Y., Li, X.: Loopster: static loop termination analysis. In: Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2017, pp. 84–94. Association for Computing Machinery, New York (2017). https://doi.org/10.1145/3106237.3106260
Acknowledgment
This work has partially been sponsored by the National Science Foundation of China (No. 61872262).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering
About this paper
Cite this paper
Jin, H., Ge, W., Zhang, Y., Li, X., Deng, Z. (2021). Loopster++: Termination Analysis for Multi-path Linear Loop. In: Gao, H., Wang, X. (eds) Collaborative Computing: Networking, Applications and Worksharing. CollaborateCom 2021. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 406. Springer, Cham. https://doi.org/10.1007/978-3-030-92635-9_28
Download citation
DOI: https://doi.org/10.1007/978-3-030-92635-9_28
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-92634-2
Online ISBN: 978-3-030-92635-9
eBook Packages: Computer ScienceComputer Science (R0)