Term graph rewriting: theory and practice
Term graph rewriting: theory and practice
A call-by-need lambda calculus
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
FPCA '95 Proceedings of the seventh international conference on Functional programming languages and computer architecture
An abstract data type for real numbers
Theoretical Computer Science
Computable analysis: an introduction
Computable analysis: an introduction
Real number computation through gray code embedding
Theoretical Computer Science
Computational Dimension of Topological Spaces
CCA '00 Selected Papers from the 4th International Workshop on Computability and Complexity in Analysis
Implementing Declarative Parallel Bottom-Avoiding Choice
SBAC-PAD '02 Proceedings of the 14th Symposium on Computer Architecture and High Performance Computing
Semantics of a Sequential Language for Exact Real-Number Computation
LICS '04 Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science
The Implementation of Functional Programming Languages (Prentice-Hall International Series in Computer Science)
Hi-index | 0.00 |
When an infinite sequence contains a bottom cell, we cannot access the rest of the sequence with the ordinary stream access. On the other hand, when we consider an extended stream access with two heads, we can read or write 1$\bot$-sequences, which are infinite sequences with at most one bottom cell. In this paper, we present a way of extending a lazy functional language with such an extended stream access in the realm of sequential computation. It has an application in real number computation in that the set of real numbers is topologically embedded in the set of 1 $\bot$-sequences [16], and therefore we can consider a program with such an extended stream access as directly manipulating real numbers. We implemented this mechanism by modifying the runtime of the Hugs system, which is a graph-reduction based implementation of the Haskell language. We present programming examples like addition and multiplication on real numbers in this extended Haskell. For this implementation, we extended Haskell with the gamb operator, which works just as McCarthy's bottom-avoiding nondeterministic choice operator “amb”. The difference is that it is realized in the realm of sequential computation, and that it is applicable only when the graph representations of the arguments share the same redex. In order to show that programs corresponding to two-head stream accesses satisfy this condition, we introduce a PCF-based calculus of term-graphs and define a data-type of 1 $\bot$-streams as a subtype of [Bool].