Decision Algorithms for Checking Definability of Order-2 Finitary PCF
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.
- 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
- 10.Loader, R.: The undecidability of lambda-definability. In: The Church Festschrift. CSLI/University of Chicago Press (1994)Google Scholar
- 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
- 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.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
- 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.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.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
- 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