10 research outputs found

    A General Theory of Sharing Graphs

    Get PDF
    Sharing graphs are the structures introduced by Lamping to implement optimal reductions of lambda calculus. Gonthier’s reformulation of Lamping’s technique inside Geometry of Interaction, and Asperti and Laneve’s work on Interaction Systems have shown that sharing graphs can be used to implement a wide class of calculi. Here, we give a general characterization of sharing graphs independent from the calculus to be implemented. Such a characterization rests on an algebraic semantics of sharing graphs exploiting the methods of Geometry of Interaction. By this semantics we can define an unfolding partial order between proper sharing graphs, whose minimal elements are unshared graphs. The least-shared-instance of a sharing graph is the unique unshared graph that the unfolding partial order associates to it. The algebraic semantics allows to prove that we can associate a semantical read-back to each unshared graph and that such a read-back can be computed via suitable read-back reductions. The result is then lifted to sharing graphs proving that any read-back (or unfolding) reduction of them can be simulated on their least-shared- instances. The sharing graphs defined in this way allow to implement in a distributed and local way any calculus with a global reduction rule in the style of the beta rule of lambda calculus. Also in this case the proof technique is to prove that sharing reductions can be simulated on least-shared-instances. The result is proved under the only assumption that the structures of the calculus have a box nesting property, that is, that two beta redexes may not partially overlap. As a result, we get a sharing graph machine that seems to be the most natural low-level computational model for functional languages. The paper concludes showing that optimality is a by-product of this technique: optimal reductions are lazy reductions of the sharing graph machine. We stress the proof strategy followed in the paper: it is based on an amazing interplay between standard rewriting system properties (strong normalization, confluence, and unique normal form) and algebraic properties definable via the techniques of Geometry of Interaction

    Functorial String Diagrams for Reverse-Mode Automatic Differentiation

    Get PDF
    We formulate a reverse-mode automatic differentiation (RAD) algorithm for (applied) simply typed lambda calculus in the style of Pearlmutter and Siskind [Barak A. Pearlmutter and Jeffrey Mark Siskind, 2008], using the graphical formalism of string diagrams. Thanks to string diagram rewriting, we are able to formally prove for the first time the soundness of such an algorithm. Our approach requires developing a calculus of string diagrams with hierarchical features in the spirit of functorial boxes, in order to model closed monoidal (and cartesian closed) structure. To give an efficient yet principled implementation of the RAD algorithm, we use foliations of our hierarchical string diagrams

    Rewriting for Monoidal Closed Categories

    Get PDF
    This paper develops a formal string diagram language for monoidal closed categories. Previous work has shown that string diagrams for freely generated symmetric monoidal categories can be viewed as hypergraphs with interfaces, and the axioms of these categories can be realized by rewriting systems. This work proposes hierarchical hypergraphs as a suitable formalization of string diagrams for monoidal closed categories. We then show double pushout rewriting captures the axioms of these closed categories

    Non-Deterministic Functions as Non-Deterministic Processes (Extended Version)

    Get PDF
    We study encodings of the lambda-calculus into the pi-calculus in the unexplored case of calculi with non-determinism and failures. On the sequential side, we consider lambdafail, a new non-deterministic calculus in which intersection types control resources (terms); on the concurrent side, we consider spi, a pi-calculus in which non-determinism and failure rest upon a Curry-Howard correspondence between linear logic and session types. We present a typed encoding of lambdafail into spi and establish its correctness. Our encoding precisely explains the interplay of non-deterministic and fail-prone evaluation in lambdafail via typed processes in spi. In particular, it shows how failures in sequential evaluation (absence/excess of resources) can be neatly codified as interaction protocols

    A study of normalisation through subatomic logic

    Get PDF

    Polynomial Time Calculi

    Get PDF
    This dissertation deals with type systems which guarantee polynomial time complexity of typed programs. Such algorithms are commonly regarded as being feasible for practical applications, because their runtime grows reasonably fast for bigger inputs. The implicit complexity community has proposed several type systems for polynomial time in the recent years, each with strong, but different structural restrictions on the permissible algorithms which are necessary to control complexity. Comparisons between the various approaches are hard and this has led to a landscape of islands in the literature of expressible algorithms in each calculus, without many known links between them. This work chooses Light Affine Logic (LAL) and Hofmann's LFPL, both linearly typed, and studies the connections between them. It is shown that the light iteration in LAL, the fixed point variant of LAL, is expressive enough to allow a (non-trivial) compositional embedding of LFPL. The pull-out trick of LAL is identified as a technique to type certain non-size-increasing algorithms in such a way that they can be iterated. The System T sibling of LAL is developed which seamlessly integrates this technique as a central feature of the iteration scheme and which is proved again correct and complete for polynomial time. Because -iterations of the same level cannot be nested, is further generalised to , which surprisingly can express the impredicative iteration of LFPL and the light iteration of at the same time. Therefore, it subsumes both systems in one, while still being polynomial time normalisable. Hence, this result gives the first bridge between these two islands of implicit computational complexity

    Polynomial Time Calculi

    Get PDF
    This dissertation deals with type systems which guarantee polynomial time complexity of typed programs. Such algorithms are commonly regarded as being feasible for practical applications, because their runtime grows reasonably fast for bigger inputs. The implicit complexity community has proposed several type systems for polynomial time in the recent years, each with strong, but different structural restrictions on the permissible algorithms which are necessary to control complexity. Comparisons between the various approaches are hard and this has led to a landscape of islands in the literature of expressible algorithms in each calculus, without many known links between them. This work chooses Light Affine Logic (LAL) and Hofmann's LFPL, both linearly typed, and studies the connections between them. It is shown that the light iteration in LAL, the fixed point variant of LAL, is expressive enough to allow a (non-trivial) compositional embedding of LFPL. The pull-out trick of LAL is identified as a technique to type certain non-size-increasing algorithms in such a way that they can be iterated. The System T sibling of LAL is developed which seamlessly integrates this technique as a central feature of the iteration scheme and which is proved again correct and complete for polynomial time. Because -iterations of the same level cannot be nested, is further generalised to , which surprisingly can express the impredicative iteration of LFPL and the light iteration of at the same time. Therefore, it subsumes both systems in one, while still being polynomial time normalisable. Hence, this result gives the first bridge between these two islands of implicit computational complexity

    A general theory of sharing graphs

    Get PDF
    Sharing graphs are the structures introduced by Lamping to implement optimal reductions of lambda calculus. Gonthier's reformulation of Lamping's technique inside Geometry of Interaction, and Asperti and Laneve's work on Interaction Systems have shown that sharing graphs can be used to implement a wide class of calculi. Here, we give a general characterization of sharing graphs independent from the calculus to be implemented. Such a characterization rests on an algebraic semantics of sharing graphs exploiting the methods of Geometry of Interaction. By this semantics we can de ne an unfolding partial order between proper sharing graphs, whose minimal elements are unshared graphs. The least-shared instance of a sharing graph is the unique unshared graph that the unfolding partial order associates to it. The algebraic semantics allows to prove that we can associate a semantical read-back to each unshared graph and that such a read-back can be compute

    A General Theory of Sharing Graphs

    No full text
    this paper. Anyhow, because of the relevance of such a problem in any practical use of sharing graphs, a detailed study of garbage collection is one of our future goals. 12 Conclusions and further work The box nesting property is the minimal (and natural) requirement under which the sharing reductions can be used to get a local and distributed implementation of fi-like rules. It is our aim to study how the class of the calculi having the box nesting property relates with the classes already studied by the term graph rewriting community. As shown by the relevant examples o

    A general theory of sharing graphs

    No full text
    corecore