Skip to main content
Log in

Compiling lisp programs for parallel execution

  • Published:
LISP and Symbolic Computation

Abstract

Curare, the program restructurer described in this paper automatically transforms a sequential Lisp program into an equivalent concurrent program that runs on a multiprocessor.

Data dependences constrain the program's concurrent execution because, in general, two conflicting statements cannot execute in a different order without affecting the program's result. Not all dependences are essential to produce the program's result.Curare attempts to transform the program so it computes its result with fewer conflicts. An optimized program will execute with less synchronization and more concurrency.

Curare then examines loops in a program to find those that are unconstrained or lightly constrained by dependences. By necessity,Curare treats recursive functions as loops and does not limit itself to explicit program loops. Recursive functions offer several advantages over explicit loops since they provide a convenient framework for inserting locks and handling the dynamic behavior of symbolic programs. Loops that are suitable for concurrent execution are changed to execute on a set of concurrent server processes. These servers execute single loop iterations and therefore need to be extremely inexpensive to invoke.

Restructured programs execute significantly faster than the original sequential programs. This improvement is large enough to attract programmers to a multiprocessor, particularly since it requires little effort on their part.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abelson, Harold and Sussman, Gerald Jay.Structure and Interpretation of Computer Programs. MIT Press (1985).

  2. Aho, A. V., Garey, M. R., and Ullman, J. D. The transitive reduction of a directed graph.SIAM Journal of Computing, 1, 2 (June 1972) 131–137.

    Google Scholar 

  3. Allen, Donald C., Steinberg, Seth A., and Stabile, Lawrence A. Recent developments in Butterfly Lisp. InProceedings of AAAI-87 Sixth National Conference on Artificial Intelligence (July 1987) 2–6.

  4. Allen, Frances, Burke, Michael, Charles, Philippe, Cytron, Ron, and Ferrante, Jeanne. An overview of the PTRAN analysis system for multiprocessing.Journal of Parallel and Distributed Computing, 5, 5 (October 1988) 617–640.

    Google Scholar 

  5. Allen, Randy and Kennedy, Ken. Automatic translation of FORTRAN programs to vector form.ACM Transactions on Programming Languages and Systems, 9, 4 (October 1987) 491–542.

    Google Scholar 

  6. Anderson, Thomas E., Lazowska, Edward D., and Levy, Henry M.The Performance Implications of Thread Management Alternatives for Shared-Memory Multiprocessors. Technical Report 88-09-04, Department of Computer Science, University of Washington (September 1988).

  7. Billstrom, David, Brandenburg, Joesph, and Teeter, John. CCLISP on the iPSC concurrent computer. InProceedings of AAAI-87 Sixth National Conference on Artificial Intelligence (July 1987) 7–12.

  8. Bird, R. S. Notes on recursion elimination.Communications of the ACM, 20, 6 (June 1977) 434–439.

    Google Scholar 

  9. Bobrow, Daniel G. and Clark, Douglas W. Compact encodings of list structure.ACM Transactions on Programming Languages and Systems, 1, 2 (October 1979) 266–286.

    Google Scholar 

  10. Boyle, James M., Dritz, Kenneth W., Muralidharan, M. N., and Taylor, Robert J. Deriving sequential and parallel programs from pure LISP specifications by program transformation. InIFIP WG2.1 Working Conference on Programme Specification and Transformation, North-Holland Publishing Company, Amsterdam (1986).

    Google Scholar 

  11. Chase, David R., Wegman, Mark, and Zadeck, F. Kenneth. Analysis of pointers and structures. InProceedings of the SIGPLAN '90 Conference on Programming Language Design and Implementation (June 1990) 296–310.

  12. Cytron, Ron and Ferrante, Jeanne. What's in a name? -or- the value of renaming for parallelism detection and storage allocation. InProceedings of the 1987 International Conference on Parallel Processing (August 1987) 19–27.

  13. Darlington, J. and Burstall, R. M. A system which automatically improves programs.Acta Informatica, 6, 1 (1976) 41–60.

    Google Scholar 

  14. Ellis, John R.Bulldog: A Compiler for VLIW Architectures. Technical Report YALEU/DCS/RR-364, Yale University, Department of Computer Science (February 1985).

  15. Ferrante, Jeanne, Ottenstein, Karl J., and Warren, Joe D. The program dependence graph and its use in optimization.ACM Transactions on Programming Languages and Systems, 9, 3 (July 1987) 319–349.

    Google Scholar 

  16. Gabriel, Richard P.Performance and Evaluation of Lisp Systems. MIT Press (1985).

  17. Gabriel, Richard P. and McCarthy, John. Queue-based multi-processing LISP. InConference Record of the 1984 ACM Symposium on LISP and Functional Programming (August 1984) 25–44.

  18. Gharachorloo, Kourosh, Sarkar, Vivek, and Hennessy, John L. A simple and efficient implementation approach for single assignment languages. InProceedings of the 1988 ACM Conference on LISP and Functional Programming (July 1988) 259–268.

  19. Goldman, Ron and Gabriel, Richard P. Preliminary results with the initial implementation of Qlisp. InProceedings of the 1988 ACM Conference on LISP and Functional Programming (July 1988) 143–152.

  20. Goldman, Ron and Gabriel, Richard P. Qlisp: experience and new directions. InProceedings of ACM/SIGPLAN PPEALS 1988 (Parallel Programming: Experience with Applications, Languages and Systems) (July 1988) 111–123.

  21. Gray, Sharon L.Using Futures to Exploit Parallelism in Lisp. Master's thesis, MIT (February 1986). MS report.

  22. Halstead, Jr., Robert H. Multilisp: a language for concurrent symbolic computation.ACM Transactions on Programming Languages and Systems, 7, 4 (October 1985) 501–538.

    Google Scholar 

  23. Harrison, III, W. Ludwell.Compiling Lisp for Evaluation on a Tightly Coupled Multiprocessor. Technical Report CSRD 565, Center for Supercomputing Research & Development, University of Illinois at Urbana-Champaign (March 1986).

  24. Harrison III, William Ludwell. The interprocedural analysis and automatic parallelization of Scheme programs.Lisp and Symbolic Computation, 2, 3–4 (1989) 179–396.

    Google Scholar 

  25. Harrison, Luddy and Padua, David A. PARCEL: project for the automatic restructuring and concurrent evaluation of Lisp. InProceedings of the 1988 International Conference on Supercomputing (July 1988) 527–538.

  26. Hendren, Laurie J. and Nicolau, Alexandru. Parallelizing programs with recursive data structures.IEEE Transactions on Parallel and Distributed Systems, 1, 1 (January 1990) 35–47.

    Google Scholar 

  27. Hill, Mark D., Eggers, Susan J., Larus, James R., Taylor, George S.,et al. SPUR: a VLSI multiprocessor workstation.IEEE Computer, 19, 11 (November 1986) 8–24.

    Google Scholar 

  28. Horwitz, Susan, Pfeiffer, Phil, and Reps, Thomas. Dependence analysis for pointer variables. InProceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation (June 1989) 28–40.

  29. Horwitz, Susan, Reps, Thomas, and Binkley, David. Interprocedural slicing using dependence graphs.ACM Transactions on Programming Languages and Systems, 12, 1 (January 1990) 26–60.

    Google Scholar 

  30. Huet, Gérard and Lang, Bernard. Proving and applying program transformations expressed with second-order patterns.Acta Informatica, 11, 1 (1978) 31–55.

    Google Scholar 

  31. Katz, Morris J.ParaTran: A Transparent, Transaction-Based Runtime Mechanism for Parallel Execution of Scheme. Master's thesis, MIT (June 1986).

  32. Kogge, Peter M. Parallel solution of recurrence problems.IBM Journal of Research and Development, 18, 2 (March 1974) 138–148.

    Google Scholar 

  33. Kogge, Peter M. and Stone, Harold S. A parallel algorithm for the efficient solution of a general class of recurrence equations.IEEE Transactions on Computers, C-22, 8 (August 1973) 786–793.

    Google Scholar 

  34. Kranz, David, Kelsey, Richard, Reese, Jonathan, Hudak, Paul, Philbin, James, and Adams, Norman. ORBIT: an optimizing compiler for Scheme. InProceedings of the ACM SIGPLAN '86 Symposium on Compiler Construction (June 1986) 219–233.

  35. Kruskal, Clyde P., Rudolph, Larry, and Snir, Marc. The power of parallel prefix.IEEE Transactions on Computers, C-34, 10 (October 1985) 965–968.

    Google Scholar 

  36. Kuck, David J., Muraoka, Yaichi, and Chen, Shyh-Ching. On the number of operations simultaneously executable in fortran-like programs and their resulting speedup.IEEE Transactions on Computers, C-21, 12 (December 1972) 1293–1310.

    Google Scholar 

  37. Kuck, D. J., Kuhn, R. H., Padua, D. A., Leasure, B., and Wolfe, M. Dependence graphs and compiler optimizations. InConference Record of the Eighth Annual ACM Symposium on Principles of Programming Languages (January 1981) 207–218.

  38. Larus, James R. and Hilfinger, Paul N. Detecting conflicts between structure accesses. InProceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation (June 1988) 21–34.

  39. Larus, James R. and Hilfinger, Paul N. Restructuring Lisp programs for concurrent execution. InProceedings of ACM/SIGPLAN PPEALS 1988 (Parallel Programming: Experience with Applications, Languages and Systems) (July 1988) 100–110.

  40. Midkiff, Samuel Pratt.Automatic Generation of Synchronization Instruction for Parallel Processors. Technical Report CSRD Rpt. No. 588, Center for Supercomputing Research & Development, University of Illinois at Urbana-Champaign (May 1986).

  41. Midkiff, Samuel P. and Padua, David A. Compiler algorithms for synchronization.IEEE Transactions on Computers, C-36, 12 (December 1987) 1485–1495.

    Google Scholar 

  42. Miller, James S.MultiScheme: A Parallel Processing System Based on MIT Scheme. Technical Report MIT/LCS/TR-402, MIT Laboratory for Computer Science (September 1987). PhD thesis.

  43. Presberg, David L. and Johnson, Neil W. The Paralyzer: Ivtran's parallelism analyzer and synthesizer. InProceedings of a Conference on Programming Languages and Compilers for Parallel and Vector Machines (March 1975) 9–16.

  44. Schwartz, J.T., Dewar, R.B.K., Dubinsky, E., and Schoneberg, E.Programming with Sets: An Introduction to SETL. Springer-Verlag (1986).

  45. Shivers, Olin. Control flow analysis in Scheme. InProceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation (June 1988) 164–174.

  46. Steele Jr., Guy L.Common LISP: The Language. Digital Press (1984).

  47. Swanson, Mark R., Kessler, Robert R., and Lindstrom, Gary. An implementation of Portable Standard Lisp on the BBN Butterfly. InProceedings of the 1988 ACM Conference on LISP and Functional Programming (July 1988) 132–142.

  48. Thomas, Robert H. and Crowther, Will. The Uniform System: an approach to runtime support for large scale shared memory parallel processors. InProceedings of the 1988 International Conference on Parallel Processing (Vol. II Software), Pennsylvania State University Press (August 1988) 245–254.

  49. Tinker, Pete and Katz, Morry. Parallel execution of sequential Scheme with ParaTran. InProceedings of the 1988 ACM Conference on LISP and Functional Programming (July 1988) 28–39.

  50. Turner, D. A. A new implementation technique for applicative languages.Software Practice & Experience, 9, 1 (1979) 31–49.

    Google Scholar 

  51. Wadler, Philip Lee.Listlessness is Better than Laziness: An Algorithm that Transforms Applicative Programs to Eliminate Intermediate Lists. Technical Report CMU-CS-85-171, Department of Computer Science, Carnegie Mellon University (August 1984). PhD thesis.

  52. Zorn, Benjamin, Ho, Kinson, Larus, James, Semenzato, Luigi, and Hilfinger, Paul. Multiprocessing extensions in SPUR Lisp.IEEE Computer (July 1989) 41–49.

Download references

Author information

Authors and Affiliations

Authors

Additional information

This research was funded by DARPA contract numbers N00039-85-C-0269 (SPUR) and N00039-84-C-0089 (XCS) and by an NSF Presidential Young Investigator award to Paul N. Hilfinger. Additional funding came from the California MICRO program (in conjunction with Texas Instruments, Xerox, Honeywell, and Phillips/Signetics).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Larus, J.R. Compiling lisp programs for parallel execution. Lisp and Symbolic Computation 4, 29–99 (1991). https://doi.org/10.1007/BF01806061

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01806061

Keywords

Navigation