Results 1 
5 of
5
Functional programming with structured graphs
 In Proceedings of the 17th ACM SIGPLAN international conference on Functional programming, ICFP ’12
, 2012
"... This paper presents a new functional programming model for graph structures called structured graphs. Structured graphs extend conventional algebraic datatypes with explicit definition and manipulation of cycles and/or sharing, and offer a practical and convenient way to program graphs in functional ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
This paper presents a new functional programming model for graph structures called structured graphs. Structured graphs extend conventional algebraic datatypes with explicit definition and manipulation of cycles and/or sharing, and offer a practical and convenient way to program graphs in functional programming languages like Haskell. The representation of sharing and cycles (edges) employs recursive binders and uses an encoding inspired by parametric higherorder abstract syntax. Unlike traditional approaches based on mutable references or node/edge lists, wellformedness of the graph structure is ensured statically and reasoning can be done with standard functional programming techniques. Since the binding structure is generic, we can define many useful generic combinators for manipulating structured graphs. We give applications and show how to reason about structured graphs.
An Ode to Arrows
"... Abstract. We study a number of embedded DSLs for autonomous ordinary differential equations (autonomous ODEs) in Haskell. A naive implementation based on the lazy tower of derivatives is straightforward but has serious time and space leaks due to the loss of sharing when handling cyclic and infinite ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Abstract. We study a number of embedded DSLs for autonomous ordinary differential equations (autonomous ODEs) in Haskell. A naive implementation based on the lazy tower of derivatives is straightforward but has serious time and space leaks due to the loss of sharing when handling cyclic and infinite data structures. In seeking a solution to fix this problem, we explore a number of DSLs ranging from shallow to deep embeddings, and middlegrounds in between. We advocate a solution based on arrows, an abstract notion of computation that offers both a succinct representation and an effective implementation. Arrows are ubiquitous in their combinator style that happens to capture both sharing and recursion elegantly. We further relate our arrowbased DSL to a more constrained form of arrows called causal commutative arrows, the normalization of which leads to a staged compilation technique improving ODE performance by orders of magnitude. 1
ISSN 02496399 ISRN INRIA/RR6315FR+ENGYet Another Implementation of Attribute Evaluation
"... apport de recherche ..."
Safe Corecursion in coFJ ∗
"... In previous work we have presented COFJ, an extension to Featherweight Java that promotes coinductive programming, a subparadigm expressly devised to ease highlevel programming and reasoning with cyclic data structures. The COFJ language supports cyclic objects and regularly corecursive methods, t ..."
Abstract
 Add to MetaCart
In previous work we have presented COFJ, an extension to Featherweight Java that promotes coinductive programming, a subparadigm expressly devised to ease highlevel programming and reasoning with cyclic data structures. The COFJ language supports cyclic objects and regularly corecursive methods, that is, methods whose invocation terminates not only when the corresponding call trace is finite (as happens with ordinary recursion), but also when such a trace is infinite but cyclic, that is, can be specified by a regular term, or, equivalently, by a finite set of recursive syntactic equations. In COFJ it is not easy to ensure that the invocation of a corecursive method will return a welldefined value, since the recursive equations corresponding to the regular trace of the recursive calls may not admit a (unique) solution; in such cases we say that the value returned by the method call is undetermined. In this paper we propose two new contributions. First, we design a simpler construct for defining corecursive methods and, correspondingly, provide a more intuitive operational semantics. For this COFJ variant, we are able to define a type system that allows the user to specify that certain corecursive methods cannot return an undetermined value; in this way, it is possible to prevent unsafe use of such a value. The operational semantics and the type system of COFJ are fully formalized, and the soundness of the type system is proved.
[Logics and meanings of programs]: Studies of Program Constructs
"... Despite cyclic data structures occur often in many application domains, objectoriented programming languages provide poor abstraction mechanisms for dealing with cyclic objects. Such a deficiency is reflected also in the research on theoretical foundation of objectoriented languages; for instance, ..."
Abstract
 Add to MetaCart
Despite cyclic data structures occur often in many application domains, objectoriented programming languages provide poor abstraction mechanisms for dealing with cyclic objects. Such a deficiency is reflected also in the research on theoretical foundation of objectoriented languages; for instance, Featherweigh Java (FJ), which is one of the most widespread objectoriented calculi, does not allow creation and manipulation of cyclic objects. We propose an extension to Featherweight Java, called COFJ, where it is possible to define cyclic objects, abstractly corresponding to regular terms, and where an abstraction mechanism, called regular corecursion, is provided for supporting implementation of coinductive operations on cyclic objects. We formally define the operational semantics of COFJ, and provide a handful of examples showing the expressive power of regular corecursion; such a mechanism promotes a novel programming style particularly wellsuited for implementing cyclic data structures, and for supporting coinductive reasoning. Categories and Subject Descriptors D.3.1 [Programming languages]: Formal Definitions and Theory—Semantics; F.3.2 [Logics and meanings of programs]: Semantics