Compiling Recursive Functional Prolog Programs with List Structure into Procedural Languages

  • Young K. Nam
  • Lawrence J. Henschen
Part of the Automated Reasoning Series book series (ARSE, volume 1)


We describe methods for translating certain classes of recursive Prolog programs representing functions into ordinary, statement-oriented languages like Pascal or C. The techniques of deductive databases are applied to Prolog programs that are functional, recursive, have no side effects (such as printing values in a particular order) and whose defining rules are mutually exclusive.


Deductive Database Prolog Program Exclusive Expression Recursive Rule Procedural Language 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    A. V. Aho and J. D. Ullman (1979): Universality of Data Retrieval Languages. ACM PODS.Google Scholar
  2. [2]
    F. Bancilhon and R. Ramakrishnan (1986): An Amateur’s Introduction to Recursive Query Processing Strategies. ACM SIGMOD.Google Scholar
  3. [3]
    M. Chen and L. Henschen (1985): On the Use and Internal Structure of a Logic-based Decision Support System. J. DSS 1(3), 205–219, Sept.Google Scholar
  4. [4]
    W. Clocksin and C. Mellish (1981): Programming in Prolog. SpringerVerlag.zbMATHGoogle Scholar
  5. [5]
    S. K. Debray and P. Mishra (1988): Denotational and Operational Semantics for Prolog. J. Logic Program. 5(1), 61–91, Mar.MathSciNetzbMATHCrossRefGoogle Scholar
  6. [6]
    S. K. Debray and D. S. Warren (1990): Towards Banishing the Cut from Prolog. IEEE Trans. Software Eng. 16, 335–349, Mar.MathSciNetCrossRefGoogle Scholar
  7. [7]
    L. Henschen and S. Naqvi (1984): On Compiling Queries in Recursive First-order Databases. J. ACM 31(1) 47–86.MathSciNetzbMATHCrossRefGoogle Scholar
  8. [8]
    J. Lin (1989): On Transforming of Logic Program via Variable-Dependence Analysis and Fact Propagation. Ph. D. dissertation, Dept. EECS, Northwestern Univ.Google Scholar
  9. [9]
    C. S. Mellish (1981): The Automatic Generation of Mode Declarations for Prolog Programs. Dep. Artificial Intell., Univ. Edinburgh, DAI Res. Paper 163, Aug.Google Scholar
  10. [10]
    Y. Nam and L. J. Henschen (1990): Compiling Linear Recursive Programs with List Structure in Prolog into Procedural Languages. Proc. COMPSAC90, Chicago, IL, Nov.Google Scholar
  11. [11]
    Y. Nam and L. J. Henschen (1991): On Generating Efficient Procedural Codes from Linear Recursive Prolog Programs with List Structure. Proc. of Intl. Phoenix Conf. on Communications and Computers, Phoenix, AZ, March, (to appear).Google Scholar
  12. [12]
    J. Naughton, R. Ramakrishnan, Y. Sagiv, and J. Ullman (1989): Efficient Evaluation of Right-, Left-, and Multi-linear rules. Proc. ACM SIGMOD Intl. Conf. 18(2), June.Google Scholar
  13. [13]
    R. Reiter (1978): Deductive Question-Answering on Relational Databases. In: Gallaire and Minker, eds.: Logic and Databases. Plenum Press.Google Scholar
  14. [14]
    N. Rowe (1988): Artificial Intelligence through Prolog. Englewood Cliffs, N. J.: Prentice-Hall.Google Scholar
  15. [15]
    D. Troy, C. Yu, and W. Zhang (1989): Linearization of Nonlinear Recursive Rules. IEEE Trans. Software Eng. 15, 1109–1119, Sept.MathSciNetCrossRefGoogle Scholar
  16. [16]
    D. H. D. Warren (1977): Implementing Prolog-Compiling Predicate Logic Programs. Dep. Artificial Intell., Univ. Edinburgh, Scotland, Res. Reps. 39, 40.Google Scholar

Copyright information

© Springer Science+Business Media Dordrecht 1991

Authors and Affiliations

  • Young K. Nam
    • 1
  • Lawrence J. Henschen
    • 1
  1. 1.Department of Electrical Engineering and Computer ScienceNorthwestern UniversityEvanstonUSA

Personalised recommendations