## Ensuring Streams Flow (1997)

Venue: | Proc. 6 th AMAST |

Citations: | 15 - 1 self |

### BibTeX

@INPROCEEDINGS{Telford97ensuringstreams,

author = {Alastair Telford and David Turner},

title = {Ensuring Streams Flow},

booktitle = {Proc. 6 th AMAST},

year = {1997},

pages = {509--523},

publisher = {Springer}

}

### OpenURL

### Abstract

. It is our aim to develop an elementary strong functional programming (ESFP) system. To be useful, ESFP should include structures such as streams which can be computationally unwound infinitely often. We describe a syntactic analysis to ensure that infinitely proceeding structures, which we shall term codata, are productive. This analysis is an extension of the check for guardedness that has been used with definitions over coinductive types in Martin-Lof's type theory and in the calculus of constructions. Our analysis is presented as a form of abstract interpretation that allows a wider syntactic class of corecursive definitions to be recognised as productive than in previous work. Thus programmers will have fewer restrictions on their use of infinite streams within a strongly normalizing functional language. 1 Introduction We aim to develop an Elementary Strong Functional Programming (ESFP) system. That is, we wish to exhibit a language that has the strong normalization (every progr...

### Citations

1399 |
A Discipline of Programming
- Dijkstra
- 1976
(Show Context)
Citation Context ...Coquand [2] or Gim'enez [5]. The Hamming function, ham is defined as the list of positive integers that have only 2 and 3 as their prime factors --- further details on such a function can be found in =-=[4]-=-. It and functions used in its definition are given in a Haskell-like syntax in Fig. 3. The type Colist here consists of the streams of integers. Further examples of guardedness analysis, including a ... |

1329 |
A calculus of communicating systems
- Milner
- 1980
(Show Context)
Citation Context ...rom the stream. Coquand [2] in Type Theory, and Gim'enez [5], in the Calculus of (Inductive) Constructions, have used the idea of guardedness, first proposed by Milner in the area of process algebras =-=[15]-=-, to produce methods for checking whether corecursive terms are normalizable. We argue that their notion of guardedness is too restrictive for programming practice in that it precludes definitions suc... |

936 | A theory of type polymorphism in progra.mming
- Milner
- 1978
(Show Context)
Citation Context ...h as dependent types, computationally irrelevant proof objects) of Martin-Lof's type theory [11,20]. We would like our language to have a type system straightforwardly based on that of Hindley-Milner =-=[6,14]-=- and to be similar in usage to a language such as Miranda 1 [22]. The case for such a language is set out in [25] --- briefly, we believe that such a language will allow direct equational reasoning wh... |

285 | Why Functional Programming Matters
- Hughes
- 1990
(Show Context)
Citation Context ...amming languages, such as Miranda, have exploited the idea of lazy evaluation to introduce the idea of infinite data structures. Hughes has pointed out the programming advantages of infinite lists in =-=[9]-=-. The disadvantages of these methods is that they rely upon a fixed evaluation strategy. In Miranda, definitions such as ones = 1 : ones only produce useful results with a lazy evaluation strategy (i.... |

157 |
An intuitionistic theory of types: Predicative part
- Martin-Löf
- 1975
(Show Context)
Citation Context ...rminates) and Church-Rosser (reduction strategies converge) properties whilst avoiding the complexities (such as dependent types, computationally irrelevant proof objects) of Martin-Lof's type theory =-=[11,20]-=-. We would like our language to have a type system straightforwardly based on that of Hindley-Milner [6,14] and to be similar in usage to a language such as Miranda 1 [22]. The case for such a languag... |

108 |
The principal type scheme of an object in combinatory logic
- Hindley
- 1969
(Show Context)
Citation Context ...h as dependent types, computationally irrelevant proof objects) of Martin-Lof's type theory [11,20]. We would like our language to have a type system straightforwardly based on that of Hindley-Milner =-=[6,14]-=- and to be similar in usage to a language such as Miranda 1 [22]. The case for such a language is set out in [25] --- briefly, we believe that such a language will allow direct equational reasoning wh... |

94 |
Inductive definitions, semantics and abstract interpretation
- Cousot, Cousot
- 1992
(Show Context)
Citation Context ... least fixed points and ascending chains. However, we have used the definitions here to retain compatibility with Coquand's approach. Ensuring Streams Flow 9 G(f; f; h) def = 0 (2) G(f; c; h) def = ! =-=(3)-=- G(f; x; h) def = ! (4) G(f; fname; h) def = S(f; fname; hi) (5) G(f; x:E; h) def = G(f; E; h) (6) G(f; C a1 : : : an ; h) def = 1 + i=n min i=1 G(f; a i ; h) (7) G(f; F a; h) def = F(f; F; 1; hai; h)... |

83 | Infinite objects in type theory
- Coquand
- 1994
(Show Context)
Citation Context ...data structure will terminate. This means that, for example, the heads of infinite lists must be well-defined. Or, to put it another way, there is a continuous "flow" of data from the stream=-=. Coquand [2]-=- in Type Theory, and Gim'enez [5], in the Calculus of (Inductive) Constructions, have used the idea of guardedness, first proposed by Milner in the area of process algebras [15], to produce methods fo... |

71 |
Codifying guarded definitions with recursive schemes
- Giménez
- 1994
(Show Context)
Citation Context ...is means that, for example, the heads of infinite lists must be well-defined. Or, to put it another way, there is a continuous "flow" of data from the stream. Coquand [2] in Type Theory, and=-= Gim'enez [5]-=-, in the Calculus of (Inductive) Constructions, have used the idea of guardedness, first proposed by Milner in the area of process algebras [15], to produce methods for checking whether corecursive te... |

66 |
Backwards analysis of functional programs
- Hughes
- 1988
(Show Context)
Citation Context ...hown how different semantic views of infinite structures may be related through abstract interpretation. 3 [8] gives a good summary of abstract interpretation and backwards analysis in particular and =-=[7]-=- gives further details of backwards analysis. Ensuring Streams Flow 7 neither guarded nor is it split up into its component parts. Therefore we know that the guardedness level of the result is 0. We t... |

17 | Walther Recursion
- McAllester, Arkoudas
- 1996
(Show Context)
Citation Context ...tract domain, A. It would also be worth comparing such an approach to that of Walther recursion where a decidable test for a broader class of definitions than primitive recursion has been established =-=[12]-=-. Another avenue for future research would be to investigate the meta-theoretic properties of this analysis. We have employed a backwards analysis in the style of Hughes [7] and it is unclear whether ... |

11 |
Head strictness is not monotonic abstract property
- Kamin
- 1992
(Show Context)
Citation Context ...that, for certain definitions, we have to determine whether the head of a Colist is guarded. It is known that, using a standard forward analysis, it is not possible to detect head-strictness of lists =-=[10]-=-. It also remains to show precisely the complexity of this abstract interpretation process. We have suggested in [19] that the overhead of performing this analysis should be polynomial in practice and... |

10 |
Infinite objects in type theory
- Mendler, Panangaden, et al.
- 1986
(Show Context)
Citation Context ...es for codata. top-level language may be translated. These rules, given in natural deduction style, are shown in Fig. 1 and were first given in [24]. They are derived from those of Mendler and others =-=[13]-=- for the Nuprl system, a variant of type theory. Briefly, recursive occurrences of a type are replaced with their suspension (denoted with a &). This terminology comes from the fact that each layer of... |