##
###
Cooperating Answer Set Programming
[chapter]

Davy Van Nieuwenborgh, Stijn Heymans, Dirk Vermeir

2006
*
Lecture Notes in Computer Science
*

We present a formalism for logic program cooperation based on the answer set semantics. The system consists of independent logic programs that are connected via a sequential communication channel. When presented with an input set of literals from its predecessor, a logic program computes its output as an answer set of itself, enriched with the input. It turns out that the communication strategy makes the system quite expressive: essentially a sequence of a fixed number of programs n captures
## more »

... complexity class Σ P n , i.e. the n-th level of the polynomial hierarchy. On the other hand, unbounded sequences capture the polynomial hierarchy PH. These results make the formalism suitable for complex applications such as hierarchical decision making and preference-based diagnosis on ordered theories. In addition, such systems can be realized by implementing an appropriate control strategy on top of existing solvers such as DLV or SMODELS, possibly in a distributed environment. 227 then send back to the employee who verifies its feasibility. If the verification fails, the communication starts all over again by the employee sending a new possible plan to the emergency services. In the other case, i.e. the adapted plan is successfully verified by the employee, it is presented to the firm's management which will try to improve it to obtain e.g. a cheaper one. Again, this cheaper alternative is sent back to the emergency services for verification, and eventually also to the employee, to check its feasibility. We develop a framework of cooperating programs that is capable of modeling hierarchical decision problems like the one above. To this end, we consider a sequence of programs P i i=1,...n . Intuitively, a program P i communicates the solutions it finds acceptable to the next program P i+1 in the hierarchy. For such a P i -acceptable solution S, the program P i+1 computes a number of solutions that it thinks improve on S. If one of these P i+1 improvements S of S is also acceptable to P i , i.e. S can be successfully verified by P i , the original S is rejected as an acceptable solution by the program P i+1 . On the other hand, if P i+1 has no improvements for S, or none of them are also acceptable to P i , S is accepted by P i+1 . It follows that a solution that is acceptable to all programs must have been proposed by the starting program P 1 . It turns out that such sequences of programs are rather expressive. More specifically, we show not only that arbitrary complete problems of the polynomial hierarchy can be solved by such systems, but that such systems can capture the complete polynomial hierarchy, the latter making them suitable for complex applications. Problems located at the first level of the polynomial hierarchy can be directly solved using answer set solvers such as DLV [16] or SMODELS [22] . On the second level, only DLV is left to perform the job directly. However, by using a "guess and check" fixpoint procedure, SMODELS can indirectly be used to solve problems at the second level [4, 15] . Beyond the second level, there are still some interesting problems. E.g., the most expressive forms of diagnostic reasoning, i.e. subset-minimal diagnosis on disjunctive system descriptions [13] or preference-based diagnosis on ordered theories [27] , are located at the third level of the polynomial hierarchy, as are programs that support sequences of weak constraints 1 on disjunctive programs. For these problems, and problems located even higher in the polynomial hierarchy, the framework presented in this paper provides a means to effectively compute solutions for such problems, using SMODELS or DLV for each program in the sequence to compute better solutions. E.g., to solve the problems mentioned before on the third level, it suffices to write three well-chosen programs and to set up an appropriate control structure implementing the communication protocol sketched above. The remainder of the paper is organized as follows. In Section 2, we review the answer set semantics and present the definitions for cooperating program systems. Further, we illustrate how such systems can be used to elegantly express common problems. Section 3 discusses the complexity and expressiveness of the proposed semantics, while Section 4 compares it with related approaches from the literature. Finally, we conclude and give some directions for further research in Section 5. Due to space restrictions, proofs have been omitted, but they can be found in [25] .

doi:10.1007/11799573_18
fatcat:e2l243gxbfhs7idrqcwbetc7bu