31 research outputs found
The (In)Efficiency of interaction
Evaluating higher-order functional programs through abstract machines inspired by the geometry of the interaction is known to induce space efficiencies, the price being time performances often poorer than those obtainable with traditional, environment-based, abstract machines. Although families of lambda-terms for which the former is exponentially less efficient than the latter do exist, it is currently unknown how general this phenomenon is, and how far the inefficiencies can go, in the worst case. We answer these questions formulating four different well-known abstract machines inside a common definitional framework, this way being able to give sharp results about the relative time efficiencies. We also prove that non-idempotent intersection type theories are able to precisely reflect the time performances of the interactive abstract machine, this way showing that its time-inefficiency ultimately descends from the presence of higher-order types
Analogy-Making as a Core Primitive in the Software Engineering Toolbox
An analogy is an identification of structural similarities and
correspondences between two objects. Computational models of analogy making
have been studied extensively in the field of cognitive science to better
understand high-level human cognition. For instance, Melanie Mitchell and
Douglas Hofstadter sought to better understand high-level perception by
developing the Copycat algorithm for completing analogies between letter
sequences. In this paper, we argue that analogy making should be seen as a core
primitive in software engineering. We motivate this argument by showing how
complex software engineering problems such as program understanding and
source-code transformation learning can be reduced to an instance of the
analogy-making problem. We demonstrate this idea using Sifter, a new
analogy-making algorithm suitable for software engineering applications that
adapts and extends ideas from Copycat. In particular, Sifter reduces
analogy-making to searching for a sequence of update rule applications. Sifter
uses a novel representation for mathematical structures capable of effectively
representing the wide variety of information embedded in software. We conclude
by listing major areas of future work for Sifter and analogy-making in software
engineering.Comment: Conference paper at SPLASH 'Onward!' 2020. Code is available at
https://github.com/95616ARG/sifte
Reversible Session-Based Concurrency in Haskell
A reversible semantics enables to undo computation steps. Reversing message-passing, concurrent programs is a challenging and delicate task; one typically aims at causally consistent reversible semantics. Prior work has addressed this challenge in the context of a process model of multiparty protocols (or choreographies). In this paper, we describe a Haskell implementation of this reversible operational seman- tics. We exploit algebraic data types to faithfully represent three core ingredients: a process calculus, multiparty session types, and forward and backward reduction semantics. Our implementation bears witness to the convenience of pure functional programming for implementing reversible languages
Causal consistency for reversible multiparty protocols
In programming models with a reversible semantics, computational steps can be undone. This paper addresses the integration of reversible semantics into process languages for communication-centric systems equipped with behavioral types. In prior work, we introduced a monitors-as-memories approach to seamlessly integrate reversible semantics into a process model in which concurrency is governed by session types (a class of behavioral types), covering binary (two-party) protocols with synchronous communication. The applicability and expressiveness of the binary setting, however, is limited. Here we extend our approach, and use it to define reversible semantics for an expressive process model that accounts for multiparty (n-party) protocols, asynchronous communication, decoupled rollbacks, and abstraction passing. As main result, we prove that our reversible semantics for multiparty protocols is causally-consistent. A key technical ingredient in our developments is an alternative reversible semantics with atomic rollbacks, which is conceptually simple and is shown to characterize decoupled rollbacks