Abstract
We propose an automated method for proving termination of \(\pi \)-calculus processes, based on a reduction to termination of sequential programs: we translate a \(\pi \)-calculus process to a sequential program, so that the termination of the latter implies that of the former. We can then use an off-the-shelf termination verification tool to check termination of the sequential program. Our approach has been partially inspired by Deng and Sangiorgi’s termination analysis for the \(\pi \)-calculus, and checks that there is no infinite chain of communications on replicated input channels, by converting such a chain of communications to a chain of recursive function calls in the target sequential program. We have implemented an automated tool based on the proposed method and confirmed its effectiveness.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The actual translation given later is a little more complex.
- 2.
Thus, the simple type system with “regions” introduced in the previous section is used here as a simple may-alias analysis. If \(x\) and \(y\) may be bound to the same channel during reductions, the type system assigns the same region to \(x\) and \(y\), hence \(x\) and \(y\) are mapped to the same function name \(f_{\rho _{x}}\) by our transformation.
- 3.
The program written here has been simplified for the sake of readability. For instance, we removed some redundant \( (\,)\), trivial function definitions, and unused non-deterministic integers. The other examples that will appear in this paper are also simplified in the same way.
- 4.
The rule for replicated inputs is also modified in a similar manner.
- 5.
Unfortunately, there are no standard benchmark set for the termination analysis for the \(\pi \)-calculus.
References
Baillot, P., Ghyselen, A.: Types for complexity of parallel computation in pi-calculus. In: ESOP 2021. LNCS, vol. 12648, pp. 59–86. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-72019-3_3
Baillot, P., Ghyselen, A., Kobayashi, N.: Sized types with usages for parallel complexity of pi-calculus processes. In: Proceedings of CONCUR 2021. LIPIcs, vol. 203, pp. 34:1–34:22. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2021). https://doi.org/10.4230/LIPIcs.CONCUR.2021.34
Baltazar, P., Mostrous, D., Vasconcelos, V.T.: Linearly refined session types. Electron. Proc. Theoret. Comput. Sci. 101, 38–49 (2012). https://doi.org/10.4204/eptcs.101.4
Bjørner, N., Gurfinkel, A., McMillan, K., Rybalchenko, A.: Horn clause solvers for program verification. In: Beklemishev, L.D., Blass, A., Dershowitz, N., Finkbeiner, B., Schulte, W. (eds.) Fields of Logic and Computation II. LNCS, vol. 9300, pp. 24–51. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23534-9_2
Champion, A., Chiba, T., Kobayashi, N., Sato, R.: ICE-based refinement type discovery for higher-order functional programs. J. Autom. Reason. 64(7), 1393–1418 (2020). https://doi.org/10.1007/s10817-020-09571-y
Cook, B., Podelski, A., Rybalchenko, A.: Proving thread termination. In: Proceedings of PLDI 2007, pp. 320–330. ACM Press (2007). https://doi.org/10.1145/1250734.1250771
Cook, B., Podelski, A., Rybalchenko, A.: Proving program termination. Commun. ACM 54(5), 88–98 (2011). https://doi.org/10.1145/1941487.1941509
Das, A., Hoffmann, J., Pfenning, F.: Parallel complexity analysis with temporal session types. Proc. ACM Program. Lang. 2(ICFP), 91:1–91:30 (2018). https://doi.org/10.1145/3236786
Das, A., Hoffmann, J., Pfenning, F.: Work analysis with resource-aware session types. In: Proceedings of LICS 2018, pp. 305–314. ACM (2018). https://doi.org/10.1145/3209108.3209146
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
Demangeon, R., Hirschkoff, D., Kobayashi, N., Sangiorgi, D.: On the complexity of termination inference for processes. In: Barthe, G., Fournet, C. (eds.) TGC 2007. LNCS, vol. 4912, pp. 140–155. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78663-4_11
Demangeon, R., Hirschkoff, D., Sangiorgi, D.: Termination in higher-order concurrent calculi. J. Log. Algebraic Methods Program. 79(7), 550–577 (2010). https://doi.org/10.1016/j.jlap.2010.07.007
Deng, Y., Sangiorgi, D.: Ensuring termination by typability. Info. Comput. 204(7), 1045–1082 (2006). https://doi.org/10.1016/j.ic.2006.03.002
Fedyukovich, G., Zhang, Y., Gupta, A.: Syntax-guided termination analysis. In: Chockler, H., Weissenbacher, G. (eds.) CAV 2018. LNCS, vol. 10981, pp. 124–143. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-96145-3_7
Griffith, D., Gunter, E.L.: LiquidPi: inferrable dependent session types. In: Brat, G., Rungta, N., Venet, A. (eds.) NFM 2013. LNCS, vol. 7871, pp. 185–197. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38088-4_13
Hashimoto, K., Unno, H.: Refinement type inference via horn constraint optimization. In: Blazy, S., Jensen, T. (eds.) SAS 2015. LNCS, vol. 9291, pp. 199–216. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48288-9_12
Heizmann, M., et al.: Ultimate automizer with two-track proofs. In: Chechik, M., Raskin, J.-F. (eds.) TACAS 2016. LNCS, vol. 9636, pp. 950–953. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49674-9_68
Kobayashi, N.: TyPiCal: a type-based static analyzer for the pi-calculus (2005). Tool available at https://www-kb.is.s.u-tokyo.ac.jp/~koba/typical/
Kobayashi, N., Sangiorgi, D.: A hybrid type system for lock-freedom of mobile processes. ACM Trans. Prog. Lang. Syst. 32(5), 1–49 (2010). https://doi.org/10.1145/1745312.1745313
Komuravelli, A., Gurfinkel, A., Chaki, S.: SMT-based model checking for recursive programs. Formal Methods Syst. Des. 48(3), 175–205 (2016). https://doi.org/10.1007/s10703-016-0249-4
Kuwahara, T., Terauchi, T., Unno, H., Kobayashi, N.: Automatic termination verification for higher-order functional programs. In: Shao, Z. (ed.) ESOP 2014. LNCS, vol. 8410, pp. 392–411. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54833-8_21
Milner, R.: The polyadic \(\pi \)-calculus: a tutorial. In: Bauer, F.L., Brauer, W., Schwichtenberg, H. (eds.) Logic and Algebra of Specification, pp. 203–246. Springer, Heidelberg (1993). https://doi.org/10.1007/978-3-642-58041-3_6
Podelski, A., Rybalchenko, A.: Transition invariants. In: Proceedings of LICS 2004, pp. 32–41 (2004). https://doi.org/10.1109/LICS.2004.1319598
Rondon, P.M., Kawaguchi, M., Jhala, R.: Liquid types. In: PLDI 2008, pp. 159–169 (2008). https://doi.org/10.1145/1375581.1375602
Sangiorgi, D.: Termination of processes. Math. Struct. Comput. Sci. 16(1), 1–39 (2006). https://doi.org/10.1017/S0960129505004810
Shoshi, T., Ishikawa, T., Kobayashi, N., Sakayori, K., Sato, R., Tsukada, T.: Termination analysis for the \(\pi \)-calculus by reduction to sequential program termination (2021). https://arxiv.org/abs/2109.00311. An extended version
Unno, H., Kobayashi, N.: Dependent type inference with interpolants. In: Proceedings of PPDP 2009, pp. 277–288. ACM (2009). https://doi.org/10.1145/1599410.1599445
Venet, A.: Automatic determination of communication topologies in mobile systems. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 152–167. Springer, Heidelberg (1998). https://doi.org/10.1007/3-540-49727-7_9
Yoshida, N., Berger, M., Honda, K.: Strong normalisation in the pi-calculus. Info. Comput. 191(2), 145–202 (2004). https://doi.org/10.1016/j.ic.2003.08.004
Acknowledgments
We would like to thank anonymous referees for useful comments. This work was supported by JSPS KAKENHI Grant Number JP20H05703.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Shoshi, T., Ishikawa, T., Kobayashi, N., Sakayori, K., Sato, R., Tsukada, T. (2021). Termination Analysis for the \(\pi \)-Calculus by Reduction to Sequential Program Termination. In: Oh, H. (eds) Programming Languages and Systems. APLAS 2021. Lecture Notes in Computer Science(), vol 13008. Springer, Cham. https://doi.org/10.1007/978-3-030-89051-3_15
Download citation
DOI: https://doi.org/10.1007/978-3-030-89051-3_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-89050-6
Online ISBN: 978-3-030-89051-3
eBook Packages: Computer ScienceComputer Science (R0)