Results 1 
9 of
9
Structuring DepthFirst Search Algorithms in Haskell
, 1995
"... Depthfirst search is the key to a wide variety of graph algorithms. In this paper we express depthfirst search in a lazy functional language, obtaining a lineartime implementation. Unlike traditional imperative presentations, we use the structuring methods of functional languages to construct alg ..."
Abstract

Cited by 26 (0 self)
 Add to MetaCart
Depthfirst search is the key to a wide variety of graph algorithms. In this paper we express depthfirst search in a lazy functional language, obtaining a lineartime implementation. Unlike traditional imperative presentations, we use the structuring methods of functional languages to construct algorithms from individual reusable components. This style of algorithm construction turns out to be quite amenable to formal proof, which we exemplify through a calculationalstyle proof of a far from obvious stronglyconnected components algorithm. Classifications: Computing Paradigms (functional programming) ; Environments, Implementations, and Experience (programming, graph algorithms). 1 Introduction The importance of depthfirst search (DFS) for graph algorithms was established twenty years ago by Tarjan (1972) and Hopcroft and Tarjan (1973) in their seminal work. They demonstrated how depthfirst search could be used to construct a variety of efficient graph algorithms. In practice, this...
Lazy DepthFirst Search and Linear Graph Algorithms in Haskell
 Glasgow Workshop on Functional Programming
, 1994
"... Depthfirst search is the key to a wide variety of graph algorithms. In this paper we explore the implementation of depth first search in a lazy functional language. For the first time in such languages we obtain a lineartime implementation. But we go further. Unlike traditional imperative presenta ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
Depthfirst search is the key to a wide variety of graph algorithms. In this paper we explore the implementation of depth first search in a lazy functional language. For the first time in such languages we obtain a lineartime implementation. But we go further. Unlike traditional imperative presentations, algorithms are constructed from individual components, which may be reused to create new algorithms. Furthermore, the style of program is quite amenable to formal proof, which we exemplify through a calculationalstyle proof of a stronglyconnected components algorithm. 1 Introduction Graph algorithms have long been a challenge to programmers of lazy functional languages. It has not been at all clear how to express such algorithms without using side effects to achieve efficiency. For example, many texts provide implementations of search algorithms which are quadratic in the size of the graph (see Paulson (1991), Holyer (1991), or Harrison (1993)), compared with the standard linear im...
Functional Graph Algorithms with DepthFirst Search (Preliminary Summary)
 in Glasgow Functional Programming Workshop
, 1993
"... Performing a depthfirst search of a graph is one of the fundamental approaches for solving a variety of graph algorithms. Implementing depthfirst search efficiently in a pure functional language has only become possible with the advent of imperative functional programming. In this paper we mix the ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
Performing a depthfirst search of a graph is one of the fundamental approaches for solving a variety of graph algorithms. Implementing depthfirst search efficiently in a pure functional language has only become possible with the advent of imperative functional programming. In this paper we mix the techniques of pure functional programming in the same cauldron as depthfirst search to yield a more lucid approach to viewing a variety of graph algorithms. This claim will be illustrated with several examples. 1 Introduction Graph algorithms have long been a challenge to functional programmers. It has not been at all clear how to express such algorithms without using side effects to achieve efficiency. For example, many texts provide implementations of search algorithms which are quadratic in the size of the graph (see [7, 3, 2], for instance), compared with the standard linear implementations given for imperative languages (see [1], for instance). In this paper we implement a variety of ...
Dynamic Cyclic Data Structures in Lazy Functional Languages
, 1995
"... Many popular myths have evolved about functional programming languages and their power of expression; one such myth is that "functional languages cannot construct arbitrary cyclic data structures at runtime" and therefore that functional languages are not appropriate for problems which require effi ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Many popular myths have evolved about functional programming languages and their power of expression; one such myth is that "functional languages cannot construct arbitrary cyclic data structures at runtime" and therefore that functional languages are not appropriate for problems which require efficient representations of dynamicallyspecified cyclic graph structures (such as a routefinding robot in a maze). This myth persists despite ample published work to the contrary (see for example [All89]) and is a recurring subject of debate [USE]. We provide a survey of some of the related work in this area; we then build on this work by presenting methods for both the dynamic construction of complex cyclic structures and their direct manipulation using circular programming techniques. 1 Introduction "A" "B" "C" "D" Figure 1: A small, directed, cyclic graph If one were asked to use a functional language to construct the directed graph given in Figure 1 then the resulting code might typically...
Software measurement and functional programming
, 1995
"... Software metrics have been investigated for the assessment of programs written in a functional programming language. The external attribute of programs considered in this thesis is their comprehensibility to novice programmers. This attribute has been operationalized in a number of experiments. The ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Software metrics have been investigated for the assessment of programs written in a functional programming language. The external attribute of programs considered in this thesis is their comprehensibility to novice programmers. This attribute has been operationalized in a number of experiments. The internal attribute of software which is examined is the structure. Two models for the structure of software have been employed: callgraphs and flowgraphs. The proposed controlflow model captures the operational semantics of function definitions. The objective measurement of the attributes has been supported by tools. The validation of structure metrics has been addressed in certain experiments for programminginthesmall. The structure of type expressions in functional programs has been analysed in a case study. A simple framework for software metrication proved to be useful. The validation of metrics has been linked with axioms from the representational measurement theory. The controlflow model for functional programs showed its value in the setup of an
Teaching Functional Programming to FirstYear Students
 in International Relationsâ€”International Studies Notes Special Issue
, 1993
"... In the period 19861991, experiments have been carried out with an introductory course in computer programming, based on functional programming. Due to thorough educational design and evaluation, a successful course has been developed. This has led to a revision of the computer programming education ..."
Abstract
 Add to MetaCart
In the period 19861991, experiments have been carried out with an introductory course in computer programming, based on functional programming. Due to thorough educational design and evaluation, a successful course has been developed. This has led to a revision of the computer programming education in the first year of the computer science curriculum at the University of Twente. This article describes the approach, the aim of the computer programming course, the outline and subject matter of the course and the evaluation. Educational research has been done to assess the quality of the course. Contents 1 Introduction 50 1.1 Motivation 50 1.2 The students 51 2 The computer programming course 51 2.1 Functional Programming 52 2.2 Imperative Programming 53 2.3 Programming techniques 53 2.4 Instructional material 54 3 Evaluations 55 3.1 Observations 55 3.2 Problems 56 3.3 Functional versus imperative programming 58 4 Programming project 60 4.1 Organisation 61 4.2 Railway information sys...
La programacion funcional en Haskell
, 1995
"... o se entiende aqu'i como, a la vez, mayor lejan'ia al computador y mayor cercan'ia al modo de razonar de los programadores. La distancia entre los lenguajes imperativos y la arquitectura del computador subyacente, la arquitectura Von Neumann, es mucho m'as peque~na que en el caso funcional. De hecho ..."
Abstract
 Add to MetaCart
o se entiende aqu'i como, a la vez, mayor lejan'ia al computador y mayor cercan'ia al modo de razonar de los programadores. La distancia entre los lenguajes imperativos y la arquitectura del computador subyacente, la arquitectura Von Neumann, es mucho m'as peque~na que en el caso funcional. De hecho, las construcciones de un lenguaje imperativo son un recubrimiento edulcorado de los correspondientes dispositivos del hardware. As'i, la memoria est'a representada por las variables del programa, los saltos condicionales e incondicionales del computador, por las instrucciones de control del lenguaje, y las operaciones de transferencia de datos entre la memoria y la UCP, por la instrucci'on de asignaci'on. No es posible establecer este paralelismo en el caso de la PF. Su modelo de c'omputo est'a basado, como se ha dicho, en la l'ogica ecuacional. De hecho, esta mayor distancia entre el modelo de c'omputo de la PF y el computador Von Neumann es uno de los obst'aculos para que la PF alcance u...
Strictness Analysis  Another Method
, 1993
"... Strictness analysis is a compile time analysis applicable to lazy functional programming languages. Strictness analysis can be used to significantly improve uniprocessor implementation speed and to derive nonspeculative parallelism. Many methods for doing strictness analysis have been proposed. Mos ..."
Abstract
 Add to MetaCart
Strictness analysis is a compile time analysis applicable to lazy functional programming languages. Strictness analysis can be used to significantly improve uniprocessor implementation speed and to derive nonspeculative parallelism. Many methods for doing strictness analysis have been proposed. Most of these are based on abstract interpretation and require fixpoint iteration. In this thesis we survey existing methods and then go on to define a new method which does not require fixpoint iteration. The new method is significantly more efficient than methods based on abstract interpretation. The abstract domain used is not fixed and can be expanded to obtain better accuracy. Our method is also easy to prove correct. We discuss further work necessary for the new method to realise its potential as a framework for fast and practical analyses.
A golden ratio notation . . .
, 1996
"... Several methods to perform exact computations on real numbers have been proposed in the literature. In some of these methods real numbers are represented by infinite (lazy) strings of digits. It is a well known fact that, when this approach is taken, the standard digit notation cannot be used. New f ..."
Abstract
 Add to MetaCart
Several methods to perform exact computations on real numbers have been proposed in the literature. In some of these methods real numbers are represented by infinite (lazy) strings of digits. It is a well known fact that, when this approach is taken, the standard digit notation cannot be used. New forms of digit notations are necessary. The usual solution to this representation problem consists in adding new digits in the notation, quite often negative digits. In this article we present an alternative solution. It consists in using non natural numbers as "base", that is, in using a positional digit notation where the ratio between the weight of two consecutive digits is not necessarily a natural number, as in the standard case, but it can be a rational or even an irrational number. We discuss in full detail one particular example of this form of notation: namely the one having two digits (0 and 1) and the golden ratio as base. This choice is motivated by the pleasing properties enjoyed...