Results 1  10
of
12
Arrows, like monads, are monoids
 Proc. of 22nd Ann. Conf. on Mathematical Foundations of Programming Semantics, MFPS XXII, v. 158 of Electron. Notes in Theoret. Comput. Sci
, 2006
"... Monads are by now wellestablished as programming construct in functional languages. Recently, the notion of “Arrow ” was introduced by Hughes as an extension, not with one, but with two type parameters. At first, these Arrows may look somewhat arbitrary. Here we show that they are categorically fai ..."
Abstract

Cited by 18 (1 self)
 Add to MetaCart
(Show Context)
Monads are by now wellestablished as programming construct in functional languages. Recently, the notion of “Arrow ” was introduced by Hughes as an extension, not with one, but with two type parameters. At first, these Arrows may look somewhat arbitrary. Here we show that they are categorically fairly civilised, by showing that they correspond to monoids in suitable subcategories of bifunctors C op ×C → C. This shows that, at a suitable level of abstraction, arrows are like monads — which are monoids in categories of functors C → C. Freyd categories have been introduced by Power and Robinson to model computational effects, well before Hughes ’ Arrows appeared. It is often claimed (informally) that Arrows are simply Freyd categories. We shall make this claim precise by showing how monoids in categories of bifunctors exactly correspond to Freyd categories.
Gradual Refinement Blending Pattern Matching with Data Abstraction
"... Abstract. Pattern matching is advantageous for understanding and reasoning about function definitions, but it tends to tightly couple the interface and implementation of a datatype. Significant effort has been invested in tackling this loss of modularity; however, decoupling patterns from concrete r ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
(Show Context)
Abstract. Pattern matching is advantageous for understanding and reasoning about function definitions, but it tends to tightly couple the interface and implementation of a datatype. Significant effort has been invested in tackling this loss of modularity; however, decoupling patterns from concrete representations while maintaining soundness of reasoning has been a challenge. Inspired by the development of invertible programming, we propose an approach to abstract datatypes based on a rightinvertible language rinv—every function has a right (or pre) inverse. We show how this new design is able to permit a smooth incremental transition from programs with algebraic datatypes and pattern matching, to ones with proper encapsulation (implemented as abstract datatypes), while maintaining simple and sound reasoning.
Freyd is Kleisli, for arrows
 In C. McBride, T. Uustalu, Proc. of Wksh. on Mathematically Structured Programming, MSFP 2006, Electron. Wkshs. in Computing. BCS
, 2006
"... Arrows have been introduced in functional programming as generalisations of monads. They also generalise comonads. Fundamental structures associated with (co)monads are Kleisli categories and categories of (EilenbergMoore) algebras. Hence it makes sense to ask if there are analogous structures for ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
(Show Context)
Arrows have been introduced in functional programming as generalisations of monads. They also generalise comonads. Fundamental structures associated with (co)monads are Kleisli categories and categories of (EilenbergMoore) algebras. Hence it makes sense to ask if there are analogous structures for Arrows. In this short note we shall take first steps in this direction, and identify for instance the Freyd
Everything Is Everything” Revisited: Shapeshifting Data Types with Isomorphisms and Hylomorphisms
 Complex Systems
"... This paper is an exploration of isomorphisms between elementary data types (e.g., natural numbers, sets, finite functions, graphs, hypergraphs) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded hi ..."
Abstract

Cited by 5 (4 self)
 Add to MetaCart
(Show Context)
This paper is an exploration of isomorphisms between elementary data types (e.g., natural numbers, sets, finite functions, graphs, hypergraphs) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides anytoany encodings automatically. A few examples of free algorithms obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to succinct data representations and the generation of random instances. 1.
Declarative Combinatorics: Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell – unpublished draft –
, 808
"... This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals etc.) and their extension to hereditarily fin ..."
Abstract

Cited by 4 (4 self)
 Add to MetaCart
This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals etc.) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides anytoany encodings automatically. A few examples of “free algorithms ” obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to succinct data representations and generation of random instances. The paper is part of a larger effort to cover in a declarative programming paradigm some fundamental combinatorial generation algorithms along the lines of Knuth’s recent work (Knuth 2006). In 440 lines of Haskell code we cover 20 data types and, through the use of the embedded combinator language, provide 380 distinct bijective encodings between them. The selfcontained source code of the paper, as generated from a literate Haskell program, is available at
Canonical Forms in Interactive Exercise Assistants
, 2009
"... Interactive exercise assistants support students in practicing exercises, and acquiring procedural skills. Many mathematical topics can be practiced in such assistants. Ideally, an interactive exercise assistant not only validates final answers, but also comments on intermediate steps submitted by ..."
Abstract

Cited by 4 (4 self)
 Add to MetaCart
(Show Context)
Interactive exercise assistants support students in practicing exercises, and acquiring procedural skills. Many mathematical topics can be practiced in such assistants. Ideally, an interactive exercise assistant not only validates final answers, but also comments on intermediate steps submitted by a student, provides hints on how to proceed, and presents workedout examples. For these purposes, fine control over the symbolic simplification procedures of the underlying mathematical machinery is needed. In this paper, we introduce views for mathematical expressions. A view defines an equivalence relation by choosing a canonical form of mathematical expressions. We use views to track and recognize intermediate answers, to help in presenting expressions to a user, and to control the granularity of the steps in workedout examples. We develop the concept of a view, discuss the laws it satisfies, and show how views are composed, which means that they can be used for multiple exercise classes. 1
Isomorphic Data Encodings and their Generalization to Hylomorphisms on Hereditarily Finite Data Types
"... Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, primes, DNA sequences e ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, primes, DNA sequences etc.) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides anytoany encodings automatically. Besides applications to experimental mathematics, a few examples of “free algorithms ” obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to selfdelimiting codes, succinct data representations and generation of random instances. The paper covers 60 data types and, through the use of the embedded combinator language, provides 3660 distinct bijective transformations between them. The selfcontained source code of the paper, as generated from a literate Haskell program, is available at
Isomorphic Data Encodings in Haskell and their Generalization to Hylomorphisms on Hereditarily Finite Data Types
, 808
"... Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, DNA sequences etc.) and ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, DNA sequences etc.) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides anytoany encodings automatically. Besides applications to experimental mathematics, a few examples of “free algorithms ” obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to selfdelimiting codes, succinct data representations and generation of random instances. The paper covers 47 data types and, through the use of the embedded combinator language, provides 2162 distinct bijective transformations between them. The selfcontained source code of the paper, as generated from a literate Haskell program, is available at
Shared Axiomatizations and Virtual Datatypes
"... In the form of a literate Haskell program, we provide a “shared axiomatization ” of Peano arithmetics, a bitstack representation of bijective base2 arithmetics, hereditarily finite sets (ZFset theory with the negation of the axiom of infinity and induction) and a few other equivalent constructs, ..."
Abstract
 Add to MetaCart
In the form of a literate Haskell program, we provide a “shared axiomatization ” of Peano arithmetics, a bitstack representation of bijective base2 arithmetics, hereditarily finite sets (ZFset theory with the negation of the axiom of infinity and induction) and a few other equivalent constructs, that turn out to express basic programming language concepts ranging from lists, sets and multisets, to trees, graphs and hypergraphs. The “axiomatization ” is described as a progressive refinement of Haskell type classes with examples of instances converging to an efficient implementation in terms of arbitrary length integers and bit operations. The resulting framework, extended with combinators providing isomorphisms between equivalent data representations, virtualizes data types as isomorphisms to a common representation supporting safe transfer of operations in the presence of polymorphic types. The selfcontained source code of the paper is available at
Translucent Abstraction: Safe Views through Invertible Programming
"... Despite the distinctive advantages of pattern matching in program understanding and reasoning, the tight coupling of interface and implementation has hampered its wider acceptance. Since the first proposal of views two decades ago, significant effort has been invested in tackling this nonmodularity ..."
Abstract
 Add to MetaCart
Despite the distinctive advantages of pattern matching in program understanding and reasoning, the tight coupling of interface and implementation has hampered its wider acceptance. Since the first proposal of views two decades ago, significant effort has been invested in tackling this nonmodularity; the obvious target has been to decouple datatype implementations from separate interfaces used for pattern matching. However, having this decoupling to coexist with soundness of reasoning has been a challenge. Inspired by the development of invertible (bidirectional) programming, we propose a design of views based on a rightinvertible language. The language is sufficiently expressive to program many of the existing and some novel view applications, with simple and sound reasoning properties: views can be manipulated as if they were datatypes and equivalent programs with respect to reasoning are guaranteed to exhibit identical operational behaviours. 1.