arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1109.0785cs.PL
收藏

使用交互式I/O的While的基于恢复的大步长和小步长解释器

Resumption-based big-step and small-step interpreters for While with interactive I/O

Keiko Nakata

摘要:

在本教程中,我们将为使用输入和输出原语扩展的While语言编写大步长和小步长总解释器。While是一种简单的命令式语言,由skip、assignment、sequence、conditional和loop组成。我们首先为While开发基于跟踪的解释器。迹是潜在的无限非空状态序列。解释器将跟踪分配给While程序:对我们来说,跟踪是While程序的表示。如果程序是终止的,则跟踪是有限的,如果程序是非终止的,则跟踪是无限的。但是,我们无法决定(即,写一个程序来决定),对于任何给定的程序,它的轨迹是有限的还是无限的,这相当于决定停机问题。然后,我们用交互式输入/输出原语扩展While。因此,我们扩展的解释器,一般化的痕迹,选择。本教程是基于我们以前的工作与T。在建构性类型论的背景下推理交互式程序。

英文摘要:

In this tutorial, we program big-step and small-step total interpreters for the While language extended with input and output primitives. While is a simple imperative language consisting of skip, assignment, sequence, conditional and loop. We first develop trace-based interpreters for While. Traces are potentially infinite nonempty sequences of states. The interpreters assign traces to While programs: for us, traces are denotations of While programs. The trace is finite if the program is terminating and infinite if the program is non-terminating. However, we cannot decide (i.e., write a program to determine), for any given program, whether its trace is finite or infinite, which amounts to deciding the halting problem. We then extend While with interactive input/output primitives. Accordingly, we extend the interpreters by generalizing traces to resumptions. The tutorial is based on our previous work with T. Uustalu on reasoning about interactive programs in the setting of constructive type theory.

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

↑