Abstract
We describe an approach in which stateful computations can be expressed within the framework of a functional language. We consider algorithms with nondeterministic intermediate results and a deterministic final result which is obtained for any series of intermediate values of some variable shared among parallel tasks or, in other words, the ordering of updates to the variable does not matter. Functional languages normally abstract away from explicit synchronization and exploit parallelism between separate uses of a variable. But in some cases we can relax that requirement with both parallelism and determinate computation. To increase its expressiveness and efficiency for this important class of problems, we propose to extend the Sisal language with state variables encapsulated within stateful functions. We have used Centaur to specify and construct a semantic-based environment. We illustrate the proposed language extension with analysis of several examples, and comparison with other languages.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
REFERENCES
J.-L. Gaudiot and C. Kim, Data-Driven and Multi-Threaded Architectures for High-Performance Computing. In T. Casavant and P. Tvrdik, (eds.), Parallel Computers: Theory and Practice, Chap. 4, IEEE Computer Society Press, Washington, D.C. (1993).
J. L. Gaudiot and Y. Wei, Token Relabeling in a Tagged-Token Data-Flow Architecture, IEEE Trans. Computers, 38(9) (September 1989).
P. Hudak. In B. Szymanski, (ed.), Para-Functional Programming in Haskell, ACM Press, New York (1991).
P. Hudak, Functional Programming Languages, ACM Computing Surveys, 21(3):359–411 (September 1989).
A. P. W. Bohm, R. R. Oldehoeft, D. C. Cann, and J. T. Feo, Sisal Reference Manual Language Version 2.0, Computer Science Department, Colorado State University, and Computing Research Group, Lawrence Livermore National Laboratory (1990).
Y. S. Chen and J. L. Gaudiot, Semantics Specifications of Extended Sisal 2.0 in the Centaur System, Proc. Eighth IASTED Int'l. Conf. Parallel and Distributed Computing Syst., pp. 410–414 (October 1996).
Y. S. Chen and J. L. Gaudiot, An Application of Extended Sisal, Proc. Int'l. Conf. Parallel and Distributed Processing Techniques and Applications, pp. 245–251 (August 1996).
I. Attali, D. Caromel, and A. Wendelborn, A Formal Semantics and an Interactive Environment for Sisal. In A. Zaky (ed.), Tools and Environments for Parallel and Distributed Systems, Kluwer Academic Publishers, pp. 231–258 (February 1996).
I. Attali, D. Caromel, Y. S. Chen, J. L. Gaudiot, and A. Wendelborn, A Formal Semantics for Sisal Arrays, Proc. Joint Conf. Infor. Sci. (September 1995).
S. Peyton Jones and P. Wadler, Imperative Functional Programming, ACM Principles of Progr. Lang. (1993).
J. Launchbury, Lazy Imperative Programming, Technical Report, Department of Computer Science, University of Glasgow (December 1993).
P. Wadler, The Essence of Functional Programming, ACM Principles of Progr. Lang. (1992).
H. Abelson, R. K. Dybvig, C. T. Haynes, G. J. Rozas, N. I. Adams IV, D. P. Friedman, E. Kohlbecker, G. L. Steele Jr., D. H. Bartley, R. Halstead, D. Oxley, G. J. Sussman, G. Brooks, C. Hanson, K. M. Pitman, and M. Wand, Revised5 Report on the Algorithmic Language Scheme, J. Higher Order and Symbolic Computation, 11(1):7–105 (1998).
R. Milner, M. Tofte, R. Harper, and D. MacQueen, The Definition of Standard ML (Revised), MIT Press (1997).
R. S. Nikhil and Arvind, Id: A Language with Implicit Parallelism. In J. Feo, (ed.), Comparative Study of Parallel Programming Languages: The Salishan Problems, Elsevier Science Publishers (1990).
Arvind and R. Nikhil, I-structures: Data Structures for Parallel Computing, ACM Trans. Progr. Lang. Syst., 11(4):598–632 (October 1989).
K. Pingali and K. Ekanadham, Accumulators: New Logic Variable Abstractions for Functional Languages, Theoret. Computer Sci., 81(2):201–221 (April 1991).
P. S. Barth, R. S. Nikhil, and Arvind, M-Structures: Extending a Parallel, Nonstrict, Functional Language with State, Proc. Fifth Conf. Functional Progr. Lang. Computer Architecture, Cambridge, Massachusetts, LNCS 523, Springer-Verlag (August 1991).
S. Peyton Jones and L. Duponcheel, Composing Monads, Technical Report Research Report YALEU-DCS-RR-1004, Yale University (December 1993).
P. Wadler, Comprehending Monads, Proc. ACM Conf. Lisp and Functional Progr., Nice (1990).
G. Almasi and A. Gottlieb, Highly Parallel Computing, Second Edition, Benjamin/Cummings (1994).
Burton Smith, The Tera Computer System, Proc. ACM Int'l. Conf. Supercomputing, pp. 1–7 (1990).
P. Borras, D. Clement, T. Despeyroux, J. Incerpi, G. Kahn, B. Lang, and V. Pascual, Centaur: The System, Proc. SIGSOFT'88, Third Ann. Symp. Software Dev. Environments, Boston (1988).
S. Skedzielewski and J. Glauert, IF1–An Intermediate Form for Applicative Languages, Manual M-170, Lawrence Livermore National Laboratory, Livermore (1985).
M. L. Welcome, B. K. Szymanski, R. K. Yates, J. E. Ranelletti, An Applicative Language Intermediate Form Explicit Memory Management, Manual M-195, Lawrence Livermore National Laboratory, Livermore (1986).
G. Kahn, Natural Semantics, Proc. Symp. Theoretical Aspects of Computer Science, Passau, Germany, LNCS 247 (February 1987).
I. Attali, D. Caromel, M. Oudshoorn, A Formal Definition of the Dynamic Semantics of the Eiffel Language, 16th Australian Computer Sci. Conf. (ACSC-16), Brisbane, Australia, 1993, also Research Report I3S 92.52.
A. Berstein, Analysis of Programs for Parallel Processing, IEEE Trans. Computers, pp. 746–757 (1966).
Y. S. Chen and J. L. Gaudiot, Parallelism Detection Algorithm for Extended Sisal Programs in Centaur, Proc. Eight ISCA Int'l. Conf. Parallel and Distributed Computing Systems, pp. 628–633 (September 1995).
Y. S. Chen and J. L. Gaudiot, Extending Functional Languages with Stateful Computa-tions, Proc. Eight IEEE Symp. Parallel and Distributed Processing, pp. 542–549 (October 1996).
T. DeBoni, J. Feo, and D. Peters, Integrating Imperative and Functional Programming in Real World Applications, Proc. High Performance Functional Computing (April 1995).
D. Engelhardt and A. Wendelborn, Investigating the Memory Performance of the Optimizing Sisal Compiler. In J. Feo, C. Frerking, and P. Miller, (eds.), Proc. Second Sisal Users' Conf., Lawrence Livermore National Laboratory, pp. 257–270 (December 1992).
S. M. Fitzgerald, Copy Elimination for True Multidimensional Arrays in Sisal 2.0, Proc. Third Sisal Users and Dev. Conf., San Diego, California (October 1993).
J.-L. Gaudiot, Structure Handling in Data-Flow Systems, IEEE Trans. Computers, 35(6):489–502 (June 1986).
E. Horowitz and S. Sahni, Fundamentals of Data Structures in Pascal, Computer Science Press, New York (1989).
K. Hwang, Advanced Computer Architecture with Parallel Programming, McGraw-Hill Publishing Company, Inc., New York (1993).
C. Kim, J.-L. Gaudiot, and W. Proskurowski, Programmability and Performance Issues: Case of an Iterative Partial Differential Equation Solver, Proc. Sisal '93, San Diego, California (October 1993).
B. Meyer, Introduction to the Theory of Programming Languages, Prentice-Hall, Inc., Englewood Cliffs, New Jersey (1991).
P. Wadler, Monads for Functional Programming, Lecture Notes for Marktoberdorf Summer School on Program Design Calculi, Springer-Verlag (August 1992).
A. Wendelborn and H. Garsden, Exploring the Stream Data Type in Sisal and Other Languages. In M. Cosnard, K. Ebcioglu, and J.-L. Gaudiot, (eds.), IFIP Transactions: Architectures and Compilation Techniques for Fine and Medium Grain Parallelism, IFIP, North-Holland, pp. 283–294 (January 1993).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Attali, I., Caromel, D., Chen, YS. et al. Enhancing Functional and Irregular Parallelism: Stateful Functions and their Semantics. International Journal of Parallel Programming 29, 433–460 (2001). https://doi.org/10.1023/A:1011125419818
Issue Date:
DOI: https://doi.org/10.1023/A:1011125419818