Complexity of Fractran and Productivity

  • Authors:
  • Jörg Endrullis;Clemens Grabmayer;Dimitri Hendriks

  • Affiliations:
  • Department of Computer Science, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands 1081 HV;Department of Philosophy, Universiteit Utrecht, Utrecht, The Netherlands 3584 CS;Department of Computer Science, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands 1081 HV

  • Venue:
  • CADE-22 Proceedings of the 22nd International Conference on Automated Deduction
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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.