skip to main content
10.1145/582153.582181acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free Access

Partial evaluation as a means for inferencing data structures in an applicative language: a theory and implementation in the case of prolog

Published:25 January 1982Publication History

ABSTRACT

An operational semantics of the Prolog programming language is introduced. Meta-IV is used to specify the semantics. One purpose of the work is to provide a specification of an implementation of a Prolog interpreter. Another one is an application of this specification to a formal description of program optimization techniques based on the principle of partial evaluation.Transformations which account for pruning, forward data structure propagation and opening (which also provides backward data structure propagation) are formally introduced and proved to preserve meaning of programs. The so defined transformations provide means to inference data structures in an applicative language. The theoretical investigation is then shortly related to research in rule-based systems and logic.An efficient well-integrated partial evaluation system is available in Qlog --- a Lisp programming environment for Prolog.

References

  1. {Arsac 79} J J Arsac, Syntactic Source to Source Transforms and Program Manipulation, Communications of the ACM, Vol 22, No 1, January 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. {Apt 81} K Apt, M H Emden, Contributions to the Theory of Logic Programming, Erasmus University, The Netherlands, 1981.Google ScholarGoogle Scholar
  3. {Beckman 76} L Beckman, A Haraldsson, Ö Oskarsson, E Sandewall, A Partial Evaluator and its Use as a Programming Tool, Artificial Intelligence Journal 7, 1976, pp. 319--357.Google ScholarGoogle ScholarCross RefCross Ref
  4. {Björner and Jones 78} D Björner, C B Jones, eds, The Vienna Development Method: The Meta-Language, Lecture Notes in Computer Science, Vol 61, Springer-Verlag, 1978.Google ScholarGoogle Scholar
  5. {Boyer and Moore 72} R S Moore, J S Moore The Sharing of Structure in Theorem Proving Programs, in Machine Intelligence 7, Meltzer and Michie, eds, Edinburgh 1972.Google ScholarGoogle Scholar
  6. {Burstall 78} R M Burstall, M S Feather, Program Development by Transformations: An Overview, Toulouse CREST Course of Programming, Toulouse, 1978.Google ScholarGoogle Scholar
  7. {Cheatham 79} T Cheatham, G Holloway, J Townley, Symbolic Evaluation and the Analysis of Programs, IEEE Transactions on Software Engineering, Vol SE-5, No 4, July 1979.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. {Clark 80} K Clark, F McCabe, IC-Prolog --- Language Features, in: {Tärnlund 80}.Google ScholarGoogle Scholar
  9. {Davis 80} R Davis, Meta-rules: Reasoning about Control, Artificial Intelligence Journal Vol 15, 1980.Google ScholarGoogle Scholar
  10. {Dincbas 80} M Dincbas, The METALOG Problem Solving System: An Informal Presentation, in: {Tärnlund 80}.Google ScholarGoogle Scholar
  11. {Emanuelson 80} P Emanuelson, Performance enhancement in a well-structured pattern-matcher through partial evaluation, Ph.D. Thesis, Linköping University, 1980.Google ScholarGoogle Scholar
  12. {Emden 76} M V Emden, R Kowalski, The Semantics of Predicate Logic as a Programming Language, J of ACM, Vol 23, No 4, October 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. {Ershov 77} A P Ershov, Correctness of Mixed Computation in Algol-like Programs, Proceedings of the 6th MFCS Symposium, in: Lecture Notes in Computer Science, Vol 53, Springer-Verlag, 1977.Google ScholarGoogle Scholar
  14. {Ershov 80} A P Ershov, Mixed Computation: Potential Applications and Problems for Study, Computing Center, Siberian Branch, USSR Ac. Sci. Novosibirsk 630090, USSR.Google ScholarGoogle Scholar
  15. {Ershov and Itkin 77} A P Ershov, V E Itkin, Corectness of Mixed Computation in an Algol-like programs, in Lecture Notes in Computer Science, vol 53, Springer Verlag, 1977.Google ScholarGoogle Scholar
  16. {Futamura 71} Y Futamura, Partial Evaluation of Computer Programs: An Approach to A Compiler-compiler, J. Inst. Electronics and Communication Engineers, 1971.Google ScholarGoogle Scholar
  17. {Gallaire 80} H Gallaire, C Lasserre, A Control Metalanguage for Logic Programming, in: {Tärnlund 80}.Google ScholarGoogle Scholar
  18. {Gordon 79} M J C Gordon, The Denotational Description of Programming Languages, An Introduction, Springer-Veriag, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. {Haraldsson 74} A Haraldsson, PCDB --- A Procedure Generator for A Predicate Calculus Data Base, IFIP-74 Information Processing, North-Holland, 1974.Google ScholarGoogle Scholar
  20. {Haraldsson 77} A Haraldsson, A Program Manipulation System Based on Partial Evaluation, Ph.D. Thesis, Linköping University, Sweden 1977.Google ScholarGoogle Scholar
  21. {Haraldsson 80} A Haraldsson, Experiences from a program manipulation system, Linköping University, July 1980, LiTH-MAT-R-80-24.Google ScholarGoogle Scholar
  22. {Henhapl 78} W Henhapl, C B Jones, A Formal Definition of Aigol-60 as described in the modified Report, in {Björner and Jones 78}Google ScholarGoogle Scholar
  23. {Jones 78} C B Jones, The Meta-language: A Reference Manual, in: {Björner and Jones 78}. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. {Kieburtz 81} R Kieburtz, J Shultis, Transformations of FP Program Schemes, in: Invited Papers, Symposium on Functional Languages and Computer Architecture, Chalmers University of Technology, Gothenburg, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. {Kleene 52} S C Kleene, Introduction to Metamathematics, Van Nostrand, New York 1952.Google ScholarGoogle Scholar
  26. {Komorowski 76} H J Komorowski, Familia --- A Question-Answering System in Prolog with Natural Language Interface, M Sc Thesis, University of Warsaw, 1976. In Polish.Google ScholarGoogle Scholar
  27. {Komorowski 79} H J Komorowski, Qlog Interactive Programming Environment --- The Experience form Embedding A Generalized Prolog in Interlisp, paper read at International Summer Seminar on Artificial Intelligence, Dubrovnik, August 1979. Also, Informatics Laboratory, Linköping University, LiTH-MAT-R-79-19.Google ScholarGoogle Scholar
  28. {Komorowski 80} H J Komorowski, Qlog --- The Software for Prolog and Logic Programming, in: {Tärnlund 80}.Google ScholarGoogle Scholar
  29. {Komorowski 81} H J Komorowski, J W Goodwin, Embedding Prolog in Lisp: An Example of A Lisp Craft Technique, SSRC, Linköping University, March 1981, LiTH-MAT-R-81-2. Paper read at Symposium on Functional Programming Languages and Computer Architecture in Gothenburg, June 1981, Sweden.Google ScholarGoogle Scholar
  30. {Komorowski 81a} H J Komorowski, A Specification of an Abstract Prolog Machine and its Application to Partial Evaluation, Ph.D. thesis no 69, Linköping University, Sweden 1981.Google ScholarGoogle Scholar
  31. {Kowalski 74} R Kowalski, Predicate Logic as a Programming Language, IFIP 74 Information Processing, North-Holland 1974.Google ScholarGoogle Scholar
  32. {Loveman 77} D B Loveman, Program Improvement by Source to Source Transformation, Journal of the ACM, Vol 24, No 1, January 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. {Martelli 76} A Martelli, U Montanari, Unification in Linear Time and Space: A Structured Presentation, Consiglio Nazionale delle Recierche, Istituto di Elaborazione della Informazione, Nota Interna B76-16, Pisa, 1976.Google ScholarGoogle Scholar
  34. {McCarthy 66} J McCarthy et al, Lisp 1.5 Programmer's Manual, MIT Press, 1966. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. {Ollongren 80} A Ollongren, On the Implementation of Parts of Meta-IV in Lisp, SSRC, Linköping University, LiTH-MAT-R-81-7, April 1981.Google ScholarGoogle Scholar
  36. {Ostrovsky 80} B N Ostrovsky, Obtaining Language Oriented Parser Systematically by Means of Mixed Computation, in: Translation and Program Models, Ed. I V Pottosin, Computing Center, Novosibirsk, 69--80. In Russian.Google ScholarGoogle Scholar
  37. {Pereira 78} L M Pereira et al, User's Guide to DECsystem-10 Prolog, September 1978.Google ScholarGoogle Scholar
  38. {Robinson 65} J A Robinson, A Machine-Oriented Logic Based on the Resolution Principle, Journal of ACM Vol 12, No 1, 1965. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. {Sandewall 71} E Sandewall, A Programming Tool for Management of a Predicate Calculus-Oriented Data Base, Proceedings of the 2nd IJCAI, London, 1971.Google ScholarGoogle Scholar
  40. {Standish 76} T A Standish, An Example of Program Improvement Using Source-to-Source Transformations, Computer Science Conference, Anaheim, February 1976.Google ScholarGoogle Scholar
  41. {Stoy 77} J E Stoy, Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory, MIT Press, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. {Sussman 72} G J Sussman, T Winograd, E Charniak, Micro- Planner Reference Manual, Al Memo 203a, Al Lab, MIT, 1971. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. {Teitelman 78} W Teitelman, Interlisp Reference Manual, Xerox, PARC, 1978.Google ScholarGoogle Scholar
  44. {Tärnlund 80}, S-Å Tärnlund, Proceedings of the Logic Programming Workshop, John von Neumann Society, Debrecen, Hungary, 1980.Google ScholarGoogle Scholar
  1. Partial evaluation as a means for inferencing data structures in an applicative language: a theory and implementation in the case of prolog

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      POPL '82: Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
      January 1982
      378 pages
      ISBN:0897910656
      DOI:10.1145/582153

      Copyright © 1982 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 25 January 1982

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      POPL '82 Paper Acceptance Rate38of121submissions,31%Overall Acceptance Rate824of4,130submissions,20%

      Upcoming Conference

      POPL '25

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader