Abstract
The authors’ \(\mathsf{ATR}\) programming formalism is a version of call-by-value \(\mathsf{PCF}\) under a complexity-theoretically motivated type system. \(\mathsf{ATR}\) programs run in type-2 polynomial-time and all standard type-2 basic feasible functionals are \(\mathsf{ATR}\) -definable ( \(\mathsf{ATR}\) types are confined to levels 0, 1, and 2). A limitation of the original version of \(\mathsf{ATR}\) is that the only directly expressible recursions are tail-recursions. Here we extend \(\mathsf{ATR}\) so that a broad range of affine recursions are directly expressible. In particular, the revised \(\mathsf{ATR}\) can fairly naturally express the classic insertion- and selection-sort algorithms, thus overcoming a sticking point of most prior implicit-complexity-based formalisms. The paper’s main work is in refining the original time-complexity semantics for \(\mathsf{ATR}\) to show that these new recursion schemes do not lead out of the realm of feasibility.
Similar content being viewed by others
References
Aehlig, K., Schwichtenberg, H.: A syntactical analysis of non-size-increasing polynomial time computation. ACM Trans. Comput. Log. 3(3), 383–401 (2002). http://doi.acm.org/10.1145/507382.507386
Barber, A.: Dual intuitionistic linear logic. Technical Report ECS-LFCS-96-347, Laboratory for Foundations of Computer Science (1996). http://www.lfcs.inf.ed.ac.uk/reports/96/ECS-LFCS-96-347/index.html
Bellantoni, S., Cook, S.: A new recursion-theoretic characterization of the polytime functions. Comput. Complex. 2(2), 97–110 (1992). http://dx.doi.org/10.1007/BF01201998
Blelloch, G.E.: Programming parallel algorithms. Commun. ACM 39(3), 85–97 (1996). http://doi.acm.org/10.1145/227234.227246
Blelloch, G.E., Chatterjee, S., Hardwick, J.C., Sipelstein, J., Zagha, M.: Implementation of a portable nested data-parallel language. J. Parallel Distrib. Comput. 21(1), 4–14 (1994). http://dx.doi.org/10.1006/jpdc.1994.1038
Chakravarty, M.M.T., Leshchinskiy, R., Jones, S.P., Keller, G., Marlow, S.: Data parallel haskell: a status report. In: DAMP ’07: Proceedings of the 2007 Workshop on Declarative Aspects of Multicore Programming, Nice, France, 2007, pp. 10–18. ACM, New York (2007). http://doi.acm.org/10.1145/1248648.1248652
Cook, S., Urquhart, A.: Functional interpretations of feasibly constructive arithmetic. Ann. Pure Appl. Logic 63(2), 103–200 (1993). http://dx.doi.org/10.1016/0168-0072(93)90044-E
Danner, N., Royer, J.S.: Adventures in time and space. In: POPL ’06: Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, SC, 2006, pp. 168–179. ACM, New York (2006). http://doi.acm.org/10.1145/1111037.1111053
Danner, N., Royer, J.S.: Adventures in time and space. Log. Methods Comput. Sci. 3(9), 1–53 (2007). http://dx/doi.org/10.2168/LMCS-3(1:9)2007
Frederiksen, C.C., Jones, N.D.: Recognition of polynomial-time programs. Technical Report TOPPS/D-501, DIKU, University of Copenhagen (2004). http://www.diku.dk/topps/bibliography/2004.html
Hofmann, M.: The strength of non-size increasing computation. In: POPL ’02: Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Portland, OR, 2002, pp. 260–269. ACM, New York (2002). http://doi.acm.org/10.1145/503272.503297
Hofmann, M.: Linear types and non-size-increasing polynomial time computation. Inf. Comput. 183(1), 57–85 (2003). http://dx.doi.org/10.1016/S0890-5401(03)00009-9
Ignjatovic, A., Sharma, A.: Some applications of logic to feasibility in higher types. ACM Trans. Comput. Logic 5(2), 332–350 (2004). http://xxx.lanl.gov/abs/cs.LO/0204045
Jones, N.D.: The expressive power of higher-order types or, life without cons. J. Funct. Program. 11(1), 55–94 (2001). http://dx.doi.org/10.1017/S0956796800003889
Kapron, B.M., Cook, S.A.: A new characterization of type-2 feasibility. SIAM J. Comput. 25(1), 117–132 (1996). http://dx.doi.org/10.1137/S0097539794263452
Ko, K.-I.: Computational Complexity of Real Functions. Birkhäuser Boston, Cambridge (1991)
Leivant, D.: Ramified recurrence and computational complexity I: Word recurrence and poly-time. In: Feasible Mathematics II, Ithaca, NY, 1992, pp. 320–343. Birkhäuser Boston, Cambridge (1995)
Mehlhorn, K.: Polynomial and abstract subrecursive classes. In: Proceedings of the Sixth Annual ACM Symposium on Theory of Computing, Seattle, WA, 1974, pp. 96–109. ACM, New York (1974). http://doi.acm.org/10.1145/800119.803890
Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). MIT Press, Cambridge (1977)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Danner, N., Royer, J.S. Two Algorithms in Search of a Type-System. Theory Comput Syst 45, 787–821 (2009). https://doi.org/10.1007/s00224-009-9181-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-009-9181-y