Advertisement

Binary Speed Up for Logic Programs

  • Jan Hrůza
  • Petr Štěánek
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1861)

Abstract

Binary logic programs can be obtained from ordinary logic programs by a binarizing transformation. In most cases, binary programs obtained by this way are less efficient than the original programs. Demoen [2] showed an interesting example of a logic program whose computational behavior was improved if it was transformed to a binary program and then specialized by partial deduction.

The class of so called B-stratifiable logic programs is defined. It is shown that for every B-stratifiable logic program, binarization and subsequent partial deduction produce a binary program which usually has a better computational behavior than the original one. Both binarization and partial deduction can be automated.

Keywords

Logic Program Original Program Predicate Symbol Unit Clause Partial Evaluator 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    R. Apt, From Logic Programming to Prolog, Prentice Hall International, NJ 1996Google Scholar
  2. 2.
    B. Demoen, On the Transformation of a Prolog Program to a More Efficient Binary Program, in: Logic Program Synthesis and Transformation 1992, Kung-Kiu Lau and Tim Clement (editors), Lecture Notes in Computer Science Vol. Springer-Verlag 1993 pp. 242–252Google Scholar
  3. 3.
    D. De Schreye, R. Gluck, J. Jorgensen, M. Leuschel, B. Martens, M. H. Sorensen, Conjunctive partial deduction: foundations, control, algorithms and experiments, The Journal of Logic Programming 41 (1999), 231–277zbMATHCrossRefGoogle Scholar
  4. 4.
    M. Falaschi, G. Levi, M. Martelli, C. Palamidessi, Declarative Modeling of the Operational Behavior of Logic Languages, Theoretical Sci. 69(3):289–318 (1989)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    M. Leuschel, Dozen Problems for Partial Deduction (A Set of Benchmarks) http://www.ecs.soton.ac.uk/~mal/systems/dppd/
  6. 6.
    M. Leuschel, M. H. Sorensen, Redundant Arguments Filtering of Logic Programs, in John Gallagher (ed.), Logic Programm Synthesis and Transformation, Proceedings of the 6th International Workshop, LOPSTR’96, LCNS 1207, 83–103, Stockholm, 1996.Google Scholar
  7. 7.
    J. W. Lloyd and J. C. Shepherdson, Partial Evaluation in Logic Programming, J. Logic Programming 11 (1991), 217–242CrossRefMathSciNetzbMATHGoogle Scholar
  8. 8.
    M. J. Maher, Equivalences of Logic Programs, in: Proc. Third Int. Conference on Logic Programming, London 1986, E. Shapiro (editor), Lecture Notes in Sci. Vol 225, Springer-Verlag, Berlin 1986, pp. 410–424Google Scholar
  9. 9.
    U. W. Neumerkel, Specialization of Prolog Programs with Partially Static Goals and Binarization, PhD Thesis, Technical University, Wien, 1993Google Scholar
  10. 10.
    M. Proietti, A. Pettorossi, Tranformation of logic programs: Foundations and Techniques, Journal of Logic Programming, 19, 20:261–320, 1994CrossRefMathSciNetGoogle Scholar
  11. 11.
    M. Proietti, A. Pettorossi, Unfolding-definition-folding, in this order, for avoiding unnecessary variables in logic programs, Theoretical Computer Science 142 (1995), 98–124CrossRefMathSciNetGoogle Scholar
  12. 12.
    A. Pettorossi, M. Proietti, Synthesis and Transformation of Logic Programs Using Unfold/Fold Proofs, Tech. Rep. 457, Dipartimento di Informatica, Sistemi e Produzione, Universita di Roma, Tor Vergata, Giugno 1997Google Scholar
  13. 13.
    D. Sahlin, An Automatic Partial Evaluator for Full Prolog, PhD Dissertation, The Royal Institute of Technology, Dept. of Telecommunication and Computer Science, Stockholm, March 1991Google Scholar
  14. 14.
    T. Sato, H. Tamaki, Unfold/Fold Transformation of Logic Programs in: Proc. of the 2nd Int. Logic Programming Conference, Uppsala 1984, S. Å. Tärnlund (editor), pp. 127–138Google Scholar
  15. 15.
    T. Sato, H. Tamaki, Existential Continuation, New Generation Computing 6 (1989), 421–438zbMATHGoogle Scholar
  16. 16.
    J. Šebelík and P. Štěpánek, Horn Clause Programs for Recursive Functions, in: Logic Programming, K. J. Clark and S. Å. Tärnlund (editors), ACADEMIC PRESS, London 1982, pp. 325–240Google Scholar
  17. 17.
    O. Štěpánková and P. Štěpánek, Stratification of Definite Clause Programs and of General Logic Programs, in: Proc. CSL’ 89, Third Workshop on Computer Science Logic, Kaiserslautern, Germany, 1989, Lect. Notes in Sci. Vol 440, Springer-Verlag, Berlin 1989, pp. 396–408Google Scholar
  18. 18.
    P. Tarau, A Continuation Passing Style Prolog Engine, Lecture Notes in Computer Science, Vol. 631, pp. 479–480, Springer-Verlag, Berlin 1992Google Scholar
  19. 19.
    P. Tarau and M. Boyer, Elementary Logic Programs, in: Proc. PLILP’90, P. Deransart and J. Maluzsyński (editors), Lecture Notes in Sci. Vol. Springer-Verlag, Berlin 1990, pp. 159–173Google Scholar
  20. 20.
    S. Å. Tärnlund, Horn Clause Computability, BIT 17 (1977), 215–226zbMATHCrossRefGoogle Scholar
  21. 21.
    K. Ueda, Making Exhaustive Search Programs Deterministic, New Generation Computing 5 (1987), 317–326CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Jan Hrůza
    • 1
  • Petr Štěánek
    • 1
  1. 1.Department of Theoretical Computer ScienceCharles UniversityPraha 1Czech Republic

Personalised recommendations