np-spec: An Executable Specification Language for Solving All Problems in NP

  • Marco Cadoli
  • Luigi Palopoli
  • Andrea Schaerf
  • Domenico Vasile
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1551)


In this paper, a logic-based specification language, called np-spec, is presented. The language is obtained extending datalog through allowing a limited use of some second-order predicates of predefined form. np-spec programs specify solutions to problems in a very abstract and concise way, and are executable. In the present prototype they are compiled to prolog code which is run to construct outputs. Second-order predicates of suitable form allow to limit the size of search spaces in order to obtain reasonably efficient construction of problem solutions. np-spec expressive power is precisely characterized as to express exactly the problems in the class NP.


Search Space Knapsack Problem Prolog Program Datalog Program Input Database 
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. [Agg98]
    A. Aggoun et al. ECL i PS e User Manual (Version 4.0). IC-Parc, Germany, July 1998.Google Scholar
  2. [Böh92]
    M. Böhm. Sat solver, 1992. Computer program available at
  3. [BB93]
    M. Buro and H. Kleine Büning. Report on a SAT competition. EATCS Bulletin, 49:143–151, 1993.zbMATHGoogle Scholar
  4. [CP98]
    M. Cadoli and L. Palopoli. Circumscribing datalog: expressive power and complexity. Theoretical Computer Science, 193:215–244, 1998.zbMATHCrossRefMathSciNetGoogle Scholar
  5. [DP60]
    M. Davis and H. Putnam. A computing procedure for quantification theory. Journal of the ACM, 7:201–215, 1960.zbMATHCrossRefMathSciNetGoogle Scholar
  6. [ELM+98]
    T. Eiter, N. Leone, C. Mateis, G. Pfeifer, and F. Scarcello. The KR system dlv: Progress report, comparisons and benchmarks. In Proceedings of the Sixth International Conference on Principles of Knowledge Representation and Reasoning (KR-98), pages 406–417, 1998.Google Scholar
  7. [GJ79]
    M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman and Company, San Francisco,Ca, 1979.zbMATHGoogle Scholar
  8. [ILO98]
    ILOG optimization suite — white paper. Available at, 1998.
  9. [KM97]
    F. Kluzniak and M. Milkowska. Spill-a logic language for writing testable requirements specifications. Science of Computer Programming, 28:193–223, 1997.CrossRefGoogle Scholar
  10. [Lif85]
    V. Lifschitz. Computing circumscription. In Proceedings of the Ninth International Joint Conference on Artificial Intelligence (IJCAI-85), pages 121–127, 1985.Google Scholar
  11. [McC80]
    J. McCarthy. Circumscription-A form of non-monotonic reasoning. Artificial Intelligence, 13:27–39, 1980.zbMATHCrossRefMathSciNetGoogle Scholar
  12. [Min96]
    S. Minton. Automatic configuring constraint satisfaction programs: A case study. Constraints, 1(1/2):7–43, 1996.CrossRefMathSciNetGoogle Scholar
  13. [Smi90]
    D. R. Smith. KIDS: A semi-automatic program development system. IEEE Transactions on Software Engineering, 16(9), 1990.Google Scholar
  14. [SML96]
    B. Selman, D. Mitchell, and H. Levesque. Generating Hard Satisfiability Problems. Artificial Intelligence, 81:17–29, 1996.CrossRefMathSciNetGoogle Scholar
  15. [Ull88]
    J. D. Ullman. Principles of Database and Knowledge Base Systems, volume 1. Computer Science Press, 1988.Google Scholar
  16. [vEK76]
    M. H. van Emden and R. A. Kowalski. The semantics of predicate logic as a programming language. Journal of the ACM, 23(4):733–742, 1976.zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Marco Cadoli
    • 1
  • Luigi Palopoli
    • 2
  • Andrea Schaerf
    • 3
  • Domenico Vasile
    • 2
  1. 1.Dipartimento di Informatica e SistemisticaUniversità di Roma “La Sapienza”RomaItaly
  2. 2.Dipartimento di Elettronica Informatica e SistemisticaUniversità delia CalabriaRende (CS)Italy
  3. 3.Dipartimento di Ingegneria Elettrica Gestionale e MeccanicaUniversità di UdineUdineItaly

Personalised recommendations