Subrecursive program schemata I & II: I. Undecidable equivalence problems; II. Decidable equivalence problems

作者:

Highlights:

摘要

The study of program schemata and the study of subrecursive programming languages are both concerned with limiting program structure in order to permit a more complete analysis of algorithms while retaining sufficiently rich computing power to allow interesting algorithms. In this paper we combine these approaches by defining classes of subrecursive program schemata and investigating their equivalence problems. Since the languages are all subrecursive, any scheme written in any one of them must halt (as long as we assume the basic functions and predicates are all total). Hence equivalence of schemes is the first question of interest we can ask about these languages.We consider schematic versions of various subrecursive programming languages similar to the Loop language. We distinguish between Pre-Loop and Post-Loop languages on the basis of whether the exit condition in an iteration loop is tested before iteration, an in Algol (Pre-), or after iteration, as in FORTRAN (Post-). We slow that at the program level all these languages have the same computing power (the primitive recursive functions) and all have unsolvable equivalence problems (of arithmetic degree II10). But at the level of schemes, Pre-Loop has an unsolvable equivalence problem, while at least one formulation of Post-Loop has a solvable equivalence problem.If L is a programming language or scheme language, the we denote by E(L) the equivalence problem in L.The basic languages considered are: Loop (≡Pre-Loop) Loop language for primitive recursive functions Post-Loop Post-Loop language for primitive recursive functions Loop◊ Loop language with restricted conditionals L[D,()] Loop schemata over D with identity L◊[D,()] Loop schemata with conditionals PL[D,()] Post-Loop schemata over D PL◊[D,()] Post-Loop schemata with conditionals P Program (flowchart) schemata Pd Program schemata with DO-statementsIn contrast to (pure) Loop schemata studied previously by the first author, some of these schemata languages contain the identity function so that a pure data transfer, X ← Y, is possible. Moreover, the equivalence algorithms given here are for the special case of linear schemes (to be defined below) with monadic function variables. Linear schemes are designated by placing L before the name of the more general class, thus LL for linear Loop, LPL for linear Post-Loop, etc. In all schemes considered here the functions are monadic, so no special designation of function rank is provided.It is well known that E(P) is recursively unsolvable and E(P)∈II20. We show that E(Loop), E(Post-Loop), E(L◊) (both with and without the pure data transfer), and E(L) are recursively unsolvable, while E(LPL) is recursively solvable.The extension of the equivalence algorithm for LPL to polyadic functions appears at present to be a tedious but straightforward modification to the monadic algorithm. We are hopeful that a simpler and more generally applicable technique will emerge for demonstrating solvability or unsolvability of this class of equivalence problems. The algorithm and proofs given here are but a crude first step in delimiting this problem.

论文关键词:

论文评审过程:Received 3 March 1972, Available online 27 December 2007.

论文官网地址:https://doi.org/10.1016/S0022-0000(72)80029-1