Relativized Hyperequivalence of Logic Programs for Modular Programming [chapter]

Mirosław Truszczyński, Stefan Woltran
2008 Lecture Notes in Computer Science  
A recent framework of relativized hyperequivalence of programs offers a unifying generalization of strong and uniform equivalence. It seems to be especially well suited for applications in program optimization and modular programming due to its flexibility that allows us to restrict, independently of each other, the head and body alphabets in context programs. We study relativized hyperequivalence for the three semantics of logic programs given by stable, supported and supported minimal models.
more » ... For each semantics, we identify four types of contexts, depending on whether the head and body alphabets are given directly or as the complement of a given set. Hyperequivalence relative to contexts where the head and body alphabets are specified directly has been studied before. In this paper, we establish the complexity of deciding relativized hyperequivalence wrt the three other types of context programs. We study variants of relativized hyperequivalence that are relevant for the development and analysis of disjunctive logic programs with modular structure. Our main results concern the complexity of deciding relativized hyperequivalence for the three major semantics of logic programs given by stable, supported and supported minimal models. Logic programming with the semantics of stable models, nowadays often referred to as answerset programming, is a computational paradigm for knowledge representation, as well as modeling and solving constraint problems [22, 23, 14, 2] . In recent years, it has been steadily attracting more attention. One reason is that answer-set programming is truly declarative. Unlike in, say, Prolog, the order of rules in programs and the order of literals in rules have no effect on the meaning of the program. Secondly, the efficiency of the latest tools for processing programs, especially solvers, reached the level that makes it feasible to use them for problems of practical importance [12] . It is broadly recognized in software engineering that modular programs are easier to design, analyze and implement. Hence, essentially all programming languages and environments support the development of modular programs. Accordingly, there has been much work recently to establish foundations of modular answer-set programming. One line of investigations has focused on the notion of an answer-set program module [13, 17, 25, 18] . This work builds on ideas for compositional semantics of logic programs proposed by Gaifman and Shapiro [11] and encompasses earlier results on stratification and program splitting [20] . The other main line of research, to which our paper belongs, has centered on program equivalence and, especially, on the concept of equivalence for substitution. Programs P and Q are equivalent for substitution with respect to a class C of programs called contexts, if for every context R ∈ C, P ∪ R and Q ∪ R have the same stable models. Thus, if a logic program is the union of programs P and R, where R ∈ C, then P can be replaced with Q, with the guarantee that the semantics is preserved no matter what R is (as long as it is in C) precisely when P and Q are equivalent for substitution with respect to C. If C contains the empty program (which is typically the case), the equivalence for substitution with respect to C implies the standard equivalence under the stable-model semantics. 1 The converse is not true. We refer to these stronger forms of equivalence collectively as hyperequivalence. Hyperequivalence with respect to the class of all programs, known more commonly as strong equivalence, was proposed and studied by Lifschitz, Pearce and Valverde [19] . That work prompted extensive investigations of the concept that resulted in new characterizations [21, 28] and connections to certain non-standard logics [6] . Hyperequivalence with respect to contexts consisting of facts was studied by Eiter, Fink and Woltran [7, 8] . This version of hyperequivalence, known as uniform equivalence, appeared first in the database area in the setting of DATALOG and query equivalence [26] . Hyperequivalence with respect to contexts restricted to a given alphabet, or relativized hyperequivalence, was proposed by Eiter et al. [8] and Inoue and Sakama [16] . It was generalized by Woltran [29] to allow contexts that use (possibly) different alphabets for the heads and bodies of rules. The approach offers a unifying framework for strong and uniform equivalence. Hyperequivalence, in which one compares projections of answer sets on some designated 1 Two programs are equivalent under the stable-model semantics if they have the same stable models.
doi:10.1007/978-3-540-89982-2_48 fatcat:w4vmedxcafca5jx5zx5hdqvwgq