프랙트란의 복잡성과 생산성
Complexity of Fractran and Productivity
Complexity of Fractran and Productivity
@misc{endrullis2009complexity,
title = {Complexity of Fractran and Productivity},
author = {Joerg Endrullis and Clemens Grabmayer and Dimitri Hendriks},
year = {2009},
eprint = {0903.4366},
archivePrefix = {arXiv},
primaryClass = {cs.LO},
url = {https://arxiv.org/abs/0903.4366}
}
Endrullis, J., Grabmayer, C., & Hendriks, D. (2009). Complexity of Fractran and Productivity [Preprint]. arXiv. https://doi.org/10.48550/arXiv.0903.4366
ENDRULLIS J, GRABMAYER C, HENDRIKS D. Complexity of Fractran and Productivity[EB/OL]. (2009-03-25)[2026-11-30]. https://arxiv.org/abs/0903.4366.
초록
함수형 프로그래밍 언어에서 무한 구조의 사용은 일반적인 관행이다. 무한 구조를 다루는 프로그램의 전체적 정확성을 보장하려면 결과의 모든 유한 부분이 유한한 단계로 평가될 수 있음을 보장해야 한다. 이를 생산성 (productivity) 이라고 한다. 무한 구조를 위한 프로그래밍에서 생산성은 잘 정의된 결과에 대한 종료 (termination) 이 유한 구조를 위한 프로그래밍에서 갖는 것과 같다. 프랙트란 (Fractran) 은 코네이가 발명했던 간단한 튜링 완전한 프로그래밍 언어이다. 우리는 프랙트란 프로그램이 모든 양의 정수에서 정지하는지 여부가 Pi^0_2-완전임을 증명한다. 함수형 프로그래밍에서 생산성은 일반적으로 내장 평가 전략에 대한 개별 항의 속성이다. 프랙트란 프로그램을 무한 리스트의 사양으로 인코딩함으로써, 이 생산성 개념이 가장 간단한 사양에 있어도 Pi^0_2-완전임을 확립한다. 따라서 이는 개별 항의 종료가 더 어렵다. 또한, 우리는 항 변환 프레임워크 내에서 생산성 개념의 가능한 일반화를 탐구하며, 그들의 계산 복잡성이 Pi^1_1-완전임을 증명함으로써 일차 논리의 표현력을 초과함을 보여준다.
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 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 Pi^0_2-complete even for the most simple specifications. Therefore it is harder than termination of individual terms. In addition, we explore possible generalisations of the notion of productivity in the framework of term rewriting, and prove that their computational complexity is Pi^1_1-complete, thus exceeding the expressive power of first-order logic.