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
... [Show full abstract] 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.