A Statically Allocated Parallel Functional Language
Abstract
We describe SAFL, a call-by-value first-order functional language which is syntactically restricted so that storage may be statically allocated to fixed locations. Evaluation of independent sub-expressions happens in parallel—we use locking techniques to protect shared-use function definitions (i.e. to prevent unrestricted parallel accesses to their storage locations for argument and return values). SAFL programs have a well defined notion of total (program and data) size which we refer to as ‘area’; similarly we can talk about execution ‘time’. Fold/unfold transformations on SAFL provide mappings between different points on the area-time spectrum. The space of functions expressible in SAFL is incomparable with the space of primitive recursive functions, in particular interpreters are expressible. The motivation behind SAFL is hardware description and synthesis—we have built an optimising compiler for translating SAFL to silicon.
Keywords
Storage Location Functional Programming Functional Language Static Allocation Register MachinePreview
Unable to display preview. Download preview PDF.
References
- 1.Burstall, R.M. and Darlington, J. A Transformation System for Developing Recursive Programs, JACM24(1), 1977.Google Scholar
- 2.Gomard, C.K. and Sestoft, P. Globalization and Live Variables. Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 166–177. ACM Press. 1991. SIGPLAN NOTICES, vol. 26, number 9.Google Scholar
- 3.Gordon, A.D., Functional Programming and Input/Output. Distinguished Dissertations in Computer Science. Cambridge University Press, 1994.Google Scholar
- 4.Greaves, D.J. An Approach Based on Decidability to Compiling C and Similar, Block-Structured, Imperative Languages for Hardware Software Codesign. Unpublished memo, 1999.Google Scholar
- 5.Hammond, K. Parallel Functional Programming: An Introduction, International Symposium on Parallel Symbolic Computation, World Scientific, 1994.Google Scholar
- 6.Hofmann, M. A Type System for Bounded Space and Functional In-Place Update. Proc. ESOP’2000 Berlin, Springer-Verlag LNCS, 2000.Google Scholar
- 7.Jones, N.D. The Expressive Power of Higer-order Types or, Life without CONS. J. Functional Programming, to appear.Google Scholar
- 8.Milner, R., Tofte, M., Harper, R. and MacQueen, D. The Definition of Standard ML (Revised). MIT Press, 1997.Google Scholar
- 9.Mycroft, A. and Sharp, R.W. Hardware/Software Co-Design using Functional Languages. Submitted for publication.Google Scholar
- 10.Page, I. and Luk, W. Compiling Occam into Field-Programmable Gate Arrays. In Moore and Luk (eds.) FPGAs, pages 271–283. Abingdon EE&CS Books, 1991.Google Scholar
- 11.Sharp, R.W. and Mycroft, A. The FLaSH Compiler: Efficient Circuits from Functional Specifications. Technical Report tr.2000.3, AT&T Laboratories Cambridge. Available from: http://www.uk.research.att.com
- 12.Sheeran, M. muFP, a Language for VLSI Design. Proc. ACM Symp. on LISP and Functional Programming, 1984.Google Scholar
- 13.Bjesse, P., Claessen, K., Sheeran, M. and Singh, S. Lava: Hardware Description in Haskell. Proceedings of the 3rd ACM SIGPLAN International Conference on Functional Programming, 1998.Google Scholar