Skip to main content
Log in

A partial evaluator for a parallel lambda language

  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

Abstract

This paper describes theoretical and practical aspects of a partial evaluator that treats a parallel lambda language. The parallel language presented is a combination of lambda calculus and message passing communication mechanism. This parallel language can be used to write a programming language’s denotational semantics which extracts the parallelism in the program. From this denotational definition of the programming language, the partial evaluator can generate parallel compiler of the language by self-application.

The key technique of partial evaluation is binding time analysis that determines in advance which parts of the source program can be evaluated during partial evaluation, and which parts cannot. A binding time analysis is described based upon type inference. A new typechcode is introduced into the type system, which denotes the type of those expressions containing residual channel operations. A well-formedness criterion is given which ensures that partial evaluation not only doesn’t commit type errors but also doesn’t change the sequence of channel operations. Before binding time analysis, channel analysis is used to analyze the communication relationship between send and receive processes.

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. Futamura Y. Partial evaluation of computation process—An approach to a compiler-compiler.Systems, Computers, Controls, 1971, 2(5): 45–50.

    Google Scholar 

  2. Turchin V F. The use of metasystem transition in theorem proving and program optimization. InLNCS’85, De Bakker J, van Leeuven J (eds.), 1980, pp.645–57.

  3. Ershov A P. On the Essence of Compilation. InFormal Description of Programming Concepts, Neuhold E J (ed.), North-Holland, 1978, pp.391–420.

  4. Jones N D, Sestoft P, Sondergaard H. An Experiment in Partial Evaluation: The Generation of a Compiler Generator. InRewriting Techniques and Applications, Jouannaud J P (ed.), LNCS 202, pp.124–140, 1985, Springer-Verlag, Dijon, France.

    Google Scholar 

  5. Jones N D, Sestoft P, Sondergaard H. Mix: A self-applicable partial evaluator for experiments in compiler generation.Lisp and symbolic Computation, 1989, 2(1): 9–50.

    Article  Google Scholar 

  6. Romanenko S A. A Compiler Generator Produced by a Self-Applicable Specialiser Can Have a Surprisingly Natural and Understandable Structure. InPartial Evaluation and Mixed Computation, Bjorner D, Ershov A P, Jones N D (eds.), Gl. Avernas, Denmark, October 1987, North-Holand, 1988, pp.445–463.

  7. Gomard C K, Jones N D. Compiler generation by partial evaluation. InInformation Processing’89, Proceedings of the 11th IFIP Word Computer Congress, Ritter G X (ed.), North-Holland, 1989, pp.1139–1144.

  8. Bondorf A. A self-applicable partial evaluator for term rewriting systems. InTAPSOFT’89, Proceedings of the International Joint Conference on Theory and Practice of Software Development, Diaz J, Orejas F (ed.), LNCS 352, pp.81–96, Barcelona, Spain, Springer-Verlag, 1989.

    Google Scholar 

  9. Bondorf A, Danvy O. Automatic autoprojection of recursive equations with global variables and abstract data types. Technical Report 1990, No 90–4, DIKU, University of Copenhagen, Denmark.

  10. Gomard C K. Higher order partial evaluation—HOPE for the lambda calculus. Dissertation, DIKU student report 89–9–11, University of Copenhagen, 1989.

  11. Jones N D, Gomard C K, Bondorf Aet al. A self-applicable partial evaluator for the lambda calculus. InProc. IEEE Computer Society 1990 International Conference on Compute Languages, 1990.

  12. Bondorf A. Automatic autoprojection of higher order recursive equations. InESOP’90, Third European Symposium on Programming, Jones N D (ed.), LNCS 432, Copenhagen, Denmark, 1990, pp. 70–87.

  13. Jones N D, Muchnick S S. TEMPO: A Unified Treatment of Binding Time and Parameter Passing Concepts in Programming Languages. LNCS 66, Springer-Verlag.

  14. Nielson H R, Nielson F. Automatic Binding Time Analysis for a Typed λ-Calculus. InScience of Computer Programming 10, North-Holland, 1988, pp.139–76.

  15. Mogensen T. Binding Time Analysis for Polymorphically Typed Higher Order Languages. LNCS 352, Springer-Verlag, pp.298–312.

  16. Damas L, Milner R. Principal type-schemes for functional programs. InProc. 9th ACM Symposium on Principles of Programming Lanuages. 1982, pp.207–12.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Kuang Hairong received her M.S. degree from Shanghai Jiao Tong University in 1995. She is now a Ph.D. candidate in the Deptartment of Computer Science & Engineering of Shanghai Jiao Tong University. Her current work concentrates on distributed system.

Sun Yongqiang received his B.S. degree from Shanghai Jiao Tong University in 1955. He engaged in research work in the Tsinghua University from 1955 to 1974. Since 1974 he has been teaching and researching in the Deptartment of Computer Science & Engineering of Shanghai Jiao Tong University. He is now a Ph.D. Tutor. His research work concentrates on theory of programming.

Lin Kai recevied his M.S. degree from Shanghai Jiao Tong University in 1989. From then on he has been teaching and researching in the Deptartment of Computer Science & Engineering of Shanghai Jiao Tong University. He is now an Associate Professor. His research work concentrates on theory of programming.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kuang, H., Sun, Y. & Lin, K. A partial evaluator for a parallel lambda language. J. of Comput. Sci. & Technol. 12, 441–457 (1997). https://doi.org/10.1007/BF02943176

Download citation

  • Received:

  • Revised:

  • Issue Date:

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

Keywords

Navigation