Abstract
It is difficult to achieve elegance, efficiency, and parallelism simultaneously in functional programs that manipulate large data structures. We demonstrate this through careful analysis of program examples using three common functional data-structuring approaches-lists using Cons, arrays using Update (both fine-grained operators), and arrays using make-array (a “bulk” operator). We then present I-structure as an alternative and show elegant, efficient, and parallel solutions for the program examples in Id, a language with I-structures. The parallelism in Id is made precise by means of an operational semantics for Id as a parallel reduction system. I-structures make the language nonfunctional, but do not lose determinacy. Finally, we show that even in the context of purely functional languages, I-structures are invaluable for implementing functional data abstractions.
- 1 ACKERMAN, W.B. A structure memory for data flow computers. Master's thesis and Tech. Rep. TR-186, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge, 1978. Google Scholar
- 2 ALLEN, J., AND KENNEDY, K. PFC: A program to convert FORTRAN to parallel form. Tech. Rep. MASC-TR82-6, Rice University, Houston, Tex., March 1982.Google Scholar
- 3 ARIOLA, Z., AND ARVIND. P-TAC: A parallel intermediate language. Tech. Rep. CSG Memo 295, MIT Lab. for Computer Science, Massachusetts ilnstitute of Technology, Cambridge, Jan. 1989.Google Scholar
- 4 ARVIND, AND CULLER, D.E. Dataflow architectures. In Annual Reviews in Computer Science, vol. 1. Annual Reviews Inc., Palo Alto, Calif., 1986, pp. 225-253. Google Scholar
- 5 ARVIND, AND NIKH1L, R.S. Executing a program on the MIT tagged-token datafiow architecture. IEEE Trans. Comput., 1989. To be published. An earlier version appeared in Proceedings of the PARLE Conference (Eindhoven, The Netherlands, June 15-19, 1987). Springer-Verlag LNCS 259, New York, 1987. Google Scholar
- 6 ARVIND, NIKHIL, R. S., AND PINGALI, K.K. Id nouveau reference manual, part II: Semantics. Tech. Rep., Computation Structures Group, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge, 1987.Google Scholar
- 7 ARVIND, AND THOMAS, R.E. I-Structures: An efficient data structure for functional languages. Tech. Rep. MIT/LCS/TM-178, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge, 1981.Google Scholar
- 8 BARENDREGT, H., AND VAN LEEUWEN, M. Functional programming and the language TALE. Tech. Rep. TR 412, Mathematical Institute, Utrecht, The Netherlands, 1985.Google Scholar
- 9 CULLER, D.E. Effective datafiow execution of scientific applications. Ph.D. dissertation, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge. To appear.Google Scholar
- 10 CULLER, D.E. Resource management for the tagged token datafiow architecture. Tech. Rep. TR-332, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge, 1985. Google Scholar
- 11 CULLER, D. E., AND ARVINO. Resource requirements of datafiow programs. In Proceedings of the 15th Annual International Symposium on Computer Architecture (Honolulu, Hawaii, May 1988). Google Scholar
- 12 DRISCOLL, J., SARNAK, N., SLEATOR, D., AND TARJAN, R. Making data structures persistent. In Proceedings of the 18th Annual ACM Symposium on Theory of Computing (Berkeley, Calif., May 1986), pp. 109-121. Google Scholar
- 13 GOSTELOW, K. P., AND THOMAS, R.E. A view of datafiow. In AFIPS Conference Proceedings, vol. 48, 1979, pp. 629-636.Google Scholar
- 14 HUDAK, P. A semantic model of reference counting and its abstraction. In Proceedings of the 1986 ACM Conference on Lisp and Functional Programming (Cambridge, Mass., Aug. 1986), pp. 351-363. Google Scholar
- 15 JAOADEESAN, R., PANANOADEN, P., AND PINGALI, K. K. A fully abstract semantics for a functional language with logic variables. In Proceedings of the 4th IEEE Symposium on Logic in Computer Science (Asilomar, Calif., June 5-8, 1989). Google Scholar
- 16 JOHNSSON, T. Lambda lifting: transforming programs to recursive equations. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture (Nancy, France, Sept. 1985). Springer-Verlag LNCS 201, New York, 1985. Google Scholar
- 17 KELLER, R. M. FEL (function equation language) programmer's guide. Tech. Rep., AMPS Tech. Memo. 7, Dept. of Computer Science, University of Utah, Salt Lake City, April 1983.Google Scholar
- 18 KUCK, D. J., KUHN, R., PADUA, D., LEASURE, B., AND WOLFE, M. Dependence graphs and compiler optimizations. In Proceedings of the 8th Annual ACM Symosium on Principles of Programming Languages. ACM, New York, 1981, pp. 207-218. Google Scholar
- 19 LINDSTROM, G. Functional programming and the logic variable. In Proceedings of the 12th Annual ACM Symposium on Principles of Programming Languages. ACM, New York, 1985, pp. 266-280. Google Scholar
- 20 NIKHIL, R.S. Id (version 88.1) reference manual. Tech. Rep. CSG Memo 284, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge, Aug. 1988.Google Scholar
- 21 NIKHIL, R. S., PINGALI, K., AND ARVlND. Id nouveau. Tech. Rep. CSG Memo 265, Computation Structures Group, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge, July 1986.Google Scholar
- 22 PADUA, D. A., AND WOLFE, M. J. Advanced compiler optimizations for supercomputers. Commun. ACM 29, 12 (Dec. 1986), 1184-1201. Google Scholar
- 23 PEYTON JONES, S. L. The Implementation of Functional Programming Languages. Prentice Hall, Englewood Cliffs, N.J., 1987. Google Scholar
- 24 PINGALI, K. K., AND EKANADHAM, K. Accumulators: New logic variable abstractions for functional languages. In Proceedings of the Conference on Foundations of Software Technology and Theoretical Computer Science. Springer-Verlag LNCS 338, New York, 1988, pp. 377-399. Google Scholar
- 25 TRAUB, K.R. A compiler for the MIT tagged token datafiow architecture. M.S. thesis, Tech. Rep. TR-370, MIT Lab. for Computer Science, Massachusetts Institute of Technology, Cambridge, Aug. 1986. Google Scholar
- 26 TRAUB, K.R. Sequential implementation of lenient progr ~mming languages. Ph.D. dissertation, Tech. Rep. TR-417, MIT Laboratory for Computer ScierLce, Massachusetts Institute of Technology, Cambridge, May 1988.Google Scholar
- 27 WADLER, P. A new array operation for functional languages. In Proceedings of the Workshop on Graph Reduction (Santa Fe, N. Mex. Sept. 1986). Springer-Verlag LNCS 279, New York, 1986, pp. 328-335. Google Scholar
- 28 WADLER, P. Listlessness is better than laziness: Lazy evaluation and garbage collection at compile time. In Proceedings of the 1984 ACM Con{erence on Lisp and Functional Programming (Austin, Tex., Aug. 1984), pp. 45-52. Google Scholar
Index Terms
- I-structures: data structures for parallel computing
Comments