Implementation and Experimentation of the Logic Language \({\cal N\!P\, D}atalog\)

  • S. Greco
  • C. Molinaro
  • I. Trubitsyna
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4080)


This paper presents a system prototype implementing \({\cal NP~ D}atalog\), a Datalog-like language for expressing \(\cal NP\) search and optimization problems. \({\cal NP~ D}atalog\) extends DATALOG \(^{\neg_s}\) (DATALOG with stratified negation) with intuitive and efficient constructs, i.e. constraints and a restricted form of (exclusive) disjunction used to define (nondeterministically) subsets (or partitions) of relations. The system translates \({\cal NP~ D}atalog\) queries into OPL programs, then solves them by using the ILOG Solver [16]. Thus, it combines an easy formulation of problems, expressed by means of a declarative logic language, and an efficient execution of the ILOG Solver. Several experiments show the effectiveness of this approach.


Logic Program Random Graph Vertex Cover Optimization Query Constraint Logic Programming 
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.
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Reading (1994)Google Scholar
  2. 2.
  3. 3.
    ASSAT experimental data on the Graph Coloring Domain,
  4. 4.
  5. 5.
  6. 6.
    East, D., Truszczynski, M.: DATALOG with Constraints - An Answer-Set Programming System. In: AAAI/IAAI, pp. 163–168 (2000)Google Scholar
  7. 7.
    East, D., Truszczynski, M.: Predicate-calculus based logics for modeling and solving search problems. ACM Transaction on Computational Logic (to appear, 2005)Google Scholar
  8. 8.
  9. 9.
    Eiter, T., Leone, N., Mateis, C., Pfeifer, G., Scarcello, F.: A Deductive System for Non-monotonic Reasoning. In: LPNMR, pp. 363–374 (1997)Google Scholar
  10. 10.
    Finkel, R.A., Marek, V.W., Truszczynski, M.: Constraint Lingo: towards high-level constraint programming. Software Practice and Experience 34(15), 1481–1504 (2004)CrossRefGoogle Scholar
  11. 11.
    Gelfond, M., Lifschitz, V.: The Stable Model Semantics for Logic Programming. In: Proc. 5th Int. Conf. on Logic Programming, pp. 1070–1080 (1988)Google Scholar
  12. 12.
    Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New generation Computing 9(3/4), 365–385 (1991)CrossRefGoogle Scholar
  13. 13.
    Greco, S., Saccà, D., Zaniolo, C.: Datalog with Stratified Negation and Choice: from P to D P. In: Proc. Int. Conf. on Database Theory, pp. 574–589 (1995)Google Scholar
  14. 14.
    Greco, S., Saccà, D.: NP-Optimization Problems in Datalog. In: ILPS, pp. 181–195 (1997)Google Scholar
  15. 15.
    Greco, S., Molinaro, C., Trubitsyna, I., Zumpano, E.: Implementing NP Datalog. Technical report – University of Calabria, submitted to an International JournalGoogle Scholar
  16. 16.
    ILOG OPL Development Studio,
  17. 17.
    Jaffar, J., Michaylov, S., Stuckey, P.J., Yap, R.: The CLP(R) Language and System. ACM Transaction on Programming Languages and Systems 14(3), 339–395 (1992)CrossRefGoogle Scholar
  18. 18.
    Johnson, D.S.: A Catalog of Complexity Classes. In: van Leewen, J. (ed.) Handbook of Theoretical Computer Science, vol. 1, pp. 67–161. North-Holland, Amsterdam (1990)Google Scholar
  19. 19.
    Kolaitis, P.G., Thakur, M.N.: Logical Definability of NP Optimization Problems. Information and Computation 115, 321–353 (1994)MATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    Lin, F., Zhao, Y.: ASSAT: computing answer sets of a logic program by SAT solvers. Artificial Intelligene 157(1-2), 115–137 (2004)MATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Marriott, K., Stuckey, P.J.: Programming with Constraints: an Introduction. MIT Press, Cambridge (1998)MATHGoogle Scholar
  22. 22.
    Niemela, I., Simons, P., Soininen, T.: Stable Model Semantics of Weight Constraint Rules. In: Proc. Int. Conf. on Logic Progr. and Nonmon. Reas., pp. 317–331 (1999)Google Scholar
  23. 23.
  24. 24.
  25. 25.
    Syrjänen, T., Niemelä, I.: The smodels system. In: Eiter, T., Faber, W., Truszczyński, M. (eds.) LPNMR 2001. LNCS, vol. 2173, pp. 434–438. Springer, Heidelberg (2001)Google Scholar
  26. 26.
    Van Hentenryck, P.: The OPL Optimization Programming Language. MIT Press, Cambridge (1999)Google Scholar
  27. 27.
    Van Hentenryck, P., Michel, L., Perron, L., Regin, J.C.: Constraint Programming in OPL. In: Proc. Int. Conf. on Principles and Practice of Decl. Progr., pp. 98–116 (1999)Google Scholar
  28. 28.
    Var Roy, P.: Logic Programming in Oz with Mozart. In: ICLP, pp. 38–51 (1999)Google Scholar
  29. 29.
    Wallace, M., Schimpf, J.: ECLiPSe: Declarative Specification and Scaleable Implementation. In: Proc. Int. Work. on Practical Aspects of Decl. Langu., pp. 365–366 (1999)Google Scholar
  30. 30.
    Zumpano, E., Greco, S., Trubitsyna, I., Veltri, P.: On the semantics and expressive power of Datalog-like languages for NP search and optimization problems. In: Proc. ACM Symp. on Applied Computing, pp. 692–697 (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • S. Greco
    • 1
  • C. Molinaro
    • 1
  • I. Trubitsyna
    • 1
  1. 1.DEIS, Univ. della CalabriaRendeItaly

Personalised recommendations