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

Prolog中字节码解释器的性能研究

On the Performance of Bytecode Interpreters in Prolog

Philipp Körner, David Schneider, Michael Leuschel

摘要:

Prolog语言的语义和递归执行模型使得语言解释器可以很自然地以AST(Abstract StringTree)解释器的形式表示,其中执行遵循程序的树表示。另一种实现技术是字节码解释器。这些解释器在评估之前将程序转换为紧凑和线性的表示,通常被认为更快,更好地利用资源。本文讨论了在Prolog语言中解释器控制流的不同表示方法,并给出了AST和字节码解释器的几种实现。在一个简单的语言设计用于此目的,我们评估是否最好的技术已知的命令式语言是适用于Prolog和如何以及他们的表现。我们的最终目标是评估Prolog中的解释器设计是最有效的,因为我们打算将这些结果应用到更复杂的语言中。然而,我们相信本文中的分析具有更普遍的意义。

英文摘要:

The semantics and the recursive execution model of Prolog make it very natural to express language interpreters in form of AST (Abstract Syntax Tree) interpreters where the execution follows the tree representation of a program. An alternative implementation technique is that of bytecode interpreters. These interpreters transform the program into a compact and linear representation before evaluating it and are generally considered to be faster and to make better use of resources. In this paper, we discuss different ways to express the control flow of interpreters in Prolog and present several implementations of AST and bytecode interpreters. On a simple language designed for this purpose, we evaluate whether techniques best known from imperative languages are applicable in Prolog and how well they perform. Our ultimate goal is to assess which interpreter design in Prolog is the most efficient, as we intend to apply these results to a more complex language. However, we believe the analysis in this paper to be of more general interest.

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

↑