Skip to main content
Log in

Mixed computation of Prolog programs

  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

This paper describes theoretical as well as implementation issues involved in the design of amix partial evaluator, starting from an interpretive specification using Prolog as the source language. First, the general theory of mixed computation is shown, together with the description of some of the problems involved in it. After this, the design of amix partial evaluator for a subset of Prolog is explained. Here, three algorithms with increasing complexity are shown. Finally, a correctness criterion for themix process is presented, together with the proof that the previously shown algorithms generate correct residual programs.

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.

Institutional subscriptions

Similar content being viewed by others

References

  1. Aho, A. V. and Ullman, D. J.,Principles of Compiler Design, Addison-Wesley, 1979.

  2. Bancilhon, F. and Ramakrishnan, R., “An Amateur’s Introduction to Recursive Query Processing Strategies,”Proceedings of SIGMOD, 1986.

  3. Beckman, L., Haraldson, A., Oskarsson, O. and Sandewall, E., “A Partial Evaluator, and Its Use as a Programming Tool,”Artificial Intelligence, 7, North-Holland, pp. 319–357, 1976.

  4. Clark, K. L., “Predicate Logic as a Computational Formalism,”Research Report, DoC79/59, Dept. of Computing, Imperial College of Science and Technology, London, 1979.

    Google Scholar 

  5. Ershov, A. P. and Itkin, V. E., “Correctness of Mixed Computation in Algol-Like Programs,”Lecture Notes in Computer Science, Vol. 53 Springer-Verlag, pp. 59–77, 1977.

  6. Ershov, A. P., “On the Essence of Compilation,” inFormal Descriptions of Programming Concepts (E. J. Neuhold, ed.), North-Holland, 1978.

  7. Ershov, A. P., “Mixed Computation: Potential Applications and Problems for Study,”Theoretical Computer Science, 18, North-Holland, pp. 41–67, 1982.

  8. Fuller, D. A. and Abramsky, S., “Mixed Computation of Prolog Programs: An Extended Paper,”Research Report, DoC 87/12, Dept. of Computing, Imperial College of Science and Technology, London, June, 1987.

    Google Scholar 

  9. Fuller, D. A., “Towards Efficient Self-Applicable Partial Evaluation in Prolog,”Research Report, Dept. of Computing, Imperial College of Science and Technology, London, February, 1988.

    Google Scholar 

  10. Futamura, Y., “Partial Evaluation of Computation Process—An Approach to a Compiler-Compiler,”Systems, Computers, Controls, Vol. 2, No. 5, pp. 45–50, 1971.

    Google Scholar 

  11. Futamura, Y., “Partial Computation of Programs,”Lecture Notes in Computer Science, Vol. 147, Springer-Verlag, pp. 1–35, 1982.

    Google Scholar 

  12. Jones, N. D., Sestoft, P. and Sondergaard, H., “An Experiment in Partial Evaluation: The Generation of a Compiler Generator,”Lecture Notes in Computer Science, Vol. 202, Dijon, France, pp. 124–140, 1985.

    Google Scholar 

  13. Jones, N. D., “Automatic program specialization: a re-examination from first principles,”DIKU Research Report, University of Copenhagen, October, 1987.

  14. Jones, N. D., “Flow Analysis of Lazy Higher Order Functional Programs,” inAbstract Interpretation of Declarative Languages (S. Abramsky and C. Hankin, eds.), Wiley, 1987.

  15. Kowalski, R., “Predicate Logic as a Programming Language,” inInformation Processing (IEIP74), (H. J. Kugler, ed.) Elsevier Science, North Holland, 1974.

    Google Scholar 

  16. Lloyd, J. W., inFoundations of Logic Programming, Springer-Verlag, 1984.

  17. Sestoft, P., “The Structure of a Self-Applicable Partial Evaluator,”Research Report, 85/11, DIKU, University of Copenhagen, 1985.

  18. Takeuchi, A., “Affinity between Meta Interpreters and Partial Evaluation,” inInformation Processing (IFIP 86), (H. J. Kugler, ed.), Elsevier Science, North Holland, pp. 279–282, 1986.

    Google Scholar 

  19. Takeuchi, A. and Furukawa, K., “Partial Evaluation of Prolog Programs and Its Application of Meta Programming,” inInformation Processing (IFIP 86) (H. J. Kugler, ed.), Elsevier Science, North Holland, pp. 415–420, 1986.

    Google Scholar 

  20. Turchin, V. F., “A Supercompiler System based on the Language REFAL,”SIGPLAN Notices, Vol. 14, No. 2 pp. 46–54, February, 1979.

    Article  Google Scholar 

  21. Venken, R., “A Prolog Meta-Interpreter for Partial Evaluation and Its Implication to Source to Source Transformation and Query-Optimisation,” inAdvances in Artificial Intelligence (T. O’Shea, ed.), Pisa, Italy, pp. 347–356. September, 1984.

  22. Warren, D. H. D., “Logic Programming and Compiler Writing,”D. A. I. Research Report, No. 44, Edinburgh University, September, 1977.

  23. Warren, D. H. D. “An improved Prolog implementation which optimises tail recursion,”Proc. of the Logic Programming Workshop, Debrecen, Hungary, 1980.

  24. Warren, D., Bowen, D. and Pereira, L., inC-Prolog User’s Manual (F. Pereira, ed.), January, 1985.

Download references

Author information

Authors and Affiliations

Authors

About this article

Cite this article

Fuller, D.A., Abramsky, S. Mixed computation of Prolog programs. New Gener Comput 6, 119–141 (1988). https://doi.org/10.1007/BF03037134

Download citation

  • Received:

  • Issue Date:

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

Keywords

Navigation