【24h】

Implications of the Turing machine model of computation for processor and programming language design

机译:图灵机计算模型对处理器和编程语言设计的影响

获取原文
获取原文并翻译 | 示例

摘要

A computational process is classified according to the theoretical model that is capable of executing it; computational processes that require a non-predeterminable amount of intermediate storage for their execution are Turing-machine (TM) processes, while those whose storage requirements are predeterminable are Finite Automaton (FA) processes. Simple processes (such as a traffic light controller) are executable by a Finite Automaton, whereas the most general kind of computation requires a Turing Machine for its execution. This implies that a TM process must have a non-predeterminable amount of memory allocated to it at intermediate instants of its execution; i.e. dynamic memory allocation. Many processes encountered in practice are TM processes. The implication for computational practice is that the hardware (CPU) architecture and its operating system must facilitate dynamic memory allocation, and that the programming language used to specify TM processes must have statements with the semantic attribute of dynamic memory allocation, for in Alan Turing's thesis on computation (1936) the "standard description" of a process is invariant over the most general data that the process is designed to process; i.e. the program describing the process should never have to be modified to allow for differences in the data that is to be processed in different instantiations; i.e. data-invariant programming. Any non-trivial program is partitioned into sub-programs (procedures, subroutines, functions, modules, etc). Examination of the calls/returns between the subprograms reveals that they are nodes in a tree-structure; this tree-structure is independent of the programming language used to encode (define) the process. Each sub-program typically needs some memory for its own use (to store values intermediate between its received data and its computed results); this locally required memory is not needed before the subprogram commences execution, and it is not needed after its execution terminates; it may be allocated as its execution commences, and deallocated as its execution terminates, and if the amount of this local memory is not known until just before execution commencement, then it is essential that it be allocated dynamically as the first action of its execution. This dynamically allocated/deallocated storage of each subprogram's intermediate values, conforms with the stack discipline; i.e. last allocated = first to be deallocated, an incidental benefit of which is automatic overlaying of variables. This stack-based dynamic memory allocation was a semantic implication of the nested block structure that originated in the ALGOL-60 programming language. ALGOL-60 was a TM language, because the amount of memory allocated on subprogram (block/procedure) entry (for arrays, etc) was computable at execution time. A more general requirement of a Turing machine process is for code generation at run-time; this mandates access to the source language processor (compiler/interpreter) during execution of the process. This fundamental aspect of computer science is important to the future of system design, because it has been overlooked throughout the 55 years since modern computing began in 1948. The popular computer systems of this first half-century of computing were constrained by compile-time (or even operating system boot-time) memory allocation, and were thus limited to executing FA processes. The practical effect was that the distinction between the data-invariant program and its variable data was blurred; programmers had to make trial and error executions, modifying the program's compile-time constants (array dimensions) to iterate towards the values required at run-time by the data being processed. This era of trial and error computing still persists; it pervades the culture of current (2003) computing practice.
机译:计算过程根据能够执行的理论模型进行分类。需要非预定数量的中间存储才能执行的计算过程是图灵机(TM)进程,而存储要求可确定的那些进程是有限自动机(FA)进程。有限自动机可以执行简单的过程(例如交通信号灯控制器),而最通用的计算类型需要图灵机来执行。这意味着TM进程必须在执行的中间瞬间为其分配不可确定的内存量;即动态内存分配。在实践中遇到的许多过程都是TM过程。对于计算实践而言,这意味着硬件(CPU)体系结构及其操作系统必须促进动态内存分配,并且用于指定TM进程的编程语言必须具有具有动态内存分配语义属性的语句,例如在Alan Turing的论文中在计算中(1936年),流程的“标准描述”对于流程旨在处理的最通用数据是不变的;即描述过程的程序永远不必修改以允许将要在不同实例中处理的数据中的差异;即数据不变编程。任何非平凡的程序都被划分为子程序(过程,子例程,函数,模块等)。检查子程序之间的调用/返回,可以发现它们是树形结构中的节点。该树结构与用于编码(定义)过程的编程语言无关。每个子程序通常需要一些内存供其自己使用(以存储其接收到的数据和计算结果之间的中间值)。在子程序开始执行之前不需要此局部所需的内存,在子程序执行终止之后也不需要此局部所需的内存;它可以在执行开始时分配,而在执行结束时释放,如果直到执行开始之前才知道本地内存的数量,则必须将其动态分配为执行的第一个动作。每个子程序中间值的动态分配/取消分配存储都符合堆栈规则;即最后分配=首先要释放,其附带好处是自动覆盖变量。这种基于堆栈的动态内存分配是源自ALGOL-60编程语言的嵌套块结构的语义含义。 ALGOL-60是一种TM语言,因为在执行时可以计算在子程序(块/过程)项(用于数组等)上分配的内存量。图灵机过程的一个更一般的要求是在运行时生成代码。这要求在执行过程中访问源语言处理器(编译器/解释器)。计算机科学的这一基本方面对于系统设计的未来至关重要,因为自1948年现代计算开始以来的55年里,计算机科学一直被忽视。计算机科学在上半个世纪的流行计算机系统受到编译时的限制(甚至操作系统启动时)内存分配,因此仅限于执行FA进程。实际效果是使数据不变程序与其可变数据之间的区别变得模糊。程序员必须进行反复试验,修改程序的编译时常量(数组维),以便在运行时根据要处理的数据迭代所需的值。这个反复试验计算时代仍然存在。它遍及了当前(2003年)计算实践的文化。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号