Skip to main content

Termination Analysis for the \(\pi \)-Calculus by Reduction to Sequential Program Termination

  • Conference paper
  • First Online:
Programming Languages and Systems (APLAS 2021)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The actual translation given later is a little more complex.

  2. 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. 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. 4.

    The rule for replicated inputs is also modified in a similar manner.

  5. 5.

    Unfortunately, there are no standard benchmark set for the termination analysis for the \(\pi \)-calculus.

References

  1. 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

    Chapter  MATH  Google Scholar 

  2. 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

  3. 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

    Article  MATH  Google Scholar 

  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

    Chapter  Google Scholar 

  5. 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

    Article  MathSciNet  MATH  Google Scholar 

  6. 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

  7. Cook, B., Podelski, A., Rybalchenko, A.: Proving program termination. Commun. ACM 54(5), 88–98 (2011). https://doi.org/10.1145/1941487.1941509

    Article  Google Scholar 

  8. 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

  9. 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

  10. 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

    Chapter  Google Scholar 

  11. 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

    Chapter  Google Scholar 

  12. 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

    Article  MathSciNet  MATH  Google Scholar 

  13. 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

    Article  MathSciNet  MATH  Google Scholar 

  14. 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

    Chapter  Google Scholar 

  15. 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

    Chapter  Google Scholar 

  16. 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

    Chapter  Google Scholar 

  17. 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

    Chapter  Google Scholar 

  18. 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/

  19. 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

    Article  MATH  Google Scholar 

  20. 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

    Article  MATH  Google Scholar 

  21. 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

    Chapter  Google Scholar 

  22. 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

  23. Podelski, A., Rybalchenko, A.: Transition invariants. In: Proceedings of LICS 2004, pp. 32–41 (2004). https://doi.org/10.1109/LICS.2004.1319598

  24. Rondon, P.M., Kawaguchi, M., Jhala, R.: Liquid types. In: PLDI 2008, pp. 159–169 (2008). https://doi.org/10.1145/1375581.1375602

  25. Sangiorgi, D.: Termination of processes. Math. Struct. Comput. Sci. 16(1), 1–39 (2006). https://doi.org/10.1017/S0960129505004810

    Article  MathSciNet  MATH  Google Scholar 

  26. 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

  27. 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

  28. 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

    Chapter  Google Scholar 

  29. 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

    Article  MATH  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Tsubasa Shoshi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics