Decision Algorithms for Checking Definability of Order-2 Finitary PCF

  • Sadaaki Kawata
  • Kazuyuki Asada
  • Naoki Kobayashi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9458)


We consider a definability problem for finitary PCF, which asks whether, given a function (as an element of a cpo), there exists a term of finitary PCF whose interpretation is the function. The definability problem for finitary PCF is known to be decidable for types of order at most 2. However, its complexity and practical algorithms have not been well studied. In this paper, we give two algorithms for checking definability: one based on Sieber’s sequentiality relation, which runs in quadruply exponential time for the size of the type of the given function, and the other based on a saturation method, which runs in triply exponential time for the size. With the recent advance of higher-order model checking, our result may be useful for implementing a tool for deciding observational equivalence between finitary PCF terms of types of order at most 3.



We thank anonymous reviewers for useful comments. This work was partially supported by JSPS Kakenhi 15H05706, and 23220001.


  1. 1.
    Abramsky, S., Jagadeesan, R., Malacaria, P.: Full abstraction for PCF. Inf. Comput. 163(2), 409–470 (2000)CrossRefMathSciNetzbMATHGoogle Scholar
  2. 2.
    Abramsky, S., McCusker, G.: Call-by-value games. In: Nielsen, M. (ed.) CSL 1997. LNCS, vol. 1414, pp. 1–17. Springer, Heidelberg (1998) CrossRefGoogle Scholar
  3. 3.
    Amadio, R.M., Curien, P.L.: Domains and Lambda-Calculi. Cambridge University Press, Cambridge (1998)CrossRefzbMATHGoogle Scholar
  4. 4.
    Broadbent, C.H., Kobayashi, N.: Saturation-based model checking of higher-order recursion schemes. In: Proceedings of CSL 2013. LIPIcs, vol. 23, pp. 129–148 (2013)Google Scholar
  5. 5.
    Hopkins, D., Murawski, A.S., Ong, C.-H.L.: Hector: an equivalence checker for a higher-order fragment of ML. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 774–780. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  6. 6.
    Hopkins, D., Murawski, A.S., Ong, C.-H.L.: A fragment of ML decidable by visibly pushdown automata. In: Aceto, L., Henzinger, M., Sgall, J. (eds.) ICALP 2011, Part II. LNCS, vol. 6756, pp. 149–161. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  7. 7.
    Hopkins, D., Ong, C.-H.L.: Homer: a higher-order observational equivalence model checkER. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 654–660. Springer, Heidelberg (2009) CrossRefGoogle Scholar
  8. 8.
    Hyland, J.M.E., Ong, C.-H.L.: On full abstraction for PCF: I, II, and III. Inf. Comput. 163(2), 285–408 (2000)CrossRefMathSciNetzbMATHGoogle Scholar
  9. 9.
    Kobayashi, N.: Model checking higher-order programs. J. ACM 60(3), 1–62 (2013)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Loader, R.: The undecidability of lambda-definability. In: The Church Festschrift. CSLI/University of Chicago Press (1994)Google Scholar
  11. 11.
    Loader, R.: Finitary PCF is not decidable. Theor. Comput. Sci. 266(1), 341–364 (2001)CrossRefMathSciNetzbMATHGoogle Scholar
  12. 12.
    Milner, R.: Fully abstract models of typed \(\lambda \)-calculi. Theor. Comput. Sci. 4(1), 1–22 (1977)CrossRefMathSciNetzbMATHGoogle Scholar
  13. 13.
    Murawski, A.S.: On program equivalence in languages with ground-type references. In: Proceedings of LICS 2003, pp. 108–108. IEEE (2003)Google Scholar
  14. 14.
    Murawski, A.S.: Functions with local state: regularity and undecidability. Theor. Comput. Sci. 338(1–3), 315–349 (2005)CrossRefMathSciNetzbMATHGoogle Scholar
  15. 15.
    Murawski, A.S., Walukiewicz, I.: Third-order Idealized Algol with iteration is decidable. Theor. Comput. Sci. 390(2–3), 214–229 (2008)CrossRefMathSciNetzbMATHGoogle Scholar
  16. 16.
    Ong, C.-H.L.: Observational equivalence of 3rd-order Idealized Algol is decidable. In: Proceedings of LICS 2002, pp. 245–256. IEEE (2002)Google Scholar
  17. 17.
    Ong, C.-H.L.: On model-checking trees generated by higher-order recursion schemes. In: Proceedings of LICS 2006, pp. 81–90. IEEE (2006)Google Scholar
  18. 18.
    Plotkin, G.D.: LCF considered as a programming language. Theor. Comput. Sci. 5(3), 223–255 (1977)CrossRefMathSciNetGoogle Scholar
  19. 19.
    Plotkin, G.D.: Lambda-definability and logical relations. Technical report, SAI-RM-4, School of Artificial Intelligence, University of Edinburgh (1973)Google Scholar
  20. 20.
    Plotkin, G.D.: Lambda-definability in the full type hierarchy. To HB Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pp. 363–373 (1980)Google Scholar
  21. 21.
    Ramsay, S.J., Neatherway, R., Ong, C.-H.L.: An abstraction refinement approach to higher-order model checking. In: Proceedings of POPL 2014, pp. 61–72. ACM (2014)Google Scholar
  22. 22.
    Reynolds, J.C.: The essence of Algol. In: O’Hearn, P.W., Tennent, R.D. (eds.) ALGOL-like Languages. Progress in Theoretical Computer Science, pp. 67–88. Springer, Heidelberg (1997) CrossRefGoogle Scholar
  23. 23.
    Sieber, K.: Reasoning about sequential functions via logical relations. In: Applications of Categories in Computer Science. London Mathematical Society Lecture Note Series, vol. 177, pp. 258–269. Cambridge University Press (1992)Google Scholar
  24. 24.
    Stoughton, A.: Mechanizing logical relations. In: Main, M.G., Melton, A.C., Mislove, M.W., Schmidt, D., Brookes, S.D. (eds.) MFPS 1993. LNCS, vol. 802, pp. 359–377. Springer, Heidelberg (1994) CrossRefGoogle Scholar
  25. 25.
    Winskel, G.: Formal Semantics of Programming Languages. The MIT Press, Cambridge (1993)zbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Sadaaki Kawata
    • 1
  • Kazuyuki Asada
    • 1
  • Naoki Kobayashi
    • 1
  1. 1.The University of TokyoTokyoJapan

Personalised recommendations