skip to main content
article

Automatically disproving fair termination of higher-order functional programs

Published:04 September 2016Publication History
Skip Abstract Section

Abstract

We propose an automated method for disproving fair termination of higher-order functional programs, which is complementary to Murase et al.’s recent method for proving fair termination. A program is said to be fair terminating if it has no infinite execution trace that satisfies a given fairness constraint. Fair termination is an important property because program verification problems for arbitrary ω-regular temporal properties can be transformed to those of fair termination. Our method reduces the problem of disproving fair termination to higher-order model checking by using predicate abstraction and CEGAR. Given a program, we convert it to an abstract program that generates an approximation of the (possibly infinite) execution traces of the original program, so that the original program has a fair infinite execution trace if the tree generated by the abstract program satisfies a certain property. The method is a non-trivial extension of Kuwahara et al.’s method for disproving plain termination.

References

  1. K. Aehlig. A finite semantics of simply-typed lambda terms for infinite runs of automata. Logical Methods in Computer Science, 3(3), 2007.Google ScholarGoogle Scholar
  2. M. F. Atig, A. Bouajjani, M. Emmi, and A. Lal. Detecting fair nontermination in multithreaded programs. In Computer Aided Verification - 24th International Conference, CAV 2012, Proceedings, volume 7358 of Lecture Notes in Computer Science, pages 210–226. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Carayol and O. Serre. Collapsible pushdown automata and labeled recursion schemes: Equivalence, safety and effective selection. In Proceedings of the 27th Annual IEEE Symposium on Logic in Computer Science, LICS 2012, pages 165–174. IEEE Computer Society, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. B. Cook, A. Gotsman, A. Podelski, A. Rybalchenko, and M. Y. Vardi. Proving that programs eventually do something good. In Proceedings of the 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2007, pages 265–276. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. B. Cook, H. Khlaaf, and N. Piterman. On automation of CTL* verification for infinite-state systems. In Computer Aided Verification - 27th International Conference, CAV 2015, Proceedings, Part I, volume 9206 of Lecture Notes in Computer Science, pages 13–29. Springer, 2015.Google ScholarGoogle Scholar
  6. B. Cook, H. Khlaaf, and N. Piterman. Fairness for infinite-state systems. In Tools and Algorithms for the Construction and Analysis of Systems - 21st International Conference, TACAS 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, Proceedings, volume 9035 of Lecture Notes in Computer Science, pages 384–398. Springer, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. O. Danvy and L. R. Nielsen. Defunctionalization at work. In Proceedings of the 3rd international ACM SIGPLAN conference on Principles and practice of declarative programming, PPDP 2001, pages 162–174. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. L. M. de Moura and N. Bjørner. Z3: an efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems, 14th International Conference, TACAS 2008, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2008, Proceedings, volume 4963 of Lecture Notes in Computer Science, pages 337–340. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. K. Fujima. HorSatP: A saturation-based higher-order model checker for APT, 2015. Tool available from the author.Google ScholarGoogle Scholar
  10. K. Fujima, S. Ito, and N. Kobayashi. Practical alternating parity tree automata model checking of higher-order recursion schemes. In Programming Languages and Systems - 11th Asian Symposium, APLAS 2013, Proceedings, volume 8301 of Lecture Notes in Computer Science, pages 17–32. Springer, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Giesl, M. Raffelsieper, P. Schneider-Kamp, S. Swiderski, and R. Thiemann. Automated termination proofs for Haskell by term rewriting. ACM Trans. Program. Lang. Syst., 33(2):7, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Grädel, W. Thomas, and T. Wilke. Automata, Logics, and Infinite Games: A Guide to Current Research, volume 2500 of Lecture Notes in Computer Science. Springer, 2002.Google ScholarGoogle Scholar
  13. A. Haddad. Model checking and functional program transformations. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2013, volume 24 of LIPIcs, pages 115–126. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2013.Google ScholarGoogle Scholar
  14. M. Hofmann and W. Chen. Abstract interpretation from büchi automata. In Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSLLICS 2014, pages 51:1–51:10. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Jhala, R. Majumdar, and A. Rybalchenko. HMC: verifying functional programs using abstract interpreters. In Computer Aided Verification - 23rd International Conference, CAV 2011, Proceedings, volume 6806 of Lecture Notes in Computer Science, pages 470–485. Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. Kaki and S. Jagannathan. A relational framework for higherorder shape analysis. In Proceedings of the 19th ACM SIGPLAN international conference on Functional programming, ICFP 2014, pages 311–324. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. N. Kobayashi. Model checking higher-order programs. J. ACM, 60 (3):20, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Kobayashi and C. L. Ong. A type system equivalent to the modal mu-calculus model checking of higher-order recursion schemes. In Proceedings of the 24th Annual IEEE Symposium on Logic in Computer Science, LICS 2009, pages 179–188. IEEE Computer Society, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. N. Kobayashi, R. Sato, and H. Unno. Predicate abstraction and CEGAR for higher-order model checking. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2011, pages 222–233. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. E. Koskinen and T. Terauchi. Local temporal reasoning. In Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSL-LICS 2014, pages 59:1–59:10. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Kuwahara, T. Terauchi, H. Unno, and N. Kobayashi. Automatic termination verification for higher-order functional programs. In Programming Languages and Systems - 23rd European Symposium on Programming, ESOP 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Proceedings, volume 8410 of Lecture Notes in Computer Science, pages 392–411. Springer, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. T. Kuwahara, R. Sato, H. Unno, and N. Kobayashi. Predicate abstraction and CEGAR for disproving termination of higher-order functional programs. In Computer Aided Verification - 27th International Conference, CAV 2015, Proceedings, Part II, volume 9207 of Lecture Notes in Computer Science, pages 287–303. Springer, 2015.Google ScholarGoogle Scholar
  23. M. Lester, R. P. Neatherway, C. L. Ong, and S. J. Ramsay. Model checking liveness properties of higher-order functional programs. In Proceedings of ML Workshop 2011, 2011.Google ScholarGoogle Scholar
  24. A. Murase, T. Terauchi, N. Kobayashi, R. Sato, and H. Unno. Temporal verification of higher-order functional programs. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, pages 57–68. ACM, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. P. Neatherway and C. L. Ong. TravMC2: higher-order model checking for alternating parity tree automata. In Proceedings of the 2014 International SPIN Symposium on Model Checking of Software, SPIN 2014, pages 129–132. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. P. C. Nguyen and D. V. Horn. Relatively complete counterexamples for higher-order programs. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2015, pages 446–456. ACM, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. C. Nguyen, S. Tobin-Hochstadt, and D. V. Horn. Soft contract verification. In Proceedings of the 19th ACM SIGPLAN international conference on Functional programming, ICFP 2014, pages 139–152. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. C. L. Ong. On model-checking trees generated by higher-order recursion schemes. In 21th IEEE Symposium on Logic in Computer Science, LICS 2006, Proceedings, pages 81–90. IEEE Computer Society, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. L. Ong and S. J. Ramsay. Verifying higher-order functional programs with pattern-matching algebraic data types. In Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, pages 587–598. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. M. Rondon, M. Kawaguchi, and R. Jhala. Liquid types. In Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation, PLDI 2008, pages 159–169. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. C. Skalka, S. F. Smith, and D. V. Horn. Types and trace effects of higher order programs. J. Funct. Program., 18(2):179–249, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. T. Tsukada and C. L. Ong. Compositional higher-order model checking via ω-regular games over böhm trees. In Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSL-LICS 2014, pages 78:1–78:10. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. H. Unno, T. Terauchi, and N. Kobayashi. Automating relatively complete verification of higher-order functional programs. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2013, pages 75–86. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Y. Vardi. Verification of concurrent programs: The automatatheoretic framework. Ann. Pure Appl. Logic, 51(1-2):79–98, 1991.Google ScholarGoogle ScholarCross RefCross Ref
  35. N. Vazou, E. L. Seidel, R. Jhala, D. Vytiniotis, and S. L. P. Jones. Refinement types for Haskell. In Proceedings of the 19th ACM SIGPLAN international conference on Functional programming, ICFP 2014, pages 269–282. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. H. Zhu, A. V. Nori, and S. Jagannathan. Learning refinement types. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming, ICFP 2015, pages 400–411. ACM, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automatically disproving fair termination of higher-order functional programs

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!