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

一种可逆的面向对象程序设计语言的设计与实现

Design and Implementation of a Reversible Object-Oriented Programming Language

Tue Haulund

摘要:

高级可逆程序设计语言很少,而且通常只提供底层机器细节的基本抽象。现代程序设计语言提供了大量的语言结构和范例,以促进抽象接口的设计,但我们目前对可逆程序设计语言的这些功能的适用性的理解非常有限。我们介绍了第一个可逆的面向对象的程序设计语言,ROOPL,支持用户定义的数据类型,类继承和子类型多态性。该语言扩展了现有可逆命令式语言的设计,并允许在可逆机器上有效实现。我们提供了一个形式化的语言语义,类型系统,我们通过实现一个可逆的图灵机模拟器证明了计算的通用性的语言。ROOPL语句是局部可逆的,不会增加程序大小或计算复杂性,并且该语言提供了对每个类方法的逆语义的直接存取。我们描述了从ROOPL到可逆汇编语言PISA的无垃圾翻译所需的技术,并提供了所述技术的完整实现。我们的研究结果表明,面向对象编程的核心语言功能进行了可逆计算领域的一些能力。

英文摘要:

High-level reversible programming languages are few and far between and in general offer only rudimentary abstractions from the details of the underlying machine. Modern programming languages offer a wide array of language constructs and paradigms to facilitate the design of abstract interfaces, but we currently have a very limited understanding of the applicability of such features for reversible programming languages. We introduce the first reversible object-oriented programming language, ROOPL, with support for user-defined data types, class inheritance and subtype-polymorphism. The language extends the design of existing reversible imperative languages and it allows for effective implementation on reversible machines. We provide a formalization of the language semantics, the type system and we demonstrate the computational universality of the language by implementing a reversible Turing machine simulator. ROOPL statements are locally invertible at no extra cost to program size or computational complexity and the language provides direct access to the inverse semantics of each class method. We describe the techniques required for a garbage-free translation from ROOPL to the reversible assembly language PISA and provide a full implementation of said techniques. Our results indicate that core language features for object-oriented programming carries over to the field of reversible computing in some capacity.

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

↑