Results 1  10
of
58
Primitive Recursion for HigherOrder Abstract Syntax
 Theoretical Computer Science
, 1997
"... ..."
(Show Context)
Polytypic programming
, 2000
"... ... PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of userdefined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorp ..."
Abstract

Cited by 94 (11 self)
 Add to MetaCart
(Show Context)
... PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of userdefined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorphisms, maps and traversals, as well as polytypic versions of a number of standard functions from functional programming: sum, length, zip, (==), (6), etc. Both the specification of the library and a PolyP implementation are presented.
Nested datatypes
 In MPC’98, volume 1422 of LNCS
, 1998
"... Abstract. A nested datatype, also known as a nonregular datatype, is a parametrised datatype whose declaration involves different instances of the accompanying type parameters. Nested datatypes have been mostly ignored in functional programming until recently, but they are turning out to be both th ..."
Abstract

Cited by 83 (6 self)
 Add to MetaCart
(Show Context)
Abstract. A nested datatype, also known as a nonregular datatype, is a parametrised datatype whose declaration involves different instances of the accompanying type parameters. Nested datatypes have been mostly ignored in functional programming until recently, but they are turning out to be both theoretically important and useful in practice. The aim of this paper is to suggest a functorial semantics for such datatypes, with an associated calculational theory that mirrors and extends the standard theory for regular datatypes. Though elegant and generic, the proposed approach appears more limited than one would like, and some of the limitations are discussed. 1
Accomplishments and Research Challenges in MetaProgramming
 In 2nd Int. Workshop on Semantics, Applications, and Implementation of Program Generation, LNCS 2196
, 2000
"... this paper into several sections. As an overview, in Section 2, I try and classify metaprograms into groups. The purpose of this is to provide a common vocabulary which we can use to describe metaprogramming systems in the rest of the paper ..."
Abstract

Cited by 83 (5 self)
 Add to MetaCart
(Show Context)
this paper into several sections. As an overview, in Section 2, I try and classify metaprograms into groups. The purpose of this is to provide a common vocabulary which we can use to describe metaprogramming systems in the rest of the paper
The UnderAppreciated Unfold
 In Proceedings of the Third ACM SIGPLAN International Conference on Functional Programming
, 1998
"... Folds are appreciated by functional programmers. Their dual, unfolds, are not new, but they are not nearly as well appreciated. We believe they deserve better. To illustrate, we present (indeed, we calculate) a number of algorithms for computing the breadthfirst traversal of a tree. We specify brea ..."
Abstract

Cited by 50 (11 self)
 Add to MetaCart
Folds are appreciated by functional programmers. Their dual, unfolds, are not new, but they are not nearly as well appreciated. We believe they deserve better. To illustrate, we present (indeed, we calculate) a number of algorithms for computing the breadthfirst traversal of a tree. We specify breadthfirst traversal in terms of levelorder traversal, which we characterize first as a fold. The presentation as a fold is simple, but it is inefficient, and removing the inefficiency makes it no longer a fold. We calculate a characterization as an unfold from the characterization as a fold; this unfold is equally clear, but more efficient. We also calculate a characterization of breadthfirst traversal directly as an unfold; this turns out to be the `standard' queuebased algorithm.
Fully Reflexive Intensional Type Analysis
 In Fifth ACM SIGPLAN International Conference on Functional Programming
, 2000
"... Compilers for polymorphic languages can use runtime type inspection to support advanced implementation techniques such as tagless garbage collection, polymorphic marshalling, and flattened data structures. Intensional type analysis is a typetheoretic framework for expressing and certifying such typ ..."
Abstract

Cited by 44 (7 self)
 Add to MetaCart
(Show Context)
Compilers for polymorphic languages can use runtime type inspection to support advanced implementation techniques such as tagless garbage collection, polymorphic marshalling, and flattened data structures. Intensional type analysis is a typetheoretic framework for expressing and certifying such typeanalyzing computations. Unfortunately, existing approaches to intensional analysis do not work well on types with universal, existential, or fixpoint quantifiers. This makes it impossible to code applications such as garbage collection, persistence, or marshalling which must be able to examine the type of any runtime value. We present a typed intermediate language that supports fully reflexive intensional type analysis. By fully reflexive, we mean that typeanalyzing operations are applicable to the type of any runtime value in the language. In particular, we provide both typelevel and termlevel constructs for analyzing quantified types. Our system supports structural induction on quant...
Calculate Polytypically!
 In PLILP'96, volume 1140 of LNCS
, 1996
"... A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds an ..."
Abstract

Cited by 41 (3 self)
 Add to MetaCart
(Show Context)
A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds another level of flexibility in the reusability of programming idioms and in the design of libraries of interoperable components.
Parametric HigherOrder Abstract Syntax for Mechanized Semantics
, 2008
"... We present parametric higherorder abstract syntax (PHOAS), a new approach to formalizing the syntax of programming languages in computer proof assistants based on type theory. Like higherorder abstract syntax (HOAS), PHOAS uses the meta language’s binding constructs to represent the object language ..."
Abstract

Cited by 39 (2 self)
 Add to MetaCart
(Show Context)
We present parametric higherorder abstract syntax (PHOAS), a new approach to formalizing the syntax of programming languages in computer proof assistants based on type theory. Like higherorder abstract syntax (HOAS), PHOAS uses the meta language’s binding constructs to represent the object language’s binding constructs. Unlike HOAS, PHOAS types are definable in generalpurpose type theories that support traditional functional programming, like Coq’s Calculus of Inductive Constructions. We walk through how Coq can be used to develop certified, executable program transformations over several staticallytyped functional programming languages formalized with PHOAS; that is, each transformation has a machinechecked proof of type preservation and semantic preservation. Our examples include CPS translation and closure conversion for simplytyped lambda calculus, CPS translation for System F, and translation from a language with MLstyle pattern matching to a simpler language with no variablearity binding constructs. By avoiding the syntactic hassle associated with firstorder representation techniques, we achieve a very high degree of proof automation.
Functional Programming with Graphs
 2ND ACM SIGPLAN INT. CONF. ON FUNCTIONAL PROGRAMMING
, 1997
"... Graph algorithms expressed in functional languages often suffer from their inherited imperative, statebased style. In particular, this impedes formal program manipulation. We show how to model persistent graphs in functional languages by graph constructors. This provides a decompositional view of g ..."
Abstract

Cited by 32 (11 self)
 Add to MetaCart
Graph algorithms expressed in functional languages often suffer from their inherited imperative, statebased style. In particular, this impedes formal program manipulation. We show how to model persistent graphs in functional languages by graph constructors. This provides a decompositional view of graphs which is very close to that of data types and leads to a "more functional" formulation of graph algorithms. Graph constructors enable the definition of general fold operations for graphs. We present a promotion theorem for one of these folds that allows program fusion and the elimination of intermediate results. Fusion is not restricted to the elimination of treelike structures, and we prove another theorem that facilitates the elimination of intermediate graphs. We describe an MLimplementation of persistent graphs which efficiently supports the presented fold operators. For example, depthfirstsearch expressed by a fold over a functional graph has the same complexity as the corresp...
Inductive Graphs and Functional Graph Algorithms
, 2001
"... We propose a new style of writing graph algorithms in functional languages which is based on an alternative view of graphs as inductively defined data types. We show how this graph model can be implemented efficiently, and then we demonstrate how graph algorithms can be succinctly given by recursive ..."
Abstract

Cited by 21 (2 self)
 Add to MetaCart
We propose a new style of writing graph algorithms in functional languages which is based on an alternative view of graphs as inductively defined data types. We show how this graph model can be implemented efficiently, and then we demonstrate how graph algorithms can be succinctly given by recursive function definitions based on the inductive graph view. We also regard this as a contribution to the teaching of algorithms and data structures in functional languages since we can use the functionalstyle graph algorithms instead of the imperative algorithms that are dominant today. Keywords: Graphs in Functional Languages, Recursive Graph Algorithms, Teaching Graph Algorithms in Functional Languages