2 research outputs found

    Design and Implementation of a Reversible Object-Oriented Programming Language

    Full text link
    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.Comment: Master's Thesis, 110 pages, 55 figure

    Design and Implementation of Dynamic Memory Management in a Reversible Object-Oriented Programming Language

    Full text link
    The reversible object-oriented programming language (ROOPL) was presented in late 2016 and proved that object-oriented programming paradigms works in the reversible setting. The language featured simple statically scoped objects which made non-trivial programs tedious, if not impossible to write using the limited tools provided. We introduce an extension to ROOPL in form the new language ROOPL++, featuring dynamic memory management and fixed-sized arrays for increased language expressiveness. The language is a superset of ROOPL and has formally been defined by its language semantics, type system and computational universality. Considerations for reversible memory manager layouts are discussed and ultimately lead to the selection of the Buddy Memory layout. Translations of the extensions added in ROOPL++ to the reversible assembly language PISA are presented to provide garbage-free computations. The dynamic memory management extension successfully increases the expressiveness of ROOPL and as a result, shows that non-trivial reversible data structures, such as binary trees and doubly-linked lists, are feasible and do not contradict the reversible computing paradigm.Comment: Master's Thesis, 231 pages, 63 figure
    corecore