Abstract
The class of Basic Feasible Functionals \(\mathtt{BFF}\) is the second-order counterpart of the class of first-order functions computable in polynomial time. We present several implicit characterizations of \(\mathtt{BFF}\) based on a typed programming language of terms. These terms may perform calls to imperative procedures, which are not recursive. The type discipline has two layers: the terms follow a standard simply-typed discipline and the procedures follow a standard tier-based type discipline. \(\mathtt{BFF}\) consists exactly of the second-order functionals that are computed by typable and terminating programs. The completeness of this characterization surprisingly still holds in the absence of lambda-abstraction. Moreover, the termination requirement can be specified as a completeness-preserving instance, which can be decided in time quadratic in the size of the program. As typing is decidable in polynomial time, we obtain the first tractable (i.e., decidable in polynomial time), sound, complete, and implicit characterization of \(\mathtt{BFF}\), thus solving a problem opened for more than 20 years.
Chapter PDF
Similar content being viewed by others
References
Avery, J.: Size-change termination and bound analysis. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. Lecture Notes in Computer Science, vol. 3945, pp. 192–207. Springer (2006). https://doi.org/10.1007/11737414_14
Baillot, P., Dal Lago, U.: Higher-order interpretations and program complexity. Inf. Comput. 248, 56–81 (2016). https://doi.org/10.1016/j.ic.2015.12.008
Baillot, P., Mazza, D.: Linear logic by levels and bounded time complexity. Theor. Comput. Sci. 411(2), 470–503 (2010). https://doi.org/10.1016/j.tcs.2009.09.015
Baillot, P., Terui, K.: Light types for polynomial time computation in lambda-calculus. In: Logic in Computer Science, LICS 2004. pp. 266–275. IEEE (2004). https://doi.org/10.1109/LICS.2004.1319621
Beame, P., Cook, S.A., Edmonds, J., Impagliazzo, R., Pitassi, T.: The relative complexity of NP search problems. J. Comput. Syst. Sci. 57(1), 3–19 (1998). https://doi.org/10.1006/jcss.1998.1575
Bellantoni, S., Cook, S.: A new recursion-theoretic characterization of the polytime functions. Computational Complexity 2, 97–110 (1992). https://doi.org/10.1007/BF01201998
Ben-Amram, A.M., Lee, C.S.: Program termination analysis in polynomial time. ACM Trans. Program. Lang. Syst. 29(1), 5:1–5:37 (2007). https://doi.org/10.1145/1180475.1180480
Bonfante, G., Marion, J., Moyen, J.: Quasi-interpretations a way to control resources. Theor. Comput. Sci. 412(25), 2776–2796 (2011). https://doi.org/10.1016/j.tcs.2011.02.007
Cobham, A.: The intrinsic computational difficulty of functions. In: Bar-Hillel, Y. (ed.) Proceedings of the International Conference on Logic, Methodology, and Philosophy of Science, pp. 24–30. North-Holland, Amsterdam (1965)
Constable, R.L.: Type two computational complexity. In: Proceedings of the 5th Annual ACM Symposium on Theory of Computing, April 30 - May 2, 1973, Austin, Texas, USA. pp. 108–121. ACM (1973). https://doi.org/10.1145/800125.804041
Cook, S.A.: Computability and complexity of higher type functions. In: Logic from Computer Science. pp. 51–72. Springer (1992). https://doi.org/10.1007/978-1-4612-2822-6_3
Cook, S.A., Kapron, B.M.: Characterizations of the basic feasible functionals of finite type. In: 30th Annual Symposium on Foundations of Computer Science (FOCS 1989). pp. 154–159. IEEE (1989). https://doi.org/10.1109/SFCS.1989.63471
Férée, H., Hainry, E., Hoyrup, M., Péchoux, R.: Characterizing polynomial time complexity of stream programs using interpretations. Theor. Comput. Sci. 585, 41–54 (2015). https://doi.org/10.1016/j.tcs.2015.03.008
Gao, S., Avigad, J., Clarke, E.M.: \(\delta \)-complete decision procedures for satisfiability over the reals. In: Gramlich, B., Miller, D., Sattler, U. (eds.) Automated Reasoning - 6th International Joint Conference, IJCAR 2012, Manchester, UK, June 26–29, 2012. Proceedings. Lecture Notes in Computer Science, vol. 7364, pp. 286–300. Springer (2012). https://doi.org/10.1007/978-3-642-31365-3_23
Girard, J.Y.: Light linear logic. Inf. Comput. 143(2), 175–204 (1998). https://doi.org/10.1006/inco.1998.2700
Hainry, E., Kapron, B.M., Marion, J., Péchoux, R.: A tier-based typed programming language characterizing feasible functionals. In: LICS ’20: 35th Annual ACM/IEEE Symposium on Logic in Computer Science, Saarbrücken, Germany, July 8–11, 2020. pp. 535–549 (2020). https://doi.org/10.1145/3373718.3394768
Hainry, E., Péchoux, R.: Theory of higher order interpretations and application to basic feasible functions. Log. Methods Comput. Sci. 16(4) (2020), https://lmcs.episciences.org/6973
Irwin, R.J., Royer, J.S., Kapron, B.M.: On characterizations of the basic feasible functionals (part I). J. Funct. Program. 11(1), 117–153 (2001). https://doi.org/10.1017/S0956796800003841
Kapron, B.M., Cook, S.A.: A new characterization of mehlhorn’s polynomial time functionals (extended abstract). In: 32nd Annual Symposium on Foundations of Computer Science, San Juan, Puerto Rico, 1-4 October 1991. pp. 342–347. IEEE (1991). https://doi.org/10.1109/SFCS.1991.185389
Kapron, B.M., Steinberg, F.: Type-two polynomial-time and restricted lookahead. In: Logic in Computer Science, LICS 2018. pp. 579–588. ACM (2018). https://doi.org/10.1145/3209108.3209124
Kawamura, A., Cook, S.A.: Complexity theory for operators in analysis. ACM Trans. Comput. Theory 4(2), 5:1–5:24 (2012). https://doi.org/10.1145/2189778.2189780
Kawamura, A., Steinberg, F.: Polynomial running times for polynomial-time oracle machines. In: 2nd International Conference on Formal Structures for Computation and Deduction, FSCD 2017. pp. 23:1–23:18. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2017). https://doi.org/10.4230/LIPIcs.FSCD.2017.23
Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: Hankin, C., Schmidt, D. (eds.) POPL 2001. pp. 81–92. ACM (2001). https://doi.org/10.1145/360204.360210
Leivant, D., Marion, J.Y.: Lambda calculus characterizations of poly-time. Fundam. Inform. 19(1/2), 167–184 (1993)
Mairson, H.G.: Linear lambda calculus and ptime-completeness. J. Funct. Program. 14(6), 623–633 (2004). https://doi.org/10.1017/S0956796804005131
Marion, J.: A type system for complexity flow analysis. In: Logic in Computer Science, LICS 2011. pp. 123–132. IEEE Computer Society (2011). https://doi.org/10.1109/LICS.2011.41
Mehlhorn, K.: Polynomial and abstract subrecursive classes. J. Comp. Sys. Sci. 12(2), 147–178 (1976). https://doi.org/10.1016/S0022-0000(76)80035-9
Nivat, M., Perrin, D.: Automata on infinite words, vol. 192. Springer Science & Business Media (1985)
Townsend, M.: Complexity for type-2 relations. Notre Dame J. Formal Log. 31(2), 241–262 (1990). https://doi.org/10.1305/ndjfl/1093635419
Volpano, D., Irvine, C., Smith, G.: A sound type system for secure flow analysis. Journal of computer security 4(2-3), 167–187 (1996). https://doi.org/10.3233/JCS-1996-42-304
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2022 The Author(s)
About this paper
Cite this paper
Hainry, E., Kapron, B.M., Marion, JY., Péchoux, R. (2022). Complete and tractable machine-independent characterizations of second-order polytime. In: Bouyer, P., Schröder, L. (eds) Foundations of Software Science and Computation Structures. FoSSaCS 2022. Lecture Notes in Computer Science, vol 13242. Springer, Cham. https://doi.org/10.1007/978-3-030-99253-8_19
Download citation
DOI: https://doi.org/10.1007/978-3-030-99253-8_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-99252-1
Online ISBN: 978-3-030-99253-8
eBook Packages: Computer ScienceComputer Science (R0)