arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2112.11077cs.PL
收藏

GP 2的一种小步操作语义

A Small-Step Operational Semantics for GP 2

Brian Courtehoute, Detlef Plump

摘要:

如果一种程序设计语言的每个转换步骤都是该语言中的原子计算步骤,则该语言的操作语义被称为小步骤。具有此属性的语义忠实地对应于语言的实现。图程序设计语言GP 2的先前语义不是完全的小步,因为循环和分支命令是以大步风格定义的。在本文中,我们提出了一个真正的小步操作语义GP 2,特别是,准确地模型发散计算。为了获得所有命令的小步骤定义,我们配备了一个堆栈的主机图和相关的操作的过渡关系。我们证明了新的语义是非阻塞的,因为每个计算要么发散,要么最终产生一个结果图或故障状态。我们还显示了有限的非决定性的财产,即每个配置只有有限数量的直接继任者。GP 2的先前语义既不是非阻塞的,也不具有有限非确定性属性。我们还表明,对于一个程序和一个图形,终止,这两个语义是等价的,旧的语义可以模拟与新的。

英文摘要:

The operational semantics of a programming language is said to be small-step if each transition step is an atomic computation step in the language. A semantics with this property faithfully corresponds to the implementation of the language. The previous semantics of the graph programming language GP 2 is not fully small-step because the loop and branching commands are defined in big-step style. In this paper, we present a truly small-step operational semantics for GP 2 which, in particular, accurately models diverging computations. To obtain small-step definitions of all commands, we equip the transition relation with a stack of host graphs and associated operations. We prove that the new semantics is non-blocking in that every computation either diverges or eventually produces a result graph or the failure state. We also show the finite nondeterminism property, viz. that each configuration has only a finite number of direct successors. The previous semantics of GP 2 is neither non-blocking nor does it have the finite nondeterminism property. We also show that, for a program and a graph that terminate, both semantics are equivalent, and that the old semantics can be simulated with the new one.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑