On some decision problems for RAM programs
作者:
Highlights:
•
摘要
We look at some decision problems for programs using the RAM (random access machine) model of computation. Under this model, each instruction takes one step to execute. We obtain positive as well as negative results. For example, we show that there is an algorithm to determine given a positive integer k and a program P with one input variable over the instruction set {x ← 0, x ← x + 1, x ← x ← 1, x ← x + y, x ← x − y, x ← x ∗ y, x ← xy, if p(x)then halt, halt, if p(x) then goto l, goto 1}, where xy is integer division and p(x) is a predicate of the form x < 0, x = 0, x ≠ 0, x > 0, whether P halts on all integer inputs in at most k steps. The problem is also decidable for multi-input programs with no multiplication and division instructions. In contrast, the problem is undecidable for programs with two input variables over the instruction set {x ← 0, x ← x + 1, x ← x − y, x ← xy, if x = 0 then halt, halt}, even when only total programs (i.e., no division by 0 occurs during any computation) are considered. This last result also holds when x ← xy is replaced by multiplication, x ← x ∗ y, but the number of input variables needed is large.
论文关键词:
论文评审过程:Received 20 February 1981, Revised 10 August 1981, Available online 5 January 2004.
论文官网地址:https://doi.org/10.1016/0022-0000(82)90055-1