NP Datalog

𝒩𝒫𝒟atalog: A logic language for expressing 𝒩𝒫 search and optimization problems. This paper presents a logic language for expressing 𝒩𝒫 search and optimization problems. Specifically, first a language obtained by extending (positive) DATALOG with intuitive and efficient constructs (namely, stratified negation, constraints, and exclusive disjunction) is introduced. Next, a further restricted language only using a restricted form of disjunction to define (nondeterministically) subsets (or partitions) of relations is investigated. This language, called 𝒩𝒫𝒟atalog, captures the power of DATALOG ¬ in expressing search and optimization problems. A system prototype implementing 𝒩𝒫𝒟atalog is presented. The system translates 𝒩𝒫𝒟atalog queries into Optimization Programming Language (OPL) programs which are executed by the ILOG OPL Development Studio. Our proposal combines easy formulation of problems, expressed by means of a declarative logic language, with the efficiency of the ILOG System. Several experiments show the effectiveness of this approach.