Theory of Computing Systems

, Volume 45, Issue 4, pp 787–821 | Cite as

Two Algorithms in Search of a Type-System

  • Norman Danner
  • James S. Royer


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.


Compositional semantics Implicit computational complexity Higher-type computation Higher-type complexity Basic feasible functionals 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aehlig, K., Schwichtenberg, H.: A syntactical analysis of non-size-increasing polynomial time computation. ACM Trans. Comput. Log. 3(3), 383–401 (2002). CrossRefMathSciNetGoogle Scholar
  2. 2.
    Barber, A.: Dual intuitionistic linear logic. Technical Report ECS-LFCS-96-347, Laboratory for Foundations of Computer Science (1996).
  3. 3.
    Bellantoni, S., Cook, S.: A new recursion-theoretic characterization of the polytime functions. Comput. Complex. 2(2), 97–110 (1992). zbMATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Blelloch, G.E.: Programming parallel algorithms. Commun. ACM 39(3), 85–97 (1996). CrossRefGoogle Scholar
  5. 5.
    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). CrossRefGoogle Scholar
  6. 6.
    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). CrossRefGoogle Scholar
  7. 7.
    Cook, S., Urquhart, A.: Functional interpretations of feasibly constructive arithmetic. Ann. Pure Appl. Logic 63(2), 103–200 (1993). zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    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). CrossRefGoogle Scholar
  9. 9.
    Danner, N., Royer, J.S.: Adventures in time and space. Log. Methods Comput. Sci. 3(9), 1–53 (2007). http://dx/ MathSciNetGoogle Scholar
  10. 10.
    Frederiksen, C.C., Jones, N.D.: Recognition of polynomial-time programs. Technical Report TOPPS/D-501, DIKU, University of Copenhagen (2004).
  11. 11.
    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). CrossRefGoogle Scholar
  12. 12.
    Hofmann, M.: Linear types and non-size-increasing polynomial time computation. Inf. Comput. 183(1), 57–85 (2003). zbMATHCrossRefGoogle Scholar
  13. 13.
    Ignjatovic, A., Sharma, A.: Some applications of logic to feasibility in higher types. ACM Trans. Comput. Logic 5(2), 332–350 (2004). CrossRefMathSciNetGoogle Scholar
  14. 14.
    Jones, N.D.: The expressive power of higher-order types or, life without cons. J. Funct. Program. 11(1), 55–94 (2001). zbMATHCrossRefGoogle Scholar
  15. 15.
    Kapron, B.M., Cook, S.A.: A new characterization of type-2 feasibility. SIAM J. Comput. 25(1), 117–132 (1996). zbMATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Ko, K.-I.: Computational Complexity of Real Functions. Birkhäuser Boston, Cambridge (1991) Google Scholar
  17. 17.
    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) Google Scholar
  18. 18.
    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). CrossRefGoogle Scholar
  19. 19.
    Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). MIT Press, Cambridge (1977) Google Scholar
  20. 20.
    Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002) Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  1. 1.Department of Mathematics and Computer ScienceWesleyan UniversityMiddletownUSA
  2. 2.Department of Electrical Engineering and Computer ScienceSyracuse UniversitySyracuseUSA

Personalised recommendations