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.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Aho, A. V. and Ullman, D. J.,Principles of Compiler Design, Addison-Wesley, 1979.
Bancilhon, F. and Ramakrishnan, R., “An Amateur’s Introduction to Recursive Query Processing Strategies,”Proceedings of SIGMOD, 1986.
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.
Clark, K. L., “Predicate Logic as a Computational Formalism,”Research Report, DoC79/59, Dept. of Computing, Imperial College of Science and Technology, London, 1979.
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.
Ershov, A. P., “On the Essence of Compilation,” inFormal Descriptions of Programming Concepts (E. J. Neuhold, ed.), North-Holland, 1978.
Ershov, A. P., “Mixed Computation: Potential Applications and Problems for Study,”Theoretical Computer Science, 18, North-Holland, pp. 41–67, 1982.
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.
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.
Futamura, Y., “Partial Evaluation of Computation Process—An Approach to a Compiler-Compiler,”Systems, Computers, Controls, Vol. 2, No. 5, pp. 45–50, 1971.
Futamura, Y., “Partial Computation of Programs,”Lecture Notes in Computer Science, Vol. 147, Springer-Verlag, pp. 1–35, 1982.
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.
Jones, N. D., “Automatic program specialization: a re-examination from first principles,”DIKU Research Report, University of Copenhagen, October, 1987.
Jones, N. D., “Flow Analysis of Lazy Higher Order Functional Programs,” inAbstract Interpretation of Declarative Languages (S. Abramsky and C. Hankin, eds.), Wiley, 1987.
Kowalski, R., “Predicate Logic as a Programming Language,” inInformation Processing (IEIP74), (H. J. Kugler, ed.) Elsevier Science, North Holland, 1974.
Lloyd, J. W., inFoundations of Logic Programming, Springer-Verlag, 1984.
Sestoft, P., “The Structure of a Self-Applicable Partial Evaluator,”Research Report, 85/11, DIKU, University of Copenhagen, 1985.
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.
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.
Turchin, V. F., “A Supercompiler System based on the Language REFAL,”SIGPLAN Notices, Vol. 14, No. 2 pp. 46–54, February, 1979.
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.
Warren, D. H. D., “Logic Programming and Compiler Writing,”D. A. I. Research Report, No. 44, Edinburgh University, September, 1977.
Warren, D. H. D. “An improved Prolog implementation which optimises tail recursion,”Proc. of the Logic Programming Workshop, Debrecen, Hungary, 1980.
Warren, D., Bowen, D. and Pereira, L., inC-Prolog User’s Manual (F. Pereira, ed.), January, 1985.
Author information
Authors and Affiliations
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
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF03037134