Streams with a bottom in functional languages

3Citations
Citations of this article
3Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

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 l ⊥-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 ⊥-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 ⊥-streams as a subtype of [Bool]. © Springer-Verlag Berlin Heidelberg 2005.

Cite

CITATION STYLE

APA

Tsuiki, H., & Sugihara, K. (2005). Streams with a bottom in functional languages. In Lecture Notes in Computer Science (Vol. 3444, pp. 201–216). Springer Verlag. https://doi.org/10.1007/978-3-540-31987-0_15

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free