Results 1 -
8 of
8
Generic trace semantics via coinduction
- Logical Methods in Comp. Sci
, 2007
"... Abstract. Trace semantics has been defined for various kinds of state-based systems, notably with different forms of branching such as non-determinism vs. probability. In this paper we claim to identify one underlying mathematical structure behind these “trace ..."
Abstract
-
Cited by 12 (5 self)
- Add to MetaCart
Abstract. Trace semantics has been defined for various kinds of state-based systems, notably with different forms of branching such as non-determinism vs. probability. In this paper we claim to identify one underlying mathematical structure behind these “trace
Monadic augment and generalised short cut fusion
- Journal of Functional Programming
, 2005
"... Monads are commonplace programming devices that are used to uniformly structure computations with effects such as state, exceptions, and I/O. This paper further develops the monadic programming paradigm by investigating the extent to which monadic computations can be optimised by using generalisatio ..."
Abstract
-
Cited by 9 (5 self)
- Add to MetaCart
Monads are commonplace programming devices that are used to uniformly structure computations with effects such as state, exceptions, and I/O. This paper further develops the monadic programming paradigm by investigating the extent to which monadic computations can be optimised by using generalisations of short cut fusion to eliminate monadic structures whose sole purpose is to “glue together ” monadic program components. We make several contributions. First, we show that every inductive type has an associated build combinator and an associated short cut fusion rule. Second, we introduce the notion of an inductive monad to describe those monads that give rise to inductive types, and we give examples of such monads which are widely used in functional programming. Third, we generalise the standard augment combinators and cata/augment fusion rules for algebraic data types to types induced by inductive monads. This allows us to give the first cata/augment rules for some common data types, such as rose trees. Fourth, we demonstrate the practical applicability of our generalisations by providing Haskell implementations for all concepts and examples in the paper. Finally, we offer deep theoretical insights by showing that the augment combinators are monadic in nature, and thus that our cata/build and cata/augment rules are arguably the best generally applicable fusion rules obtainable.
Towards Merging Recursion and Comonads
, 2000
"... Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold op ..."
Abstract
-
Cited by 8 (2 self)
- Add to MetaCart
Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold operator on the product comonad. Both versions capture functions that require extra arguments for their computation and are related with the notion of strong datatype. 1 Introduction One of the main features of recursive operators derivable from datatype definitions is that they impose a structure upon programs which can be exploited for program transformation. Recursive operators structure functional programs according to the data structures they traverse or generate and come equipped with a battery of algebraic laws, also derivable from type definitions, which are used in program calculations [24, 11, 5, 15]. Some of these laws, the so-called fusion laws, are particularly interesting in p...
Generic trace theory
- International Workshop on Coalgebraic Methods in Computer Science (CMCS 2006), volume 164 of Elect. Notes in Theor. Comp. Sci
, 2006
"... Trace semantics has been defined for various non-deterministic systems with different input/output types, or with different types of “non-determinism ” such as classical non-determinism (with a set of possible choices) vs. probabilistic nondeterminism. In this paper we claim that these various forms ..."
Abstract
-
Cited by 6 (4 self)
- Add to MetaCart
Trace semantics has been defined for various non-deterministic systems with different input/output types, or with different types of “non-determinism ” such as classical non-determinism (with a set of possible choices) vs. probabilistic nondeterminism. In this paper we claim that these various forms of “trace semantics” are instances of a single categorical construction, namely coinduction in a Kleisli category. This claim is based on our main technical result that an initial algebra in
Deriving animations from recursive definitions
- In Draft Proceedings of the 14th International Workshop on the Implementation of Functional Languages (IFL’02
, 2002
"... Abstract. This paper describes a generic method to derive an animation from a recursive definition, with the objective of debugging and understanding this definition by expliciting its control structure. This method is based on a well known algorithm of factorizing a recursive function into the comp ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Abstract. This paper describes a generic method to derive an animation from a recursive definition, with the objective of debugging and understanding this definition by expliciting its control structure. This method is based on a well known algorithm of factorizing a recursive function into the composition of the producer and the consumer of its call tree. We developed a systematic method to transform both the resulting functions in order to draw the tree step by step. The theory of data types as fixed points of functors, generic recursion patterns, and monads, are fundamental to our work and are briefly presented. Using polytypic implementations of monadic recursion patterns and an application to manipulate and generate graph layouts we developed a prototype that, given a recursive function written in a subset of Haskell, returns a function whose execution yields the desired animation. 1
Towards Merging Recursion and Comonads
, 2000
"... Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold op ..."
Abstract
- Add to MetaCart
Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold operator on the product comonad. Both versions capture functions that require extra arguments for their computation and are related with the notion of strong datatype. 1 Introduction One of the main features of recursive operators derivable from datatype definitions is that they impose a structure upon programs which can be exploited for program transformation. Recursive operators structure functional programs according to the data structures they traverse or generate and come equipped with a battery of algebraic laws, also derivable from type definitions, which are used in program calculations [24, 11, 5, 15]. Some of these laws, the so-called fusion laws, are particularly interesting in p...
Short Cut Fusion of Recursive Programs with Computational Effects
- SYMPOSIUM ON TRENDS IN FUNCTIONAL PROGRAMMING 2008 (TFP'08)
, 2008
"... Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standardbuild combinator which expresses uniform production of functorial contexts containing data of inductive types. It a ..."
Abstract
- Add to MetaCart
Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standardbuild combinator which expresses uniform production of functorial contexts containing data of inductive types. It also proves correct a fusion rule which generalizes thefold/build andfold/buildp rules from the literature, and eliminates intermediate data structures of inductive types without disturbing the contexts in which they are situated. An important special case arises when this context is monadic. When it is, a second rule for fusing combinations of producers and consumers via monad operations, rather than via composition, is also available. We give examples illustrating both rules, and consider their coalgebraic duals as well.
21.1 GENERALIZING SHORT CUT FUSION 21.1.1 Introducing Short Cut Fusion
"... Abstract: Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standard build combinator which expresses uniform production of functorial contexts containing data of inductive ..."
Abstract
- Add to MetaCart
Abstract: Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standard build combinator which expresses uniform production of functorial contexts containing data of inductive types. It also proves correct a fusion rule which generalizes the fold / build and fold/buildp rules from the literature, and eliminates intermediate data structures of inductive types without disturbing the contexts in which they are situated. An important special case arises when this context is monadic. When it is, a second rule for fusing combinations of producers and consumers via monad operations, rather than via composition, is also available. We give examples illustrating both rules, and consider their coalgebraic duals as well.

