How to Incorporate Negation in a Prolog Compiler?

  • Juan José Moreno-Navarro
  • Susana Muñoz-Hernández
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1753)


Knowledge representation based applications require a more complete set of capabilities than those offered by conventional Prolog compilers. Negation is, probably, the most important one. The inclusion of negation among the logical facilities of LP has been a very active area of research, and several techniques have been proposed. However, the negation capabilities accepted by current Prolog compilers are very limited. In this paper, we discuss the possibility to incorporate some of these techniques in a Prolog compiler in an efficient way. Our idea is to mix some of the existing proposals guided by the information provided by a global analysis of the source code.


Semantics of Negation Global Analysis Implementation of Negation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    K. R. Apt. Logic programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume 3, pages 493–574, Elsevier, New York, 1990.Google Scholar
  2. [2]
    R. Barbuti, D. Mancarella, D. Pedreschi, and F. Turini. Intensional negation of logic programs. Lecture notes on Computer Science, 250:96–110, 1987.Google Scholar
  3. [3]
    R. Barbuti, D. Mancarella, D. Pedreschi, and F. Turini. A transformational approach to negation in logic programming. JLP, 8(3):201–228, 1990.CrossRefMathSciNetzbMATHGoogle Scholar
  4. [4]
    C. Braem, B. Le Charlier, S. Modart, and P. Van Hentenryck. Cardinality analysis of Prolog. In I. S. on Logic Programming, pages 457–471. The MIT Press, 1994.Google Scholar
  5. [5]
    P. Bruscoli, F. Levi, G. Levi, and M.C. Meo. Compilative Constructive Negation in Constraint Logic Programs. In Sophie Tyson, editor, Proc. of the Nineteenth International Colloquium on Trees in Algebra and Programming, CAAP’ 94, volume 787 of LNCS, pages 52–67, Berlin, 1994. Springer-Verlag.CrossRefGoogle Scholar
  6. [6]
    M. Carlsson. Freeze, indexing, and other implementation issues in the wam. In I. Conference on Logic Programming, pages 40–58. The MIT Press, 1987.Google Scholar
  7. [7]
    D. Chan. Constructive negation based on the complete database. In Proc. Int. Conference on Logic Programming’88, pages 111–125. The MIT Press, 1988.Google Scholar
  8. [8]
    D. Chan. An extension of constructive negation and its application in coroutining. In Proc. NACLP’89, pages 477–493. The MIT Press, 1989.Google Scholar
  9. [9]
    K. L. Clark. Negation as failure. In J. Minker H. Gallaire, editor, Logic and Data Bases, pages 293–322, New York, NY, 1978.Google Scholar
  10. [10]
    W. Drabent. What is a failure? An approach to constructive negation. Acta Informatica., 33:27–59, 1995.CrossRefMathSciNetGoogle Scholar
  11. [11]
    M. García de la Banda, K. Marriott, and P. Stuckey. Efficient analysis of constraint logic programs with dynamic scheduling. In 1995 International Logic Programming Symposium, pages 417–431. The MIT Press, 1995.Google Scholar
  12. [12]
    A. Van Gelder, K.A. Ross, and J.S. Schlipf. The well-founded semantics for general logic programs. J. of the ACM, 38(3):620–650, 1991.zbMATHCrossRefGoogle Scholar
  13. [13]
    M. Hermenegildo, F. Bueno, D. Cabeza, M. García de la Banda, P. López, and G. Puebla. The CIAO Multi-Dialect Compiler and System: An Experimentation Workbench for Future (C)LP Systems. In Parallelism and Implementation of Logic and Constraint Logic Programming. Nova Science, Commack, NY, USA, April 1999.Google Scholar
  14. [14]
    P.M. Hill and J.W. Lloyd. The Gödel Programming Language. The MIT Press, 1994.Google Scholar
  15. [15]
    K. Kunen. Negation in logic programming. J. of Logic Programming, 4:289–308, 1987.CrossRefMathSciNetzbMATHGoogle Scholar
  16. [16]
    J. W. Lloyd. Foundations of Logic Programing, 2nd edition. Springer, 1987.Google Scholar
  17. [17]
    P. López-García, M. Hermenegildo, S. Debray, and N. W. Lin. Lower bound cost estimation for logic programs. In 1997 International Logic Programming Symposium. MIT Press, 1997.Google Scholar
  18. [18]
    J.J. Moreno-Navarro. Default rules: An extension of constructive negation for narrowing-based languages. In Proc. ICLP’94, pages 535–549. The MIT Press, 1994.Google Scholar
  19. [19]
    S. Munoz. Algunas técnicas para el tratamiento de información negativa en Prolog. Master’s thesis, Facultad de Informática, UPM, 1997.Google Scholar
  20. [20]
    K. Muthukumar and M. Hermenegildo. Compile-time derivation of variable dependency using abstract interpretation. JLP, 13(2/3):315–347, July 1992.zbMATHCrossRefGoogle Scholar
  21. [21]
    L. Naish. Negation and quantifiers in NU-Prolog. In Proc. 3rd ICLP, 1986.Google Scholar
  22. [22]
    A. Di Pierro, M. Martelli, and C. Palamidessi. Negation as instantiation. Information and Computation, 120(2):263–278, 1995.zbMATHCrossRefMathSciNetGoogle Scholar
  23. [23]
    G. Puebla, M. García de la Banda, K. Marriott, and P. Stuckey. Optimization of Logic Programs with Dynamic Scheduling. In 1997 International Conference on Logic Programming, pages 93–107, Cambridge, MA, June 1997. MIT Press.Google Scholar
  24. [24]
    R. F. Stark. Cut-property and negation as failure. International Journal of Foundations of Computer Science, 5(2):129–164, 1994.CrossRefMathSciNetGoogle Scholar
  25. [25]
    P. Stuckey. Constructive negation for constraint logic programming. In Proc. IEEE Symp. on Logic in Computer Science, volume 660. IEEE Comp. Soc. Press, 1991.Google Scholar
  26. [26]
    A. Voronkov. Logic programming with bounded quantifiers. In A. Voronkov, editor, First Russian Conference on Logic Programming, volume 592, pages 486–514, Irkutsk, Rusia, September 1990. Springer 1992.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Juan José Moreno-Navarro
    • 1
  • Susana Muñoz-Hernández
    • 1
  1. 1.Dpto. LSIIS - Facultad de InformáticaUniversidad Politécnica de MadridMadridSpain

Personalised recommendations