可逆语言扩展及其在并行计算中的应用
Reversible Language Extensions and their Application in Debugging
摘要:
有一系列的方法和技术可用于指导语言扩展和领域特定语言的设计和实现。一种简单而强大的技术是基于跨基本语言的编译通道交错的源到源转换。尽管是一种成功的方法,但它的主要缺点是输入源代码在过程中丢失。当考虑到程序开发的整个工作流程(警告和错误报告、调试,甚至程序分析)时,程序翻译并不比美化的宏语言更强大。在本文中,我们提出了一种增强的方法,语言扩展的Prolog,符号注释包括在目标程序。这些注释允许有选择地反转翻译的代码。我们说明了这种方法,通过显示,耦合它与最小的扩展到一个通用的Prolog调试器,使我们能够为用户提供一个熟悉的,源代码级的视图,在调试过程中使用的各种语言扩展,如功能符号,DCG,或CLP{Q,R}的程序。
英文摘要:
A range of methodologies and techniques are available to guide the design and implementation of language extensions and domain-specific languages. A simple yet powerful technique is based on source-to-source transformations interleaved across the compilation passes of a base language. Despite being a successful approach, it has the main drawback that the input source code is lost in the process. When considering the whole workflow of program development (warning and error reporting, debugging, or even program analysis), program translations are no more powerful than a glorified macro language. In this paper, we propose an augmented approach to language extensions for Prolog, where symbolic annotations are included in the target program. These annotations allow selectively reversing the translated code. We illustrate the approach by showing that coupling it with minimal extensions to a generic Prolog debugger allows us to provide users with a familiar, source-level view during the debugging of programs which use a variety of language extensions, such as functional notation, DCGs, or CLP{Q,R}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。