|
ABSTRACT
The benefits of programming in a functional style are well known. In particular, algorithms that are expressed as compositions of functions operating on sequences/vectors/streams of data elements are easier to understand and modify than equivalent algorithms expressed as loops. Unfortunately, this kind of expression is not used anywhere near as often as it could be, for at least three reasons: (1) most programmers are less familiar with this kind of expression than with loops; (2) most programming languages provide poor support for this kind of expression; and (3) when support is provided, it is seldom effcient.
In any programming language, the second and third problems can be largely solved by introducing a data type called series, a comprehensive set of procedures operating on series, and a preprocessor (or compiler extension) that automatically converts most series expressions into efficient loops. A set of restrictions specifies which series expressions can be optimized. If programmers stay within the limits imposed, they are guaranteed of high efficiency at all times.
A common Lisp macro package supporting series has been in use for some time. A prototype demonnstrates that series can be straightforwardly supported in Pascal.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
 |
2
|
|
| |
3
|
ALLEN, F., AND COCKE, J. A catalogue of optimizing transformations. In Design and Optimization of Compilers. R. Rustin, Ed.~ Prentice Hall, New York. 1971.
|
 |
4
|
|
 |
5
|
|
| |
6
|
BARSTOW, D. Automatie progranmfing for streams. In Proceedings of the 9th International Joint Conference on Artificial Intelligence (Aug. 1985). 232 237.
|
 |
7
|
|
| |
8
|
|
| |
9
|
|
| |
10
|
|
| |
11
|
BLOSS, A., HUDAK, P., AND YOUNG, J. Code optimizations for lazy evaluation. Lisp and Symbolic Comput. 1, 2 (Sept. 1988), 147 164.
|
| |
12
|
|
| |
13
|
BURKE, G., AND MOON, D Loop iteration macro. Massachusetts Institute of Technology Rep. LCS/TM-169, July 1980.
|
 |
14
|
|
 |
15
|
|
 |
16
|
|
| |
17
|
FRIEDMAN, D., AND WISE, D. CONS should not evaluate its arguments. University of Indmna Computer Science Department Rep. 44, Nov. 1975.
|
| |
18
|
GOLDBERG, A., AND PAIGE, R. Stream processing. Rutgers University Laboratory for Computer Systems Research Rep. LCSR-TR-46, Aug. 1983.
|
| |
19
|
|
| |
20
|
|
| |
21
|
|
 |
22
|
|
| |
23
|
HARTMANIS, J., LEWIS, P.~ AND STEARNS, R. Classification of computations by rime and mernory requirements. In Proceedings IFIP Congress 65. Spartan Books~ Washington DC, 1965, 31 35.
|
 |
24
|
|
| |
25
|
|
| |
26
|
KAHN, CJ., AND MACQUEEN, D. Corontines and networks of parallel processes. In Proceedings 1977 IFIP Congress. North-Holland, Amsterdam, 1977.
|
 |
27
|
|
| |
28
|
LISKOV, B., et. al (?,LU Re~orence Manual. Springer-Verlag. New York, 1981.
|
| |
29
|
ORWANT, J. Support of obviously syn~hronizablp serres expressions in Pascal. Massachusetts Institute of Technology Rep. AI/WP-312, Sept. 1988.
|
| |
30
|
PERDUE, C , AND xvVATERS, R. Generators and gatherers. In Common Lisp: the language, 2nd Ed. G Steele Jr., Ed., Digital Press, Burhngton, MA, 1990, 956-959
|
 |
31
|
|
| |
32
|
|
 |
33
|
|
| |
34
|
R,ICH, C., AND WATERS, R. The Prograrnmer's Apprentice. Addison-Wesley, Reading MA, 1990.
|
| |
35
|
RUTH, CI , ALTER, S , AND MARTIN, W. A very high level language for business data pro- ~essing. Massachusetts Institute of Technology Rep LCS/TR-254, 1981.
|
| |
36
|
|
| |
37
|
|
| |
38
|
TEITELMAN, W Interlisp Reference Manual. Xerox PARC, 1978.
|
 |
39
|
Philip Wadler, Applicative style programming, program transformation, and list operators, Proceedings of the 1981 conference on Functional programming languages and computer architecture, p.25-32, October 18-22, 1981, Portsmouth, New Hampshire, United States
[doi> 10.1145/800223.806759]
|
 |
40
|
|
| |
41
|
|
| |
42
|
\~ATEaS, R A method for analyzing loop programs. IEEE Trans Softw. Eng. 5, 3 (Mav 1979), 237-247.
|
| |
43
|
WATERS, R. LetS. An expressional loop notation Massachusetts Instltute of Technology Rep AIM-680a, Oct. 1982.
|
 |
44
|
|
 |
45
|
|
| |
46
|
WATERS, R Using obviously synchronizable series expressions instead of loops. In Proeeedings 1988 hiternational CoIlference on Computer Languages (Miami, FL, Oct. 1988). IEEE Computer Society Press, New York, 1988, 338-346.
|
| |
47
|
|
| |
48
|
|
| |
49
|
WmE, D. Generator expressions. USC Information Sciences Inst~tute P~ep. ISI/RR-83-116, 1983
|
| |
50
|
XvVULF, ~V., LONLDON, P~ , AND ~HAVV, M An introduction to the construction and venfication of Alphard programs. IEEE Trans. Softw. Eng. 2, 4 (Dec. 1976), 253 265.
|
| |
51
|
Military Standard Ada Programmmg Language. ANSI/MIL-STD-1815A-1983, U.S. Government Printing Office, Feb. 1983.
|
REVIEW
"Donald Cohen : Reviewer"
A series is a possibly unbounded sequence of values. Compositions
of functions that operate on series are generally briefer and more
easily understood than alternative expressions of the same computation,
for example, the sum of the squares of
more...
|