Results 1  10
of
18
Elementary strong functional programming
, 1995
"... Functional programming is a good idea, but we haven’t got it quite right yet. What we have been doing up to now is weak (or partial) functional programming. What we should be doing is strong (or total) functional programming in which all computations terminate. We propose an elementary discipline o ..."
Abstract

Cited by 43 (0 self)
 Add to MetaCart
Functional programming is a good idea, but we haven’t got it quite right yet. What we have been doing up to now is weak (or partial) functional programming. What we should be doing is strong (or total) functional programming in which all computations terminate. We propose an elementary discipline of strong functional programming. A key feature of the discipline is that we introduce a type distinction between data, which is known to be finite, and codata, which is (potentially) infinite. 1 What is Functional Programming? It is widely agreed that functional programming languages make excellent introductory teaching vehicles for the basic concepts of computing. The wide range of topics covered in this symposium is evidence for that. But what is functional programming? Well, it is programming with functions, that much seems clear. But this really is not specific enough. The methods of denotational semantics show us
Representations of stream processors using nested fixed points
 Logical Methods in Computer Science
"... Abstract. We define representations of continuous functions on infinite streams of discrete values, both in the case of discretevalued functions, and in the case of streamvalued functions. We define also an operation on the representations of two continuous functions between streams that yields a ..."
Abstract

Cited by 15 (2 self)
 Add to MetaCart
Abstract. We define representations of continuous functions on infinite streams of discrete values, both in the case of discretevalued functions, and in the case of streamvalued functions. We define also an operation on the representations of two continuous functions between streams that yields a representation of their composite. In the case of discretevalued functions, the representatives are wellfounded (finitepath) trees of a certain kind. The underlying idea can be traced back to Brouwer’s justification of barinduction, or to Kreisel and Troelstra’s elimination of choicesequences. In the case of streamvalued functions, the representatives are nonwellfounded trees pieced together in a coinductive fashion from wellfounded trees. The definition requires an alternating fixpoint construction of some ubiquity.
Extending the Loop Language with HigherOrder Procedural Variables
 Special issue of ACM TOCL on Implicit Computational Complexity
, 2010
"... We extend Meyer and Ritchie’s Loop language with higherorder procedures and procedural variables and we show that the resulting programming language (called Loop ω) is a natural imperative counterpart of Gödel System T. The argument is twofold: 1. we define a translation of the Loop ω language int ..."
Abstract

Cited by 9 (6 self)
 Add to MetaCart
We extend Meyer and Ritchie’s Loop language with higherorder procedures and procedural variables and we show that the resulting programming language (called Loop ω) is a natural imperative counterpart of Gödel System T. The argument is twofold: 1. we define a translation of the Loop ω language into System T and we prove that this translation actually provides a lockstep simulation, 2. using a converse translation, we show that Loop ω is expressive enough to encode any term of System T. Moreover, we define the “iteration rank ” of a Loop ω program, which corresponds to the classical notion of “recursion rank ” in System T, and we show that both translations preserve ranks. Two applications of these results in the area of implicit complexity are described. 1
Towards formally verifiable resource bounds for realtime embedded systems
 ACM SIGBED Review— Special issues
, 2006
"... This paper describes ongoing work aimed at the construction of formal cost models and analyses that are capable of producing verifiable guarantees of resource usage (space, time and ultimately power consumption) in the context of realtime embedded systems. Our work is conducted in terms of the doma ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
This paper describes ongoing work aimed at the construction of formal cost models and analyses that are capable of producing verifiable guarantees of resource usage (space, time and ultimately power consumption) in the context of realtime embedded systems. Our work is conducted in terms of the domainspecific language Hume, a language that combines functional programming for computations with finitestate automata for specifying reactive systems. We describe an approach in which highlevel information derived from sourcecode analysis can be combined with worstcase execution time information obtained from abstract interpretation of lowlevel binary code. This abstract interpretation on the machinecode level is capable of dealing with complex architectural effects including cache and pipeline properties in an accurate way. It has been applied to several largescale commercial safetycritical systems, including the flight control system for the Airbus A380. 1
Beating the Productivity Checker Using Embedded Languages
"... Abstract. Some total languages, like Agda and Coq, allow the use of guarded corecursion to construct infinite values and proofs. Guarded corecursion is a form of recursion in which arbitrary recursive calls are allowed, as long as they are guarded by a coinductive constructor. Guardedness ensures th ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
Abstract. Some total languages, like Agda and Coq, allow the use of guarded corecursion to construct infinite values and proofs. Guarded corecursion is a form of recursion in which arbitrary recursive calls are allowed, as long as they are guarded by a coinductive constructor. Guardedness ensures that programs are productive, i.e. that every finite prefix of an infinite value can be computed in finite time. However, many productive programs are not guarded, and it can be nontrivial to put them in guarded form. This paper gives a method for turning a productive program into a guarded program. The method amounts to defining a problemspecific language as a data type, writing the program in the problemspecific language, and writing a guarded interpreter for this language. 1
Unfailing Haskell: A static checker for pattern matching
 In TFP ’05: The 6th Symposium on Trends in Functional Programming
, 2005
"... A Haskell program may fail at runtime with a patternmatch error if the program has any incomplete (nonexhaustive) patterns in definitions or case alternatives. This paper describes a static checker that allows nonexhaustive patterns to exist, yet ensures that a patternmatch error does not occur. ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
A Haskell program may fail at runtime with a patternmatch error if the program has any incomplete (nonexhaustive) patterns in definitions or case alternatives. This paper describes a static checker that allows nonexhaustive patterns to exist, yet ensures that a patternmatch error does not occur. It describes a constraint language that can be used to reason about pattern matches, along with mechanisms to propagate these constraints between program components. 1
Supercompilation and Normalisation by Evaluation
 SECOND INTERNATIONAL WORKSHOP ON METACOMPUTATION IN RUSSIA (META 2010)
, 2010
"... It has been long recognised that partial evaluation is related to proof normalisation. Normalisation by evaluation, which has been presented for theories with simple types, has made this correspondence formal. Recently Andreas Abel formalised an algorithm for normalisation by evaluation for System F ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
It has been long recognised that partial evaluation is related to proof normalisation. Normalisation by evaluation, which has been presented for theories with simple types, has made this correspondence formal. Recently Andreas Abel formalised an algorithm for normalisation by evaluation for System F. This is an important step towards the use of such techniques on practical functional programming languages such as Haskell which can reasonably be embedded in relatives of System Fω. Supercompilation is a program transformation technique which performs a superset of the simplifications performed by partial evaluation. The focus of this paper is to formalise the relationship between supercompilation and normalisation by evaluation for System F with recursive types and terms.
Corecursive Algebras: A Study of General Structured Corecursion (Extended Abstract)
"... Abstract. We study general structured corecursion, dualizing the work of Osius, Taylor, and others on general structured recursion. We call an algebra of a functor corecursive if it supports general structured corecursion: there is a unique map to it from any coalgebra of the same functor. The conce ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Abstract. We study general structured corecursion, dualizing the work of Osius, Taylor, and others on general structured recursion. We call an algebra of a functor corecursive if it supports general structured corecursion: there is a unique map to it from any coalgebra of the same functor. The concept of antifounded algebra is a statement of the bisimulation principle. We show that it is independent from corecursiveness: Neither condition implies the other. Finally, we call an algebra focusing if its codomain can be reconstructed by iterating structural refinement. This is the strongest condition and implies all the others. 1
Mixing Induction and Coinduction
, 2009
"... Purely inductive definitions give rise to treeshaped values where all branches have finite depth, and purely coinductive definitions give rise to values where all branches are potentially infinite. If this is too restrictive, then an alternative is to use mixed induction and coinduction. This techn ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Purely inductive definitions give rise to treeshaped values where all branches have finite depth, and purely coinductive definitions give rise to values where all branches are potentially infinite. If this is too restrictive, then an alternative is to use mixed induction and coinduction. This technique appears to be fairly unknown. The aim of this paper is to make the technique more widely known, and to present several new applications of it, including a parser combinator library which guarantees termination of parsing, and a method for combining coinductively defined inference systems with rules like transitivity. The developments presented in the paper have been formalised and checked in Agda, a dependently typed programming language and proof assistant.
Mesa Language
, 1979
"... We describe an automated analysis of Haskell 98 programs to check statically that, despite the possible use of partial (or nonexhaustive) pattern matching, no patternmatch failure can occur. Our method is an iterative backward analysis using a novel form of patternconstraint to represent sets of d ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We describe an automated analysis of Haskell 98 programs to check statically that, despite the possible use of partial (or nonexhaustive) pattern matching, no patternmatch failure can occur. Our method is an iterative backward analysis using a novel form of patternconstraint to represent sets of data values. The analysis is defined for a core firstorder language to which Haskell 98 programs are reduced. Our analysis tool has been successfully applied to a range of programs, and our techniques seem to scale well. Throughout the paper, methods are represented much as we have implemented them in practice, again in Haskell.