Abstract
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
We thank an anonymous reviewer for providing us the information of Stoughton’s work.
- 2.
A function f between pointed cpos is continuous if f is monotonic and preserves the least upper bound of any directed subset. Note that, if f is a function between finite cpos, f is continuous if and only if f is monotonic.
- 3.
A cartesian product of two cpos \(D_1=(S_1,\le _1)\) and \(D_2=(S_2,\le _2)\) is a cpo \((S_1\times S_2,\le _{D_1 \times D_2})\) where \((d_1,d_2)\le _{D_1 \times D_2}(d_1^{\prime },d_2^{\prime }) \mathop {\Longleftrightarrow }\limits ^{\mathrm {def}}d_1 \le _1 d_1^{\prime }\wedge d_2 \le _2 d_2^{\prime }\).
References
Abramsky, S., Jagadeesan, R., Malacaria, P.: Full abstraction for PCF. Inf. Comput. 163(2), 409–470 (2000)
Abramsky, S., McCusker, G.: Call-by-value games. In: Nielsen, M. (ed.) CSL 1997. LNCS, vol. 1414, pp. 1–17. Springer, Heidelberg (1998)
Amadio, R.M., Curien, P.L.: Domains and Lambda-Calculi. Cambridge University Press, Cambridge (1998)
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)
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)
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)
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)
Hyland, J.M.E., Ong, C.-H.L.: On full abstraction for PCF: I, II, and III. Inf. Comput. 163(2), 285–408 (2000)
Kobayashi, N.: Model checking higher-order programs. J. ACM 60(3), 1–62 (2013)
Loader, R.: The undecidability of lambda-definability. In: The Church Festschrift. CSLI/University of Chicago Press (1994)
Loader, R.: Finitary PCF is not decidable. Theor. Comput. Sci. 266(1), 341–364 (2001)
Milner, R.: Fully abstract models of typed \(\lambda \)-calculi. Theor. Comput. Sci. 4(1), 1–22 (1977)
Murawski, A.S.: On program equivalence in languages with ground-type references. In: Proceedings of LICS 2003, pp. 108–108. IEEE (2003)
Murawski, A.S.: Functions with local state: regularity and undecidability. Theor. Comput. Sci. 338(1–3), 315–349 (2005)
Murawski, A.S., Walukiewicz, I.: Third-order Idealized Algol with iteration is decidable. Theor. Comput. Sci. 390(2–3), 214–229 (2008)
Ong, C.-H.L.: Observational equivalence of 3rd-order Idealized Algol is decidable. In: Proceedings of LICS 2002, pp. 245–256. IEEE (2002)
Ong, C.-H.L.: On model-checking trees generated by higher-order recursion schemes. In: Proceedings of LICS 2006, pp. 81–90. IEEE (2006)
Plotkin, G.D.: LCF considered as a programming language. Theor. Comput. Sci. 5(3), 223–255 (1977)
Plotkin, G.D.: Lambda-definability and logical relations. Technical report, SAI-RM-4, School of Artificial Intelligence, University of Edinburgh (1973)
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)
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)
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)
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)
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)
Winskel, G.: Formal Semantics of Programming Languages. The MIT Press, Cambridge (1993)
Acknowledgments
We thank anonymous reviewers for useful comments. This work was partially supported by JSPS Kakenhi 15H05706, and 23220001.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Kawata, S., Asada, K., Kobayashi, N. (2015). Decision Algorithms for Checking Definability of Order-2 Finitary PCF. In: Feng, X., Park, S. (eds) Programming Languages and Systems. APLAS 2015. Lecture Notes in Computer Science(), vol 9458. Springer, Cham. https://doi.org/10.1007/978-3-319-26529-2_17
Download citation
DOI: https://doi.org/10.1007/978-3-319-26529-2_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-26528-5
Online ISBN: 978-3-319-26529-2
eBook Packages: Computer ScienceComputer Science (R0)