11 research outputs found
Generating reversible circuits from higher-order functional programs
Boolean reversible circuits are boolean circuits made of reversible
elementary gates. Despite their constrained form, they can simulate any boolean
function. The synthesis and validation of a reversible circuit simulating a
given function is a difficult problem. In 1973, Bennett proposed to generate
reversible circuits from traces of execution of Turing machines. In this paper,
we propose a novel presentation of this approach, adapted to higher-order
programs. Starting with a PCF-like language, we use a monadic representation of
the trace of execution to turn a regular boolean program into a
circuit-generating code. We show that a circuit traced out of a program
computes the same boolean function as the original program. This technique has
been successfully applied to generate large oracles with the quantum
programming language Quipper.Comment: 21 pages. A shorter preprint has been accepted for publication in the
Proceedings of Reversible Computation 2016. The final publication is
available at http://link.springer.co
A geometry of interaction machine for Gödel's System T
Gödel’s System T is the simply typed lambda calculus extended with numbers and an iterator. The higher-order nature of the language gives it enormous expressive power—the language can represent all the primitive recursive functions and beyond, for instance Ackermann’s function. In this paper we use System T as a minimalistic functional language. We give an interpretation using a data-flow model that incorporates ideas from the geometry of interaction and game semantics. The contribution is a reversible model of higher-order computation which can also serve as a novel compilation technique
Reversible Computation in Term Rewriting
Essentially, in a reversible programming language, for each forward
computation from state to state , there exists a constructive method to
go backwards from state to state . Besides its theoretical interest,
reversible computation is a fundamental concept which is relevant in many
different areas like cellular automata, bidirectional program transformation,
or quantum computing, to name a few.
In this work, we focus on term rewriting, a computation model that underlies
most rule-based programming languages. In general, term rewriting is not
reversible, even for injective functions; namely, given a rewrite step , we do not always have a decidable method to get from
. Here, we introduce a conservative extension of term rewriting that
becomes reversible. Furthermore, we also define two transformations,
injectivization and inversion, to make a rewrite system reversible using
standard term rewriting. We illustrate the usefulness of our transformations in
the context of bidirectional program transformation.Comment: To appear in the Journal of Logical and Algebraic Methods in
Programmin
Reversible Term Rewriting
Essentially, in a reversible programming language, for each forward computation step from state S to state S', there exists a constructive and deterministic method to go backwards from state S' to state S. Besides its theoretical interest, reversible computation is a fundamental concept which is relevant in many different areas like cellular automata, bidirectional program transformation, or quantum computing, to name a few. In this paper, we focus on term rewriting, a computation model that underlies most rule-based programming languages. In general, term rewriting is not reversible, even for injective functions; namely, given a rewrite step t1 -> t2, we do not always have a decidable and deterministic method to get t1 from t2. Here, we introduce a conservative extension of term rewriting that becomes reversible. Furthermore, we also define a transformation to make a rewrite system reversible using standard term rewriting.This work has been partially supported by the EU (FEDER) and the Spanish Ministerio de EconomÃa y Competitividad (MINECO) under grant TIN2013-44742-C4-1-R, by the Generalitat Valenciana under grant PROMETEO-II/2015/013 (SmartLogic) and by the COST Action IC 1405 on Reversible Computation. A. Palacios was partially supported by the the EU (FEDER) and the Spanish Ayudas para contratos predoctorales para la formación de doctores de la Sec. Estado de Investigación, Desarrollo e Innovación del MINECO under FPI grant BES-2014-069749. Part of this research was done while the second and third authors were visiting Nagoya University; they gratefully acknowledge their hospitality.Nishida, N.; Palacios Corella, A.; Vidal Oriola, GF.; Nishida (2016). Reversible Term Rewriting. Schloss Dagstuhl-Leibniz-Zentrum für Informatik GmbH, Dagstuhl Publishing. https://doi.org/10.4230/LIPIcs.FSCD.2016.28
Formal Methods for Constraint-Based Testing and Reversible Debugging in Erlang
Tesis por compendio[ES] Erlang es un lenguaje de programación funcional con concurrencia mediante paso de mensajes basado en el modelo de actores. Éstas y otras caracterÃsticas lo hacen especialmente adecuado para aplicaciones distribuidas en tiempo real acrÃtico. En los últimos años, la popularidad de Erlang ha aumentado debido a la demanda de servicios concurrentes.
No obstante, desarrollar sistemas Erlang libres de errores es un reto considerable. A pesar de que Erlang evita muchos problemas por diseño (por ejemplo, puntos muertos), algunos otros problemas pueden aparecer. En este contexto, las técnicas de testing y depuración basadas en métodos formales pueden ser útiles para detectar, localizar y arreglar errores de programación en Erlang.
En esta tesis proponemos varios métodos para testing y depuración en Erlang. En particular, estos métodos están basados en modelos semánticos para concolic testing, pruebas basadas en propiedades, depuración reversible con consistencia causal y repetición reversible con consistencia causal de programas Erlang. Además, probamos formalmente las principales propiedades de nuestras propuestas y diseñamos herramientas de código abierto que implementan estos métodos.[CA] Erlang és un llenguatge de programació funcional amb concurrència mitjançant pas de missatges basat en el model d'actors. Estes i altres caracterÃstiques el fan especialment adequat per a aplicacions distribuïdes en temps real acrÃtic. En els últims anys, la popularitat d'Erlang ha augmentat degut a la demanda de servicis concurrents.
No obstant, desenvolupar sistemes Erlang lliures d'errors és un repte considerable. Encara que Erlang evita molts problemes per disseny (per exemple, punts morts), alguns altres problemes poden aparéixer. En este context, les tècniques de testing y depuració basades en mètodes formals poden ser útils per a detectar, localitzar y arreglar errors de programació en Erlang.
En esta tesis proposem diversos mètodes per a testing i depuració en Erlang. En particular, estos mètodes estan basats en models semà ntics per a concolic testing, testing basat en propietats, depuració reversible amb consistència causal i repetició reversible amb consistència causal de programes Erlang. A més, provem formalment les principals propietats de les nostres propostes i dissenyem ferramentes de codi obert que implementen estos mètodes.[EN] Erlang is a message-passing concurrent, functional programming language based on the actor model. These and other features make it especially appropriate for distributed, soft real-time applications. In the recent years, Erlang's popularity has increased due to the demand for concurrent services.
However, developing error-free systems in Erlang is quite a challenge. Although Erlang avoids many problems by design (e.g., deadlocks), some other problems may appear. Here, testing and debugging techniques based on formal methods may be helpful to detect, locate and fix programming errors in Erlang.
In this thesis we propose several methods for testing and debugging in Erlang. In particular, these methods are based on semantics models for concolic testing, property-based testing, causal-consistent reversible debugging and causal-consistent replay debugging of Erlang programs. We formally prove the main properties of our proposals and design open-source tools that implement these methods.Palacios Corella, A. (2020). Formal Methods for Constraint-Based Testing and Reversible Debugging in Erlang [Tesis doctoral no publicada]. Universitat Politècnica de València. https://doi.org/10.4995/Thesis/10251/139076TESISCompendi
Reversibility in the higher-order π-calculus
The notion of reversible computation is attracting increasing interest because of its applications in diverse fields, in particular the study of programming abstractions for reliable systems. In this paper, we continue the study un-dertaken by Danos and Krivine on reversible CCS by defining a reversible higher-order π-calculus, called rhoπ. We prove that reversibility in our cal-culus is causally consistent and that the causal information used to support reversibility in rhoπ is consistent with the one used in the causal semantics of the π-calculus developed by Boreale and Sangiorgi. Finally, we show that one can faithfully encode rhoπ into a variant of higher-order π, substantially improving on the result we obtained in the conference version of this paper