Advertisement

Complexity of Fractran and Productivity

  • Jörg Endrullis
  • Clemens Grabmayer
  • Dimitri Hendriks
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5663)

Abstract

In functional programming languages the use of infinite structures is common practice. For total correctness of programs dealing with infinite structures one must guarantee that every finite part of the result can be evaluated in finitely many steps. This is known as productivity. For programming with infinite structures, productivity is what termination in well-defined results is for programming with finite structures.

Fractran is a simple Turing-complete programming language invented by Conway. We prove that the question whether a Fractran program halts on all positive integers is \({\rm \Pi}^{0}_{2}\)-complete. In functional programming, productivity typically is a property of individual terms with respect to the inbuilt evaluation strategy. By encoding Fractran programs as specifications of infinite lists, we establish that this notion of productivity is \({\rm \Pi}^{0}_{2}\)-complete even for some of the most simple specifications. Therefore it is harder than termination of individual terms. In addition, we explore generalisations of the notion of productivity, and prove that their computational complexity is in the analytical hierarchy, thus exceeding the expressive power of first-order logic.

Keywords

Normal Form Turing Machine Fractran Program Productivity Problem Functional Programming 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Arts, T., Giesl, J.: Termination of Term Rewriting Using Dependency Pairs. Theoretical Computer Science 236, 133–178 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Conway, J.H.: Fractran: A Simple Universal Programming Language for Arithmetic. In: Open Problems in Communication and Computation, pp. 4–26. Springer, Heidelberg (1987)CrossRefGoogle Scholar
  3. 3.
    Endrullis, J., Geuvers, H., Zantema, H.: Degrees of Undecidabililty of TRS Properties. In: CSL 2009 (to appear, 2009)Google Scholar
  4. 4.
    Endrullis, J., Grabmayer, C., Hendriks, D.: ProPro: an Automated Productivity Prover (2008), http://infinity.few.vu.nl/productivity/
  5. 5.
    Endrullis, J., Grabmayer, C., Hendriks, D.: Complexity of Fractran and Productivity (2009), http://arxiv.org/abs/0903.4366
  6. 6.
    Endrullis, J., Grabmayer, C., Hendriks, D., Isihara, A., Klop, J.W.: Productivity of Stream Definitions. In: Csuhaj-Varjú, E., Ésik, Z. (eds.) FCT 2007. LNCS, vol. 4639, pp. 274–287. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Grue Simonsen, J.: The π 0 2-Completeness of Most of the Properties of Rewriting Systems You Care About (and Productivity). In: RTA 2009 (to appear, 2009)Google Scholar
  8. 8.
    Herman, G.T.: Strong Computability and Variants of the Uniform Halting Problem. Zeitschrift für Math. Logik und Grundlagen der Mathematik 17(1), 115–131 (1971)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Hinman, P.G.: Recursion-Theoretic Hierarchies. Springer, Heidelberg (1978)CrossRefzbMATHGoogle Scholar
  10. 10.
    Klop, J.W.: Term Rewriting Systems. In: Handbook of Logic in Computer Science, vol. 2, pp. 1–116. Oxford University Press, Oxford (1992)Google Scholar
  11. 11.
    Kurtz, S.A., Simon, J.: The Undecidability of the Generalized Collatz Problem. In: Cai, J.-Y., Cooper, S.B., Zhu, H. (eds.) TAMC 2007. LNCS, vol. 4484, pp. 542–553. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  12. 12.
    Lagarias, J.C.: The 3x + 1 Problem and its Generalizations. AMM 92(1), 3–23 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Peyton Jones, S.: The Implementation of Functional Programming Languages. Prentice-Hall, Englewood Cliffs (1987)zbMATHGoogle Scholar
  14. 14.
    Roşu, G.: Equality of Streams is a \({\rm \Pi}^{0}_{2}\)-complete Problem. In: ICFP, pp. 184–191 (2006)Google Scholar
  15. 15.
    Sijtsma, B.A.: On the Productivity of Recursive List Definitions. ACM Transactions on Programming Languages and Systems 11(4), 633–649 (1989)CrossRefGoogle Scholar
  16. 16.
    Terese: Term Rewriting Systems. Cambridge Tracts in Theoretical Computer Science, vol. 55. Cambridge University Press, Cambridge (2003)Google Scholar
  17. 17.
    Toyama, Y.: Strong Sequentiality of Left-Linear Overlapping Term Rewriting Systems. In: LICS, pp. 274–284. IEEE Computer Society Press, Los Alamitos (1992)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Jörg Endrullis
    • 1
  • Clemens Grabmayer
    • 2
  • Dimitri Hendriks
    • 1
  1. 1.Department of Computer ScienceVrije Universiteit AmsterdamAmsterdamThe Netherlands
  2. 2.Department of PhilosophyUniversiteit UtrechtUtrechtThe Netherlands

Personalised recommendations