Programming with Streams in a Pascal-Like Language

A description is given of features which were added to a conventional programming language that will manipulate streams of values. A stream is a sequence of values of a certain fixed type. The number of elements of a stream may be determined at execution time, and evaluation of each element can be postponed until its value is actually needed. Many programs can be expressed naturally and clearly as networks of processes communicating by means of streams. The network is called a composite function and consists of several component functions. Since component functions are connected solely by streams, they greatly increase the flexibility of combinations and the reusability of programs. Loop statements can be considered as iterative statements over streams. One general problem in these networks is the mechanism of terminating each process of the network. A practical solution for this problem is presented. Comparisons to other programming styles, such as coroutines, Lisp, functional programming, and dataflow languages, are described. Three modes of execution are considered for the implementation of composite functions: parallel mode, coroutine mode, and inline mode. In the inline mode, a composite function is expanded and transformed into a single function, realizing maximum run-time efficiency. Algorithms for this expansion are given. >

[1]  Ikuo Nakata,et al.  Modelling and Analysis of Concurrent Processes Connected by Streams , 1987 .

[2]  Peter Henderson,et al.  A lazy evaluator , 1976, POPL.

[3]  Richard C. Waters,et al.  A Method for Analyzing Loop Programs , 1979, IEEE Transactions on Software Engineering.

[4]  Ken Thompson,et al.  The UNIX time-sharing system , 1974, CACM.

[5]  Flaviu Cristian,et al.  Exception Handling and Software Fault Tolerance , 1982, IEEE Transactions on Computers.

[6]  Ole-Johan Dahl,et al.  SIMULA 67 common base language, (Norwegian Computing Center. Publication) , 1968 .

[7]  Wil Plouffe,et al.  An asynchronous programming language and computing machine , 1978 .

[8]  William W. Wadge,et al.  Lucid, a nonprocedural language with iteration , 1977, CACM.

[9]  M. A. Jackson,et al.  Information systems: Modelling, sequencing and transformations , 1978, ICSE '78.

[10]  Michael Jackson,et al.  Principles of program design , 1975 .

[11]  Tetsuo Ida,et al.  Functional Programming with Streams , 1983, IFIP Congress.

[12]  Ken Moody,et al.  A coroutine mechanism for BCPL , 1980, Softw. Pract. Exp..

[13]  William H. Burge,et al.  Stream Processing Functions , 1975, IBM J. Res. Dev..

[14]  David R. Hanson,et al.  Generators in Icon , 1981, TOPL.

[15]  Gilles Kahn,et al.  Coroutines and Networks of Parallel Processes , 1977, IFIP Congress.

[16]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[17]  Mary Shaw,et al.  Abstraction and verification in Alphard: Defining and specifying iteration and generators , 1977 .

[18]  Arvind,et al.  Streams and Managers , 1980, Operating Systems Engineering.

[19]  J. Kriz,et al.  Extension of Pascal by coroutines and its application to quasi‐parallel programming and simulation , 1980, Softw. Pract. Exp..

[20]  Inmos Limited,et al.  Occam Programming Manual , 1984 .

[21]  Wayne P. Stevens How Data Flow can Improve Application Development Productivity , 1982, IBM Syst. J..

[22]  Larry Masinter,et al.  The Interlisp Programming Environment , 1981, Computer.

[23]  Craig Schaffert,et al.  Abstraction mechanisms in CLU , 1977, Commun. ACM.

[24]  Kenneth E. Iverson,et al.  Notation as a tool of thought , 1980, APLQ.

[25]  J. M. Triance,et al.  Experiences with a schematic logic preprocessor , 1980, Softw. Pract. Exp..

[26]  Philip Wadler,et al.  Applicative style programming, program transformation, and list operators , 1981, FPCA '81.

[27]  Rudolf Marty,et al.  Hierarchical Coroutines: A Mechanism for Improved Program Structure , 1979, ICSE.