Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A formal characterization of a domain independent abductive reasoning system Kean, Alex C.Y. 1993

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-ubc_1993_spring_phd_kean_alex.pdf [ 7.64MB ]
Metadata
JSON: 831-1.0051340.json
JSON-LD: 831-1.0051340-ld.json
RDF/XML (Pretty): 831-1.0051340-rdf.xml
RDF/JSON: 831-1.0051340-rdf.json
Turtle: 831-1.0051340-turtle.txt
N-Triples: 831-1.0051340-rdf-ntriples.txt
Original Record: 831-1.0051340-source.json
Full Text
831-1.0051340-fulltext.txt
Citation
831-1.0051340.ris

Full Text

A FORMAL CHARACTERIZATION OF A DOMAIN INDEPENDENT ABDUCTIVE REASONING SYSTEM By Alex Chia-Yee Kean Bachelor of Computer Science Acadia University 1983 Master of Science (Computer Science) Acadia University 1985 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF Doctor of Philosophy in THE FACULTY OF GRADUATE STUDIES (DEPARTMENT OF COMPUTER SCIENCE) We accept this thesis as conforming to the required standard  THE UNIVERSITY OF BRITISH COLUMBIA 1992 © Alex Chia-Yee Kean, December 1992  In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission.  (Signature)  Department of  69(4A. p LAte-r  The University of British Columbia Vancouver, Canada  Date  DE-6 (2/88)  I 14-kk- D-ec^1151-  Abstract Abduction is a logical inference technique used in explanation finding and a variety of consequence finding. One application domain that stands out in utilizing abduction is automated diagnostic reasoning. This thesis provides a formal specification and methods of computation for a domain independent propositional abductive reasoning system. On the competence level, specifications are defined for domain independent abductive reasoning in terms of finding assumption-based explanations, direct consequences, extensions and a protocol for revising assumptions. On the performance level, computational strategies for performing abduction according to the defined specifications are studied. The computational framework for a propositional abductive inference engine, the Clause Management  System (CMS), is presented. The computational framework of the CMS uses the notion of prime implicates to represent its knowledge base. As a result, the algorithm to update the CMS knowledge base is an incremental algorithm for generating prime implicates - the first reported. Coupled with the notion of reasoning with assumptions, the abduction framework is extended to include inquiry about defeasible assumptions. The notion of assumption-based reasoning presented includes finding assumption-based explanations, direct consequences and extensions. Extending the computational framework of the CMS, an Assumption-based Clause Management System (ACMS) that computes the above functions, is presented. A simple protocol for use by domain specific applications interacting with the ACMS is proposed. Included in the protocol is a method to perform revision of assumptions. The first algorithm to perform incremental deletion of prime implicates is also presented. Additionally, a new notion of approximated abduction together with a set of approximation strategies, namely knowledge-guided and  resource-bounded approximation, are proposed. The goal of these studies is to propose a framework for incorporating knowledge-guided and resource-bounded approximation into computational abduction. The potential benefit might be the discovery of a useful and tractable approximation strategy. The specification of a domain independent propositional abductive reasoning system is the main achievement of this thesis. The resulting abductive reasoning system, the ACMS, is adaptable to a wide spectrum of domain specific applications. The ACMS can free designers from repeatedly building specialized abductive inference engines, and instead allow them to concentrate their effort on knowledge engineering and problem solving.  ii  Contents ii  Abstract^ Table of Contents^  iii  List of Figures^  vii  List of Definitions^  ix  List of Algorithms^  xi xii  List of symbols^ Preliminary^  xi  Acknowledgement^  xvi  1 Introduction 1.1 Abduction ^ 1.1.1^Deduction/Abduction ^ 1.2  1.3  1 2  4  1.1.2^Knowledge Management Systems ^  7  Clause Management ^  9  1.2.1^Dependency ^  11  1.2.2^Implicates ^  12  1.2.3^Assumptions ^  13  The Revision Problems ^  14  1.3.1^Addition  15  ^  1.3.2^Deletion ^  15  1.4  Approximation ^  16  1.5  Applications ^  17 iii  1.5.1^Diagnostic Reasoning^ 2  3  ^ 18  Clause Management Systems  19  2.1  Introduction  19  2.2  Implicates ^  23  2.3  Support ^  27  2.3.1^Prime Support ^  29  2.3.2^Trivial Support ^  30  2.4  Query ^  32  2.5  Preference Orderings ^  35  2.6  Conjunctive Queries ^  38  2.7  Conclusion ^  41  ^  An Incremental Method for Generating Prime Implicates  43  3.1  Introduction  43  3.2  Definitions ^  45  3.3  Tison's Method ^  46  3.4  The Incremental Method ^  48  3.5  Correctness ^  51  3.6  Complexity Analysis ^  52  3.7  Subsumption and Optimization ^  54  3.7.1^History and Biform Restriction ^  55  3.7.2^Parent and Children Subsumptions  62  3.8 4  .  ^  ^  3.7.3^Other Optimizations? ^  64  Conclusions ^  67  Assumption-based Clause Management Systems  68  4.1  Introduction  ^  68  4.2  Assumption-Based Reasoning ^  71  4.2.1^Definitions ^  71  4.2.2^Varieties of Reasoning ^  71  42.3^Assumption-based Explanations ^  72  4.2.4^Extensions ^  74  4.25^Direct Consequences ^  77  An Assumption-Based Clause Management System ^  79  4.3  iv  4.3.1^Restricted a-theory .^.^,^.^.^.^.^.^..............^. ^ 80 4.3.2^Explanations, Direct Consequences and Supports ^ 4.3.3^Computations^.....^.^.^.^.^ 4.4 5  6  .  81  ^ 81 87  Conclusions ^  88  Revision  88  5.1  Introduction  5.2  An Extended ACMS ^  90  5.2.1^Addition ^  92  5.2.2^Deletion ^  92  5.3  A Protocol ^  93  5.4  Is Deletion Necessary  5.5  Conclusions ^  ^  ^99 100  Approximation  102  6.1  Introduction ^  102  6.1.1^Approximation ^  104  6.1.2^Implicates and Explanations Revisited ^  105  6.1.3^Constraints and Approximation ^  106  Query-based Implicates ^  107  6.2.1^Definition and Properties of Query-based Implicates ^  107  6.22^Explanations Generated From Query-based Implicates ^  111  Problems with Computing Query-based Implicates ^  113  6.3.1^Approximating Minimal Query-based Implicates ^  114  Restricted Generalized Consensus ^  116  6.2  6.3  6.4  6.4.1^Definition and Properties of Restricted Generalized Consensus ^ 116 6.4.2^An algorithm for computing g(E) ^ 6.4.3^Explanations Generated From g(E)  7  ^  119 122  6.5  ATMS implicates ^  124  6.6  Length-based Implicates ^  125  6.7  Conclusions ^  126  Diagnostic Reasoning  129  7.1  Introduction  129  72  Consistency-Based Diagnostic Reasoning ^  ^  130  7.3 Abduction-based Diagnostic Reasoning ^  134  7.4 Abduction-Based Diagnostic Inquiry ^  137  7.5 Conclusions ^  143 144  8 Conclusions^  145  8.1 Contributions ^ 8.2 Future Research ....... ^.^. Glossary  ^  Bibliography  ^  .  147 150 153  List of Figures 1.1  Reasoning System = Problem-Solver + Inference Engines ^  1  1.2  An Abnormal Inverter ^  3  1.3  A possible reasoning system configuration ^  5  1.4  Reasoning System = Problem-Solver + I Deduction, Abduction ] ^  5  1.5  Intelligent Backtracking Search Space ^  6  1.6  A Problem-Solver-KMS Reasoning System Architecture ^  8  2.1  The Configuration of Deductive and Abductive Engines ^  20  2.2  Implicates Inclusion Relations ^  25  2.3  Canonical Ordering of minimal supports  37  2.4  Canonical Ordering of minimal explanations ^  38  3.1  IPIA example 3.4.1: Stage 1 ^  49  3.2  IPIA example 3.4.1 : Stage 2 ^  50  3.3  IPIA example 3.4.1 : Stage 3 ^  50  3.4  CTree for Example 3.7.1: Restriction Optimization ^  61  3.5  de Kleer's Example ^  65  3.6  CTree(11, C)for Local Optimization ^  66  5.1  A Constraint Satisfaction Problem: A Complete search tree ^  96  6.1  An Abnormal Inverter ^  108  6.2  Set Inclusion Properties of I, MI and MI1Q1 of E. ^  110  6.3  Set Inclusion Properties of I, MI, MI Q i and M/(Q1 of E.  115  6.4  Set Inclusion Properties of I, MI, MI1 QI, M/1 10 and the approximation G of E. ^ 118  ^  vii  ^  6.5  Minimal Implicates Consensus Graph ^  121  6.6  Approximation Adequacy ^  128  7.1  A 1-bit Full Adder ^  133  8.1  A Fully Connected Problem-Solver-KMS Architecture ^  148  viii  List of Definitions 1.1.1 Abduction-based Explanation ^  3  2.2.1 Minimal/Prime Implicate ^  23  2.2.2 Trivial Implicate ^  24  2.3.1 Support ^  27  2.3.2 Prime Support ^  29  2.3.3 Trivial Support ^  30  2.5.1 Minimal Support Preference Orderings ^  35  3.1.1 Prime Implicant ^  44  3.2.1 Consensus ^  45  3.3.1 Biform/Monoform ^  46  3.7.1 History ^  55  3.72 Restriction ^  55  3.7.3 Proxy ^  56  4.2.1 Assumption-based Explanation ^  72  4.2.2 Assumption-based Minimal, Minimal Trivial, and Prime Explanations ^ 73 4.2.3 Assumption-based Extension ^  74  42.4 Assumption-based Irrefutability ^  76  4.2.5 Assumption-based Direct Consequence ^  78  4.2.6 Assumption-based Minimal, Minimal Trivial, and Prime Direct Consequence ^ 78 4.3.1 a-transformation ^  80  4.3.2 Conflict Sets ^  84  4.3.3 Reiter's Hitting Sets ^  85  5.2.1 A-Deletion ^  93 ix  5.3.1 Disagreement Set ^  94  6.1.1 Selective Implicates ^  107  6.2.1 Query-based Implicate ^  108  6.3.1 Approximated Minimal Query-based Implicate ^  114  6.4.1 Restricted Generalized Consensus ^  116  6.5.1 ATMS-implicate ^  124  6.6.1 Length-n Implicate ^  125  x  List of Algorithms 2.1  Algorithm for Minimal Supports ^  33  3.1  Tison's Method ^  47  3.2  IPIA ^  49  3.3  Optimized IPIA ^  63  4.1  Algorithm for Minimal Explanations ^  83  6.1  Algorithm Naive QBIG ^  119  6.2  Algorithm QBIG-Subsumption ^  120  xi  List of symbols ■^True. ^^False.  inv(S)^if S =-- {S1, • • • ,^is a set of sentences, inv(S) = {-iSi , • I(E)^The set of all implicates of E. MI(E)^The set of all minimal implicates of E. PI(E)^The set of all prime implicates of E. TI (E)^The set of all trivial implicates of E. MT/ (E)^The set of all minimal trivial implicates of E. MS(G, E)^The set of all minimal supports of G wit. E. PS(G, E)^The set of all prime supports of G wrt. E. MTS(G, E)^The set of all minimal trivial supports of G wit. E. ME(G, T)^The set of all assumption-based minimal explanation of G wit. T. MTE(G, T)^The set of all assumption-based minimal trivial explanation of G wit. T. PE(G, T)^The set of all assumption-based prime explanation of G wit. T. MDC(G,T)^The set of all assumption-based minimal direct consequences of G wrt. T. MTDC(G, T)^The set of all assumption-based minimal trivial direct consequences of G wrt. T. PDC(G,T)^The set of all assumption-based prime direct consequences of G wrt. T. A^A set of assumptions.  xii  A set of facts. R( C)^A property R constrained on a sentence C. For example, R( C) C  c A.  a-theory^An assumption-based theory. T = (.F, A)^An assumption-based theory, theory, where both .7 and A are well formed sentences of G. -  Preliminary We shall assume a propositional language ,C with a vocabulary V containing a set of countably infinitely many propositional variables including two special symbols ■ (true) andll (false), a set of logical connectives {n , V, —> —}, and sentences formed using only these variables and connectives (Shoenfield, 1967). Since we are dealing primarily with propositional logic, the adjective "propositional" is dropped whenever no ambiguity arises. We use the logical entailment relation, with its standard logical definition and Th (E) for the set of all the logical consequences of E, where E c E. Unless stated otherwise, a finite set of sentences, S = {S1, . , SO, denotes the conjunction Si A ...A Sn. The function znv(S) denotes the set {-'S1, . • • , A normal form formula is a special type of sentence defined in terms of its constituent variables, literals and clauses. A variable is denoted by a lowercase letter, possibly subscripted; and a literal is a positive variable x or a negated variable —ix. We call x and —ix a pair of complementary literals. A clause, denoted by an uppercase letter possibly subscripted, is either a conjunction of literals (conjunctive clause), or a disjunction of literals (disjunctive clause), without repetition. The negation of a disjunctive clause, C, is a conjunctive clause and vice versa. An empty disjunctive clause is denoted by the symbol ^ and an empty conjunctive clause is denoted by the ■ symbol. A clause is also represented by a set of literals. A clause C is fundamental if C does not contain a complementary pair of literals, otherwise C is non-fundamental. Thus, both ■ and ^ are fundamental because they do not contain any literals. A nonfundamental disjunctive clause is a tautology and a non-fundamental conjunctive clause is a contradiction. For clarity, we shall use the implication sequence A —> B such that the antecedent A is a conjunctive clause and the consequent B is a disjunctive clause. For instance, the implication sequence a A b c V d is equivalent to the disjunctive clause —ict V b V c V d. A Conjunctive Normal Form (CNF) formula is a conjunction of disjunctive clauses and a Disjunctive Normal Form (DNF) formula is the dual. Uppercase Greek and calligraphic letters for example, E, F and 7, are used to denote formulae. A formula is also represented by a set of clauses. When formulae and clauses are represented as sets, set operations such as union (U), intersection (n) and difference (—) are assumed. A set A subsumes another set B if A C B. In normal form representation, a clause A subsumes a clause B if both A and B are disjunctive/conjunctive clauses and A C B. Thus, the empty disjunctive clause, El, subsumes all disjunctive clauses, and the empty conjunctive clause, k subsumes all conjunctive clauses. Let E be a set of sets, the set SUB(E) is a maximal subset of E such that no member of xiv  SUB(E) is subsumed by another member of E. For example, if E = {{a, b, c}, {a, d}, {a, c}, {a, b, d}}, SUB(E) = {{ a , d}, {a, c}}.  xv  Acknowledgements First and foremost, I am very fortunate to have a supervisor who is a "walking encyclopedia" of artificial intelligence, Alan Mackworth. His persistent questioning of problems and solutions helped me learn the art of scientific research and I cannot express enough gratitude for his guidance and supervision. Part of this thesis is based on the collaborative work with my long time colleague George Tsiknis, over a span of three years. I am grateful to him for the collaboration which resulted in the publications (Kean and Tsiknis, 1993), (Kean and Tsiknis, 1990) and (Kean and Tsiknis, 1992b); chapters 2, 3 and 4 are based on the work described therein. Also, to a very special friend, Jane Mulligan, for her friendship, fun, and most of all her ever challenging intellectual discussions. Many of the ideas in this thesis were a direct result of intense discussion with her. Throughout the development of this thesis, I was also blessed to have guidance from many sources, including David Poole who always asked difficult questions; Paul Gilmore who inspired me to be formal, precise and hence do logic; and Peter Danielson who introduced to me the great potential of information economy. I am also grateful to Ashok Chandra, Michael Loui, Raymond Reiter, Johan de Kleer, Wolfgang Bibel, Teow-Hin Ngair and Hugo Chan for assistance in my research. There are too many friends to be mentioned here but not too little gratitude to express, especially to Greg Grudic, Ian Cavers, Peter Apostoli, Theresa Fong and Koon Ming Lau.  xvi  Chapter 1  Introduction One of the goals of Artificial Intelligence (AI) is to understand and build computational systems that perform a wide spectrum of intelligent reasoning. Deductive Reasoning (BlAsius and Biirckert, 1989),  Computational Learning (de Jong, 1989) and Diagnostic Reasoning (Reiter, 1987) are a few examples of such intelligent reasoning paradigms. They all require specialized knowledge and mechanisms in their reasoning domain, but share some common utilities in their computational specifications. We can express these common features as Reasoning System = Problem-Solver + Inference Engines (Reiter and de Kleer, 1987) as shown in figure 1.1. The Problem-Solver portion of the scheme consists of domain  Reasoning System Inference Engines  Problem Solver  Figure 1.1: Reasoning System = Problem-Solver + Inference Engines dependent knowledge, in the form of domain specific strategies or heuristics, that is necessary in the decision making process for that application domain. Conversely, the inference engines are mechanisms for performing inferences independent of domain knowledge. The types of inferences are characterized by three classes: Deduction, Inductive Generalization and  Abduction. Deductive inference is used in many reasoning systems such as, for instance, STRIPS-based planners (Cohen and Feigenbaum, 1982, pp 128-134). Inference of inductive generalization is used in machine learning research as one of its major strategies (de Jong, 1989). And, abductive inference is 1  1.1 ABDUCTION^  2  emerging as an important tool in diagnostic reasoning (Poole et al., 1986; Console and Torasso, 1990; Ayeb et al., 1990). In this thesis the inference engines are the focus, and more specifically, abductive inference is studied in depth in the framework of a domain independent, propositional abductive inference engine.  1.1 Abduction The term Abduction in logic applies to an inference involving the formation of plausible explanations for an observation given some facts. It was first introduced by Aristotle (384-322 B.C.) (Ross, 1952) and later followed by Charles Sanders Peirce (1839-1914) (Hartshorne and Weiss, 1931) in his theory of scientific discovery. The word was derived from the Greek word corcerwr) (pronounced as apa-go-ge) which is the opposite of deduction, en cryco-yi (pronounced as epa-go-ge). Using the notation in Pople's -  presentation (Pople, 1973), we can express the intuition behind abduction in the context of mathematical logic as follows: let Betty _has _a _cold —> Betty_sneezes ^ Major Premise, B etty _has _a_cold  ^ Minor Premise,  Betty_sneezes  Conclusion;  where the above sentences assume the standard logical meaning. The major premise states that if Betty  has a cold then Betty sneezes; the minor premise states that Betty has a cold; and the conclusion states that Betty sneezes. A deduction is an argument that the conclusion is necessarily true following the major and minor premises; in our example, Betty_sneezes is the necessary conclusion. In contrast to deduction, an abduction is an argument that explains the conclusion given the major premise, sometimes by offering the minor premise as an explanation. Thus, given the major premise above, a possible explanation for the conclusion Betty_sneezes is Betty_has_a_cold. An important distinction is that in abduction, the explanation (minor premise) is only plausible. In other words, we are inclined towards admitting the explanation given the major and minor premises. For instance, we cannot positively account for the truth of the statement "Betty _has _a _cold"; it may well be that someone is tickling Betty's nose. Moreover, the statement " B etty _sneezes" is not a consequence of our abductive reasoning but merely an observation. If we fail to explain why " Betty _sneezes" using abduction, we might begin to doubt the truth of our observation. What has been achieved in abductive  reasoning is a process for acquiring a plausible explanation that can explain the observation.  1.1 ABDUCTION^  3  In AI, abductive reasoning has assumed a crucial role in many important automated reasoning applications. One application domain that stands out in utilizing abduction is automated diagnostic reasoning (Reiter, 1987; Poole et al., 1986; Console and Torasso, 1990; Ayeb et al., 1990) and design synthesis (Finger and Genesereth, 1985; Genesereth, 1984). For instance, in circuit diagnosis, the circuit model of an inverter — its function is to toggle an input 0 or 1 to produce an output 1 or 0 respectively — is encoded as a set of sentences (figure 12). This specification will serve as our major premise stated  0  0 Figure 1.2: An Abnormal Inverter  as follows: if the input X is equal to 0 and the inverter I is not abnormal', then the output Y is equal to 1. Conversely, if the inverter is abnormal, then the output can be either 0 or 1 depending on the type of fault model. The type of fault determines the abnormality of the inverter. For instance, if the inverter is stuck_ on_1 then independent of the input, the output will always be 1. In this example, given an input value 0, the normality of the inverter is undetermined without considering the fault stuck_on_1 2 . The question is what constitutes an explanation for the observation that the input X is equal to 0 and the output Y is equal to 0? Using abduction, the minor premise that can explain the observation is that the inverter I is abnormal. One issue in abduction is the process of selecting the "right" explanation (Zaffron, 1971). There are plenty of hypotheses that can explain the observations of both X and Y having zero values. For instance, the clause "inverter I is abnormal and the sun is shining" may serve as an explanation for the observation X = 0 and Y = 0, even though it is not useful. As a consequence, in the realm of abductive reasoning, we need an admissibility criterion for explanations that can rationalize the observation reasonably. To begin with, one criterion is to insist that the explanation together with the major premise does indeed deductively imply the conclusion, as in the Betty sneezing example, and that it is also consistent with the major premise. To facilitate the discussion within the context of reasoning, we shall refer to the major premise as a set of facts denoted by E; the minor premise as an explanation denoted by E; and finally the conclusion as an observation denoted by G. 1 For historical reasons, the abnormality of the inverter is emphasized instead of the normality, because diagnosis is conventionally equated with fault diagnosis. 2 For  a detailed discussion on this issue regarding different fault models, see (de Kleer et al., 1990).  1.1 ABDUCTION^  4  Definition 1.1.1 (Abduction-based Explanation) Let E be a set of sentences denoting the set of facts and the sentence G be the observation. A sentence E is an explanation for G with respect to E if  1. E E G, and 2. E U E is consistent. For example, the fact: "if Ian is not sick he is in the office in the morning", is encoded in E as Ian_in_the_office}. If the observation is Ian_in_the_office, then it is consistent that the explanation E = {—lan_is_sick} explains the observation. On the other hand, consider E augmented with the fact that "Ian is sick"; that is E = Ian_in_the_office, Ian_is_sick}. The sentence ---Jan_is_sick is no longer an explanation for the same observation because it is inconsistent with E. The above definition of explanation has a long history; a few early advocates include Karl Popper (1959) and Carl Gustav Hempel (1966). Similar definitions can also be found in Meltzer's (1970) work on induction and Plotkin's (1970a) inductive generalization. More recent work on abduction using the above definition, can be found in Finger and Genesereth's (1985) RESIDUE system, Poole (1986) et al.'s THEORIST, Cox and Pietrzykowski's (1986; 1987) diagnosis theory and Reiter and de Kleer's (1987) formalization of the Assumption-based Truth Maintenance System (ATMS).  1.1.1 Deduction/Abduction In the framework of Reasoning System = Problem-Solver + Inference Engines, each inference method is a module and is used by the Problem-Solver or by other inference engines. For instance, in AI one important use of abduction is as a supplementary reasoning tool to other inferential techniques such as deduction and inductive generalization. Deductive inference serves to determine what can be concluded, and abductive inference on the deductive proof explains why certain deductive steps was carried out. Similarly, inductive generalization induces hypotheses and abductive inference on the induction process explains why they were induced. To visualize the proposed architecture, consider a possible configuration that might result from the separation of inference and a Problem-Solver. The possible configurations of the three types of inference in the inference engine are numerous. For instance, we can describe a possible coupling of these inferences in our reasoning system as Reasoning System = Problem-Solver + [ Deduction, Abduction, Inductive Generalization as shown in figure 1.3. This configuration has its inference engines lined up in parallel serving the Problem-Solver, and is useful in applications like diagnostic reasoning since all three modes of inference are needed.  1.1 ABDUCTTON^  5 Reasoning System Inference Engines Deduction  ...■•-.1.11.  Problem Solver  Abduction  Inductive Generalization  Figure 1.3: A possible reasoning system configuration To facilitate the study of the abductive inference engine in this thesis, we present the architecture composed of the deduction and abduction engines. This composition is represented in our reasoning system as Reasoning System = Problem-Solver + [ Deduction, Abduction ], as shown in figure 1.4.  Reasoning System Inference Engines -,  r  Problem Solver  Deduction  Abduction  Figure 1.4: Reasoning System = Problem-Solver + [ Deduction, Abduction ]  In this configuration, there are two subsystems in the inference engine, namely a deductive engine like a theorem prover and an abductive engine called the Clause Management System (CMS) 3 (Reiter and de Kleer, 1987; Kean and Tsiknis, 1993). A CMS is a propositional abductive inference engine. The purpose of the CMS is to revise and maintain the propositional encoding of the deduction performed by the deductive engine, in a separate knowledge base, during the problem solving session. In return, the deductive engine can ask for an explanation of its deduction. For instance, the deductive engine can query the CMS for explanations of why a conclusion was derived, that is, which premises were used to derive this conclusion; this explanation is used to avoid repeated deduction involving the same 3 Historically  called a truth maintenance system, in recent years the name reason maintenance system (McDermott, 1989) is used.  1.1 ABDUCTION^  6  premises. Also, the deductive engine can query the CMS for conflicting deduction steps in intelligent backtracking4 . Suppose that the deductive engine is a Prolog' inference engine and the abductive engine is a CMS. Consider figure 1.5 which represents the search path of a Prolog goal ":— p(X), q(Y), r(X)". The aim is Intelligent Backtrackin  Intelligent Forwarding  q(Y)  r(X) X=a  r(a)  Figure 1.5: Intelligent Backtracking Search Space to instantiate X and Y beginning by matching p(X) with either alternative p(d) or p (a). Subsequently, q(Y) is matched with an alternative such that Y is instantiated with some term. We shall assume that the instantiation of variable Y is laborious and is depicted by the shaded area in the figure. Finally, r(X) is matched with either r(c) or r(a) such that the variable X is instantiated with a term that agrees with the instantiation of the same variable in p(X). The search strategy is executed from left to right: first, instantiating the variable X to d by matching p(X) with p(d); second, searching through the huge search space under q(Y); and finally, failing at both alternatives r(c) and r(a) because X is instantiated to d. From the naive search strategy point of view, it will backtrack to the search space of q(Y) looking for alternatives even though analytically q(Y) does not contribute to the conflict'. An intelligent backtracking strategy will backtrack to p(X), the exact backtracking point, searching for the alternative p(a) and instantiating X to a; and intelligently forward to r(X), the exact forwarding point, to succeed in matching r(a), avoiding the huge search space of q(Y). This simple example is sufficient to illustrate the importance of intelligent backtracking and forwarding, especially in the case where the search space in q(Y) requires enormous computation in comparison to 4 For  discussion on the topic of intelligent backtracking, see (Bruynooghe and Pereira, 1984; Cox, 1984).  sProlog is a logic programming language that uses positive Horn clause resolution with a left-to-right depth first search strategy (Clocksin and Mellish, 1981). 6 This  is known as thrashing in the literature of constraint satisfaction problems (Mackworth, 1977).  1.1 ABDUCTION^  7  the other two search spaces. With the aid of the CMS, the Prolog engine can encode its activities, in this example the fact that X = d is the result of matching p(X) with p(d), and send them to the CMS for bookkeeping. In the event of discovering the conflict X = c and X = a from the search space for r(X), it can query the CMS for the origin of X = d for the purpose of backtracking (cf. (de Kleer, 1984)). Coupling the deductive engine of Prolog with the abductive engine of the CMS, the information processing provides not only the deduction of what is concluded, but also the abduction of why the deduction succeeds or fails. This is an enhancement to the Prolog inference engine in which the response to a goal is simply a yes/no answer plus variable bindings.  1.1.2 Knowledge Management Systems To provide further details on the proposed reasoning architecture, we present a Knowledge Management System (KMS) consisting of a deductive inference engine and an abductive inference engine (CMS) (figure 1.6). The function of the KMS as a whole is to provide utilities like deductive inference, revision, abductive query, assumption-based reasoning et cetera, independent of the domain knowledge. The property of the KMS being independent from domain specific knowledge is crucial to the whole architecture, which is expected to serve a variety of applications through the Problem-Solver front end. Recall that the Problem-Solver portion of the scheme consists of domain dependent knowledge that is necessary in the decision making process. For instance, a possible Problem-Solver is a constraint solver for the map interpretation problem (cf. (Reiter and Mackworth, 1990)). It contains knowledge and constraints about maps and has specific methods of operating on these representations and constraints. Additionally, it requires some deductive and abductive inferences while executing these specific methods. Many application domains have specific knowledge representations and control strategies but require general inference strategies like deduction and abduction. Within the KMS, there are some important representational criteria for the CMS. The CMS must be correct, expressive and computationally feasible with respect to the specifications of its functionality. To achieve this, first we shall restrict the CMS to operate on a propositional knowledge base. Second, we shall describe the functionality of the CMS in a formal setting so that methods of computation for the CMS functions can be verified and analyzed. In the actual implementation of the CMS, specialized computing techniques, programming languages and hardware can be exploited to increase the CMS efficiency. One other important issue in this paradigm is the issue of a protocol between the deductive inference engine and the CMS. The CMS protocol, we shall call it the Abduction Communication Protocol (ACP), is a set of utilities defining the domain independent functions of the CMS. For instance, as shown in figure  8  1.1 ABDUCTION^  Problem Solver  KMS  Constraint Solver Learning System  Deductive Engine  Temporal Reasoning Diagnostic Reasoning Distributed Reasoning THEORIST  a  (3 CMS Abductive Engine  Figure 1.6: A Problem-Solver-KMS Reasoning System Architecture  1.6, the commands for revisions are Add and Delete. The response for command Add is either succeed or fail depending on the consistency of the resulting addition. The Ask command, following the paradigm of Levesque (1984), has two parameters: the first is a query and the second is the type of response desired for the query, such as explanation or direct consequence, shown in figure 1.6 as a dotted arrow. Once these specifications and their computations are defined, the ACP commands form the set of utilities the deductive inference engine can use to update or query the CMS. Moreover, the ACP is domain independent and any reasoning system can utilize the CMS through the ACP without modification of the CMS. For instance, the same ACP can also be used by the Problem-Solver when abductive reasoning is needed. Many truth maintenance systems like Steele and Sussman's Constraints (1978) and de Kleer's ATMS (1986c) did attempt to provide a protocol for using the system but most of them fell short in the sense that the protocol is heavily tied to the implementation and the application domain. This thesis will attempt to provide a completely domain independent ACP which provides enriched functionality for truth maintenance, thereby laying the foundation for the standardization of ACP. Embedded in the deductive inference engine, there is a specification for the encoding of the deductions. The purpose of this specification is to enable the deductive inference engine to identify what to transmit to the CMS, and in return how to utilize the response from the CMS meaningfully. Such  1.2 CLAUSE MANA GEMENT^  9  encoding is dependent on the specific deductive inference engine, and it is possible that a general specification can be fixed for a wide class of deductive inference engines. For instance, to transmit to the CMS the encoding of facts about an inverter (Figure 1.2), the specification might suggest the following form: E = { X = 0 A Y = 1, X 1 A -ictb(I)—> Y =0,  X = 0 A ab(I) Y = 0, X = 1 A ab(I) --+ Y =1, X =OV X =1, -,(X =OAX =1), Y =OV Y= 1, -,(Y= 0 A Y= 1)). Additionally, the deductive inference engine has its own protocol, the Deduction Communication  Protocol (DCP), which defines a set of deductive inference functions; it is not presented in this thesis. Finally, the ACP plus the DCP define a set of utilities called the Inference Utility Specifications (IUS). This set of utilities is a collection of domain independent functions for performing deductive and abductive inferences. The KMS and the IUS packaged together formed a domain independent inference system that is portable and applicable to many domains. The notion of portability of an inference system is an elusive dream in AI. If it were ever achieved  it would provide significant benefits, and anything which will make it more achievable should be encouraged (Ramsay, 1988, p 215). This thesis is a continuing effort to further the work of Doyle (Doyle, 1979), de Kleer (de Kleer, 1986a) and Reiter and de Kleer (Reiter and de Kleer, 1987) in advancing this goal by studying the CMS abductive inference engine, and its use, in depth.  1.2 Clause Management On the competence level, the functionality of clause management in a CMS is two fold. First, it serves as an abductive inference engine for finding explanations for queries with respect to its knowledge base E at some instant in time. We shall call this functionality abductive inference in clause management. The second functionality we shall call revision in clause management. Revision is classified as two operational concepts namely addition, which means adding new knowledge to E, and deletion, which means deleting existing knowledge from E. Hidden within revision is the ability to manage potentially conflicting assumptions used during the course of abductive inference. An assumption is a statement asserted that may be retracted later, that is, an assumption is a defeasible statement. Hereafter, we shall refer to the tasks of clause management as abductive inference and revision. To claim that a CMS performs the above tasks, some adequacy issues regarding performance must be addressed. Normally, the approach is to extract explanations on-the-fly every time we need to explain  1.2 CLAUSE MANAGEMENT^  10  a query. We shall call this the interpreted approach, and one system that uses it is the implementation of THEORIST presented in (Poole et al., 1986). During the course of problem solving, there are many explanations extracted for one query which remain useful for the next query. The question is whether some or all of the computations performed, while finding the relationship of the explanation-query pair (the dependency), can be salvaged by "remembering" the computed dependencies. These computed dependencies are then reused whenever possible, making query processing more efficient. The concept of dependency is described in more detail in section 1.2.1. This idea, called the compiled approach (Reiter and de Kleer, 1987), is dependent on the assumption that there is an abundance of inexpensive storage. In fact, if storage is expensive, the interpreted approach is preferable to the compiled approach in terms of reusing the space that is permanently occupied by the compiled approach. This raises the issue of the tradeoff between the interpreted approach and the compiled approach in terms of storage and query processing time. The tradeoff is not competitive. On the contrary, the compiled approach is viewed as the interpreted approach with the extension that we keep all the performed computations in memory. Thus, the tradeoff should be viewed as exploring a continuum of methods of computation. In this thesis, we examine the compiled approach for abductive inference, which has not previously been studied in depth, in the framework of a clause management system. For our discussion, we assume cheap storage is available to the system. The issue of whether to compile some or all of the knowledge base also requires careful examination, and partial compilation will be studied in chapter 6 under the title of approximation. The second adequacy criterion is the issue of revision. Since we are assuming compilation, every addition of knowledge or assumptions to the existing knowledge base requires re-compilation, hopefully only for those relevant and affected conclusions. This is called the update problem in clause management by Reiter and de Kleer (1987), and one solution to this is to devise an incremental addition algorithm (Kean and Tsiknis, 1990) such as that described in chapter 3. Deleting an assumption, on the other hand, requires the removal of all compiled dependencies which depend on this assumption. A naive approach is to remove all the compiled dependencies, and perform the complete re-compilation without the deleted assumption. This is not desirable because many of the compiled dependencies remain valid independent of the deleted assumption; thus, an incremental  7 The use of the terminology compiled and interpreted originated from (Reiter and de Kleer, 1987). The reader should distinguish the use of these terms from that in the study of programming languages. The terminology is intended to reflect the query response methods of preprocessing (compiled) versus computing on-the-fly (interpreted).  1.2 CLAUSE MANAGEMENT^  11  deletion scheme is needed (Kean, 1992). No existing truth maintenance system considers incremental deletion as part of its functionality; this topic is studied in chapter 5.  1.2.1 Dependency The strategy of clause management in performing abductive inference is to manage the relationship between the elements of an explanation-query pair, or simply the dependencies between premises and conclusions. A dependency between a premise and its conclusion is, according to the definition of explanation (definition 1.1.1), the relationship between the explanation E used to derive the observation G given E. The problem of finding such dependencies is called the tracking problem in clause management. In the compiled approach, this set of dependencies is tracked, computed and kept for the purpose of finding explanations. For example, let E be a set of facts describing some medical symptoms and causes 8 : Tobacco smoking causes constricted coronary arteries. Constricted coronary arteries reduce blood flow in the heart. Insufficient blood flow in the heart causes coronary thrombosis (heart attack).  The above statement is propositionally encoded as: smoking -+ constricted_arteries, constricted_arteries^reduced_blood_flow_in_heart ^and reduced_blood_flow_in_heart^heart_attack.  When we compile the above statements in the CMS, one of the dependencies that is, the dependency between smoking and heart attack, is explicitly "remembered". If the query is about causes of heart attack, the explanation smoking can be retrieved very quickly by looking up this compiled statement. In fact, most abductive inference systems that have used the notion of dependency between the observation and its explanation have used definition 1.1.1 directly, or indirectly through procedural interpretation, in both interpreted and compiled approaches. The RESIDUE system (Finger and Genesereth, 1985) used the definition of explanation (definition 1.1.1) directly and called E the residue. In Poole et al.'s system of theory formation (THEORIST) (1986), they used the same definition and labelled the tuple (E, E) an explanation for G. Another such example can be found in Cox and Pietrzykowski's (1986) definition of causes. In the two most influential implementations of truth maintenance systems, Doyle (1979) used the above definition for justification implicitly in his data structures; while in de 8  For the issue of defining cause and effect, see (Copi, 1982, chapter 12).  ^  1.2 CLAUSE MANAGEMENT^  12  Kleer's ATMS (1986a) the notion of a label in a node was also defined using definition 1.1.1 as described in (Reiter and de Kleer, 1987; Kean, 1990). 1.2.2 Implicates Another issue in the compiled approach is how to compile the knowledge base of the CMS such that dependencies can be accessed and processed efficiently. Reiter and de Kleer (Reiter and de Kleer, 1987) proposed the strategy of compiling the knowledge base into a set of equivalent and minimal sentences called minimal implicates, the explanation for a particular query is then easily computed via set operations. The notion of implicants (the dual of implicates) has been studied extensively in the switching theory literature (Bartee et al., 1962). Let E be a set of sentences and P a sentence; the sentence P is an implicate of E if E k P. If we confine our discussion to conjunctive normal form (CNF), then the implicate P of E is minimal if no proper subset of P is an implicate of E. Additionally, an implicate P of E is prime if there is no other implicate P' of E such that P' -f P. For instance, using the inverter example, the set of facts represented in CNF is  Example 1.2.1 E^0 V ab(I) V Y =1,^= 1 V ab(I) V Y = 0, = 0 V --iab(I) V Y = 0,^= 1V -- ab(I) V Y =1, ,  X :=OV X =1, — X=0V— X=1, ,  ,  Y=OV Y=1, -- Y=OV— Y=1}. ,  ,  And the set of all minimal implicates are  ^MI (E) = { --iab(I) V^= 0 V Y =0,^—,ab(I) V —0( = 0 V^= 1, - ab(I)V X =1V Y = 0,^—,ab(I)V X=1V— Y=1, ,  —,ab(I)V —0(^--rab(I) VX=1V Y = 1,  ^X=0V— Y=0,^—,ab(I)V X =OV Y= 1, ^ab(I) V --X = 0 V Y =1,^ab(I)V^= 0 V^= 0, ^ab(I)V X =OV Y= 0,^ab(I)V X=0V-- Y=1, ^ab(I)V^=1V^= 1,^ab(I) V^=1V Y = 0, ^ab(I)V X=1V-- Y=0,^ab(I)V X = 1V Y =1, ,  ,  ,  = 0 V^=1,^X =OV X= 1,  Y=OV Y=1,  13  1.2 CLAUSE MANAGEMENT^ X = 0 V — X = 0,^Y= 0 V-- Y= 0, ,  ,  X = 1 V —0( = 1, Y=1 V-iY— 1,  1.  Intuitively, computing the set of all minimal implicates is computing the set of all logical consequences, in this case minimal with respect to other logical consequences in E. Note that every smallest (in terms of literals) tautology, for instance —,X = 0 V X = 0, is also a minimal implicate of E. If E is defined over a finite set of vocabulary, that is there are only finitely many variables that E can use in defining sentences, then the set of minimal implicates of E is finite. If the set of all minimal implicates of E is available, the search for an explanation of a given query can be achieved via fast set operations. .  The characterization of logical consequences as implicates and minimal implicates is extremely useful in the study of the computation of abduction. For instance, the dependency of an explanation and its observation is a logical consequence of a set of facts E, and thus an implicate with respect to E. In the interpreted approach, the implicate is computed on-the-fly, whereas in the compiled approach, the set of all minimal implicates is preprocessed. Besides being used in explanation finding, the notion of implicates is also used in characterizing diagnosis (de Kleer et al., 1990). In chapter 2, a detailed discussion on the properties and computation of implicates is presented.  1.2.3 Assumptions An assumption is a statement that is defeasible. By designating certain statements as assumptions, we can use abductive inference to find assumption-based explanation. This is useful in a problem domain like diagnostic reasoning, in which we can postulate the normality of a set of components as assumptions, and find assumption-based explanation to explain the observation. For instance, we have a circuit containing an and-gate and an or-gate. We are interested in diagnosing the state of the and-gate but not the or-gate. By assigning a state of normality to the and-gate as an assumption, we can focus our diagnosis on that gate. Using abduction, we can focus on finding explanations that are assumption based. To give an account of the notion of assumption-based explanations, let E be a set of sentences denoting the set of facts, A be a set of assumptions and the sentence G be the observation. We call the sentence E an assumption-based explanation for G with respect to E if (1)E C A, (2)E = E -- G and (3)E U E is consistent. This notion of assumption-based explanation is an extension of the definition of explanation (definition 1.1.1), with an additional constraint restricting the explanation to be a subset of the set of designated assumptions A. In chapter 4, a precise definition with respect to an assumption based theory will be presented.  1.3 THE REVISION PROBLEMS^  14  In the example 1.2.1 of diagnosing the inverter circuit (figure 1.2), let the set of assumptions be  A = {ab(I), -,ab(I)} and let the observation G be X = 0 ---) Y = 1. An assumption-based explanation for G with respect to E is -, a b (I). Intuitively, the inverter I being not abnormal, or normal, explains the behavior X = 0 -f Y = 1. Note that -, Y = 0, or simply Y = 1 by the equality axioms, is an explanation for G with respect to E but is not assumption-based. By placing different constraints on condition (1), such as E C AU zny (A), one can define a variety of explanations and consequences for use in problem solving. This is one of the motivations for designing an assumption-based clause management system (ACMS). Another motivation of assumption-based clause management is to manage the revision of assumptions and perform reasoning despite these changing assumptions. For instance, we have an assumption  stu ck _ 0 n _O (I ), denoting inverter I is stuck on 0, and later remove it because we discover that the inverter  I is no longer stuck on 0. Thus, one issue in the ACMS is to design ways of tracking assumptions in the compiled approach for the purposes of assumption-based reasoning and revision (Kean and Tsikrtis, 1992b; Kean, 1992). In chapter 4, an assumption-based clause management system that provides a variety of assumption-based abductive and deductive reasoning is presented.  1.3 The Revision Problems The second task of clause management is the task of assumption revision. The process of revision is to manage potentially conflicting assumptions used during the course of abductive inference. In the event of contradiction, some assumptions will be revised in order to restore consistency. For instance, an inverter cannot be normal and abnormal at the same time. Revision is a concept which came about to capture the dynamic and non-monotonic nature of reasoning, that is to handle changes in knowledge over time (Gdrdenfors, 1988). Within revision, the process of addition adds new facts or assumptions into the existing knowledge base; and the process of deletion removes assumptions from the existing knowledge base. Note that statements that are designated as facts can be added but not deleted. There is a distinction between add and assert, or delete and retract. Let E be the knowledge base. An assumption A asserted into E means E  k A. Obviously adding A into E will satisfy the condition.  Nevertheless, we can add different statements like C and C -- A to E to assert A. Thus, addition means a statement is physically added to the knowledge base and assertion means arranging to draw a particular consequence from the knowledge base. Conversely, deletion means deleting a statement from the knowledge base and retracting a statement means causing it not to be a consequence of the knowledge base. An intelligent reasoning system without methods to revise its knowledge base is static  1.3 THE REVISION PROBLEMS^  15  and non-scalable. Any attempt to study intelligent reasoning must address the issues of knowledge revision. For example, let the knowledge base contain information about the relationship between a city map and its corresponding geography. The set of facts, E = {main_street Broadway_avenue, river -* Fraser_riverl, contains information about the geography of the city; and the current set of assumptions, A { straight _line main _street , - straight _line -p river, --liver}, contains the relationship between the ,  lines in the city map and its corresponding geography. One assumption -based explanation for the query Broadway_avenue with respect to E is -- river A (straight_line —> main_street) A (- straight_line river). ,  Deductively, the assumptions --,river and -stra ight _line —> river yields the consequence straight _lin e; together with the other assumption straight_line main _street yields the consequence main _street; and with the fact main_street —> Broadway_avenue, we conclude the query Broadway_avenue. Thus, if we retract one of the assumptions, let us say - straight_line river, then the above chain of reasoning no longer holds. The same problem arises when a new assumption is added, in this case new conclusions can be drawn that were not possible before.  1.3.1 Addition In clause management, adding a new fact or assumption to the existing knowledge in the compiled approach suggests an incremental addition method (Kean and Tsiknis, 1990). This is because when adding a new fact or assumption, we prefer not to recompile the entire knowledge base. If the chosen representation of the knowledge base is the set of minimal implicates, the incremental addition problem is formalized as follows: if MI (E) is the set of all minimal implicates of E, the knowledge base, and C is a new sentence, compute MI (MI(E)u Cl) by exploiting the fact that M/ (E) is already compiled. Note that M/(M/(E)U{ C}) can be computed using conventional methods, such as the Quine-McCluskey algorithm (Bartee et al., 1962), by treating M/(E)U{ Cl as its input. Such conventional methods are not advantageous because they do not exploit the property M/ (M/ (E)) = MI (E). In chapter 3, an incremental algorithm for this problem is presented and the complexity of the problem is studied.  1.3.2 Deletion In our definition of deletion, only assumptions are removable; however the distinction between facts and assumptions is unclear. One could argue that since all knowledge changes over time, there are no facts but only assumptions; consequently every piece of knowledge is removable. Conversely, a  1.4 APPROXIMATION^  16  reasonable definition for facts is the knowledge that remains unchanged during the course of problem solving. In the task of clause management, we shall adopt the latter position for simplicity in the presentation. When an assumption "a" is chosen for deletion, all consequences that depend on this assumption, in this case all the minimal implicates which have a occurring in them, must be removed. How would we identify all these consequences? In fact, the study of the dependency between assumptions and observations in terms of minimal implicates will help in solving this problem. Recall that in the  addition problem, the task is to incrementally compile the knowledge base with new sentences. In the deletion problem, the task is to find and delete all the consequences that involve the assumption a in an incremental fashion, such that the state of the compiled knowledge base MI(E) after deletion is equivalent to MI(E — {a}) (Kean, 1992). In chapter 5, an incremental deletion scheme is studied and a protocol for adding facts and assumptions and deleting assumptions is presented.  1.4 Approximation So far, the CMS operates on a single domain E by compiling it into the corresponding set of minimal implicates M/ (E). The original motivation for compiling the domain was to achieve a speedup in querying under the assumptions of frequent query, infrequent update and abundant storage. Not surprisingly, this is achieved at the expense of high cost in the compilation. The question is whether there is an approximation strategy that is more efficient? Finding explanations in abduction involves finding some related implicates in the knowledge base, whether by the interpreted or compiled approach. If more implicates are available, through computational effort, the "more precise", in terms of minimality and consistency, the explanation becomes. If all the minimal implicates are computed, then all the minimal explanations are found. As noted before, the difference between the interpreted and the compiled approach is that the compiled approach precomputes and keeps all the minimal implicates. What if, in the interpreted approach, we accumulate and save those minimal implicates computed for each query and "reuse" them whenever applicable? In this case, we are trading off storage in the hope of faster querying. Conversely, what if in the compiled approach, we compute only the minimal implicates related to each query? In this case we are using less storage by not precomputing all the minimal implicates. In fact, the interpreted and compiled approaches are two extreme strategies, and the intermediate approaches are measured according to the amount they compile.  1.5 APPLICATIONS^  17  Since abduction requires that consistency and minimality of an explanation be satisfied, the complexity of abduction is NP-hard. Additionally, in the CMS framework, computing the set of all minimal implicates is also potentially exponential (Chandra and Markowsky, 1978; Kean and Tsiknis, 1990). Given the complexity of the abduction problem (Bylander et al., 1991), the study approximating abduction is achieved by approximating implicates and hence, the approximation of explanations. Subsequently, the problem is to explore the relationship between approximating the set of minimal implicates and the corresponding quality of explanations. On the competence level, a set of strategies for symbolic approximation is proposed in chapter 6, and applied to the study of approximating implicates and explanations. The study is based on the approximation of the set of implicates and consequently, the approximation of explanations. A general definition for approximated minimal implicates, called selective implicates, is presented. Three specific instances of selective implicates: query-based, ATMS and length-based are studied. Both the query-based and ATMS implicates are knowledge-guided approximation. The length-based implicate is resource-bounded approximation. The goal of studying these implicates is to propose a framework for incorporating knowledge-guided and resource-bounded approximation into computational abduction. The potential benefit of these studies is the discovery of a useful and tractable approximation strategy. On the performance level, methods of computing and approximating query-based implicates are presented. Using the set of query-based minimal implicates, explanations are generated and the properties of these explanations are studied.  1.5 Applications One method of evaluating the domain independent abduction engine CMS and its extension, the ACMS, is to demonstrate their applicability in various reasoning paradigms. In this thesis, the domain of diagnostic reasoning in circuitry is used to demonstrate the capability of the ACMS, in providing the computation for both consistency-based and abduction-based circuit diagnostic reasoning. Additionally, using the ACMS, we can demonstrate the variety of assumption-based explanations and consequences in more sophisticated diagnostic reasoning. The issue of how a Problem-Solver, or a deductive engine, encodes its knowledge for transmission to the ACMS is not addressed here. Instead, the propositional encoding of the circuitry is supplied explicitly as input to the ACMS. The demonstration here is not meant to be exhaustive, but to begin the  1.5 APPLICATIONS^  18  process of verifying the strength or discovering the weakness of the ACMS, in order to achieve the goal of a portable abductive inference system.  1.5.1 Diagnostic Reasoning According to the dictionary, "diagnosis, is defined as an act of investigation or analysis of the cause or nature  of a condition, situation, or problem" (Mish, 1986). A diagnostic reasoning system as studied in AI, is a computational system that performs diagnosis. Conventional diagnostic systems employ some form of rule-based production system (Buchanan and Shortliffe, 1984). The knowledge encoded in such systems is usually in the form of a relation between possible causes and possible effects. We use a simple boolean-valued circuitry to demonstrate diagnostic reasoning using the ACMS. Conceptually, we model diagnostic reasoning as follows (Reiter, 1987): given a set of facts SD (the system description) describing the circuit, and an observation OBS; a diagnosis for the observation  OBS is a description of the normality or abnormality of the components in the circuitry. The normality or abnormality of a component, a b ( C) or ab(C), is the cause for the effect which is the observed set of inputs and outputs for the circuitry. Within the logical framework, there are two methodologies for characterizing circuit diagnosis namely consistency-based and abduction-based diagnostic reasoning. In the consistency-based diagnostic reasoning paradigm (Reiter, 1987; de Kleer et al., 1990), the system to be diagnosed is described by a set of sentences. The objective of the diagnosis is to extract every  minimal subset of causes that is consistent with the system description SD and the observation OBS. More formally, a diagnosis for (SD, OBS) is a minimal set { cause I cause E A} U{—, cause I cause E A— o} of causes A C A such that SD U{cause I cause E A}  U{-, cause I cause E A — A} U OBS is consistent.  Consistency-based diagnosis is performed via the computation of minimal implicates and conflict sets (Tsiknis and Kean, 1988; de Kleer et al., 1990). In abduction-based diagnostic reasoning (Poole, 1988b), the problem is posed as an abduction problem. The idea is to find an assumption-based explanation, which is a set of causes, that can explain the observation G with respect to E. More formally, the system SD is described by a set of sentences and a set A of causes. Given an observation OBS, a diagnosis for (SD, OBS) is a minimal conjunction of  causes E C A such that SD = E OBS and SD U E is consistent. The notion of abduction-based diagnostic reasoning studied here covers more than the conventional notion of fault diagnosis. It includes the idea of inquiry into the system behaviour in both normal and faulty states. The response to a query can be an explanation, a conditional explanation, a set of extensions, a direct consequence or many other options. The variety of modes of question answering provided by the ACMS in this domain is the focus as reported in chapter 7.  Chapter 2  Clause Management Systems In this chapter, a domain independent abduction inference engine called the Clause Management System (CMS) is presented. The CMS is designed for aiding other components of a reasoning system in generating explanations. The other component might be a deductive engine within the KMS or a Problem-Solver. The deductive engine transmits propositional formulae representing its knowledge to the CMS, and in return the deductive engine can query the CMS for explanations with respect to the CMS knowledge base. To simplify the presentation, we shall present the CMS independent of other components in our proposed reasoning system and the CMS knowledge base is assumed to be in conjunctive normal form'.  2.1 Introduction As advocated in the introduction, one strategy to facilitate the deductive engine within the KMS or a Problem-Solver in performing its task is to have a supplementary system, the CMS, to maintain some of its knowledge base. The deductive engine transmits the whole or part of its knowledge base to the CMS for maintenance. In return, the deductive engine can query the CMS for explanations and use the reply at its own discretion depending on the application domain. As a requirement, the CMS should be domain independent so that its functionality can be utilized by a deductive engine or a wide range of domain dependent Problem-Solvers. The CMS was first proposed by Reiter and de Kleer (1987) to characterize the logic of compilation in truth maintenance systems, especially the Assumption-Based Truth Maintenance System (ATMS) of de Kleer (1986a). In their original paper, they provided a characterization of the ATMS but certain details This chapter is based on (Kean and Tsiknis, 1993).  19  20  2.1 INTRODUCTION^  about the actual representation of the sets of implicates and the computation of supports for general formulae were not addressed. The goal of this chapter is to fill these gaps and provide a complete presentation of the CMS. In figure 2.1, the configuration of a deductive engine and a CMS, abstracted from our proposed reasoning system, is shown.  KMS Deductive Engine  CMS Abductive Engine  Figure 2.1: The Configuration of Deductive and Abductive Engines  The above architecture consists of a deductive engine and a domain independent CMS. The deductive engine transmits a clause, representing either existing or newly acquired knowledge, to the CMS. The CMS incrementally updates its knowledge base with this clause. The process of update may require substantial computation, but it can function in parallel with the deductive engine. In the course of making a decision, the deductive engine can request the CMS for a support clause, the negation of an explanation of a given query. The query consists of a clause G, to which the CMS must respond with every smallest clause S such that S V G but not S alone is a logical consequence of the knowledge base of the CMS. Such a clause is called the minimal support clause for G. In other words, the CMS informs the deductive engine that the negation of every such S is an explanation which, if known to the deductive engine, would sanction the conclusion G. The deductive engine can use this information to make a decision, for instance, in chosing alternatives during the deduction process. Thus, while the deductive engine's actions depend on the problem domain, the CMS is highly domain independent.  2.1 INTRODUCTION^  21  There are many applications that use the CMS beside using it together with a deductive engine. For example, Reiter and de Kleer (1987) described how searching among alternatives in the search space can be facilitated by the CMS. In addition, de Kleer and Williams (1987) demonstrated the use of an ATMS (a special kind of CMS) in diagnostic reasoning. First, we shall illustrate a possible deductive engine-CMS cooperation scheme by an example. Consider a deductive engine with knowledge base E and assume that in its attempt to prove alarm_on, has discovered that E ,--- { smoke A heat A burglary —÷ alarm_on, msmoke A heat —+ alarm_on, - heat A burglary --f alarm_on and ,  smoke A - heat A -iburglary -+ alarm_on}. ,  Thus, the deductive engine transmits to the CMS the disjunctive clauses -iburglary V - heat V -'smoke V alarm_on, ,  - heat V smoke V alarm_on, ,  -iburglary V heat V alarm_on, msmoke V heat V burglary V alarm_on.  Suppose now that the deductive engine is interested in finding the minimal support for alarm_on. By querying the CMS with alarm_on it obtains the minimal support for it namely —, burglary, — smoke V heat, ,  —iheat V smoke and -, alarm_on. This in turn implies that a minimal explanation for alarm_on is either burglary, smoke A — heat, heat A -ismoke and alarm_on, since each of them imply alarm_on is a logical  consequence of E. Reiter and de Kleer (1987) have shown that the set of minimal supports, MS(G, E), for a query G can be computed from the set of minimal implicates MI (E) of the CMS knowledge base. Since the set M/ (E) and E are logically equivalent, the CMS may choose to represent the set E as it is, the interpreted  approach, or with extra effort and memory, preprocess the set E into MI (E). The set MI (E) can be computed from the set of prime implicates PI (E) and we shall call the preprocessing approach the  compiled approach. We shall briefly compare these two approaches. Under the interpreted approach the CMS stores the set of disjunctive clauses, transmitted by the deductive engine, in its knowledge base without any alteration. Updating the CMS's database E with a new clause C is simply E = E U { C}. Nevertheless, query processing is laborious because the set of minimal supports must be computed for every different query G.  2.1 INTRODUCTION^  22  If the set M/ (E) is available, the set MS (G, E) can be computed very efficiently by using special indexing and ordering schemes on MI (E). Naturally, the compiled approach aims at minimizing the expensive computation of the set MI (E) by precompilation and recompiling incrementally during update, as advocated by Reiter and de Kleer (1987, p 187). Under the compiled approach, the CMS stores the set of minimal implicates, MI(E), of E the knowledge it has received so far. When a new disjunctive clause C is transmitted to the CMS, the CMS computes and stores MI (MI(E) U { C)) using an incremental method discussed in chapter 3 of this thesis. With the set of minimal implicates available, the query processing for minimal support can be achieved efficiently. In the actual design of a CMS, one must be cautious with the tradeoff between the interpreted and compiled approaches. If the CMS task is to perform vast numbers of updates, then the interpreted approach is superior simply because updates take constant time. Conversely, if the CMS task is heavily dependent on query processing, that is computing minimal supports, then the compiled approach is more suitable. It is important to note that the size of the compiled knowledge base can be exponential, that is the number of prime implicates (a subset of minimal implicates) of a set of clauses is potentially exponential (Chandra and Markowsky, 1978; Kean and Tsiknis, 1990). Consequently, the compiled approach potentially needs exponential space to store the prime implicates. The other factor that discriminates between these two approaches lies in the time complexity of query processing and update. In most reasoning environments, the completion time for the update can be compromised without affecting the deductive engine's activities. Conceivably, the deductive engine issues an update and resumes its own activity without awaiting the completion of the update. On the other hand, the query response time is crucial to the deductive engine. When a query is issued by the deductive engine, it must receive the response before it can continue its activity. In this scenario, one would prefer a fast response time to the query and be willing to compromise the completion time for update. Thus the compiled approach is preferable simply because it provides faster query processing. In addition, augmenting the compiled approach with the incremental prime implicate generator reduces the compromise for update to a minimum. On the other hand, if the storage resource is very expensive, then the compiled approach loses its attractiveness. From the above discussion, the alert reader will immediately ask whether there is any method in between the two extreme approaches. This issue will be addressed in chapter 6 under the topic of approximation. Finally, the possible configurations of this deductive engine-CMS architecture are rather interesting, and research into their adequacy is far from complete. For instance, there is an interesting tradeoff between the CMS maintaining the entire deductive engine's knowledge base and maintaining part of it.  2.2 IMPLICATES^  23  In the first case, maintaining the entire knowledge base might be computationally unattractive because not all of the knowledge is "relevant" to the task the deductive engine performs. In the second case, the deductive engine maintains its own E and transmits to the CMS only "relevant" knowledge with respect to the task the deductive engine performs. Obviously what constitutes relevancy is of great concern here. Nevertheless, in this chapter we shall concentrate on the functionality of the CMS in the compiled approach and its computational problems, assuming that it contains a knowledge base transmitted to it in whole or in part.  2.2 Implicates In the compiled approach, the knowledge base E of clauses is translated into a set of equivalent clauses called the set of prime implicates, denoted by PI (E), which is a subset of the set of minimal implicates of E.  Definition 2.2.1 (Minimal/Prime Implicate) Given a set of clauses E and a clause P, 1. Pis an implicate of E if E P. 2. P is a minimal implicate of E if P is an implicate of E and there is no other implicate P' of E such that P' subsumes P. 3. P is a prime implicate 2 of E if P is an implicate of E and there is no other implicate P' of E such that P'^P. According to definition 2.2.1, the difference between a minimal implicate and a prime implicate is that the minimality relation, for prime implicates excludes non-fundamental clauses 3 whereas the definition of minimal implicate does not. The reader should note that the notion of minimal implicates corresponds to the notion of prime implicants in (Reiter and de Kleer, 1987). We decided to adopt the terminology of primeness used in switching theory instead, because primeness is a stronger property than minimality.  Example 2.2.1 Let E =^V b, 4 V c,^V d, a V e,^V e} be a set of clauses and the vocabulary V = {a, b, c, d, e, f , g, .}. The set of minimal implicates are {- a V b, 4 v c, —c V d,^V c,^V d, 4 V ,  2 The notion of a prime implicate (the dual of prime implicant) was first introduced by Slagle, Chang and Lee (1970). 3 Recall that a non-fundamental clause contains a pair of complementary literals. A non-fundamental disjunctive clause is a tautology.  2.2 IMPLICATES^  24  d, e, a V -a, b V -6 , c V^d V^f V -1, g V , .1 and the set of prime implicates are {-,a V b, -6 V c,^V d,^V c,^V d,^V d, e}.  Notice that the set of prime implicates is finite if the set E is. According to the definition of implicate, a non-fundamental clause P is always an implicate of any set E. We shall distinguish such an implicate by the following definition. Definition 2.2.2 (Trivial Implicate) A non-fundamental clause P is a trivial implicate of any set E. A clause P is a minimal trivial implicate of E if P is both a minimal and trivial implicate of E. In example 2.2.1, any clause of r that contains at least one pair of complementary literals is a trivial implicate of E but only {a V^b V^c V^d V -4, f V -if . .} are minimal trivial implicates of E. Note that e V is not minimal and that the set of minimal trivial implicates can be infinite if V is infinite. The distinction between these different types of implicates is crucial in the understanding of the notion of a support introduced later. Notation 2.2.1 (Sets of Implicates) If E is a set of clauses, I(E), MI(E), PI(E), TI(E) and MTI(E) denote the set of all implicates, minimal implicates, prime implicates, trivial implicates and minimal trivial implicates of E respectively.  Naturally, the set I (E) is the set of logical consequences of E in CNF. Thus, if E is inconsistent I (E) is the set ,C in CNF and E 0, hence M/ (E) = {0} and PI(E) = {0} because the empty clause subsumes every other implicate. The set MTI (E) = 0 because the empty clause is fundamental. If E is empty, then the set of all implicates I (E) is the set of all the tautologies of G in CNF that is, I(0) = (0), PI(0) = 0 and MI(0) = MT/(0). Recall that only fundamental clauses can be prime implicates. In addition, the set MTI (E) contains only non-fundamental clauses. Naturally, the various sets of implicates defined here are closely related. The following lemmata and theorems illustrate the relations between the sets PI(E), MI (E) and MTI (E) of a set of clauses E. Lemma 2.2.1 Let E be a set of clauses. (1) Every prime implicate of a set of clauses E is fundamental. (2) For any set of clauses E, PI(E) fl MTI(E) = 0.  (3) For any set of clauses E, PI(E) C MI(E).  2.2 IMPLICATES^  25  (4) For any set of clauses E, MI(E) = PI(E) u MTI(E). Proof : (1) Let P E P/(E) and assume that P is non-fundamental. Then for any implicate G of E, G -f P which contradicts the fact that P is a prime implicate of E. (2) a corollary follows from (1) and the definition of trivial implicates (definition 2.2.2). (3) Let P E PI(E) and assume that P IZ MI(E). Then there exists an implicate Q of E such that Q subsumes P. But then Q --f P which contradicts P E PI (E). (4)If P E PI (E) U MTI(E), by (3) and definition 2.22, P E MI (E). Conversely, assume that P E MI (E). If P is fundamental then there is no other implicate Q of E for which Q -- P therefore P E PI (E). If P is non-fundamental then by definition 2.2.2, P E MT/ (E). Consequently, P E PI (E) U MTI (E). QED Intuitively, all prime implicates are fundamental and since the set MTI(E) contains only nonfundamental clauses, their intersection is empty. Recall that the difference between PI(E) and MI (E) is the minimality relation. In fact, the minimality relation (—) expressed in P/(E) is similar to the minimality (C) in MI(E) if all clauses are fundamental. Therefore, the relation P/(E) C MI(E) holds. Figure 2.2 illustrates that the set MI (E) is being partitioned into two disjoint sets PI (E) and MTI(E). Since finite E implies finite PI (E), MI (E) is finite iff MTI(E) is finite or V is finite.  I = Implicates MI = Minimal Implicates TI = Trivial Implicates PI = Prime Implicates MTI= Minimal Trivial Implicates  Figure 2.2: Implicates Inclusion Relations Investigation into the inclusion relations among these sets reveals that the set MI (E) can be constructed given only the set PI (E) because the set MTI (E) can be constructed on-the-fly.  2.2 IMPLICATES^  26  Theorem 2.2.1 (Set of MU) For any set of clauses E over a language ,C with the vocabulary V, MTI(E) , {x V -ix IxEV and no P E PI(E) subsumes x v -ix}.  Proof : If T E MTI(E) then T is of the form x V - x, for if T = x V -ix V A for any clause A, then there is always a trivial implicate x V -ix of E that subsumes T. Therefore T has the form x V -ix where x E V and no other implicate (nor prime implicate) of E subsumes it. Consequently, T E {x V-a Ixe V and no P E P/(E) subsumes x V-ix}. Conversely, we assume that T E {x V --ix I x E V and no P E PI (E) subsumes xv-ix}. T is a trivial implicate in the form x V -ix and T is not minimal if there exist a minimal implicate Q that subsumes T. In this case, Q is either x or --a or O. In either case, Q is fundamental and by the lemma 2.2.1 Q E PI (E). Therefore T E MT/ (E). QED ,  We shall illustrate the formation of the set MI (E) by assuming the set PI (E), and constructing the set MTI(E) using PI(E) by the following example. Example 2.2.2 Let E ---= {p V qV r, ---ip V q, -iq V r, -13 V q V -is, -ir V -is, -ir V p V t} , then PI(E) = {r, -is, pvt, q V t, -73 V q}, MTI(E) = {x V -ix 1 x E V - {r ,s}} and MI(E) = PI(E) U MTI(E).  The notion of logical entailment of a clause by a set of clauses E is expressed using the sets M/ (E) and PI (E) by the following theorem (cf. (Reiter and de Kleer, 1987)). Theorem 2.2.2 (Entailment) Let E be a set of clauses,  =  (1) if G is a clause, then E G iff there is an M E MI(E) such that M subsumes G.  (2) if G is a fundamental clause, then E  G if there is a P E PI(E) such that P subsumes G.  Proof : Let E be a set of clauses and G be a clause.  =  (1) Assume E G. By definition 2.2.1, G is an implicate of E. If there is no M C G such that E m, then by the definition of minimal implicate (definition 2.2.1), G E MI(E) and G subsumes itself. Otherwise, by the definition of MI(E), there is an M E MI(E) such that M subsumes G. Conversely, assume that there is a M E MI(E) such that M subsumes G, by definition 2.2.1, E^M and since M C G, E G. (2) Similar argument as above except that since G is fundamental, any proper subset P of G is also fundamental. Therefore, by the definition of prime implicate (definition 2.2.1), P E PI(E).^QED As a direct consequence of definition 2.2.1 and theorem 2.2.2, the sets E, MI (E) and PI (E) are logically equivalent as expressed by the following corollary  2.3 SUPPORT^  27  Corollary 2.2.1 (Logical Equivalence) Let E be a set of clauses, then E, MI(E) and PI(E) are all logically equivalent in the sense that if a clause C is in one of the above sets, then the others logically entail C. As a consequence of lemma 2.2.1, theorem 2.2.1 and corollary 2.2.1, the most important set of implicates of E is the set of prime implicates P/ (E). In fact, the set of prime implicates of E plays the central role in the CMS presented here and will be used throughout this thesis.  2.3 Support The notion of a support and a minimal support for a single clause as presented in (Reiter and de Kleer, 1987) are restated here in order to facilitate our classification of minimal, prime, trivial and minimal trivial supports. In (Reiter and de Kleer, 1987), a support for a single clause is computed via the notion of a "prime implicant" in their terminology. In fact, their notion of prime implicant corresponds to the concept of minimal implicate in the previous section. The change of terminology is needed because the definition of prime implicant has its root in switching theory (Bartee et al., 1962) and prime implicate has its root in (Slagle et al., 1970). Moreover, in the actual algorithm for computing support, only the set of prime implicates is needed. The intuition behind a support clause S is that —PS is a hypothesis that implies the conclusion G with respect to the knowledge base E. Further, is not inconsistent with E otherwise E would imply any conclusion whatsoever. A minimal support clause is the smallest such hypothesis that implies G. Definition 2.3.1 (Support) Let E be a set of clauses and G be a clause. A clause S is a support for G with respect to E if I. EkSVG(orES—G) 2. E^S. A clause S is a minimal support for G with respect to E S is a support for G and there is no other support S' for G such that S' subsumes S. We shall illustrate the notion of a support and minimal support using the following example. Example 2.3.1 Assume that the CMS received the following set of clauses E = {p a V b, b c, p , a V d}. If c is the query, then {--ic ,^V a, 4} is the set of minimal supports for c. This is because E^c^c, EkpA—a^c and E^b -- c, every clause in this set is consistent with E and every clause in this set is  2.3 SUPPORT^  28  The set of minimal supports for a clause G with respect to E can be easily computed from the set of minimal implicates of E. The following lemma and theorem on minimal supports and sets of minimal supports are from (Reiter and de Kleer, 1987) and are given here without proofs. The result of their theorem and lemma are needed for defining the computation of prime and minimal trivial supports. Lemma 2.3.1 (Minimal Support (Reiter and de Kleer, 1987)) Suppose E is a set of clauses, MI(E) is the set of minimal implicates of E and G is a clause. If the clause S is a minimal support clause for G with respect to  E, then there is an M E MI(E) such that M n G 0 and S = M — G. Let E denote a set of clauses, MI (E) denote the set of minimal implicates of E, and G be a clause, and let A {M — G I M E MI(E) and M n G 0}. The above lemma ensures that if S is a minimal support for G, then S can be found in the set A. Unfortunately, the converse of the lemma is not true in the sense that there are members of A that are not minimal supports for G. This is because subsumption might occur among members of A. Consequently, subsumption must be considered in the construction of the set as the following theorem indicates. Theorem 2.3.1 (Set of Minimal Supports (Reiter and de Kleer, 1987)) Let E be a set of clauses, MI(E) be the set of minimal implicates of E and G be a clause. The set MS(G, E) SUB({M —G PM E MI(E) and M n G 0}) is the set of minimal supports for G with respect to E.  There is a special case where the inverse of lemma 2.3.1 also holds in the sense that every support in A is also minimal. This is the case when the query is a clause with a single literal (unit clause) as stated in the following corollary. Corollary 2.3.1 (Reiter and de Kleer, 1987) Suppose E is a set of clauses, MI(E) is the set of minimal implicates of E and G = 1 is a unit clause. Then clause S is a minimal support clause for G with respect to E iff there is an M E MI(E) such that 1 E M and S = M —1.  Note that if E is inconsistent, there is no support for G. This follows because the only clause in M/ (E) is the empty clause, and since the empty clause does not have any intersection with any clause G, MS(G, E) 0. Similarly, if E U G is inconsistent (even though E is consistent), G has no support. On the other hand, if E is consistent and E G, by theorem 2.2.2, there is an M E MI M that subsumes G, and since M C G, the only minimal support for G is M — G {0}. For the same reason, if the query G is a non-fundamental clause (tautology), then the only minimal support clause for G is the empty clause.  2.3 SUPPORT^  29  2.3.1 Prime Support Recall that in example 2.3.1, the clause ^is a minimal support for c. In fact, -ic trivially supports c in the sense that c V c is a tautology. We shall distinguish this type of trivial support and elaborate on its role in section 2.3.2, but we shall first discuss the type of supports that are nontrivial in the following sense. Definition 2.3.2 (Prime Support) Let E be a set of clauses and G be a clause. A clause S is a fundamental support for G with respect to E if S is a support for G and S V G is fundamental. A clause S is a prime support for G if S is both a minimal and fundamental support for G.  Fundamental and prime supports are more restricted notions of a support defined above, in the sense that they have to preserve an additional property namely, S V G being fundamental. Consequently, given a clause G, any support S for G that makes S V G non-fundamental (called trivial support in section 2.3.2) is neither a fundamental nor prime support for G. Not surprisingly, the set of prime supports for a clause G with respect to E can be easily computed from the set of prime implicates of E. Theorem 2.3.2 (Set of Prime Supports) Suppose E is a set of clauses, PI(E) is the set of prime implicates of  E and G is a clause, then PS(G, E) = SLIB({P -G I P E PI(E), P n G 0 and P V G is fundamental}). is the set of prime supports for G with respect to E.  Proof : If E is inconsistent or G is a tautology PS(G, E) = 0 and the theorem is true. We assume E is consistent and G is fundamental.  Let S E PS(G, E) and by construction, S is a fundamental support for G. We shall prove that S is minimal. Suppose there is a minimal support S' for G such that S' C S. By theorem 2.3.1, S' P - G for some P E MI(E) and P n G 0. If S' v G is fundamental, P E PI(E) and 5' E PS(G, E) contradicting S E PS(G, E). If S' V G is non-fundamental, there is some literal x such that -ix E 5 and x E G. But then S' S since -ix 0 S. Therefore, S is minimal. /  Conversely, let S be a prime support for G. Since S is also a minimal support for G, by theorem 2.3.1, there exists a P E M/(E) such that P n G 0 and S = P - G. Assume that P E MT/(E), then P= x V Ix for some x E V, but then S V G is non-fundamental, therefore P E ME). Assume P V is non-fundamental. Since P and G are both fundamental, there must exist a literal x such that x E P and -x E G, but then S V G is non-fundamental. Therefore, S E PS(G, E).^QED -  2.3 SUPPORT^  30  Example 2.3.2 Let E = {- a V -4 V b, V V c, V c} and the set of prime implicates PI(E) = {-ia V V c, -iaV c, -19V c}.If G = -4V bV c,thenPS(G, E) = = -131. Notice that the prime implicate P = V V c has a non-empty intersection with G but PV G is non-fundamental. Also, the fundamental support -a V is not prime because subsumes it. ,  2.3.2 Trivial Support As indicated in the previous subsections, there are some distinguished types of minimal supports that trivially support a clause. Intuitively, if G = a V^V c, then the negation of its literals^b and are all potentially trivial supports for G. This is because E^a V a V^V c holds for any E and if E 1 --a, a is a trivial support for G. Definition 2.3.3 (Trivial Support) Let E be a set of clauses and G a clause. A clause T is a trivial support for G if T is a support for G and T V G is non-fundamental. A clause T is a minimal trivial support for G if T is both a trivial and minimal support for G.  Recall that according to lemma 2.2.1, the set MI (E) is composed of two disjoint sets PI (E) and MTI(E). We have already seen MS(G, E) being constructed from MI(E), and PS(G, E) being constructed from PI (E). Ideally, we would like to have a similar definition for the set of minimal trivial supports for a clause G with respect to E using M TI (E) only. Unfortunately, the following observation reveals the impossibility of such a construction. Let A = SUB ({M -GIME MT/ (E) and M n G Op and G = x V -ix V A for some x E V and a fundamental clause A. Since G is a non-fundamental clause, if E is consistent any support for G is a trivial one. Therefore, the only minimal trivial support for G is O. But, if x or E PI (E), then x V MTI(E) and therefore ^ cl A. The second problem arises when G x V y is a fundamental clause such that x E PI (E) and y PI (E). Obviously, x V Ix MTI(E) and y V^E MTI(E). Since PS( G, E) = {D}, no trivial support for G is minimal. But, according to A,^is a minimal trivial support. To overcome these problems we resort to the following less appealing characterization of the set of minimal trivial supports. -  Theorem 2.3.3 Let E be a set of clauses and G be a clause, the set of minimal trivial supports for G with respect to E, MTS(G, E), is  1. if E is consistent and G is non-fundamental then MTS(G, E) = {11} otherwise 2. MTS(G, E) = {M -GIME MTI(E), M n G 0 and no clause in PS(G, E) subsumes M - G}  2.3 SUPPORT^  31  Proof : If E is consistent and G is non-fundamental then the only minimal and trivial support for G is q therefore the theorem holds. If E is inconsistent, MT/ (E) = 0 and the theorem holds. Let E be consistent and G be a fundamental clause and let S E MTS(G, E). Since MTI(E) C MI (E), by theorem 2.3.1 any such S is a support for G and is trivial by construction, that is S V G is non-fundamental.  Suppose S is not minimal, by construction, S is a single literal x such that -ix E G and the only clause that subsumes S is ^. But, if is a support for G, ^ E PS(G, E) (because G is fundamental) which contradicts the hypothesis S E MTS(G, E). ^  Conversely, let S be a minimal trivial support for G. By definition 2.3.3 and theorem 2.3.1, S E MS(G, E) that is, there exists an M E MI (E) such that S = M - G, M nG 00 and S V G is nonfundamental. Consequently, there exists an x E V such that x E S V G and -ix E S V G. Assume that M E PI(E), since x and --ix cannot both occur in M or in G, therefore either x E M and -ix E G or vice versa. Assume that M = x VA V B and G= -ix V A V C with A 0 and B n C = 0, hence S = x V B. Neither x nor -ix can be in Pip since their presence contradicts the assumption that M E Pip. Therefore by theorem 2.2.1, M' = x V -ix E MTI(E) which implies that S' = M' - G = z is a support for G and S' C S contradicting the assumption that S is a minimal trivial support. Therefore M E MTI(E). Moreover, no P E PS(G, E) can subsume S because S is minimal. Consequently, S E MTS(G, E). QED As a consequence of the definitions of minimal, prime and minimal trivial supports, the corollary below summarizes the relations among them. Corollary 2.3.2 If E is a set of clauses and G a clause, then PS(G, E)  n MTS(G, E) = 0 and MS(G, E) = PS(G, E) UMTS(G, E).  Since MTI(E) is computed using PI (E), alternatively, the set of minimal trivial supports for a clause G with respect to a set E can be defined as expressed by the following corollary. Corollary 2.3.3 If E is a set of clauses and G is a clause, then 1. if E is consistent and G is non-fundamental then MTS(G, E) = {^} 2. if PS(G,E) = {^} then MTS(G, E) = 0, otherwise 3. MTS(G, E)={-ixixEGand -a PI(E)}  The characterization presented so far also allows us to perform separation of minimal supports in terms of prime and minimal trivial supports. That is, if the set MS(G, E) is available, the sets PS(G, E),  2.4 QUERY^ MTS( G, E) can be computed as MTS(G, E)  32 ,  {T T E MS(G,E) and T V G is non-fundamental}  and PS(G, E) = {P 1 P E MS(G, E) and P V G is fundamental} . An application of this separation process occurs when finding supports for a conjunctive clause query, both prime and minimal trivial supports are intermixed and the above scheme is useful if separation of them is desired. The details of this process will be presented in section 2.6. In summary, beginning with the proposed method of computing MS(G, E) from (Reiter and de Kleer, 1987), we have extended it to compute the sets PS(G, E) and MTS(G, E). We have shown that any of these sets can be constructed from the set PI (E), which justifies it as the only set of implicates of E that we need to maintain in order to efficiently compute any set of supports for any clause. Also, the distinction between minimal, trivial and prime supports suggests that under certain circumstances, if the trivial supports for a clause G are of no concern to the deductive engine, the CMS might as well not compute them at all. Conversely, if the deductive engine has a need for trivial supports for a query G, the CMS can compute the set of minimal trivial supports given the set of prime supports. In the case of a single clause query, the minimal trivial support can easily be computed. There is no obvious application for this type of minimal trivial support beside determining the triviality of the query. On the other hand, if the query is a conjunction of clauses, the minimal trivial support for each clause is needed for the construction of minimal supports for the conjunction (section 2.6). Moreover, we observe that the minimal trivial support for a conjunction of clauses is closely related to minimal models (minimal number of truth assignments). For example, if E is empty and .T is a CNF formula, then the minimal trivial support S of .T that is, = S V .T and S can be shown to correspond to a minimal model of T . We shall leave this investigation for future research.  2.4 Query Thus far, a query has been in the form of a single clause G. The CMS replies with the set of minimal supports, MS(G, E), represented by two disjoint sets MTS(G, E) and PS(G, E), for G with respect to the knowledge base E. Since trivial and prime supports for G may have different uses in the deductive engine, the CMS differentiates among them. Some useful information about G, independent of domain context, can be obtained by inspecting these sets of supports. 1. If both sets are empty, E U G is inconsistent; 2. if PS(G, E) = 0 and MTS(G, E) = G is a tautology; 3. if PS(G, E) = {0} and MTS(G, E) = 0, G is a logical consequence of E  33  2.4 QUERY^  Algorithm: Algorithm for Minimal Supports Input: a set of clauses PI(E) and a clause G. Output: MS(G, E) = PS(G, E) U MTS(G, E). Step 1: If PI(E) = {^} then MTS(G, E) = 0 and PS(G, E) = 0, GOTO 6. Step 2: If G is non-fundamental then PS(G, E) = 0 and MTS(G, E) =^GOTO 6. Step 3: PS(G, E) = SUB({P  -  G IP E PI(E), P fl G 0 and P V G is fundamental})  Step 4: If PS(G, E) = {^} then MTS(G, E) = 0, GOTO 6. Step 5: MTS(G, E) =^x E G and --ix PI(E)}  Step 6: RETURN: MS(G, E) = PS(G, E) U MTS(G, E).  end  Algorithm 2.1: Algorithm for Minimal Supports 4. if PS(G, E) = 0 and MTS(G, E) 0, G is consistent with E but not "related" to it. In most applications only the prime supports are important for instance, in diagnostic reasoning, as demonstrated in chapter 7. Nevertheless, the minimal trivial supports are indispensable for computing the prime supports for conjunctive queries as section 2.6 indicates. The following algorithm is the amalgamation of the results presented thus far and we demonstrate the algorithm with the following example.  Example 2.4.1 Let E = {-a V - I)V c V d, V f V g, -id V h V j, V u,^V v,^The set of prime implicates ,  of E are PI (E) = ( 1)- a V- bVfVuV3 Vv, ( 2)- aV- bVfVuVhVj, ( 3)- ctV-ibVfVgVjVv, ,  ,  ( 4)- aV ,  (  7)  -,  ,  ,  - 1)VfVgVhVy, ( 5)^V-ibVeVy ,  a V.-4)V dVf Vu,^( 8)-z  ,  V v,^(^-- ct V -ibVcV ,  h V j,  v-- bvdvfVg,^( 9) - c/V-ibVcVd, ,  ,  (10)^V f V u,^(11)^V f V g,^(12) 4 V I V v, -  (13) --id VhVj,^(14)-,g V u,^(15) - 1z V v,^(16) w ,  }.  The following four queries for the set of clauses E above illustrate the type of minimal supports obtained using the algorithm. For clarity, each support clause is accompanied by a number indicating  34  2.4 QUERY^  which prime implicate in PI(E) the support was generated from. Throughout the example, A represents the set of potential prime supports for the query, that is, the set constructed at Step 3 of the algorithm before the application of the SUB operator.  Query A (Minimal Support): G=  - aViVd ,  A = {^V f V uV v(1), - bV f V uV h(2),^V f VgV v(3), —1) V f VgV h(4), - ,  V c V v(5),^—,1) V c V h(6),^V f V u(7),^V f V g (8) ,^V c(9)}  PS(G, E) = {— b V c(9),^V f V g(8), — 1) V f V u(7)} ,  ,  MTS(G,E) = {a, -'j, -'d} Notice that in query A, the prime implicates (12) and (13) do not contribute to a fundamental support clause because the union of the prime implicate and the query is non-fundamental. In the set PS( G, E), notice that the prime support clause (7) subsumes (1) and (2); (8) subsumes (3) and (4); and  (9) subsumes (5) and (6). The set of minimal trivial supports includes the negations of the goal literals because none of them is in PI(E). Thus, the set of minimal supports for the dause V d is the set PS(G, E) U MTS(G, E).  Query B (Entailment): G =^V v A={-iaV -ibVfVuVj(1), - aV-ibVfVgVj(3), -,c/V-ibVcV3(5), ,  --id V y (12), ^(15)1 PS(G, E) = {^} MTS(G, E) = 0 In query B, the query G is entailed by E, that is, by theorem 2.2.2 there is a prime implicate (15)  that subsumes G. Thus the only minimal support for G is the empty clause, as shown in the set A and consequently in the set PS(G, E). Query C (Tautology): G= w V PS(G, E) = MTS(G, E) = {^} In query C, the query is a tautology (non-fundamental). According to the definition of minimal support (definition 2.3.1), the only minimal support clause for a tautology is the empty clause found in the set MTS(G, E). This is obtained from Step 2 in the algorithm.  Query D (Inconsistent): G =  2.5 PREFERENCE ORDERINGS^  35  A=0 PS(G,E) = 0 MTS(G,E) = 0  Finally, in case D, the query is inconsistent, that is, E U G kp or E ^G. Such a query does not have any intersection with any prime implicate in PI(E), consequently PS (G , E) is the empty set. Also, the negation of G, w, is the clause (16) in PI (E) therefore the set MTS(G, E) is also empty  2.5 Preference Orderings Normally, the set of minimal supports for a query contains more than one clause. It would be interesting to design a method to distinguish among these minimal supports. In fact, the notion of preference in minimal support has been advocated in the literature. For instance, in (Cox and Pietrzykowski, 1986), a basic cause for a query G corresponds to our notion of a prime support S for G such that there is no other prime support S' for G that satisfies E S S'. Poole (1989) defined a least presumptive hypothesis which is comparable to a minimal support S such that there is no other minimal support S' for G that satisfies E S' --+ S. Poole also observed that there is a need for not only basic and least presumption, but more complete specification of their preference orderings. Recall that subsumption was used as the ordering relation in deriving minimal supports for a query G. Similarly, we can define an ordering on minimal supports based on logical specificity as follows: Since any support for a clause is by nature fundamental, if Si and S2 are supports for G with respect to E, then we say that Si precedes S2 if Sl —> S2 for some formula (1). Note that by denoting Si precedes or is preferred over S2 by Si —f S2 implies that the contra-positive is also true. For instance, "I prefer eating chicken over beef' also expresses the preference that "not eating beef is preferred over not eating chicken". The nature of preference orderings cannot be captured solely by material implication. A case like "I do not prefer eating beef over chicken" does not necessarily imply that "I eat beef and not chicken". Whether there exists a universal theory of preference orderings for all preferences known to humankind is questionable. In the following, we will consider only the class of preferences that are expressible by logical specificity.  Definition 2.5.1 (Minimal Support Preference Orderings) Let E and (I) be sets of clauses, G be a clause, MS(G, E) be the set of all minimal supports for G with respect to E. We say that 1. Si precedes S2 with respect to (I) (S 1^S2) if (I)^—+ S2 for distinct Si, S2 E MS(G, E).  ▪  2.5 PREFERENCE ORDERINGS ^  36  2. S is an upper minimal support with respect to 0 (S^if there is no other S' c MS(G, E) such that 0^S^S'. 3. S is a lower minimal support with respect to (I) (—> S) if there is no other S' E MS(G, E) such that S'^S. If S is both lower (---* S) and upper ( S^minimal support with respect to (1., then S is called isolated and is denoted by itself. Also, if I = E, the resulting ordering is called a canonical ordering of MS(G, E). The above definition allows the deductive engine to provide a set of ordering constraints relevant to the application domain denoted by 0, to achieve some degree of discrimination among the minimal supports. In the absence of such constraints, E can always be used to serve the purpose. For demonstration purpose, we shall hereafter use the canonical ordering as the constraint. Note that theorem 2.2.2 ensures that for any A, B E MS(G, E), A B if and only if there exists a P E PI(E) that subsumes --- A V B. ,  Example 2.5.1 Let E be a set of clauses representing the following facts and let the query be G = government_in_trouble. E { inflation _high^  unemployment_high,  inflation_high A bank _intervention^interest_high, interest_high A investment_high^dollar_high, dollar_high^  exports_low,  dollar_high^  imports _high,  exports_low A imports_high^—'gnp_increases, — resolve_constitution^ --,investment_high, ,  - resolve_constitution A -'gnp_increases^government_in_trouble, ,  investment_high^  -'unemployment_high}.  The set of minimal supports for the query G = government_in_trouble is MS (G , E)^-dollar_high V resolve_constitution, gnp_increases V resolve_constitution, - imports_high V - exports_low V resolve_constitution, ,  ,  -- government_in_trouble} ,  and their canonical ordering using the set E is depicted in figure 2.3. The arrows in the graph correspond directly to the canonical ordering relation ^Thus, -- government _zn _trouble is the lower minimal support ,  37  2.5 PREFERENCE ORDERINGS ^ for G;  -  dollar_high V resolve_constitution is the upper minimal support; and the other two minimal  supports are the intermediates.  dollar high V resolve_constitution  — imports_high v — exporis_low V resolve_constitution ,  ,  gnp_increases v resolve_constitution  --,government_in_trouble Figure 2.3: Canonical Ordering of minimal supports  Note that the ordering was defined over a set of minimal supports which are clauses. If the negations of minimal supports (minimal explanations) are desired, then the ordering can be transformed easily as follows: the ordering Si S2 (E S2) corresponds to - S2 -32 - S1). The ,  ,  negation of a disjunction of literals (a support) is a conjunction (an explanation) and sometimes this is more legible in terms of demonstration. The reason for defining the ordering in terms of clauses is that the constraint .1) may define logical specificity in any form and as long as it is expressible by logical specificity, the translation is merely syntactic. For instance, by negating the above set of minimal supports we obtain the following set of minimal explanations:  dollar_high A -'resolve_constitution, --,gnp_increases A — resolve_constitution, ,  imports_high A exports_low A  -'  resolve_constitution,  government_in _trouble}.  By reversing the arrows in figure 2.3 we obtain the canonical ordering for the set of minimal explanations for G. We have mentioned earlier that in many applications only the set of prime supports is of interest, consequently a preference ordering for the prime supports is needed instead. By restricting the ordering relation defined in this section (definition 2.5.1) to the set PS(G, E), a similar preference ordering on the set of the prime supports for a query G can be obtained.  2.6 CONJUNCTIVE QUERIES^  38  g ov ernment_in _trouble  --Inp _increases A - resolve _constitution  imports _high A exports _low A —.resolve _constitution  ,  dollar_high A — resolve _constitution ,  Figure 2.4: Canonical Ordering of minimal explanations  2.6 Conjunctive Queries To generalize the functionality of the CMS, Reiter and de Kleer (1987, p 185) recognized the need for the notion of a minimal support for a conjunction of clauses, but did not provide a method to compute it. In this section, we shall present such a method. Initially, we shall present the method for finding the minimal support for a conjunction of two clauses and subsequently, generalize it to multiple conjuncts. The notion of a support for a conjunction of two clauses G i A G2 is derived from the definition of a support (definition 2.3.1) by substituting G = G1 A G2. Intuitively, the set of supports for Gi A G2 can be constructed by first constructing the sets of minimal supports MS(Gi, E) and MS( G2, E) respectively, and taking the pairwise disjunction of their minimal supports, provided they satisfy certain conditions. Theorem 2.6.1 Let E be a set of clauses and G = G1 A G2 the conjunction of two clauses. Let A {S1 V S2 I Si E MS(Gi, E) , S2 E MS(G2, E) and no M E MI(E) subsumes Sly S21. The set MS(G, E) SUB(0) is the set of minimal supports for G with respect to E.  Proof : Let S E MS(G, E). We shall prove that S is a minimal support clause for G.  =  a. (support) By definition, S = Si V S2 where Si E MS(Gi, E) and S2 E MS(G2, E). Since E and E S2 V G2, by propositional reasoning E (Si V S2) V (Gi A G2). By the construction of A, there is no minimal implicate that subsumes S and hence, by theorem 2.2.2, E [7 S. Consequently, S is a support for G with respect to E. b. (minimality) Let R be a support for G that is, E  =  RV (G1 A G2) and E 1;& R, and R C S.  Since Ek RV Gi and E = RV G2, R is a support for G1 and G2 respectively. Hence there exist an  2.6 CONJUNCTIVE QUERIES ^  39  E) and R2 E MS(G2, E) such that Ri C R and R2 C R. Therefore, Ri V R2 C R and since E R, by theorem 2.2.2 there is no M E MI (E) that subsumes Ri V R2 .. This means that Ri V R2 E A. Therefore, either R1 V R2 E MS(G, E) or it is subsumed by some R' E MS(G, E). Since ie C Ri V R2 C 5, S is subsumed by some element in MS(G,E) contradicting the assumption that S E MS(G,E). R1 E MS(Gi,  Conversely, let S be a minimal support for G = G1 A G2 with respect to E. We shall prove that S E MS( G, E). Since E^S V (G1 A G2), hence E^S V G1, E^S V G2 and E 17& S. That is, S is a support for C1 and G2 respectively. By the definition of minimal support (definition 2.3.1), there exist Si C S and S2 C S such that Si and 52 are minimal supports for Gi and G2 respectively that is, S1 E MS(Gi, E) and S2 E MS(G2,E). Since E S1 V S2 V G and E si V S2 because Si V S2 C S, no M E MI (E) subsumes Si V 52 hence Si V S2 is a support for G and also Si V S2 E A. If Si V S2 C 5, then S is not minimal contradicting the assumption that S is, consequently, S V S2 and therefore QED S E MS(G,^ Example 2.6.1 Let E = {-13 V q,^V r, -13 V t} and G = r A t. Then PI(E) = {-13 V q,^V r, -13 V t,^V r} MS(r, E) PS(r, E) U MTS(r, E) =^U {-1.} MS(t, = PS(t, E) UMTS(t, E) =^U {-it}  ,  A = {--,q V gyp --ill V^-13 V^V -13,^V --it} MS(r A t,^= {-'q V^V -- t} ,  An obvious generalization of theorem 2.6.1 can be obtained as follows. If G1, , G„ are n clauses and G = Ci A ... A G„, then we define MS(G, E) SUB({ Si V S2 V • • • V Sn for each i, 1 < i < n, Si E MS(Gi, E) and no M E MI (E) subsumes Si V S2 V ... VS0).  Notice that in the above method, if Si V S2 is subsumed by some SI V S2 where Si, SI E MS(G1,E),  z  S2 S E  MS(G2, E) and tIf = V Si E MS( Gz , E), then obviously ,S;VSV‘If subsumes Si V S2 V W. =3  This means that we have generated a lot of non-minimal supports that are subsumed later. The above observation suggests that we should remove non-minimal supports as early as possible preventing the unnecessary combinatorial explosion. The following theorem is a generalization of theorem 2.6.1 and gives the basis for a recursive algorithm for computing the minimal supports for the conjunction of an arbitrary (finite) number of  2.6 CONJUNCTIVE QUERIES^  40  clauses. The theorem exploits the local non-minimality condition and removes non-minimal supports as soon as possible. Theorem 2.6.2 Let E be a set of clauses and G1, ... , G,,, n > 2 are n clauses. The set of minimal supports for G = Gi A ... A G„ is MS(G i ... A , E) = SLIBUS v S' S E MS(Gi ... A G„_ i , E), S' E MS(G,, , E) and no M E MI(E) subsumes S v S'}). Proof : By simple induction on the number of clauses in the conjunction and theorem 2.6.1. ^QED Notice that the condition "no M E MI(E) subsumes S V S" can actually be replaced by (2) S V S' is fundamental and (ii) no P E PI (E) subsumes S V S'. The above replacement is an obvious consequence of theorem 2.22 and the following corollary restates theorem 2.6.2 in a simplified manner. Corollary 2.6.1 If E is a set of clauses and G1, . , G,,, n > 2 are n clauses, the set of minimal supports for G = G1 A... A G„ is defined as  MS(Gi ... G,„ E) = SLIBUS V S' I S E MS(Gi ... A G„_i , E), S' E MS(G„, E), no P E PI(E) subsumes S v S' and S V S' is fundamental }).  Example 2.6.2 In example 2.6.1, if the query is G =rAtAq,wecan construct the minimal support for G by taking the set of minimal supports MS(r A t, E) computed in example 2.6.1, and pairing it with the set MS(q , E) as follows:  MS(r A t, = { q V^V —4} MS(q, E) =^, -'q} —,  O = hp V V —it, —q V —t, gyp ,  —  13 V^V V  MS(r A t A q, = {—q V Before we leave this section we present an alternative for computing the set of minimal supports for a finite conjunction of clauses 4 . 4 This alternative was brought to our attention by professor Raymond Reiter in a personal communication in October 1988.  2.7 CONCLUSION^  41  Theorem 2.6.3 Let E be a set of clauses and G = G1 A . A Gn a conjunction of n > 2 clauses. For any clause S, S E MS(G, E) iff S E PS(a , E') where a is a new propositional variable not occurring in E U {G} and -  E' E {G Proof : We need to prove that for any clause S which contains no occurrences of a, S is a support for  with respect to E' if S is a support for G with respect to E.  =  Assume S is a support for a with respect to E', then E'^S V o- or E^G^a} S V 0- and E (G a)^V a . By propositional reasoning, E S V G V and since u does not occur in either of E, S or G, E J S V G. Moreover, since E' 1 S and E 1 5, therefore S is a support for G with respect to E. Conversely, assume S is a support for G with respect to E that is, E S V G and E S , then In addition, E' S for otherwise E (G a-)^S which (S V G) A (G a-) and E' S • by propositional reasoning implies that E S V Icr. Since a does not occur in E or S , E S which contradicts our hypothesis. Consequently S is a support for u with respect to E'. ^QED -  V cf.  —  -  The recursive algorithm implied by theorem 2.62, although it looks complicated, it is actually better in complexity terms than the method proposed by theorem 2.6.3. The latter technique requires first transforming the DNF formula G a- into an equivalent formula .T in CNF, and then computing the prime implicates of E U T . If .T has m clauses, m applications of the incremental algorithm are required to obtain the new set of prime implicates. This also implies that for each query, the knowledge base E must be duplicated before adding the augmented query clause in order to preserve the set E for other queries. The algorithms discussed in this section generate the set of minimal supports for a conjunction of clauses in a rather direct way. Unlike the algorithm in section 2.4, these algorithms do not explicitly generate the sets of prime and minimal trivial supports for a conjunction; therefore, some extra effort is needed to partition the minimal supports into prime and trivial ones. More specifically, let E be a set of clauses and G = G1 A ... A Gn a conjunction of n > 2 clauses. By corollary 2.3.2, for any clause S E MS(G, E), S E PS(G, E) iff for some i,1 < i < n, G VS is fundamental, otherwise S E MTS(G,E). Consequently, when a conjunctive query G is presented to the CMS, it computes MS(G, E), applies the fundamental test on MS(G, E) and replies with the sets PS(G, E) and MTS(G, E). i  2.7 Conclusion In this chapter, we extended the study of the Clause Management System (CMS) originally presented by Reiter and de Kleer (1987). The CMS supplements the deductive engine by generating explanations for a given query with respect to the knowledge the deductive engine sends to the CMS. To accomplish  2.7 CONCLUSION^  42  this task, the CMS relies heavily on the concept of implicates of a set of clauses. We distinguished three important kinds of implicates: minimal, prime and minimal trivial implicates. We argued that prime implicates are sufficient for representing the CMS knowledge base received from the deductive engine. Subsequently, the notions of minimal, prime and minimal trivial supports for a single clause were introduced and the algorithms to compute them were discussed. We then generalized these algorithms to compute these supports for a finite conjunction of clauses and thus for any propositional formula. In addition, we defined a preference ordering scheme based on logical specificity on the minimal supports, that gives some basis for further discrimination among the set of minimal supports for a query. An experimental CMS has been implemented using Quintus Prolog (1987) as the programming language and all the examples discussed in this chapter have been tested. As for future research, the encoding of the deductive engine knowledge to be transmitted to the CMS was not addressed here. We intend to study this issue for some well known types of deductive engine such as Prolog in our future work. In the case of a Problem-Solver using a CMS, we intend to investigate problems like the cooperation between consistency techniques (Mackworth, 1977) and the CMS in the realm of constraint satisfaction problems. Other proposed future research is an investigation into the correspondence between minimal trivial supports and minimal models for a formula. The benefit of this study would be an extension of the capability of the CMS to aid reasoning systems, such as the logical system for depiction and map interpretation (Reiter and Mackworth, 1990).  Chapter 3  An Incremental Method for Generating Prime Implicates The CMS knowledge base will typically evolve over time and, most often, information will be added to the knowledge base. Using the approach of compiling prime implicates in the CMS, there is a need for an incremental method to compute prime implicates so to avoid recompilation from scratch every time an update is performed. The problem of incrementally computing prime implicates in the CMS framework is defined as follows: Given a set of clauses E, a set of prime implicates II of E and a clause C, the problem is formulated as finding the set of prime implicates for H U { C}. Intuitively, the property of implicates being prime implies that any effort to generate further prime implicates from a set of prime implicates will not yield any new prime implicates. In this chapter an incremental method for generating prime implicates from a set of existing prime implicates plus a new clause, is proposed, using the properties of prime implicates. The correctness proof and complexity analysis of the incremental method are presented, and the intricacy of subsumptions in the incremental method is also examined'.  3.1 Introduction Traditionally, prime implicants have been used to perform minimization on combination circuits (Biswas, 1975; Kohavi, 1978; Hwa, 1974; Hwang et al., 1985; Rhyne et al., 1967). In the realm of AI applications, the role of prime implicates has also generated considerable interest. For instance, in 1 This  chapter is based, in part, on (Kean and Tsiknis, 1990) and (Kean and Tsiknis, 1992a).  43  3.1 INTRODUCTION^  44  mechanical theorem proving, Slagle et a/.(1969; 1970) introduced the notion of prime consequence (analogous to prime implicants or prime implicates) in consequence-finding using semantic resolution. The definition of a prime implicate of a formula, as presented in definition 2.2.1, is restated below. (Prime Implicate) 2 : Given a clause P and a CNF formula E, P is an implicate of E if E P. P is a  prime implicate of E if P is an implicate of E and there is no other implicate P' of E such that k P'^P. In contrast to the definition of a prime implicate, its dual is called a prime implicant. Definition 3.1.1 (Prime Implicant) Given a conjunctive clause P and a DNF formula E, P is an implicant of  E if P E. P is a prime implicant of E if P is an implicant of E and there is no other implicant P' of E such that  In switching theory, DNF is the widely accepted representation, hence the notion of implicant is relevant. On the other hand, in the realm of theorem proving, CNF is the choice of representation for refutation hence the notion of implicate is relevant (Slagle et al., 1970). Hereafter, because of this duality, we shall use the term "implicate" and assume a formula in conjunctive normal form in order to be consistent with the previous chapter. Methods for generating prime implicates from Boolean expressions, in our case CNF formulae, have been studied extensively in the area of switching theory. For example, there is the consensus method (Bartee et al., 1962); the well-known Karnaugh Map techniques and the Quine-McCluskey algorithm (Bis was, 1975; Kohavi, 1978); the Semantic Resolution technique explored by Slagle et al.(1969; 1970); and the elegant Tison's Method (1967). It is obvious that all of the conventional methods to generate prime implicates are applicable to the CMS update problem. However they are inefficient simply because they are concerned with the generation of prime implicates from an arbitrary CNF formula. What is needed is an incremental method that updates the set of prime implicates when its corresponding CNF formula is modified. More formally, given a CNF formula E n C1 A C2 A ... A G and its corresponding set of prime implicates denoted by PI (E n ), then the task can be formulated as computing PI (En + 1), where En+1 En A en+i- Obviously, P/ (E n +1) can be generated directly from E n A Cn +1. Using the conventional methods, unfortunately this results in a lot of redundant computations simply because none of the conventional methods exploit the fact that the clauses of PI (E n ) are already prime. Ideally, we would like to generate P/ (E n + 1 ) from PI(E n ) A Cn +1. 2 For the case of first order implicates, see (Marquis, 1990; Marquis, 1991).  3.2 DEFINITIONS^  45  This chapter presents a new algorithm for generating prime implicates from PI (E n ) A G +1 . There are two criteria for such an algorithm. First, the algorithm should not rely on the canonical forma of the formula as most of the conventional methods do, except those by Slagle et a/.(1969; 1970) and Tison (1967). Second, the algorithm should exploit the properties of prime implicates so that the generation process avoids unnecessary consensus operations. At this point, it is necessary to indicate that there is not much hope for a "simple" incremental method simply because the PI operator is not monotone. More precisely, there exist sets of prime implicates of P and S such that neither PI(P U S) C PI(P) U PI(S) nor PI(P U S) D P1(P) U PI(S). As an example, consider P = {x V /I and S = { t, y}, PI(P U 5) { x, t, y} while PI(P) P and PI(S) S and PI(P)U PI(S)= {x V 1y, t, y}. —  3.2 Definitions In this chapter, when x is a literal we shall use 7 to denote its negation for readability. Also, a clause is represented by the juxtaposition of its literals (eg. xyz). If Ml , M2, . , Mk are clauses, then the juxtaposition M1M2 ...  Mk  will represent the clause V M i without repetition.  Definition 3.2.1 (Consensus) Let A = xA' and B = YB' . The consensus of A and B with respect to the variable  x is defined as CS(A, B, x) = A'B', if A'B' is fundamental.  If CS(A, B, x) = A'B' exists, then we say that the consensus is defined. We shall denote a chain of consensus operations CS(.. . CS(CS(C, P1, x1), P2 ) • • • , Pn,xn) by the generalized consensus GCS (C , P.• • •Pn<xi•••xn>)  or, without specifying the variables, as GCS(C, P1,^, Pn) (Tison, 1967). The notion of consensus is a restricted type of resolution (Davis and Putnam, 1960; Robinson, 1965). The restriction is that the resolvent (consensus) must be fundamental. A fundamental resolvent that contains a complementary pair of literals is always true (tautology) or false (contradiction) when the resolvent is in CNF or DNF respectively. In resolution, a tautology or contradiction is eventually removed as a resolvent thus justifying the restriction to being fundamental. We shall speak of consensus CS (C , P, x) with respect to a literal x to mean the consensus of C and P with respect to the variable occurring in the literal x. C.  3 Let  S be a set of clauses over a set of variables V. A clause C e S is said to be in canonical form if every variable in V occurs in  3.3 TISON'S METHOD^  46  The relationship between consensus and implicant/implicate is stated in the well-known consensus theorem that is, if P is the consensus of two conjunctive clauses of a DNF formula E, then P is an implicant of E. By duality, if P is the consensus of two disjunctive clauses of a CNF formula E, then P is an  implicate of E. Finally, given a CNF/DNF formula E, the set H of the prime implicates/implicants of E is unique and logically equivalent to E that is, the conjunction/disjunction of the clauses of II is logically equivalent to E.  3.3 Tison's Method Tison's Method (1967), is an elegant algorithm for generating prime implicates from an arbitrary formula. The actual incremental algorithm discussed in section 3.4 will be built based on Tison's Method for the problem of incrementally computing prime implicates.  Definition 3.3.1 (Biform/Monoform) Let E = C1 A ... A C, be a formula. 1. The variable x is a biform variable in E if x E C, and z E Ci for some i, j. 2. The variable x is a monoform variable in E if x E Ci for some i and z CI for all j. 3. A literal is Worm / monoform if its variable is biform monoform. Tison's Method for generating prime implicates exploits the fact that each biform literal will be used exactly once in the algorithm. Note that a consensus operation is equivalent to a resolution step plus fundamental test. Thus Tison's Method is similar to the Davis and Putnam (1960) procedure for computing satisfiability (DPP) and Robinson's (1965) resolution procedure in propositional calculus. In the resolution procedure, the search for the empty resolvent heavily relies on which clauses are selected and in DPP, the resolving (biform) variables play a more important role in selecting the clauses. Tison's Method places the control solely on the set of biform variables, suggesting that Tison's Method is very close to DPP. Given a formula E = Ci A ... A Cn , Tison's Method generates all and only the prime implicates of E. The correctness proof of Tison's Method can be found in (Loui and Bilardi, 1982).  Example 3.3.1 We shall demonstrate Tison's Method with the following example. Let E = {try, t z, LYE , abc,dbE, act} be a set of clauses. .  .  There are four biform literals that is, 1, x, a and c, and executing Tison's method according to this order yields twenty six succesful consensus operations. Nevertheless, the set of prime implicates of E contains only seventeen clauses.  47  3.3 TISON'S METHOD^ Algorithm: Tison's Method  Step 1.0 Initially, let .T be the set { Ci, . • • , C.}. Throughout the computation, .T is the set of implicates of E. At the completion of the computation, .7 is the set of all prime implicates of E. -  Step 2.0 For each biform variable x in Cl A ... A  G do  Step 2.1 For every pair of clauses C 2 ,^E .T, add to .T the consensus CS( C, " x) if it is defined. Step 2.2 Delete from .F every clause Q such that there is another Q' in .T that subsumes Q.  end end  Algorithm 3.1: Tison's Method Biform = t z^=Tax(1) CS (Tta,7 (2) CS (eta, fty)^= Tezy ( 3) CS(Tta,tyx)^="Fayx (4) CS (Eta , tyx)^= cayx  ( 5) CS (7 t a :ft 0^=aTy" -  ( 6) CS (Tta,,T71)^=TaTT Biform = x ( 7) C S (73 x , 777)^= -  ( 8) CS (tYx TXT a) =7TzT a -  ( 9) CS(TxTa,TF 1) =yc a 11 -  --  -  (10) CS (yx T a ,TiT a) = Irc a -  -  Biform = a (11)CS(Tta,TTib)^= tTb (12)CS(7, c Tib) = Tz7 eb ---  -  (13)CS(^a ,TV) = zy7b -  (14) CS(Vx ja,Tdb)^yxTb -  (15)CS(y xT a ,Ta b) =yx jb -  -  (16)CS(Ty a,Teib) = Tfeb -  (17)CS iTa,Trib) = Tt7b (18) CS (Tta,77ib)  3.4 THE INCREMENTAL METHOD^  48  Biform = c  (19) CS (b ac,y 2. c a)^xa --  (20) CS(b ac,Ty7 a) = bzya (21)CS(bac,7a) Wrf a (22) CS(b ac,Tta)^=-7)ta  (23)CS(bac,Tta)^= bta (24)CS(6ac,T7Ta) = T)Tf a (25)CS(bac,T g"Ta) =12 a (26) CS(bac,y xT a) =Tqxa After subsumption, the set of prime implicates of E is  {byx C, bzyc bzxc bTi,Vx7 a, TTea,,TF5a, Eta jyx 14,7x 7 ,bac,Tiib,yzb a, 2' gba,..7)a, 17) -  ,  -  -  7  -  3.4 The Incremental Method In this section, we shall present an extended Tison's Method which generates prime implicates incrementally. Let II be the set of prime implicates of a formula E, C be a new clause and let the set of new implicates PI (II U C}) be stored in the set A. The algorithm is similar to Tison's Method with two differences: first, the algorithm will only perform consensus with respect to the set of biform variables that occur in the input clause C. Second, it will only perform consensus between clauses from A and H but not within the same set A or H. Example 3.4.1 We shall demonstrate the IPIA algorithm using set of clauses from example 3.3.1. Let H = {Try, tyz , txz aTic,■ciV} be the set of existing prime implicates of some formula E, and C = at be the input clause. Initially, the set A contains the input clause C and there are three biform literals in C namely, a, T .  and 1. Step 2.0 selects the first biform literal a and Step 2.1 selects an element S E A which is C and an element P E H which is TibT. The resulting consensus bet is stored in the set A. Pictorially, the execution can be represented by a tree whose root is the clause C, with every arc labelled by a clause in II and every node (except the root) labelled by the consensus of its parent and its associated arc label. Such a tree is called the consensus tree generated from H U { C} and is denoted by CTree(11, C). Figure 3.1 illustrates this representation, the element act is connected to the new consensus 1) 0, with the prime -  implicate Ti b? attached to the arc. Hence the node label is the element from A and the arc label is the element from II.  3.4 THE INCREMENTAL METHOD^  Algorithm: Incremental Prime Implicant/Implicate Algorithm (IPIA) Input: A set of prime implicants H of a formula E and a clause C. Output: The set A U (13. is the set of prime implicants of H U C}. Step 1.0 Initialize A = C} and (I) = H. Delete any D E A that is subsumed by another D' E A U (1) If C is deleted then STOP. Delete any D E (1) that is subsumed by another D' E A U 4); Step 2.0 For each variable x in C that is biform in II U C} do Step 2.1 For each S E A and P E such that CS(S, P, x) is defined do Step 2.1.1 T = CS(S, P, x) Step 2.1.2 A = A U T. end Step 2.2 Delete any D E A that is subsumed by another D' E A U (1) Delete any D E that is subsumed by another D' E A U (I); end end  Algorithm 3.2: IPIA  71 Ttb bct  Figure 3.1: IPIA example 3.4.1: Stage 1  49  50  3.4 THE INCREMENTAL METHOD^  Since there is no more consensus with respect to the biform literal a, the algorithm proceeds by selecting the next biform variable Z. Again, there is exactly one consensus as illustrated in figure 3.2.  Figure 3.2: IPIA example 3.4.1: Stage 2  The next and final iteration calls for consensus on the biform literal t. Notice that there are three elements from A that have consensus with respect to the biform literal t namely, act, b71 and abt. These elements are the nodes in the tree and hence the algorithm extends the tree with their consensus as shown in figure 3.3. —t  acxy a cy z  cxz  txz  b  yz b x z a xy abTz ab""z -  Figure 3.3: IPIA example 3.4.1: Stage 3  Notice that there are no subsumptions among the set A U II, therefore, after the completion of the algorithm A U H is the set of all prime implicates of II U C}. The number of edges is the number of successful consensus operations. Thus, using IPIA on this example produces eleven successful consensus operations, as opposed to Tison's method which required twenty six, most of which were subsumed later. The gain in efficiency for IPIA results from the strategy of avoiding the generation of non-prime implicates.  51  3.5 CORRECTNESS^  3.5 Correctness The biform literals of II U C} that occur in C can be processed by Step 2.0 of the incremental algorithm in any desired order. Thus at Step 2.0, a specific order is selected and the algorithm proceeds according to this order. We shall call such a selected order the C-literal order. Also, given the Cliteral order x i , x2, • • • , r k , a path from a node Si to 8, in the CTree(II, C) is a set of node clauses {Sl, • . , 8,} and arc clauses {P1, , _1} such that S2 = CS ( S1 , P1, ), Sm = CS(Srn-1, Pm-1, )  83 = CS ( S2 , P2, x32 ), • • •/  where 1 < jl < j2 • • < j m < k. Additionally, the execution of Step 2.0 with  respect to the i-th literal in the chosen C-literal order is called stage i (or i-th stage), while A, and 11, denote the sets A and II at the end of stage i. We shall use [C] to denote the set of all biform literals of  II U C} that occur in C. First we prove the following lemmata. Lemma 3.5.1 Let II be a set of prime implicates of a formula E. Any consensus of two clauses in H is subsumed  by a clause in II. Proof : Let P be the consensus of two clauses in H. By theorem 2.2.2, P is an implicate of H and therefore, there exists a prime implicate P' of H that subsumes P. Since H is a set of prime implicates therefore  P'EII.  QED  Lemma 3.5.2 Given a set of prime implicates II = {P1, , Pn} of a formula E and a clause C, the set of prime  implicates of II U {C} can be generated using Tison's Method by considering only the set of biform literals [C]. Proof : Let vi ,^, v m , xl , ..., xk be all the biform literals that occur in H U C} such that each biform literal x, E [C], 1 < i < k and each biform literal vj^[C], 1 < j < m. The key observation is that Tison's Method is correct independent of the ordering in which the biform literals are considered in Step 2.0 (of Tison's Method). Thus if we adopt the ordering v1,^vm, xi,^xk, we may observe that after the biform literals vi, vm have been used by Step 2.0 in Tison's Method, there are no new clauses generated nor old ones deleted. This is simply because any pair of clauses containing biform literal v, considered for consensus so far comes from the set H. Since H is a set of prime implicates, any consensus among them must be subsumed by another prime implicate P E II by lemma 3.5.1. Consequently only the biform literals , xk that occur in C can contribute to generating new prime implicates and subsuming old ones.^  QED  The previous lemma justifies Step 2.0 in the incremental algorithm where only the biform literals [C] can contribute to generating new prime implicates and subsuming old ones. Lemma 3.5.3 Let C = xix2 . . . xk be a clause, II a set of prime implicates of a formula E and A the set of prime  implicates generated by the IPIA algorithm applied on H U {C}. No clause in A contains for any 1 < i < k.  3.6 COMPLEXITY ANALYSIS^  52  Proof : 4  Let D TD' be a clause in A that contains an xi 1 < i < k. From the construction of A, we have II U Cl D. We claim that because xi E D therefore H D. Assuming otherwise, there is a model M II but M D. That is, x7 V D' is false in M and hence x is true in M. Because x, is true in M, M is also a model of II U Cl, hence contradicting H U Cl D 5 . QED ,  -  i  As a consequence of the above lemma, we have the following corollary. Corollary 3.5.1 No two clauses in A can have consensus on any biform literal x E [C].  Theorem 3.5.1 (Correctness) Let H be a set of prime implicates of a formula E and C be a clause. The incremental algorithm generates the set of prime implicates of H U {C}. Proof : The theorem follows from the correctness of Tison's Method plus the fact that in the consensus operations:  (a) (Lemma 3.5.2) It is sufficient to consider only the biform literals [C]. (b) (Lemma 3.5.1) It is not necessary to consider the consensus among clauses in H. (c) (Corollary 3.5.1) It is not necessary to consider the consensus among clauses in A. ^QED  3.6 Complexity Analysis The present section is devoted to issues concerning the complexity of the incremental algorithm. We concentrate on the worst case time complexity only, which is calculated in terms of the number of consensus and subsumptions performed. Again, we assume the input to the algorithm consists of the set of prime implicates H of a formula E and the clause C with [C] = {x1, x2, , xk}. In addition, the cardinality of H is assumed to be MI = n. First we prove the following lemma. Lemma 3.6.1 Each clause P E H is used in at most one stage of the incremental algorithm. 4 The following proof is a "semantic" proof. A lengthy "syntactic" proof that uses the notion of generalized consensus can be found in (Kean and Tsiknis, 1988). 5 Recall that we are in CNF, II U {C} denotes 11 A {C}, C is a clause x l^xk and D is a clause^D'. By duality, the proof can also be modified for DNF (Kean and Tsiknis, 1990).  53  3.6 COMPLEXITY ANALYSIS^  Proof : Let P E II and if P used in more than one stage, it should contain more than one literal complementary to those in [C]. We assume that P = 7 4 • • - 7 2 1 M where 1 < i t < i2 < • • • < ii < k, and M is the monoform of P with respect to C. At each stage m, 1 < m < k, every clause in A contains at least the literals xm , x,,, +1 , • • , xk. P cannot be used at any stage in < it simply because P contains at least T, 1 _ 1 7, / complementary literals with respect to any clause in A. Obviously, P also cannot be used at any stage m > i1 because there is no complementary literal. Evidently, P may only be used at stage nt =  il.  QED  The following theorem estimates the complexity of the algorithm. Theorem 3.6.1 Given a set of prime implicates II of a formula E and a clause C, the incremental algorithm  requires at most 0(( nr .2k ) operations (consensus and subsumptions), where n = III I and k is the cardinality of [C]. Proof : Let II„ 1 < i < k be the set of the clauses from H used at stage i and III, I = n2. First, we calculate the maximum number of consensus operations required. If m u 1 < i < k denotes the maximum number of clauses in A, at the end of stage i, then m1 ni + 1 and mi  = mi.-  ini_i ni = mi_i(ni + 1)  for 2 < i < k. Consequently, at most 0 (ni n2 • nk) new clauses have been generated at the end of k-th stage. Since each clause is generated by one consensus operation, the upper bound O(n i n2 • • • nk) also represents the maximum number of consensus operations required by the algorithm. Furthermore, by assuming that every clause in II is used at some stage, then by lemma 3.6.1 we have ni + n2 + • • • ± nk n or with equal distribution of the number of prime implicates in each n, we obtain n  ni = — for 1 < i < k.  k  As a result, the number of the consensus operations, as well as the number of clauses in A is at most i k ). The number of required subsumption operations can be easily estimated by observing that 0(( L:) every clause in A should be checked for subsumption against every other clause in A that is, 0((;i' )2 k ), as well as against every clause in II that is, 0( n ( ). Consequently, the number of subsumptions  performed is at most  n  n 2kn(k) k) 0 (( — k) +  and if log n > -T ki log k, a relation that is true in most applications, then the overall time complexity of the algorithm is simply 0 (( 711c )2 k ).^ QED The last result shows that the algorithm is exponential in time. Many optimizations are possible but they cannot reduce the complexity class of the algorithm. Note that the incremental problem presented  54  3.7 SUBSUMPTION AND OPTIMIZATION^  here is a restricted case of the general problem of generating prime implicates. In the general case, Chandra and Markowsky (1978) showed that the number of prime implicates of a set of n-arbitrary clauses is 0(3'). Unfortunately, the following example shows that even in this restricted case, the incremental problem is also exponential. More precisely, given a set of prime implicates H of a formula E and a clause C, the number of the prime implicates of II U {C) is potentially exponential on the size of H.  Example 3.6.1 Let C = al • • . ak' U Hi and Hi  faisii, • • • ,aisiml  where all Si] are new pairwise distinct  variables different from any ai, for 1 < i < k, 1 < j < m. Evidently, II is a set of prime implicates since neither consensus nor subsumption occurs between any pair of its clauses. Assume a subset (P of II U {C} such that I. contains C and at most one clause from each H i , 1 < i < k. A chain of successive consensus using all the members of 4 , starting with C will generate a prime implicate of H U {C}. Obviously there are (in + 1)k different subsets (1) of II U C}. Since every clause in II U C} is also a prime implicate, consequently the total number of prime implicates of H U {C} is (m + 1) k + ink which is in the order of C2((lkL) k ) for  3.7  n  ntk = VII I.  Subsumption and Optimization  In section 3.5, theorem 3.5.1 indicates that subsumption is a necessary operation in order to guarantee the correctness of the incremental algorithm. Unfortunately, as shown in the proof of theorem 3.6.1, the complexity of performing subsumptions in the incremental algorithm is quite expensive. Naturally one would question whether there are properties of consensus which can be exploited to avoid generating implicates that are not prime. Once again, we assume the algorithm is applied to II U C} and [C] = {x1, . . . , xk }. Initially, suppose there is a clause P E II such that CS( C, P, x) = C1 and C1 subsumes C for some x E [C]. If x is the first biform literal considered at Step 2.0, C1 becomes the new root of the consensus tree and the stage that corresponds to x terminates immediately. This process, which can be repeated as long as the above condition holds for the new root, is called root optimization. When a stage is reached where no further root optimization can be applied, the incremental algorithm is resumed with the new root as input clause and the remaining biform literals with respect to C. While root optimization is relatively inexpensive ( 0 (n) where n = 1111), it may account for a significant overall saving. More precisely, if C contains k biform literals and 27/ of them have been resolved by root optimizations, where in < k, the complexity of the algorithm is reduced to 0((i' ) 2 ( k- '0).  3.7 SUBSUMPTION AND OPTIMIZATION^  55  According to lemma 3.5.3, corollary 3.5.1 and lemma 3.6.1, at stage i we only need to consider prime implicates from II 2Z = {P E II I PnC= {x1 }}. The others either do not have consensus with any clause in E, or the resulting consensus contain literals complementary to those in [C]. We shall call this the single biform selection in H.  3.7.1 History and Biform Restriction The observation on the history and biform restriction requires some careful explanation. The idea is that since every biform variable is used once in every stage, if a previously used biform variable reoccurs in the result of a consensus operation at a later stage, we claim that such a consensus is subsumed. That is, we can safely ignore a consensus operation that reintroduces a previously used biform variable. To perform this operation, we require a method to keep track of used biform variables. First, we define the history(S) for each clause S E A as follows: Definition 3.7.1 (History) For each clause S E A the history of S (history(S)) is defined as follows:  a) history(C) = 0 b) In Step 2.1.1 of IPIA, if S = CS(S' , P, x,) for some S' E A, P E II and z E [C], then history(S) = history(S') U {xj.  Thus, the history of a clause S contains all the biform literals of C that were involved in the chain of consensus operations that generated S. In addition to the notion of a history, we shall define a variant of it called a restriction. Definition 3.7.2 (Restriction) For each clause S E A the restriction of S (restriction(S)) is defined as follows:  a) restriction(C) = 0 b) In Step 2.1.1, if S = CS(S' , P, x,) for some S' E A, P E II and x, E [C], then set restriction(S) = restriction(S') u {x,} and c) In Step 2.2, if D' is the clause that subsumes D then set restriction(D') = restriction(D) n restriction(D').  Note that history and restriction are defined for the clauses in A that is, the clauses generated by a chain of consensus operations starting at the input clause C. In order to have history and restriction defined for every clause, we set history(P) = 0 and restriction(P) = 0 for every clause P E H. The  3.7 SUBSUMPTION AND OPTIMIZATION ^  56  above settings are intuitively acceptable since elements of II are provided as input to the algorithm, and no consensus operation using the root C are involved in generating them. In our notation, if history(S) = s and restriction(S) = R s, we shall denote the clause S as <1 t ,R s>S . -  Thus, when using the algorithm IPIA, we shall compute the restriction for each clause  generated and update its restriction if subsumption occurs. The restriction of a clause will be used to demonstrate that in any stage of the IPIA algorithm, if a clause S is generated and contains literals which are in restriction(S) (S f1 restriction(S) 0), the clause S is subsumed by another clause 5' that is generated in the same stage and does not intersect with its restriction. This implies that clauses like S can be avoided if the algorithm prohibits consensus operations that introduce literals in the restriction of S. Note that the notion of a restriction is similar to that of a history, the only difference being that in part (c) of the restriction definition, the restriction of a clause is modified whenever it subsumes another.  The use of the intersection operation at this step is justified by the following observation. When a clause <71, s ,R s>,5 subsumes <H T ,R. T>T at Step 2.2 of IPIA, T is deleted because the presence of S ensures  that any implicate generated by T will be subsumed by an implicate generated by S. However, if we prohibit consensus to occur due to the non-empty intersection with its restriction, then we cannot assure the above subsumption property. This is because if Rs and R T are different sets, there may exist a consensus operation allowed by R T but prohibited by Rs.. By updating Rs to become the intersection of the old Rs and RT , such assurance is reinstated. Note that when S subsumes T, the operation of updating the restriction of S implies that the update is performed to a particular clause S. The reason is that there may be many clauses that subsume T but we only choose one such S. We shall define the notion of a proxy to facilitate reference to such a clause.  Definition 3.7.3 (Proxy) For any clause W generated by IPIA, we define a proxy of W as follows: 1. When <Hini ,Rw>W is the clause T generated at Step 2.1.1, the proxy of Kw, ,R,,>W is itself; 2. If^,R. w>W is the clause D deleted at Step 2.2, then the clause <7-t,,,R,,>D 1 E 0 U II in the same step, is the proxy of <n,,,R w>W and because of the subsumption and the intersection of restriction operations, the restriction RD C Rw. ,  3. If A is the proxy of B and B is the proxy of C, then A is the proxy of C. For the same reason, RA C RB C R-c. As a corollary to the definition, every clause in A has a proxy.  Corollary 3.7.1 For any clause S generated by IPIA, there is a proxy of S in A U  3.7 SUBSUMPTION AND OPTIMIZATION ^  57  Lemma 3.7.1 Let A, B E A and P E H be clauses such that the consensus CS(B, P, x) is defined. If A subsumes B then either (i) A subsumes CS(B, P, x) or (ii) CS(A, P, x) subsumes CS(B, P, x). Proof : Let B = xMB and P^Assume that A subsumes B and there is a consensus CS(B, P, x) = MBMP. If x ,% A, since A C B, A C MBMP, therefore (i) holds. If x E A, since A C B, there is a consensus CS(A, P, x) = MA MP such that MA C MB, thus (ii) holds.^ QED The purpose of defining history and restriction is to prove that any clause generated by IPIA, which violates the restriction condition, is not minimal; that is, another clause is also generated which subsumes the first. First, we need the following lemma. Lemma 3.7.2 Let <H (2 ,R (2>Q = GCS(C, Pq, ^,Pq,„, < x qi ,^, xq,„ >) where Pq, E H and 1 < qi < q2 • • • < q m < n. Then at the end of stage q n, of IPIA, there is a clause <7-eT ,RT>T E A such that <HT ,RT>T subsumes <H Q :R Q>Q and RT C^,^, xq,„}. Proof : By induction on the stages in. When m = 0 then Q is the input clause <71c ,R c>C . By the definition of restriction, R. = 0, and <7-e T T>T is either <re c c>C or the proxy of <re c c>C. In either case RT = 0 and the lemma is true. Assume the lemma is true for all stages < 711 and we will prove it for in. We assume that at the end of stage q rn _i, there is a clause T m _ 1 Tm _ i >Trq _i that subsumes = GCS(C, P q„ , < x q„ . . . , x qm _, >) and R. T n, _ 1 c { By the assumption, Q = CS (Q m _i, P qm , x q „) and by lemma 3.7.1, either Tm _i or CS(^Pqni, x q ,n ) subsumes Q. If Tfli _i subsumes Q, the lemma is true because RT,,_, C fx ql , . , x q „,,l. Otherwise, <H Tm ,R T rn >Trn = CS(Tm _i, P qm , x qm ) subsumes Q. The following cases need to be considered. 1. If <H Trrt _ r ,7?^E II, then ‹If Tm ,1Z Tni >Tni^CS(Tm _i, P qm , x qm ) must also be in II. By the definition of restriction, all clauses in P have empty history and restriction, hence the lemma is true. 2. If Tm_i E zX and <H Tm ,R T rn >Tm is generated at stage q, and given RTm R-T„ C { x §,„ . . . , x qm }, and the lemma is true.  =^fxqn,  1, then  3. If <2e Tnc iz Trn >Tn, is deleted, at the end of stage g m, there is a clause <H T ,7z. T>T, the proxy of <h Tm ,R T m >Tm such that <H T ,Te T>T subsumes <7{ T rn Trn >T,, and 7?-7-• C 7?, T, . Therefore <7( T ,R T>T subsumes <re Q Q >Q and RT C , • • , T qm } and the lemma is true. QED -  ,  ^  58  3.7 SUBSUMPTION AND OPTIMIZATION^  Next, we will show that at the end of any stage, any clause generated by IPIA will have empty intersection with its own restriction. Intuitively, this means that the clauses generated and still remaining at the end of each stage do not reintroduce biform literals that are in their restriction. Lemma 3.7.3 For each stage of IPIA, if <N s^E A is a clause such that 'Rs ns 0, then a clause <7iu,7,L>1.1 is also  generated in the same stage such that Ru n U = 0 and U subsumes S.  Proof : By induction on stage i. When i = 0, the only clause in A is <1 1 c ,R- c>C and by the definition of restriction, R,c = 0, therefore ,  -  the lemma is true. Assume the lemma is true for all stages < i and assume that at stage i, a clause S exists such that  <re s ,rz s >S = CS(S3 , P, x2 ) and Rs n S 0 where <7-t .93 ,7Zsi >S3 is a clause generated prior to stage i. We also assume that <ki ,R >Sj is the generalized consensus of <7-t ,7Z c>C and the set of prime implicates 1^.7 s  P = {P i , ... P.7 } denoted by <ti^>Sj =  M GCS(C,^= Tri BIM', • • • ,^ jB 1^1  ,  n , • • • Xri >)  where, for each k,1 < rk < i, Pk resolves on the biform literal x rk at stage rk, Bk C [C] (positive biform literals) and Mj  n [C] = 0 (monoforms). Let Lk = {Xrk , ... , xrj } for each k,1 < k < j, be the positive  biform literals which remain to be resolved at stage rk . Then, by the consensus definition  ^<H  ^si >Sj = x2 . . . x n, U^— Lk) U Mk. k=1^k=1  If the prime implicate P =  7,  BM, then CS (S3 „  1)  is  <n s s >5 = xj+ 1 ' • x nU B U( B k — L OU M U Mk  ^k=1^k  and Hs = 7 1.93 u {xi}, Rs = Rs I U {Tz}. -  We want to prove that if Rs  nS 0  then there is a clause .<7-e u ,R. u>11 generated by IPIA at stage i  that subsumes S and has the property that Run U= 0. Notice that by the inductive hypothesis, since  j < i, Rsj n S3 = 0. Hence Rs n S 0 if Rs n B 0, that is B reintroduces biform literals that are in the restriction of S. ^Let if = Hs, — B = fx ql ,^r qn, 1. Obviously if C {x1 ,^, x 2 _1}, and assume that these literals appear in if in the same order they got resolved in generating <n ,7Z q >S i from C. Let .7^ 1 -  = { P q , . . . , P qm } be the corresponding subset of the prime implicates that were involved in the ,  consensus operations. Note that 2' c P.  ^  3.7 SUBSUMPTION AND OPTIMIZATION ^  59  By theorem 3.5.1 (the correctness of IPIA), lemma 3.6.1 (every clause in H is used exactly once in IPIA), the fact that <N s ,R s>S1 = GCS( C, P1, , P3 ) is defined and {P o , ..., P qn,} C {P1, ..., P3 }, the generalized consensus <H Q ,7Z Q>C2 = GCS(C, P o ,..., P on ) is defined. By lemma 3.7.2, at the end of stage q r,„ there is a clause <re T ,7Z T> T such that < -/-( T ,R. T>T subsumes <H Q  Q >Q  and IZT C  {x ql ,^xqn,}.  Similarly, at the end of stage i — 1, there is a clause ^,7Z I> Ti  which is the proxy of <7-‘^T>T, in which 7Z Ti C {X qi^Xqm } according to the definition of proxy -  (definition 3.7.3). Hence, <-ke Ta,RT,>T'  <HT,TeT> T C  c  -  <H Q ,iz cd>Q  ^  (3.1)  Now we want to prove that Q C (S3 U B). First, let m  and  B qk — {X qk^X qm }) U M <71 Q >Q = xi • xn U B U( ^qk k=1^  (3.2)  k=1  (3.3)  S^>S = X i . X n U (Bk — fX rk ,^Xr JD j Mk k=1 k=1^  U  j  a) Notice that each  B qk  ,1 < k < in in (3.2) is identical to a Bk for some k,1<k<lin (3.3), that is each  qk in 3.2 is equal to some k in 3.3. Therefore, in order to prove rn  ^U  (  B qk^f x qk • • • ' x qn, 1 )^U  k=1^  k=1  (Bk^  {x rk ,^, Tri }) U  B  ^  (3.4)  it is sufficient to prove that for each k,1 < k < (B qk — {X qk , X qk+i ,^Xqm})  c (B qk -  {x qk , x qk  +1, ..., }) U B.^(3.5)  If we assume otherwise, let xz E (B qk — {x qk , x qk}i ,^, x qm }) and ^xz^(B qk  — {x qk , x qk + 1, ..., x3 }) and x,^B,  therefore, xz  E {x qk , x qk + 1, ..., xj } and  xz^{ X  qk  X  qk}l • • • XqM} .  ^  ^  (3 .6) (3.7)  This means that x, is not in Sj , i.e. it was resolved away by some P, and it was not reintroduced by any one of P :+ 1, , Pj . Hence, x, E  11C3  and since x, B, and by the construction of I-1*, x, E if or  simply xx, E^xqm 1.^  (3.8)  3.7 SURSUMPTION AND OPTIMIZATION^  60  But then (3.6) and (3.8) imply that Tz E { x qk , x qk+ „^x qn, } which contradicts (3.7). Therefore (3.4) and (3.5) hold. b) It now remains to show that m  U M C-U Mk  ^  (3.9)  qk k=1^k=1  Since {qi, q2,..., q,„} C {1,2, ..., k}, relation (3.9) holds. Consequently, (3.4) and (3.9) imply that Q C (SJ U B). So, according to (3.1) <HT,^C^T^C 0-e  Q  ,7z (2>Q C  (SI U B).  Since T' is the proxy of T, we have RTI C {X q„...,X qm }  ^  (3.10)  and by the inductive hypothesis, TeT n T' = 0.^ ,  (3.11)  Then at stage z, the operation CS( T', P, x2 ) is defined, because otherwise T' and P must have more than one biform literal which implies (using (3.10)) that S and P have the same property, which contradicts the hypothesis that CS(S3 , P, xi) is defined. Thus, the clause < 7i T IUtvi LIZ T ,u{x,}>T" = CS(T', P, x i ) is generated. In this case, MT U{X })n T" = 0 because 7Z n T' = 0 (from 3.11) and R.T1 C {X qi , ..., X q m } (from 3.10). Since T' C (S3 U B), the consensus T" subsumes 5, therefore T" is the clause U we sought. j  -  ,  i  QED  As a consequence of the above lemma, we have the following corollary. Corollary 3.7.2 At the end of each stage of IPIA, for any clause <n ,ns>S E A, 1Zs n S = 0. -  Also, note that only the proxy's restriction needs to be updated, even though there may be many other clauses that subsume the clause. As a direct consequence of the lemma, when consensus operations are performed with a clause S E A, only the clauses P in H for which P n restrzction(S)= 0 need to be considered; the rest introduce literals in restriction(S). The following example shows that the restriction strategy saves considerable work by not generating implicates that are to be subsumed later. Example 3.7.1 Let C = xix2x3x4 and II =^x2ac, x3b 1 , x3b2, x3b3,  x4 x1 a  <> Xi X2 X3 X4  <1•4 > 8.x2 x3 a  T.1 x4 a <xl > x2 x3 x4 a  X3 b3  •  x2 x1x3x4ac  T2ac  < X3 > x1x2x4ab1^<x3> Xi X2 X4 a b2  '^• •  xq x1  a^El x, a  subsumes •  <x3 x4 > xix2abi  < x2 > x3 x4 a c new-^—► < X2 > X3 x4 a c  < xi x3 > x2 x4 a bi 0  <  X3>  x2x4 a b2  < X1X3>  x2x4 a b 3  TA a El xi a • Txi a^Ti xi a  X3 b3  <x2x4> x 3 ac <x2x3> x4acb,  <x2 X3> X4 a c b 2  a <x2x3x4> acbi  < x2x3 > x4 a cb 3  X X X  T.;x1 a  0  <x2x3x4> ac  < x2 x3 x4 > a cb 3 2  Figure 3.4: CTree for Example 3.7.1: Restriction Optimization  < X3 X4 01x2  < X3 > x1 x2 x4 a b 3  Ti x1 a 0 a b2 < x3x4 > x, T2 a b3  3.7 SUBSUMPTION AND OPTIMIZATION^  62  Figure 3.4 shows the CTree of II U Cl. The set of biform literals is [C] = {xi, x2, x3, x4} and the algorithm is executed according to that ordering. Initially, there is exactly one consensus between the root and the prime implicate T x4 a on the first biform literal At stage 2, A = {<> x l x2 r3 x4, < xl > .  Z`3 T4 a} and the only prime implicate that has the negative biform r2" is 7.2 a c. The consensus between ,  the root and the prime implicate is CS(<> xi x2 x3 x4 ac, x2) <  T2  -  > xlx3x4 ac and the other consensus  CS(< x1 > 1•2 r3x4a, xYac, x2) -,---< x1x2 > xg x4ac. The latter consensus subsumes the first and hence the restriction is updated to become < x2 > zi x4 ac, indicated in figure 3.4 by the labels old and new. After —  stage 3, the prime implicate x4 xi a reintroduces the already resolved biform literal x 1 . According to the restriction condition, four of the nodes (denoted by the dotted lines and crossed nodes in the figure) are prohibited from consensus operations because x1 is in their restriction. In fact, these prohibited consensus are repeated on the right branch of the tree. If we did not prohibit these four nodes from consensus, there would be duplicated consensus and if there were more elements in [C], and hence consensus after stage x4, the wasteful duplication could be enormous.  3.7.2 Parent and Children Subsumptions The observation of parent and children subsumptions in a CTree (II, C) is more conspicuous. Let  S' = CS (S , P, x i ) be a node in the CTree(II, C) generated at stage i from some P E II and S E A. If S' subsumes S then S' subsumes all the children of S that are generated at stage i. Similarly, if S' subsumes P then S' subsumes all the consensus resulting from any clause in A and P. Consequently, early elimination of subsumed parent nodes and arc clauses is a great advantage. Thus, for each node  S E A, the algorithm removes subsumed clauses as described above and performs subsumption on the children of S if they exist. We shall call this the local subsumption check operation. Algorithm 3.7.2 is the Optimized IPIA with all the mentioned optimizations. Additionally, there is the trivial observation that if subsumption is performed at the end of each stage, no subsumption occurred between stages. This is reflected in Step 3.3 of the Optimized IPIA and is formally stated in lemma 3.7.4.  Lemma 3.7.4 Whenever control reaches the end of Step 3.3 of the Optimized IPIA algorithm, no subsumption  relation exists between any two clauses in A_Children U A.  Proof : We assume that at Step 2.0, [C] = xl x2 . . . xk and we will prove the lemma by induction on stage  i, 1 < i < k. For i = 1, all the clauses in A_Children come from the same parent (the root), therefore Step 3.2.3 insures that there are no subsumptions among them and the root.  3.7 SUBSUMPTION AND OPTIMIZATION^  63  Algorithm: Optimized IPIA Input: A set of prime implicates II of a formula E and a clause C. Output: The set A U H is the set of prime implicates of H U C}. Step 0.0 Delete any DE H U { C} that is subsumed by another D' E H U { C}. If C is deleted, STOP. Step 1.0 (Root optimization) For each P E II do Step 1.1 If CS( C, P, x) = C' for some x E [C] and C' subsumes C then set C = C' and delete any P E H that is subsumed by C. end Step 2.0 Set A = Cl. Step 3.0 For each biform literal x E [C] do Step 3.1 Set A_Children = 0 and^= { P E H ITD n C {x}} Step 3.2 For each clause S in A do Step 3.2.1 If restriction(S) n P = 0 and CS (S , P, x) = S' for some P E lh and 5' subsumes S then delete S from A, restriction(S') = restriction(S) and set S_Children = {S'} else set S_Children = {CS (S , P, x)^P E 11., and restriction(S) n P = 0) and restriction(S") = restriction(S) U {x} VS" E S_Children. end Step 3.2.2 (local subsumption) Delete any D E II U S_Children that is subsumed by another D' E II U S_Children. Step 3.2.3 Add S_Children to A_Children. end Step 3.3 Check subsumption among the clauses in A_ Children. If a clause D is subsumed by D' then delete D and set restriction(D') = restriction(D') n restriction(D). Step 3.4 Add the remaining A_Children to A. end end  Algorithm 3.3: Optimized IPIA  3.7 SUBSLIMPTION AND OPTIMIZATION^  64  Assume the lemma is true for any stage < i. Suppose at the end of Step 3.3 of the i-th stage there exist two clauses Si and S2  S2 in  A_Children U A such that either Si subsumes  S2 or S2 subsumes  Si. Si and  cannot both be in A since this contradicts the inductive hypothesis. Furthermore, Step 3.3 insures  that Si and  S2 cannot  both be in A_ Children.  Assume, without loss of generality, that Si E A_Children and S2 E A. In this case, 52 = riTi+1 ... xk M2 and there exist SI E A and P E II such that Si = xi xi+i . xk Ml , P = Ti FM3 and Si = CS(,57, P, xi) i.e., Sl =  Xi+2 • • • XkM1M3;  where, F  c {xid- 1, • • • , xk}  and Mj n  {xi, • • ., xk} =  0 for j = 1, 2, 3.  Note that at the end of Step 3.3 of stage i any clause in A contains at least x, x,+1 . . . xk. Consequently, S2 can  not subsume Si since x, E S2 but x, cl Si . On the other hand, if Si subsumes S2 then  which implies that M 1 C M2 and SI subsumes the inductive hypothesis; otherwise,  S2 is  S2.  Mi M3 C M2 , .  If SI and S2 are different clauses, then this contradicts  eliminated at Step 3.2.1. QED  Theorem 3.7.1 (Correctness of the Optimized IPIA) Given a set of prime implicates H of a formula E and  a clause C, after the completion of the Optimized IPIA, the set A U II contains all and only the prime implicates of II U {C}.  Proof : Theorem 3.7.1 is a consequence of theorem 3.5.1 and the results that have been presented in this QED  section.^  3.7.3 Other Optimizations? The complexity of the optimized algorithm is 0  )2 )  where n = 11 11 and k is the number of the biform -  literals of C that survive the root optimization. Obviously, it is still in the same complexity class as its predecessor IPIA but it is expected to have an improvement on performance over IPIA. The explosion in complexity comes from the fact that at each stage, the same clause in H is used with many clauses in A to generate consensus which may get deleted later at Step 3.3. We shall discuss some heuristics that fail to achieve further optimization correctly. First, note that in restriction optimization, the process of updating each consensus restriction by the intersection operation during subsumption seems peculiar. As explained earlier, it is a necessary operation. One question is that what happens if we ignore the intersection operation and instead, use the history as the guide for detecting the reintroduction of biform literals? This approach was introduced in (Kean and Tsiknis, 1990) and it has been observed that it can produce an incomplete set of prime  3.7 SUBSUMPTION AND OPTIMIZATION^  65  implicates 6 . For example, let PI (.T) = {xy, Ty} and the input clause C = {iy- }. The CTree is shown in figure 3.5 where the history of a clause is displayed on the left of the clause, enclosed in "< >".  < - >y  Yy  missing  6 Figure 3.5: de Kleer's Example Starting from the root with an empty history, we first resolve on the biform literal x with the prime implicate xy to yield < > V. At this point, it subsumes its parent and therefore the right branch (denoted by a dotted line) is not present. At the next stage, using the history restriction the other prime implicate Ey is prohibited from resolving with < > y on the biform literal y because Ty contains T which is in the history of < > y. Since there are no other possible consensus, the history restriction produces an incomplete set of prime implicates of PI (.F U { C}), missing 7. -  .  Second, at Step 3.3 of Optimized IPIA, there is an observation that clauses in A_Children cannot subsume each other if they are derived from different parents using different prime implicates. This approach was also used in (Kean and Tsiknis, 1990). Intuitively, at any stage let Si and S2 be clauses in Children that have been generated by two different clauses CS(Si , Pi, x2 ) and CS(S P2, xi) respectively. If Si subsumes S2, we would like to claim that T = CS Pi, x ) subsumes 82. Pictorially, we are bringing Pi over to the subtree under the node SZ and the consensus T will subsume S2 at Step 3.2.2 of local subsumption check. Thus, any subsumption in .6—Children can only occur between clauses derived using the same prime implicate, in this example between S i and T both derived using prime implicate Pi. l  i  6 This observation was first reported to us by Peter Jackson (personal communication, 1990) and later by Johan de Kleer (personal communication, 1991).  3.7 SUBSUMPTION AND OPTIMIZATION  ^  66  Unfortunately, if T = S2, at Step 3.22 there is no provision to tell the local subsumption check which one to keep. It may be the case that T is deleted, but then Si still subsumes S2 and they are derived from different prime implicates. For example, let II = fro a yi , To yo yi , xl Yo yi , Tam)} and C {x0 xl }. Figure -  3.6 shows the CTree of this example. Xo  T = ayo yi  equal  S2 = ayo yl  S i = Yo Yi  subsumes ....... • - -•  Figure 3.6: CTree(II, C)for Local Optimization It would be of great advantage if there were a way to detect in advance which consensus are bound to be deleted. Alas, such a test will inevitably have the same complexity as the generation of the consensus and subsumption check. First, consider some clauses S E A, Pl, P2 E II. We would like to claim that "if P i /[C] C P2/[C] then CS(S, Pl , x) C CS(S, P2, X) for any x E [C]." This would allow us to ignore such P2 from the beginning. Unfortunately, this claim is true only when restriction(S) n Pl = 0 and restriction(S)  n P2 = 0. But checking such a constraint diminishes the value of the claim, that is, clauses  3.8 CONCLUSIONS^  67  like P2 cannot be ignored without considering S. As an example, consider H = -Ma,T-21),x1T3c,T3ac} and C =xl x2x3. Secondly, consider two clauses Si and 82 in A at stage i such that Si = xi xi+1 . • . xk Ml , 52 X i X i +i Xk M2 and both have consensus with the clause P = T i FM3, where F, M1, M2/ M3 are as in the proof of lemma 3.7.4. In this case CS(Si , P, x 2 ) subsumes CS(S2, P, x 2 ) iff Mi M3 C M2 M3. Since M1 M2 and M2 Mi the subsumption relation among the two consensus cannot be detected by considering Si and S2 alone. The reader can examine the example of II = {a xy,Tip,Tx,Tpq} and C = acd with any -  possible C-literal ordering.  3.8 Conclusions We have presented an incremental algorithm for generating the prime implicates of a set of clauses. The correctness proof of this algorithm is provided and its complexity is analyzed. Although the incremental algorithm can be used to generate the prime implicates of a given set of clauses by incrementally considering one clause at a time, nevertheless it is best suited for situations where new clauses are frequently added over the period in consideration. Moreover, this algorithm, in contrast with algorithms for minimization in the Boolean functions domain, does not rely on a canonical form representation of the clauses. This latter feature makes it attractive for application in the CMS. Subsequently, some optimizations were discussed for the IPIA algorithm and the optimized IPIA was presented. Unfortunately, the worst case complexity of the new algorithm is identical to the old ones, while it is expected to have an improvement on performance over IPIA. This result was expected mainly because the problem of generating prime implicates is itself intractable. Nevertheless, there is continuing effort on improving IPIA for practical implementation (de Kleer, 1992). In de Kleer's approach, the effort is concentrated on performing fast subsumption and the experimental results showed a dramatic improvement in running time. There are many other possible applications for the incremental algorithm, for instance, incremental theorem proving, generalized diagnostic reasoning (or hypothesis generation) and a general system for nonmono tonic reasoning.  Chapter 4  Assumption-based Clause Management Systems This chapter extends the study of clause management by providing a specification for assumptionbased abduction using the material developed in the previous chapters. This study was motivated by Reiter and de Kleer's preliminary report on the foundation of truth maintenance systems. The concept of assumption-based abduction is formulated in a framework of assumption-based reasoning. An assumption-based theory is defined, and the notions of explanation and direct consequence are presented as forms of plausible conclusion with respect to this theory. Additionally, the concept of extension and irrefutable sentences are discussed together with other variations of explanation and direct consequence. On the issue of performance, a set of algorithms for computing these conclusions for an assumption-based theory are presented. We use the notion of prime implicates in an extended CMS called an Assumption-based Clause Management System (ACMS) 1 .  4.1 Introduction The idea that reasoning involves many implicit assumptions can be traced back to the work of Bolzano's logic of variations (Berg, 1962). In Bolzano's argument,  Every proposition is either true or false and that permanently so. In some cases, however, the same proposition would seem to be at times true and at times false. The reason for this, according to Bolzano, is that in the original proposition some component, which may not be stated explicitly in 1  This chapter is based on (Kean and Tsilcrtis, 1992b).  68  4.1 INTRODUCTION^  69  the corresponding linguistic expression, has been changed. Bolzano's Logic 1873 (trans. by Jan Berg (1962, p 92)] For instance, the sentence, "grass is green", is true under an implicit assumption that it is summer, but is false under the assumption that it is winter. With the advent of computational machinery, the aspiration of mechanizing reasoning has put the focus on the understanding and management of these implicit assumptions. The first step to this mechanization is to decide which implicit assumptions to make explicit, and the second step is to devise methods to manage these explicit assumptions. In this chapter, we shall be concerned with the latter in the form of the CMS framework. The management of assumptions is important because we want to be able to identify the assumptions that affect a conclusion, and alter the conclusion as the assumptions are changed. This ability is a desirable quality, evident in human reasoning. In the CMS framework, the management of the dependency between assumptions and conclusion is supported by an extended CMS called an Assumption-based Clause Management System (ACMS). An ACMS, performs what is traditionally known as truth maintenance (Doyle, 1979; de Kleer, 1986a) and more recently as reason maintenance (McDermott, 1989). The motivation for creating such a system is to augment a Problem-Solver, or in our KMS architecture a deductive engine, with utilities for managing activities concerning its non-monotonic state of beliefs represented by assumptions. In the deductive engine's knowledge base, the addition of new information might nullify the validity of some conclusion but justify new ones. The nature of the problem demands that the ACMS keep track of the relationship between the conclusion and the arguments that justify it. If some of these arguments are no longer sound due to the addition of knowledge, the conclusion should be dropped. This is opposed to the orthodox usage of mathematical logic, where a false premise which entails all statements is a valid argument. In the concept of assumption-based reasoning, unsound arguments can be separated and the remaining sound arguments can be used to continue the business of reasoning. Hitherto, much effort has been invested in designing and implementing the concept of truth maintenance or reason maintenance, and little effort has been dedicated to the formalization that is essential to its understanding. To this end, Reiter and de Kleer (1987) made a first attempt in their preliminary report on the foundation of truth maintenance systems. This chapter, motivated by Reiter and de Kleer's preliminary report, extends the study of the principle of truth maintenance under the general title of  assumption-based reasoning. ATMS (de Kleer, 1986a), an assumption-based truth maintenance system, was built based on some informal notions and many clever intuitions to improve efficiency. The end result was a highly customized and complex program, but it is difficult to analyze whether the tradeoff of expressive power for efficiency is justifiable. More specifically, ATMS started with a restricted type of Horn clauses and  4.1 INTRODUCTION^  70  later, realizing the need for more general expressive power, it was extended with more complicated heuristics (de Kleer, 1986b). de Kleer (1986b, p 196) admits that the choice of which heuristic to use to increase efficiency for a particular Problem-Solver is an art. This is not to argue that specialized ACMS should not be built. On the contrary, specialized ACMS can be derived from the general system if required. This has the additional advantage that the performance and correctness of the derived system can be measured with respect to the general system. The essential difference between the ACMS and the ATMS is that the ACMS is specification oriented, with emphasis on the correctness of methods of computation for its functionalities. As it is derived from the CMS, it also functions independently from domain specific knowledge and is adaptable to a wide spectrum of Problem-Solvers, including a deductive engine in our proposed KMS architecture. A fundamental function of ACMS is to manage the dependencies between hypotheses and conclusions. To give a formal account of dependency, consider a propositional logic with some facts F and a sentence G. Suppose there exists some sentence E (constrained to satisfy some conditions) such that .TUE  k G.  E is said to imply G with respect to F and the relation TUEkG is the dependency. Most often the constraint on E is that it is consistent with F. The alert reader will notice that the sentence E in the dependency is the explanation defined in definition 1.1.1 and the negation of a support (definition 2.3.1) defined in chapter 2. In fact, this is the functionality we called abductive inference in clause management. Most systems that have used the notion of dependency between the conclusion and its justification have used the above definition directly, or indirectly through some procedural interpretation. The RESIDUE system (Finger and Genesereth, 1985), used the above definition directly and called E the residue. In the THEORIST system for theory formation, the same definition was used and the tuple (. T , E) was called an explanation for G (Poole et al., 1986). Another such example can be found in Cox and Pietrzykowski's (1986) definition of causes. In a less obvious manner, Martin and Shapiro (1988) presented a formal system of belief revision using the notion of relevance logic. They also incorporated the above definition in their notion of origin-set for a supported well formed formula. In the two most influential implementations of truth maintenance systems, Doyle (1979) used the above definition for justification implicitly in his data structure; while in de Kleer's ATMS (1986a), the notion of a label in a node is similar to the justification of a Horn formula restricted to assumptions, as indicated by Reiter and de Kleer (1987). A crucial issue in assumption-based clause management is how to encode the knowledge base such that the dependencies and justifications can be easily inferred. Another issue is how to update the existing dependencies efficiently when a new piece of knowledge is added. As discussed in chapter  4.2 ASSUMPTION-BASED REASONING ^  71  1, section 1.2.3, with proper encoding of assumptions the CMS performs these functions. We shall call this type of reasoning the ACMS performs assumption-based reasoning 2 .  4.2 Assumption-Based Reasoning Assumption-based reasoning is a form of reasoning in which the conclusions are affected by assumptions. Historically, Tarski's classical notion of consequence has prevailed over most modern logical systems. The notion of assumption-based reasoning was made popular in the AI community in the eighties but it has been in existence since the work of Bolzano in 1873 (Berg, 1962, p 92). In Bolzano's logic of variation, a conclusion for an argument is always subject to some assumptions. When these assumptions change, so does the argument for the conclusion. Explicating the semantic difference between the notions of consequence of Bolzano and Tarski, is beyond the scope of this thesis 3 . The purpose of this section is to provide a propositional theory of assumption-based reasoning in Bolzano's sense (at least in the same spirit as his motivation) but not to deviate from the Tarskian semantics by creating a new logic. The eventual goal of course, is to to define the functionality of the ACMS and provide a computational framework for assumption-based reasoning.  4.2.1 Definitions The knowledge base of a task domain is represented by a set of sentences which are known to be true, the facts (F); and a set of sentences called the assumptions (A) which represent all the possible hypotheses a deductive engine assumes. An assumption-based theory (a-theory) is a tuple T A) where both F and A are well formed sentences of G. The distinction between facts and assumptions is in the way they are used by the conclusion sanctioning process. From here on, our definitions implicitly refer to an a-theory T = (Y. , A) unless stated otherwise.  4.2.2 Varieties of Reasoning Traditionally, logical reasoning in problem solving is closely related to a logical deduction process that associates the conclusions with their premises by means of sound deductive rules. As the task of problem solving became more sophisticated, another type of reasoning known as abduction emerged. We shall 2 111 (Ramsay, 1988), assumption-based reasoning is used to categorize a wide range of non-monotonic reasoning including default reasoning, commonsense reasoning etc. However, the name is used in this thesis in the context of reasoning with assumptions and to categorize the activity of truth maintenance.  3 See  (van Benthem, 1985).  4.2 ASSUMPTION-BASED REASONING^  72  introduce a framework for a variety of abductive and deductive reasoning which, when coupled with the notion of assumptions, will form the basis of our proposed assumption-based reasoning. Let the facts .7 be a set of sentences, Ant and Conseq be two sentences, and R. a property over -  sentences. We can classify one variety of abductive and deductive reasoning as follows: Constrained Abduction^Constrained Deduction (la) R(Ant),  (2a) R( Conseq),  (lb) F Ant^Conseq,  (2b)  (1c)^—,Ant;  (2c) .T^Conseq.  Ant^Conseq,  In (1), if the query is Conseq and the answer is Ant, we immediately have a notion of abduction (cf. definition 1.1.1). More precisely, Ant is a consistent hypothesis that sanctions the consequence Conseq. The property R(Ant) is a constraint on the sentence Ant in the abduction. In some cases R(Ant) is taken to be the relation C Ant where C is a given theory. In the following subsection, we shall explore a variant of abduction by defining R. to be the subset relation between Ant and a set of assumptions A. Conversely, in (2) if Ant is the query and Conseq is the answer, we have a special notion of deductive  consequence. According to this, the answer Conseq cannot be concluded from the facts F alone but it is a logical consequence of the facts if augmented with Ant. Again, the property R. will play the role of a constraint on Conseq. In a later subsection (4.2.5), we shall present a refinement to this notion of deductive consequence, by defining /Z. to be the subset relation between Conseq and a set of assumptions.  4.2.3 Assumption-based Explanations Finding a consistent hypothesis (or explanation) that sanctions a conclusion is a type of reasoning process that is inevitable in many application domains including diagnostic reasoning. We shall first introduce the notions of assumption-based explanation, explainability, agreeability, irrefutability and logical extension. The search for an assumption-based explanation for a sentence G is a search for a consistent subset of assumptions that together with F imply G. We shall call this assumption-based  abductive reasoning. Definition 4.2.1 (Assumption-based Explanation) Let 7 = (.F, A) be an a-theory and the query G be a  sentence. A set of sentences E is an assumption-based explanation of G from 7 if 1. R(E) E C A,  4.2 ASSUMPTION-BASED REASONING^ 2.  UE  73  kG^and  3.F u E is consistent. A sentence G is explainable from T if there exists an explanation of G from T. A sentence G is agreeable with respect to 7 if G is explainable from T but its negation is not. 4 From here on, we shall drop the adjective "assumption-based" and assume explanations and the rest are assumption-based as defined in definition 4.2.1. Generally, a sentence G can have infinitely many explanations if A is infinite. If E is an explanation of G, any consistent superset of E is also an explanation of G. Consequently some minimality restrictions on explanations are required. In addition, it is desirable to distinguish some explanations which trivially entail G independent of the facts F. For instance, for any set of facts if G = mirror_reflects_light and A = mirror_reflects_light }, obviously mirror_reflects_light is a legitimate explanation for G with respect to F, as long as it is consistent with T. Such an explanation is apparently trivial and it is discarded from consideration in many application domains such as the analysis of questions and answers in natural language (Hamblin, 1976, p 258). Nevertheless, the acceptability of an explanation based on semantics is not the concern of our theory. We shall therefore introduce the notions of minimality, triviality, and primeness for explanations.  Definition 4.2.2 (Assumption based Minimal, Minimal Trivial, and Prime Explanations) -  Let T = (F, A) be an a-theory, the query G be a sentence and a set of sentences E c A be an explanation of G with respect to T. 1. E is a minimal explanation of G if there is no other explanation E' of G such that E' subsumes E. 2. E is a trivial explanation of G if E G otherwise E is non-trivial. E is a minimal trivial explanation of G if E is both a minimal and trivial explanation of G. 3. E is a prime explanation of G if it is minimal and non-trivial. The following terms ME(G,T), MTE(G, T) and PE(G, 7) are used to denote the sets of minimal, minimal trivial and prime explanations respectively of a sentence G from an a-theory. It follows trivially from the definitions that the property ME(G, T) PE(G,T)u MTE(G, T) holds. Note that assuming consistent .7., these minimalities also have the following properties: 1. If U G is inconsistent, then ME(G,7) = 0. This is obvious since .1 ^G therefore .T UEK G for any E. -  4 The  terminology used to classify the type of sentences by their explainability is borrowed from McDermott and Doyle (1980).  ^ 4.2 ASSUMPTION-BASED REASONING 74 2. If G is tautologous, PE(G,T)= 0 and MTE(G,T) = {■} because of triviality 3. If G is not tautologous and J ^G, then PE(G,T)= {■} and MTE(G,T)= 0 because ■ G. So far, the only constraint defined by the property R, in definition 4.2.1, is the subset relation. Different facets of explanations can also be defined by strengthening R. For instance, one useful constraint is to restrict the explanation E to be the negation of an assumption from the set A that is,  E C iny (A). The obvious application of such a constraint is in the process of diagnosis. If battery_is_ok is our assumption in A, then battery_is_ok can be a possible explanation (restricted by E C zny (A)) for the observation G = ignition_fails, with respect to the knowledge base. This explanation will lead us to the diagnosis that the battery is not functioning properly. A second possibly useful constraining property is to define a conditional explanation as E = Ant A  Assump, where Assump is a subset of assumptions and Ant are non-assumptions. The fact that Ant A Assump —f G means that the query G is justified by Ant through the assumptions Assump. An interesting example of using conditional explanation for diagnosis is shown in chapter 7.4. These variants of explanations can be defined by extending R, and we shall reserve this study for future work.  4.2.4 Extensions Another type of assumption-based reasoning is the reasoning of irrefutability. It relies on the concept of an extension of an a-theory which is introduced by the following definition s .  Definition 4.2.3 (Assumption based Extension) Let T = (.T, A) be an a-theory and for any set of sentences S, define F(S) to be a minimal set satisfying the following properties. -  1. T C F(S) 2. Th(F(S)) = F(S) 3. For any formula a E A, if F(S) U {a} is consistent then a e F(S). Thus, a set of sentences E is an extension of 'T if r(e)  = S.  The above definition of an extension is the standard fix-point definition of an extension. A similar usage can also be found in Reiter's default logic (1980). The difference is that in an a-theory assumptions are 5 The notion of an extension is similar to those found in default reasoning. The relation between extension and default reasoning for THEORIST can be found in (Poole, 1988a). Nevertheless, our characterization of extensions in a propositional theory is aimed at exploring the methods of computing them.  75  4.2 ASSUMPTION-BASED REASONING ^  logical sentences rather than default rules. In Reiter's default logic, a default rule cannot be encoded as an implication since the contra-positive of an implication has no corresponding semantics in the default rule. The next theorem characterizes an extension in a more constructive way following the spirit of Davis (1980), and is a variant of Reiter's theorem on default logic extension (1980). In this case the set of defaults is replaced by a set of propositional sentences. Theorem 4.2.1 Let 'T = (F, A) be an a-theory with an enumerable set of assumptions A and cb = be some enumeration of A. Define 4 = F and for each i, i > 0  u —  al, az, • •  eio U{ ai +1 } is consistent otherwise.  Then E is an extension of 'T if there exists an enumeration of A such that E = Th(E, ). 0  QED  Proof : Trivial.^  It follows from the above theorem that an extension is completely determined by the set of assumptions it contains as stated by the following corollary. Corollary 4.2.1 The set E is an extension of an a-theory (1', A) iff there is a maximal subset D of A such that U D is consistent and = Th(F U D).  The above corollary implies that for any a-theory T = , A): 1. If .T is consistent, T has at least one consistent extension;  2. if F is inconsistent, the only extension of T is the whole language £; 3. T has as many extensions as the number of maximal consistent subsets of A with respect to .T; and  4. any subset of A that is consistent with F is in some extension of T. As indicated, any extension of T is generated by some maximal subset of A that is consistent with T. Moreover, each of these subsets generates a single extension of T. For this reason, any subset of A that is maximal and consistent with .7 is called an extension generating subset or simply a generating subset of T. For example, let .T = { c} and A = { a, g, The generating subsets of J are {a, g} and { a, g }. Thus, with the notions of extension and explanation, a useful question is to ask whether a sentence is -  .  4.2 ASSUMPTION-BASED REASONING^  76  in some known extension. The following lemma establishes the connection between explanation and extension'. Lemma 4.2.1 Let E be an extension of 7 = , A) generated by a generating subset D C A and G be a sentence. G is in iff there is a minimal explanation E of G such that E C D.  Proof : Assume that E is an explanation of G, and D is a maximal consistent subset of A such that E C D. Since TuEk G, G E Th(F U D) and G is in the extension E generated by D. Conversely, if G E E,G E Th(F U D) or simply TUD G. Since .TU D is consistent (corollary 4.2.1) by the definition of explanation (definition 4.2.1), D is an explanation of G. By the definition of minimality, there exists an E C D such that E is a minimal explanation of G. QED  =  As a consequence of the above lemma, we see the relationship between explainability and being in an extension as expressed by the following corollary 7 . Corollary 4.2.2 A formula G is explainable from T iff G is in some extension of 'T Conversely, given an extension E, the task of determining whether a sentence is not in this extension can also be formulated as shown by the following lemma. Lemma 4.2.2 Let E be an extension of T = (.T, A) generated by a D C A and G be a sentence explainable from T. The sentence G is not in E iff for every explanation E of G from T, the set F U E U D is inconsistent 8 .  Proof : The proof follows from lemma 4.2.1 as follows: for any explanation E C A, E U D is a set of assumptions consistent with F if E C D simply because D is a maximal subset of assumptions consistent with . QED Finally, an irrefutable sentence is naturally defined to be a sentence that is in all extensions of T . Equally important, an irrefutable sentence G implies that for every extension, there is a consistent explanation of G with respect to T 9 . Definition 4.2.4 (Assumption based Irrefutability) Given an a-theory T =^, A) and a sentence G, the sentence G is irrefutable in T if G is in every extension of T -  6 Cf.  (Poole, 1988a).  7 Cf.  (Poole, 1988a).  8 i.e.  E u D is an inconsistent subset of assumptions.  This is called membership in all extensions (Poole, 1989, p 99).  77  4.2 ASSUMPTION-BASED REASONING ^  -  Clearly, a formula G is irrefutable in 7" if for any extension E of 7 generated by some D, there is a minimal explanation E of G such that E C D. This implies that examining irrefutability using definition 4.2.4 would require generating all the extensions of T. An alternative characterization of an irrefutable sentence which does not require explicit reference to the extensions of 7" is given by the following theorem .  °  Theorem 4.2.2 (Irrefutable) Let G be a sentence explainable from T = ^A) such that the set of its minimal explanations from T is finite, that is ME(G,T) = {E1,E2, ^,Ek}. The sentence G is in every extension of T iff --E l A ... A  --  Ek  is not explainable from T.  Proof : If: Assume there exists an extension of 7" generated by D, the sentence G is not in S and  -,E1 A ...A -lEk is not explainable from 7". By lemma 4.2.2, .TU E, U D is inconsistent for each i, 1 < i < k. Since U D is consistent by corollary 4.2.1 and by propositional reasoning .7 U D^-E1 for each i, 1 < i < k, thus, .T U D - E1 A ... A -'Ek or simply^D -÷ -E1 A ... A -'Ek. Consequently, D is an explanation of -E1 A ... A -'Ek from T which contradicts the assumption that it is not explainable from  -  ,  T.  ,  Only if: Assume that G is in every extension and^A ... A LEI, is explainable from T. Since -  - E1 A ...A -'Ek is explainable from 7", there exists an explanation E C D and an extension E generated by D such that .T U D - E1 A ... A -'Ek by lemma 4.2.1. Hence by propositional reasoning, for every i, 1 < i < k, U E, U D is inconsistent. Consequently by lemma 4.2.2, G is not in S contradicting the assumption that G is in every extension. QED ,  The concept of a logical extension generated by a set of assumptions has many interesting aspects. For instance, the consistency of a subset of assumptions can be determined by comparing it to the collection of extensions. In short, the characterization of assumption-based abduction and extension presented here gives more expressive power to reasoning systems. Even more interesting is that the computations for these features will be defined using the homogeneous representation of the ACMS.  4.2.5 Direct Consequences In AI reasoning, most often the type of consequence we desire is precisely the consequence that is most "relevant" to the query. We can view this as a kind of logical focus of attention. For instance, given some facts F and a query G, it is desirable to know whether a sentence C is a consequence of F U G but is not a consequence of .T alone. In the presence of assumptions, this notion of consequence can be 10 Variations of this theorem are also used in default reasoning (Poole, 1989) and circumscriptive theorem provers (Ginsberg, 1988).  78  4.2 ASSUMPTION-BASED REASONING^  viewed as an inquiry into which assumptions follow from the fact G with respect to F. We shall call this assumption-based deductive reasoning.  Definition 4.2.5 (Assumption based Direct Consequence) Let T =^, A) be an a theory and G be a sentence. The disjunction of a set of sentences C is a direct consequence of G with respect to T if -  -  1. R(C) dg CC AU inv (A), 2. TuGCand 3. .T^C. In this subsection, a direct consequence, denoted by a finite set of sentences, is a disjunction of sentences. The restriction imposed on direct consequence is different from the restriction on explanations for the following reasons. First, recall that an assumption is a statement that one postulates and is defeasible. For when we say C c A, and C is a direct consequence of G, we mean that we have discovered that the observation G together with our knowledge T justifies C. This discovery will in turn change the status of C from being an assumption to being a fact together with the observation G. Thus, one application of direct consequence is to discover assumptions that are justified by observation, which in turn helps to reduce the number of assumptions in the course of problem solving. Additionally, if C contains only negative assumptions that is, C C inv(A), then C is a set of assumptions that is in conflict with G that is, .T G U C is inconsistent. This is particularly useful in identifying potential conflicts among assumptions with respect to .T and G. For instance, if C is such a direct consequence for G, then any extension generating subset D of T that is a superset of C will be split for the new theory T = (T U G, A). Although in principal direct consequences are more closely related to G itself than to the number of direct consequences of a sentence G can be very large or even infinite. Like its counter-part explanation, a kind of minimality restriction is necessary.  Definition 4.2.6 (Assumption based Minimal, Minimal Trivial, and Prime Direct Consequence) Let T = (T , A) be an a-theory, the query G be a sentence and C be a direct consequence of G with respect to T. -  1. C is a minimal direct consequence of G if C is a direct consequence of G and there is no other direct consequence C' of G such that C' subsumes C. 2. C is a trivial direct consequence of G if G^C otherwise it is non-trivial. C is a minimal trivial direct consequence of G if C is both minimal and trivial.  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM ^  79  3. C is a prime direct consequence of G if it is both minimal and non-trivial.  For convenience, we will use MDC(G, 7), MTDC(G, 7) and PDC(G, 7) to denote respectively, the sets of minimal, minimal trivial and prime direct consequences of G with respect to 7. It trivially follows from the definitions that the property MDC(G, T) = PDC(G, T) U MTDC(G, 7) holds. Note also that, assuming .7 . is consistent, these minimalities also have the following properties: 1. If .7" U G is inconsistent, then MDC(G,7), 1^1. This is obvious since F U G El. 2. If G is a tautology, then PDC(G, T) = 0 and MTDC(G, T) = 0. 3. If G is not a tautology and .7 - k G, then MDC(G,T) = 0. It follows from the definition that no sentence C can be a direct consequence because when .F . U G C then .F. C. Note that the notion of a minimal direct consequence provides an answer to the criticism of superfluous consequences that is often raised by the AI reasoning community. That is, if .Fu G is inconsistent, its only minimal direct consequence is the sentence ^ (false) although any sentence is a classical consequence of it. Similarly, if C is a minimal direct consequence of G and S, any sentence C V S is not a minimal direct consequence of G, although it is a classical consequence. For instance, if the facts .F" prove that "salt is soluble in water", we cannot conclude by using minimal direct consequence that "salt is soluble in water or Unicorns exist". We can also modify the definition of direct consequence by the constraint R( C) cig C = (Assump --, Conseq), where Assump is a conjunction of assumptions while Conseq is a disjunction of non-assumption sentences. Thus .7" U G (Assump --- Conseq) states that the consequence Conseq is subjectively entailed by the query G with respect to the assumptions Assump. We shall call this a conditional direct consequence of G. Obviously other forms of minimal direct consequences can be defined depending on the application. The computation for a variety of consequences will be provided by the ACMS.  4.3 An Assumption-Based Clause Management System In the previous section, we discussed the functionality of assumption based reasoning in terms of direct consequence, explanation, agreeability, irrefutability and extension. In this section we define an Assumption Based Clause Management System (ACMS) that performs this type of reasoning.  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM ^  80  4.3.1 Restricted a-theory So far, we have dealt with a general a-theory T =^A) with potentially infinite sets of facts and assumptions. Prior to the discussion of ACMS, we shall restrict the a-theory to have a more computationally realistic form. For pragmatic reasons and computational feasibility, we now restrict the sets F and A of 'T to be finite. Secondly, we restrict each assumption to be a single literal. The latter restriction is justified by the following discussion.  Definition 4.3.1 (a-transformation) Let T = , A) be an a-theory. We define a transformation u as follows:  1. For every sentence a E A, a(a) = A where A is a new propositional variable not used anywhere in the theory. 2. u(A) = fu(a) a E Al 3. a(F)=TU{c(a)EaktEA} and 4. u(T) = (u(T), u(A)). The intuition behind the a-transformation is that every assumption is replaced by some new variable A, and a new sentence expressing the equivalence of a and A is added to .T. Note that if the assumption a in A is a single literal, we can simply use u(a) = a. Additionally, if the task is concentrated only on finding explanations, the representation u(a) a is sufficient. The biconditional is required for computing direct consequences and extensions. If o-transformation is performed on both and A, then obviously T and c-(T) are equivalent, as expressed by the following theorem.  Theorem 4.3.1 For any a-theory T^, A), T and u(T) are equivalent in the sense that for any sentence G,  E is an explanation/direct consequence of G from T iff c(E) is an explanaticmldirect consequence of G from u(T). Proof : Trivially follows from definition 4.3.1, and conservative extension by explicit definition that preserves the logical consequences of the old theory in an extended new theory (Shoenfield, 1967, p 57) QED For computational simplicity, we shall also restrict ourselves to sentences in normal form that is, CNF form. Hereafter, we can safely assume that for any a-theory 7 = A), is a finite set of clauses in CNF form and the finite set of assumptions A contains only single literals as elements.  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM ^  81  4.3.2 Explanations, Direct Consequences and Supports With the restriction on CNF enforced, a careful examination of the definition of explanation, definition 4.2.1, suggests that an explanation of G with respect to T is the negation of a support for G that consists solely of assumptions. We shall call this type of support an assumption based support with respect to T. This is stated more formally in the following lemma.  Lemma 4.3.1 Let T = (F, A) be an a-theory and G be a formula. A conjunctive clause E is an explanation of G with respect to Tiff E C A and^is a support for G with respect to F.  Proof : With respect to T, the conjunctive clause E is an explanation of G iff E C A, FUEk G and U E is consistent (by definition 4.2.1). Propositionally this is equivalent to .7" ^V G and By the definition of support (definition 2.3.1) ^is a support for G with respect to Y.^QED Minimality, triviality and primeness are defined in similar fashion. Finally, the next lemma reveals the connection between direct consequence and assumption based support.  Theorem 4.3.2 Let T = , A) be an a-theory and G be a formula. A clause C is a direct consequence of G with respect to T iff C C A U inv(A) and C is a support for —PG with respect to F.  Proof : It follows from the definition of direct consequence (definition 4.2.5) and support(definition QED 2.3.1).^ Similarly, minimal, minimal trivial and prime direct consequences can be shown to correspond to assumption based supports in their appropriate form. Lemmata 4.3.1 and theorem 4.3.2 indicate that the computational effort for finding minimal explanations and direct consequences of a clause G, is tantamount to searching for the assumption based minimal supports for G. In addition, the computation of irrefutability and agreeability can also be reduced to finding assumption based minimal supports.  4.3.3 Computations Given an a-theory T =^A), the ACMS represents the a-theory by the following sets of clauses. The set of clauses .T is represented by the set of its prime implicates PI (F) and the set of assumptions A is represented by a set of literals. In the event of an update, that is when adding a new clause to .F, the set of prime implicates of the augmented set of facts are updated using the incremental algorithm for computing prime implicates discussed in chapter 3. In the event of a query, the computation of the various types of responses to the query is achieved by the following methods. Firstly, given an a-theory  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM^  82  T =^A) and a set of clauses G, we shall identify the various types of tasks which can be performed  by the system as follows: (i) It can compute the minimal, minimal trivial or prime explanations of G; (ii) it can assert whether G is agreeable or irrefutable; (iii) it can compute the extensions of T; or (iv) it can compute the minimal, minimal trivial or prime direct consequences of G. We shall begin by examining the computation of (i) and (ii). Since all definitions presented here are merely extensions of the definition of a support (definition 2.3.1), the correctness of the methods used hereafter trivially follows from the corresponding algorithms for computing supports discussed in chapter 2. First, assuming G to be a single clause, the set of prime explanations for G is computed as: PE(G,T) = SUB({-'S S P — G, P E PI(T),P n G 0, P V G is fundamental and inv(S) C  Note that if P — G = 0 then S is clause G is computed as:  ^  and^is Similarly, the set of minimal trivial explanations for a  1. if .7 is consistent and G is non-fundamental then MTE(G, T) = {I} else -  2. if PE(G, T) = {I} then MTE(G, 7) = 0, otherwise 3. MTE(G,T) = {el eEG,eEA and^PI(.7)}. Consequently, the set of minimal explanations for a clause G is computed by taking the union of the above two sets, that is ME(G, T) = PE(G, T) U MTE(G, 7). On the other hand, if G = {G1, . Gn} is a set of clauses (a formula) the set of minimal explanations of G is computed recursively as follows: ME(G,T) = SUB({ E A E' E E ME(Gi A ...A G n _i,i) and E' E ME(G,,,T) and  no P E PI (.F) subsumes^V^and V —1E' is fundamental }). Putting together these methods, an algorithm for computing the set of minimal explanations for a formula G is stated in algorithm 4.3.3. Having presented an algorithm for computing minimal explanations, the next discussion is on the computation of agreeability and irrefutability. A method for asserting agreeability is stated by the following lemma.  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM^  83  Algorithm: Algorithm for Minimal Explanation Input: PI (.7 ) and a set of clauses G. Output: ME(G,'T) = PE(G,T) U MTE(G,T). .  Step 1: If PI (F) = {D} then MTE(G, T) = 0 and PE(G, T) = 0, GOTO 6. Step 2: If G is non-fundamental then PE(G,T) =0 and MTE(G,T) = {■}, GOTO 6. Step 3: PE(G,T) = SUB({-S I S= P— G, P E PI(F), P n G 0 0, P u G is fundamental and inv(S) c A}) Step 4: If PE(G,T) = {■} then MTE(G ,T) =0, GOTO 6. Step 5: MTE(G,T) :_-_-_ {e jeEG and —ie (;1 PI(F)} Step 6: RETURN: ME(G, T) = PE(G,T)u MTE(G, T). end  Algorithm 4.1: Algorithm for Minimal Explanations Lemma 4.3.2 Given an a-theory T = (. T , A) and a formula G, the formula G is agreeable with respect to T if ME(G,T) 0 0 and ME(- G, T) = 0. ,  Proof : Follows from definition 4.2.1.^  QED  We can also effectively decide the irrefutability of a set of clauses G in T by using the result of theorem 4.2.2. More precisely, we first compute the set of minimal explanations (I) = ME(G ,T) and then using the same method, compute the set of minimal explanations for the conjunction of the negations of all explanations in '1 that is, 0' = ME( A -- S,T). ,  Set.  If the set I 0 0 and the set 1' = 0 then G is irrefutable in T, otherwise it is not. The reader should note that minimal supports (instead of minimal explanations) are enough to determine irrefutability because of the duality between support and explanation. More precisely, the set of minimal supports E = MS(G ,T) and E' = MS( A  s, T)  SEE  can be computed instead of 0 and 0'. If E 0 0 and E' = 0, G is irrefutable in T and it is not otherwise.  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM^  84  Even though we have a method to decide whether a set of clauses is explainable or irrefutable, that is whether it is in some extension or is in every extension, without explicitly computing all the extensions of 'T, there are cases where computing all the extensions or the set of extension generating subsets is also desirable. For instance, in a Problem-Solver-ACMS framework the Problem-Solver can query the ACMS for some or all maximal consistent subsets of assumptions", that is the set of extension generating subsets with respect to the current environment (T, A). It is important to note that any a-theory T = (F, A) with a finite set of assumptions has finitely many extensions. Since each extension of an a-theory is completely characterized by its generating subsets, computing all the extensions of the theory is equivalent to computing all its generating subsets. The first observation is that the set PI (T) automatically gives us a set of minimal inconsistent subsets of assumptions which Reiter (1987) called minimal conflict sets and de Kleer (1986a) referred to as nogoods. For reasons of coherence we shall follow Reiter's terminology.  Definition 4.3.2 (Conflict Sets) Given an a-theory T = , A), C C A is a minimal conflict set of T if U C is inconsistent and no proper subset of it is inconsistent with F. The following lemma explicitly characterizes conflict sets in terms of minimal implicates and the subsequent corollary describes conflict sets in terms of prime implicates.  Lemma 4.33 Given a clause C = {ci, , ck} where C c A, C is a minimal conflict set of the a-theory T =^, A) iff { ci, • • • , ck} EMI(T). —  —,  Proof : Follows from definition 4.32 and the entailment property of minimal implicates. ^QED Intuitively, if .7' U C is inconsistent then F^C and MI (F)^C. Using the entailment property of minimal implicates, there is a minimal implicate P E MI (F) that subsumes C. Hence P is a minimal  conflict set of T. Since the set MI (Y) can be constructed from PI (T), the following corollary describes explicitly the computation for generating minimal conflict sets using prime implicates of .7-. Corollary 43.1 Given a clause C = {cl, ... , ck} where C C A, C is a minimal conflict set of the a-theory T (F, A) iff^,^E PI(T)U {{x, —a} I x or -a E A and {x} , {—a} PICT)). Proof : It follows from lemmata 4.3.3, and 22.1 and 2.2.1 from chapter 2 that MI (T) = PI (T)u MTI (I) and MTI(F)^{{x,^IxEV and no P E P/(.T) subsumes {x , — x}} where V is the language ,  vocabulary.^ 11 In  de Kleer's terminology, this is called the maximal consistent environments (de Kleer, 1986a).  QED  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM ^  85  For convenience, we shall denote the set of minimal conflict sets for the a-theory as MCS(.F, A). Also note that it can be subdivided into two disjoint sets namely the prime conflict set PCS(F, A) corresponding to elements derived from PI(F), and the other derived from MTI(T) which is the minimal trivial conflict set MTCS(F, A). Thus the minimal conflict set is the union of the prime conflict set and the minimal trivial conflict set. Note that the inclusion of the set MTCS(F, A) is necessary by virtue of the definition of conflict set 4.3.2 and lemma 4.3.3. For instance, if z, E A for some literal z and neither of them occur in any formula in .T, then obviously U {z, — z} is inconsistent. This suggests that {z, -z} is a minimal conflict set but PI (.T) alone may not produce this minimal conflict set. ,  Having extracted the minimal conflict sets from the sets of prime implicates and minimal trivial implicates of .T, we can compute their minimal hitting sets as defined by Reiter (1987) which will eventually lead to our notion of extension. Definition 4.3.3 (Reiter's Hitting Sets) Suppose W is a collection of subsets of A, a set H c A is a hitting set for 1/V if H n C 0 0 for each C E W. A hitting set H for W is minimal iff no proper subset of H is a hitting set for W.  Intuitively, a hitting set is a set that has elements in common with every set in W. For instance, if W = {{1, 2}, {3, 4}, {5, 6}1, then the set {1, 3, 5} is a hitting set of W. The extension generating subsets of T are exactly the complements of the minimal hitting sets of MCS(T , A). The following theorem characterizes extensions in terms of minimal hitting sets. Theorem 4.3.3 Let T = (F, A) be an a-theory, W = {Cl, , Ck} is the set of all minimal conflict sets of I and 7 1 is the set of all minimal hitting sets of W. A subset D of A is an extension generating subset iff the set -  A — D E 'K. Proof : If: Assume that A — D E 7-1, then by definition 4.3.3, for each i, 1 < i < k, (A — D) n Cti  O 0.  Consequently for all i, Cti D for otherwise (A — D) n C, = 0. Since every C, is a minimal conflict set and every CC ¢ D, U D is consistent and D is in some extension generating subset. Suppose D is not maximal that is, there is an a E A — D such that .T U D U al is consistent. Then obviously C, Du{a} for any i, 1 < i < k, otherwise .F U D U {a} is inconsistent. Hence (A — (D U {a})) n C, 0 for all i, 1 < i < k and by definition 4.3.3, A — (D U {a}) is a hitting set. But then (A — (D U fal)) C A — D, which contradicts that A — D E 7 1. -  Only if: Assume that a subset D of A is an extension generating subset. Then by corollary 4.2.1, D is a maximal subset of A such that F U D is consistent, hence D is a maximal subset such that each C, D, for each i, 1 < i < k. Therefore A — D is a minimal subset such that (A — D) n C, 0 for each  i,1 < i < k and by definition 4.3.3, A  —  D  QED  4.3 AN ASSUMPTION-BASED CLAUSE MANAGEMENT SYSTEM^  86  Since all the minimal conflict sets are readily available, the method for computing hitting sets is simplified. Let each minimal conflict set C, be a clause, 1 < i < k and their conjunction A ,k, 1 C, is a CNF formula. Let v7L 1 H, be the DNF formula obtained by normal-form transformation of A 2 , 1 C„ further simplified by deleting subsumed clauses. Then the sets H , 1 < i < in are all and only the minimal hitting sets for the minimal conflict sets. Additionally, there is an extra constraint on the minimal hitting set as characterized by the following lemma. z  Lemma 4.3.4 Let T = , A) be an a-theory and C be the set of all minimal conflict sets of T. No minimal hitting set H of C contains complementary literals. Proof : Assume .7. is consistent and hence PI(.T) does not contain the empty clause 0. Let C be the set of all minimal conflict sets of T, and 7-1 be the set of all minimal hitting sets of C. Suppose L E 7 1 and the complementary literals a,—,a E L: -  (a) First we prove that neither { a} nor a } are in PI(T). Assume otherwise, i.e. { a} E PI (F), then "-la" cannot occur in any of the clauses C E PI (F) because the resolvent of C and "a" would subsume C, contradicting C being a prime implicate of F. Therefore, by the definition of conflict set 4.3.2, a} E MCS(F, A) and subsequently, the set { a,—,a} MCS(F, A). Consequently, since only a} E MCS(F, A), and the literal "a" does not occur in any conflict set, therefore by the definition of minimal hitting set 4.3.3, a L contradicting the assumption. A similar argument holds for {—Pa} E PICT), therefore, {a}, {-i a} V PI (F). (b) Now we will show that L is not a minimal hitting set. Assume otherwise, then by theorem 4.3.3, the set A — L is a maximal consistent subset of assumptions with respect to T. But neither { a} nor a} is in PI (T) which implies that F U a} is consistent and F U a} is also consistent respectively. Consequently, (A — L) U { al and (A — L) U a) are consistent with Y . and they both contain A — L contradicting the maximality of A — L.^ QED Clearly any method for transforming from CNF to DNF is suitable for our purpose. For example, we can represent the CNF formula as a matrix and use the connection method (Bibel, 1987) to construct a set of paths P through the matrix. It can be shown easily that the DNF formula is the set of non-complementary paths 2' that are not subsumed by other paths in the set P. Furthermore, such techniques can be optimized for our setting since subsumptions can be greatly reduced by examining the structure of the matrix. More formally, let M be a set of sets represented by a matrix where each Al, E M,1 < i < n is a column. A path is defined as a set { m, in, e M , for all i = 1, n}. For example, i  4.4 CONCLUSIONS^  87  let M^{{a, b,^{a,- c), {f, g}} and its corresponding matrix is: ,  a^a b —c  fg  A possible path in M is the set { a^Using the definition of a path above, we can define a simple recursive procedure to enumerate a path as follows: 1. {m I m E .M1 if M is a clause, Path(M) —^ { 2. Path(Mi ,..., Mn _i) U Path(Mn ) if M^,^, Mn • For optimization, additional constraints can be incorporated into the process of selecting a literal in statement (1). That is, a literal "m" is selected from M, in Path(Mi ) if -on^Path(Mi ,^, Conversely, if Path(Mi , . • • , ma-1) n M 2  0  0, then the whole column M, can be ignored with respect to  Path(Mi, . ,^) without loss of completeness because of minimality. Note that this is not true with respect to other paths. The reader can examine the validity of the claim by trying out the matrix shown above. Finally, the last service the ACMS is designed to provide is the computation of direct consequences. Note that by theorem 4.3.2, a direct consequence of a clause G corresponds to a support for the negation of G. Obviously, computing direct consequences is equivalent to computing supports, a function already performed by the ACMS. Conditional explanations and direct consequences can be easily computed by extending lemma 4.3.1 and theorem 4.3.2. The definition of direct consequence of G restricted to negative assumptions, inv(A), is computed by restricting the direct consequences of G to consist of solely negative literals. The varieties of explanations and direct consequences are enormous and their significance will definitely be dependent on the context in which questions and answers are formulated. Nevertheless, most of them are expected to be treated by the ACMS in a similar manner to that discussed here.  4.4 Conclusions In this chapter, the formal aspects of the specification of assumption-based clause management are studied and lead to the notion of assumption based reasoning in general. We have explored an assumption based reasoning theory with the notions of direct consequence, explanation, conflict set, extension, agreeability and irrefutability. Using the framework and results from the CMS developed in the chapter 2, we have also provided a computational system (ACMS) that performs the computations for the above functions.  Chapter 5  Revision Recall that the motivation for creating clause management systems is twofold. First, it is used for the abductive process of generating explanations for a query; and second, to perform the necessary bookkeeping for the revision of assumptions in the knowledge base. The process of revision is defined as addition of facts and assumptions and deletion of assumptions from the knowledge base. In this chapter we propose a logical scheme for tracking the dependency between a query and its explanation in an assumption-based clause management system (ACMS) for the purpose of abduction and revision. As a consequence, an incremental deletion scheme is derived. A protocol for assumption revision is demonstrated by a backtrack search example. The proposed ACMS is the first clause management system using the compiled approach that employs incremental deletion of prime implicates as part of its capability'.  5.1 Introduction As discussed in the previous chapter, clause management was a concept developed specifically to deal with the problems of maintaining and querying knowledge that may vary over time. Our knowledge base is divided into two separate components: a set of facts .7" and a set of assumptions A. A fact is a sentence such that the truth of the sentence is accepted in the problem domain and cannot be altered during the course of problem solving 2 . An assumption, on the other hand, is an asserted sentence that may be retracted later, that is, an assumption is a defeasible statement. The framework for performing revision takes a different view towards managing the set of assumptions. We shall assume a set of 1  This chapter is based on (Kean, 1992).  Note that this notion of a fact is more general than the notion of a fact in logic programming where only an atomic predicate is a fact. 2  88  5.1 INTRODUCTION^  89  assumptions A such that F U A is consistent and a new assumption a that we wish to add into the set A. The revision problem is defined as finding a maximal subset z C A such that YuAu{a} is consistent. Recall that the functionality of clause management is twofold. First, it serves as an abductive inference engine for finding explanations for a query with respect to .7" at some instant in time. An explanation is usually restricted to be a set of assumptions, and a query is a sentence that we wish to find explanations for. In order to perform revision as stated above, we will require a variant of definition 4.2.1 of assumptionbased explanation or simply explanation with the modified relation E C A U znv (A). Intuitively, if E is comprised of only positive assumptions this means that this set of assumptions justified G. Second, if E consists of negative assumptions, this means that concluding G would require the belief of those negative assumptions, which are in conflict with the present set of assumptions. This is useful in identifying potential conflicts of assumptions in the course of revision. The second functionality is appropriately called revision in clause management. Revision is classified as two operational concepts, namely addition which means adding new facts into F or new assumptions into A, and deletion which means deleting an existing assumption from A. Revision is a concept which came about to capture the dynamic and non-monotonic nature of reasoning, that is to handle changes in assumptions over time (Gardenfors, 1988). Note that in deletion, only an assumption is removable because an assumption is a defeasible statement. Addition and deletion are necessary operations for managing potentially conflicting assumptions used during the course of abductive inference. For instance, if the set of facts is =  A = {p  a,  fa -+ q,  b r} and the current set of assumptions is  then one explanation for the query  --b A (p  a) A ( np -  q with  respect to F is  b).  Deductively, using the assumptions and b yields the consequence other assumption  p a  yields the consequence  a and  with the fact  p.  a q, we  Furthermore, using the  can conclude the query  q.  Thus, if we were to retract one of the assumptions, let us say b, then the above chain of reasoning no longer holds. The same problem arises when a new assumption is added, where in this case new explanations might be found that were not possible before. Note that in terms of finding explanations, both the deletion of an assumption and addition of a fact or assumption, may result in either generating more explanation or finding fewer explanations than before. This is due to the consistency requirement that is, U A U{a} is consistent. To have a clause management system that performs the revision functions, some adequacy issues must be addressed. Since we are using the compiled approach, every addition of knowledge or assumptions to the existing knowledge base requires re-compiling, hopefully only those relevant and  5.2 AN EXTENDED ACMS^  90  affected dependencies. This is the requirement of incremental addition for which a method was reported in chapter 3. Conversely, deleting an assumption requires the removal of those saved dependencies which relate to this assumption. A naive approach is simply to remove all the saved dependencies, and perform the re-compilation without the deleted assumption. This is not desirable since many dependencies may remain useful independent of the deleted assumption. Thus, an incremental deletion scheme is needed. No existing truth maintenance systems consider incremental deletion as part of their functionality. For instance, in Doyle's Justification Truth Maintenance System (JTMS), a proposition P is either IN or OUT indicating whether it is consistent to believe P or not. Thus, believing P is OUT is not the same as asserting P is false. Similarly, if P is deleted, deleting P, or P is not present in the knowledge base, it is neither false nor OUT. Doyle does not consider deleted assumptions in his JTMS (Doyle, 1979). In de Kleer's ATMS, a separate knowledge base is used to maintain inconsistent assumptions (or nogoods). Thus, removing an assumption a means asserting a -- false, or a is a nogood. Unfortunately, if we change our mind about a being nogood later, there is no way to revise except to delete a from the nogood knowledge base. Also, if the revised assumption occurs in many other nogoods, it is not clear how the deletion process can be achieved. de Kleer does not consider deletion as a function in his ATMS (de Kleer, 1986a). This chapter will present a logical scheme for incremental deletion based on the framework of the Assumption based Clause Management System (ACMS) discussed in chapter 4. The proposed ACMS is the first clause management system in the compiled approach that includes incremental deletion as part of its functionality  5.2 An Extended ACMS In this section, we define an extended ACMS that is capable of performing assumption-based abductive reasoning and revision. For clarity, we shall repeat the necessary definitions found in chapter 4 with some slight modification. Our knowledge base is divided into two separate components: a set of facts .T and a set of assumptions A. We restrict the set of facts ) and the set of assumptions A of the assumption based theory T = (.T, A) to be propositional, finite and contains sentences in CNF. Ideally, for each assumption, we would like to pre-compute the set of minimal implicates it can derive together with F. Unfortunately, we cannot simply union the set of assumptions A with .1 and compute the set of minimal implicates because it may contain potentially contradictory assumptions and more importantly, members of A can be deleted at a later time. Thus, one approach is for each query G, to check whether any assumption is applicable to deduce G. This is unattractive since it does  5.2 AN EXTENDED ACMS^  91  not exercise the principle of "remembering" the dependencies and it does not utilize the compilation of .T. How do we pre-compute and "keep track" of minimal implicates deduced using assumptions which are potentially contradictory and removable? We shall call this the tracking problem in the compiled  approach. All existing truth maintenance systems resolve this problem by keeping pointers, in the computer programming sense, to track the dependencies as well as elaborate data-structures to handle the existence of contradicting assumptions. For instance in Doyle's JTMS, an explicit data-structure of  IN and OUT labels denoting the status of propositions is used, and methods to resolve the status being IN or OUT are algorithmic (Doyle, 1979). There is no method for deleting assumptions. We shall now present a logical scheme for the tracking problem. It is well known in mathematical logic that conservative extension by explicit definition preserves the logical consequences of the old theory in an extended new theory (Shoenfield, 1967, p 57). We apply this idea as follows: for each assumption a E A, we introduce an explicit definition by defining a E A, where A is a new variable not occurring elsewhere in the theory. Subsequently, we can extend the theory .7" by adding all the explicit definitions introduced. In fact, we have already seen such a scheme defined as a-transformation in definition 4.3.1 (chapter 4) 3 . In the computer programming sense, the a-transformation indexes every sentence a in the assumption set A with a new variable A. Thus, any new minimal implicate derived from o (.7 ) dependent on the -  .  assumption will contain the corresponding variable A. Note that the sentence a might be non-atomic, in which case the interaction between the equivalent label A and the set of facts .7 - is not intuitive. If a-transformation is performed on both 1 . and A, then T and c-(T) are equivalent as already expressed in theorem 4.3.1. Using the c--transformation, we can now safely compile the set o (.7") into its corresponding set of -  minimal implicates. For example, let A = fp, -, p1 and F = fp^ql. Using a-transformation we introduce two new variables A l and A2 as new names for the assumptions. Thus c(i) = U {p A 1 ,^A2} and its corresponding set of minimal implicates is  Mi(cr(.7)) = {^A A2),  A2^-p,  P  Al V A2  A2, 1),  P^4, —+ 4,  q}.  3 As noted in chapter 4, subsection 4.3.1, the representation A^a is sufficient if the task is restricted to finding explanations only.  92  5.2 AN EXTENDED ACMS^  If the query is q, there is a minimal explanation, namely Al, denoting the fact that assuming A l p in .T explains the consequence q. Also, since EC AU znv (A), the assumption -- A2 is also a minimal explanation for q denoting the fact ,  5.2.1 Addition In the process of addition, there are two types of knowledge, namely new facts and new assumptions, to add. In the case of adding a new facts C, we can simply compute the new set MI ( MI (o-(T)) U C} ). In the case of adding a new assumption y, we compute 1. o(A) = a(A) U {A} for a new variable A not used anywhere; and  2. the set MI( MI(cr(.T)) u {-y E- ). In both cases, the incremental algorithm in chapter 3 can be used to update the set of minimal implicates. Note that the addition of facts or assumptions to the theory T might produce inconsistency. The proper procedure for adding facts or assumptions is an issue in the usage of the ACMS. A protocol for this usage is proposed in section 5.3.  5.2.2 Deletion In terms of deletion, only assumptions are removable. The distinction between facts and assumptions is not clear. One could argue that there are no facts, only assumptions since all knowledge changes over time. Consequently, everything would be removable. Conversely, a reasonable definition for facts is the knowledge that remains unchanged during the course of the problem solving. In this chapter, we shall adopt the latter position for simplicity in the presentation. When an assumption a is chosen for deletion, all minimal implicates derived using a must be removed. How would we identify these minimal implicates? Recall that each assumption has a unique variable A attached to it as an equivalence. Thus, any minimal implicate P that can be derived using a, but is not derivable without it, must have A occurring in P. This is expressed by the following theorem, which is a form of conservative extension by explicit definition (Shoenfield, 1967, p 57). Theorem 5.2.1 Let T = (T, A) be an a-theory, a be a sentence and  A be a new propositional variable not  occurring in (.F, A). Then, T P and T u {a E A} P only if A or^occurs in P.  =  Assume that neither A nor -0, occurs in P. Let J ^P, then there exists a model M .T, M P. Since A is a distinct variable not occurring in (T , A), the extended model M U {A} 9* where A assumes  Proof :  5.3 A PROTOCOL^  93  k  K  the truth value of a and by assumption M U {A} P. But the extended model M U {A} .F U {a -LE Al and by the fact that I U {a -f_= A} P, the same must be true for the extended model, M U {A} P, contradicting the assumption. QED  =  -  H -  As a consequence, deleting an assumption a E A in T = (I, A) is achieved by deleting all the consequences P that have A or -- A occurring in them. In the case of 0-(T), the deletion consists of simply the set operations ,  1. a- (A) = r(A) — {A} and  2. c(Y) = a(.fl — {a E Al. Interestingly enough, since the set of all minimal implicates of the a-theory is represented in the set MI (a-(I)), deleting an assumption a E A in T = (. T, A) is defined in the following way. Definition 5.2.1 0 - Deletion) Let T = (. T , A) be an a-theory, a(a) =  A for a E A, A E a(A) and let MI(o-(.T)) be the set of all minimal implicates of o-(I). When a is deleted, the revised theory a(T)' = (MI(o-(..T))' , o-(A)') is defined as 1. a (A)' = u(A) — {A} 2. MI(o-(T))/ = MI(o-(.T)) — {P 1 P E MI(a(I)) and either A or -IA occurs in P}.  The correctness of the above A-deletion follows from theorem 5.2.1 and the fact that o GT) is equivalent to MI (cr(I)) in the sense that (3 (T) P if and only if there is a P' E MI (a-(Y)) that subsumes P (theorem 2.2.2). Additionally, the A-deletion process involves only a linear search through the set M/ (c (.7)). With careful indexing on the set M/(o-(F)) a faster method is feasible. -  -  ,  5.3 A Protocol In this section, a protocol is proposed for performing assumption revision while using the ACMS in performing intelligent backtracking search. The protocol proposed here is in the spirit of Frank Ramsey's test for evaluating conditionals suggested in 1929, summed up by Stalnaker (Veltman, 1985, p 95) as follows : [Ramsey's Test] This is how to evaluate a conditional: first, add the antecedent (hypothetically) to your stock of beliefs; second, make whatever adjustments are required to maintain consistency (without modifying the hypothetical belief in the antecedent); finally, consider whether or not the consequent is then true.  5.3 A PROTOCOL^  94  The key idea lies in the statement "... make whatever adjustments are required to maintain consistency ...". In our framework of assumption based reasoning, Ramsey's Test takes the form of asserting an assumption a in the theory T = , A) such that it is consistent together with .7 and the set of assumptions A asserted so far. Thus, the problem is if it is inconsistent, find the set of assumptions that contribute to the inconsistency. We can formalize the above problem as a diagnosis problem (Reiter, 1987): -  Definition 5.3.1 (Disagreement Set) Let c(T) = (o (Y), o-(A)) be a c--transformed a-theory and a be an -  assumption for addition into the current set of assumptions A. A disagreement set 4 for T is a minimal set A C A such that U {-'ala U  {aja E A  — A} U {a}  is consistent. — (Eq.1)  Since the set of assumptions A contains all positive literals because of the a-transformation, the reading of the above equation is that if the assumptions in A are false and the others remain true, then the set {-- ala E^U{ala E A - A} is consistent with and a. Since the Ramsey's test requires the maintenance of a consistent set of assumptions with^the goal of revision is to empty the set A by revising the assumptions in it to make a eligible for addition. ,  The computation of the set A is rather straight forward. First, recall that in the definition of conflict set (definition 4.3.2), for C C A, the set C is a conflict set of F U {a} if .7 U C U {a} is inconsistent. The set C is a minimal conflict set if no proper subset of it is a conflict set of .T U {a}. Now, if equation (Eq.1) is to be satisfied, the set { a I a E A - Al must not be a superset of any minimal conflict set C. Consequently, A must contain an element from every minimal conflict set. In fact, such a set is called a hitting set (definition 4.3.3). This idea of a hitting set is also used in chapter 4 for computing extensions and in chapter 7 for diagnostic reasoning. -  It has been shown that a minimal hitting set of the set of all minimal conflict sets of .T U {a} is a disagreement set for .7" U {a}. The proof of this result can be found in (Reiter, 1987). Computing the .  minimal hitting set can be achieved by using a normal form transformation as described in section 4.3. Computing a minimal conflict set is also trivial. Note that if .7 U {a} U C is inconsistent for C c A then FU C^and .T C^Since we assume UA is consistent, hence F U C is also consistent. Consequently, a conflict set for .7" U {a} is an explanation for with respect to T. By obtaining the set of all minimal explanations, represented by ME(-,a), we get the set of all minimal conflict sets with respect to .T U {a}. This method is also used in chapter 7 for diagnostic reasoning. Note that since we -  4 We deemed it appropriate to change the name for the definition from diagnosis to disagreement set, in order to better reflect the usage of the definition in the context of assumptions revision. Moreover, the definition of diagnosis varies according to different researchers, for instance, see (de Kleer et al., 1990).  5.3 A PROTOCOL^  95  are only interested in a conflict set which is a subset of A, we can restrict our explanation finding to  E c A for efficiency purposes. Thus, the actual sequence of asserting an assumption is characterized as follows: [Asserting Assumption] This is how to assert an assumption a into your current set of consistent  assumptions A: First, ask for the set of all minimal explanations for that is, the set ME(— a); and second, compute the set of all disagreement sets by computing the set of all minimal hitting sets of ME(---,a). If the disagreement set is empty then it is consistent to add a into A. If it is not empty, by the principle of least change choose the smallest disagreement set A (breaking a tie arbitrary) for ,  revision. Replace the members in A that occur in A by other alternate assumptions and repeat the process until it is consistent to add a. We propose a protocol comprised of: add(a) that adds assumption a into A; delete(a) that deletes assumption a from A; and ask(explain, a) that returns the set of all minimal explanations of a with respect to T = , A). For convenience, we shall define disagree(a) as returning the set of all disagreement sets generated by executing ask(explain, a) and then computing its minimal hitting sets. This —,  protocol is sufficient to simulate the sequence of operations for asserting assumptions. To illustrate reasoning using this protocol, we shall mimic intelligent backtracking search in a constraint satisfaction problem  5.  Assume the Problem-Solver is solving a constraint satisfaction problem using the domain independent ACMS. The actual algorithm for the Problem-Solver is based on the operation of asserting assumptions but the interpretation of the explanations is domain dependent to the Problem-Solver. The following example assumes the Problem-Solver is capable of interpreting the explanations as results. Example 5.3.1 Assume that we have three variables X, Y and Z, each variable can have a value of r (red) or w  (white) and the constraints are X 0 Y and Y 0 Z. Figure 5.1 shows the complete search space for the problem of finding consistent values for the variables X, Y and Z satisfying the constraints X 0 Y and Y Z. The edges of the upper search tree are labeled with the current assignment of value for the variables, and the bottom search tree with constraints. In a naive top-down, left-to-right search strategy, the left-most branch (X = r, Y = r, Z = r) is tried and upon failing because of the constraint X 0 Y (denoted by a cross x ), it backtracks to the  most recent point, that is Z w and fails again on X 0 Y. 5 This demonstration of the protocol is not suggested as an efficient method to solve constraint satisfaction problems. An in-depth study of constraint satisfaction problems can be found in (Mackworth, 1977)  5.3 A PROTOCOL^  96  ,X=w  e.  •  Z=r^ •Z:=Nv^Z=r^=  Z=r^  •  •  XY^X41(  •  ■ X4Y  X41(  •  I^ • • X41  •^•  1 1^ •^• • • X^X I • •^•^• \./^X^X^\.// Y4Z  Y4Z1^Y#Z1^Y4Z^  •  I • • X^X  X4Y^X4Y i^X4Y  T  variable assignment  ill constraints  Figure 5.1: A Constraint Satisfaction Problem: A Complete search tree. Note that an intelligent search strategy should immediately detect that the cause of failure comes from the incompatible values between X and Y. Thus, backtracking should occur at the point where X = Y avoiding unnecessary trial of Z = w. Using the protocol suggested, the following sequence of reasoning steps mimics this intelligent backtracking strategy. Initially, the uniqueness and existence for each value are expressed as facts.  F={  X  = rVX = w,^= r A X= w),  Y=rV Y= w,^= r A Y = w),  Z =rVZ=w, —1(Z= rAZ=^}.  Next, we assert the postulate for each variable; X = r, Y = r and Z = r in our assumption set, that is  6  c(A) = { (X = r) E , (Y =^A2)  (Z  = r) E A3 }.  We shall assume that the sets .T and A are transformed into o .F) and cr(A) by the c--transformation. Also, the set 0-(F) is compiled into the set of minimal implicates MI (o-(1)). -  Considering the first constraint X Y that we would like to add, first, we execute disagree (X Y) that is, ask( explain,^Y)), which computes its minimal hitting set which is the set of all the 6 Note that the assumption set (A) should contain only a,, but for clarity and ease of reference, we shall write the equivalence in our example.  97  5.3 A PROTOCOL^  disagreement sets. The set ask(explain, — (X^Y)) {{ (X = E-^Y =^A2}} and ,  disagree(X^Y) { z1 = {(X r) Ai}, A2 = ( Y =^A21}  The explanation of - (X Y) says that if both assumptions Y = r and X = r are true then they sanction -(X Y) or simply X = Y. That is, there are assumptions in the current set of assumptions A which justify the negation of our intended constraint X 0 Y. These assumptions are potentially in conflict with our intended constraint X 0 Y. Thus, we have to find out which of them are conflicting and revise them accordingly. ,  The set of disagreement sets informs us that in order to add X 0 Y into our current set of assumptions, then either (X = r) Ai or ( Y = r) A2 must be negated to maintain the consistency the addition. For instance, U { (X =^U {(Y =-- r )^(Z =^A3} U {X Y} -1  is consistent. Thus, before the constraint X 0 Y can be added, we have to revise the assumptions that occur in the disagreement sets. Since they both contain a singleton assumption, arbitrarily we shall try to revise the first assumption X = r. An alternative for the assumption X = r is X = w. Before we replace the old assumption by a new one, we have to ensure that the alternative is also consistent. This is achieved by asking for its disagreement sets that is, disagree(X w). The set ask(explain, = w)) = {{(X r) ar }} and consequently there is only one disagreement set A = {(X = r)^}. That is, no other assumption is in conflict with X = w except of course X = r which is the one we wish to revise. -  Thus, we can safely delete the assumption X = r by delete(X r) and replace it with X = w using add(X = w). Consequently, the revised set of assumption becomes o (A) = { (X = w) Ai, -  (Y = r) A2,  (Z r) —= A3 }.  Subsequently, we shall re-examine the constraint X 0 Y with the revised set of assumptions. By executing disagree(X Y) we obtain no explanation for the negation of X 0 Y and hence there is no disagreement set. This signals that the revision is successful and in turn, we can safely add(X Y) into our assumption set which becomes  98  5.3 A PROTOCOL^ cr(A) = { (X =^E- Al, (Y = r)  Az ,  E  (Z^r) -a A3, (X^Y)^A4, }.  Considering the second constraint Y Z, the minimal explanations for its negation and the set of all disagreement sets are ask(explain,-- (Y^Z)) =^{(Y^r) E- A2, (Z = r)^A3} {(X =^E Al, (Z = E A3, (X 0 Y) A4}} ,  .  and  disagree(X Y) =^= {(Z = E A3}, A2 = {(X = w) E A1,( Y^E A21, A3 = f( =^A2, (X 0 Y) E- A4}} •  Since there are three possible disagreement sets, by the principle of least change we shall choose the smallest one which is Ai = {(Z = r)  E  A3}. The alternate assumption is Z = w and disagree(Z = w)  yields only the disagreement set A = {(Z = r) A3}. This is expected since we are replacing Z = r by Z = w. Hence, by delete(Z = r) and add(Z = w) the revised set of assumptions becomes cr (A) = { (X = E (Y = -E A2, (Z w) _= A3, (X 0 Y)  E  A4,  }  Subsequently, re-examining the constraint Y ^Z by dzsagree(Y^Z) yields no explanation and disagreement set. Thus, it is safe to add (Y Z) into the set of assumptions and the revised set becomes  c(A)  = (x =  E  Ai,  (Y = r) —= Az , (Z =  OE-  A3,  (X # Y)  E  A4,  (Y Z)  E-  As }.  To verify the result, we ask ask( explain , (X 0 Y) A ( Y Z)). The set of all its minimal explanations are  Ai A A2 A A3,^  A - A2 A -,A3, ,  group(1)  5.4 IS DELETION NECESSARY ?^ Al A A2 A A5, -1A1 A - A2 A A5,  99  group(2)  ,  Ai A A3 A A5 group(3) -Ot i A 0t3 A A.5)^ --  A2 A A3 A ALI A2 A 1A3 A A4  group(4)  Ai A A3 A A41 1A1 A A3 A .A4,}  group (5)  -,  -  -  --,  A4  A .\5, group(6)  The first minimal explanation A l A A2 A A3 or simply (X =  w) A ( Y = r)  A  (Z = w)  is a set of consistent assumptions for sanctioning the constraints (X 0 Y) A (Y explanation 1A1 A A2 A 1A3 or simply -  -,  Z).  Similarly, the  -  (X = r) A ( Y w) A (Z  = r)  is an alternate solution.  5.4 Is Deletion Necessary ? The previous sections have been presented under the assumption that deletion of knowledge is necessarily a feature of reasoning. Is deletion necessary? As demonstrated in the previous section, if revision of assumptions is the reasoning strategy as when evaluating conditional statements, for example in intelligent backtracking search, then deletion is necessary as the complementary process to addition. Also, recall that one of the reasons for compilation is to achieve fast retrieval. Take for instance, the knowledge "if it is raining, the ground is wet" and "if the ground is wet, I wear my rubber overshoes". As a practical rule, we would compile this information by adding "if it is raining, I wear my rubber overshoes" to our system, thus bypassing the intermediate reasoning step. We shall call this compilation by addition because a new rule is added. Conversely, consider Reiter's default rule —P-q (read as if it is consistent to conclude p, then conclude q) (Reiter, 1980). More intuitively, consider the example "if it is consistent that I have neckties (p), I will wear a necktie to the restaurant (q)". Since I am poor and I don't have neckties, I cannot conclude that I will wear a necktie to the restaurant. On a later occasion, I can afford and hence own neckties, I can now conclude that I will wear a necktie to the restaurant. Now that I own neckties, the practical question is whenever I go to a restaurant, do I repeatedly try to verify whether it is consistent I have neckties before I wear one?  5.5 CONCLUSIONS^  100  Since the change of status is lasting (but does not have to be forever), wouldn't it be better to compile our new knowledge by deleting the default rule? Thus, this notion of compilation by deletion will allow me to wear a necktie to the restaurant without suffering from a headache by constantly worrying about consistency. Conversely, deletion does not necessarily mean loss of information. The removal of an assumption means either the assumption is irrelevant or is inconsistent with my perceived current state of the domain of discourse. If it is irrelevant we keep this irrelevant assumption in a separate knowledge base, lets call it "dustbin", for the sake of keeping information around. If it is inconsistent, some will argue that removal of it loses information as when a human reasons with inconsistency. I argue that a Problem-Solver does not reason with inconsistency, rather about inconsistency. Thus the detection of inconsistency within subject matter is a piece of knowledge at a different knowledge level from the subject matter in the domain of discourse. In the Problem-Solver-ACMS paradigm, when the Problem-  Solver detects inconsistency with the aid of the ACMS, a separate knowledge base is established to keep this piece of information. For instance, assume the Problem-Solver discovers that the assumptions A l and A2 are inconsistent when used together in the knowledge base E. Thus, in a separate knowledge base Ei, responsible for maintaining inconsistent knowledge about E, an encoding in the form A' E' 1=1  is stored, where the quotes indicate names. Additionally, this separate knowledge base can also be maintained by the ACMS. Thus, I argue that each knowledge base should be kept consistent such that reasoning within the knowledge base is also consistent. In short, deletion should not be viewed as a loss, but rather, in conjunction with addition, as a process of replacement of old assumptions with new ones. Additionally, not to be taken as refuting the argument above, the ACMS is also powerful enough to reason about inconsistency within a single knowledge base (Kean and Tsiknis, 1992b).  5.5 Conclusions In summary, the tasks of abduction reasoning and revision in clause management are now completely characterized and can be computed in the logical framework of the ACMS. The tracking of the dependency between a query and its explanation is accomplished by a logical scheme of indexing, and its compilation into a representation of minimal implicates. The deletion process is achieved by deleting the selected minimal implicates. A protocol consisting of add(A), delete(A), ask(explazn, A) and disagree(A) has been proposed and its application was demonstrated by mimicking the reasoning of  5.5 CONCLUSIONS^  101  intelligent backtrack search. The ACMS proposed here is the first clause management system using the compiled approach that takes into account incremental deletion as one of its functions. As for future work, the choice of assumptions for deletion is an important issue. In the absence of domain specific knowledge, choosing a preference over a set of equally plausible disagreement sets (assumptions) can be bewildering. So far, only the principle of least change has been exercised. With the help of the ACMS, some method of investigating a preference such as the canonical ordering of explanations in the CMS (section 25) would be fruitful. Finally, different types of Problem-Solvers use the ACMS differently, and the study of their interaction could suggest a different definition for a protocol for the Problem-Solver-ACMS paradigm.  Chapter 6  Approximation This chapter studies the approximation of the set of minimal implicates and the effect this approximation has on their corresponding minimally consistent explanations. A general definition for approximated minimal implicates, called selective implicates, is presented. Three specific instances of selective implicates: query-based, ATMS and length-based are studied. Using the set of query-based minimal implicates and its approximation, explanations are generated and the properties of these explanations are studied. The goal of these studies is to propose a framework for incorporating knowledge-guided and resource-bounded approximation into computational abduction. The potential benefits might include the discovery of a useful, tractable approximation strategy for computational abduction'.  6.1 Introduction Recall that abduction in propositional logic is formulated as deducing a consistent sentence (explanation) that implies a given query from a given knowledge base. Additionally, it is desirable to compute the  minimal explanation. We shall call the consistency and minimality of explanation the descriptive adequacy criteria of computational abduction. Our computation of explanations, in the CMS, is via the notion of compiling minimal implicates. Subsequently, the search for an explanation for a given query is achieved by fast set operations on the set of minimal implicates. The complexity of the decision problem for abduction is NP-hard since it requires satisfying the consistency and minimality of an explanation. Additionally, in the CMS framework the cardinality of the set of all minimal implicates is also potentially exponential as described in chapter 3. We shall label its computational complexity the procedural adequacy criteria for abduction. 1  This chapter is based on (Kean, 1990).  102  6.1 INTRODUC 110N^  103  In light of such a procedural adequacy drawback, two questions in computational abduction arise: Question A: Can restricting the expressiveness of sentences in the knowledge base, thus limiting the expressiveness of explanations, result in tractable abduction without sacrificing the descriptive adequacy criteria? Question B: Is a framework of knowledge-guided or resource-bounded approximation strategies justified since such a framework implies, in general, forgoing global consistency and global minimality of explanation with respect to the knowledge base? In question A, the answer seems to be negative. For instance, in de Kleer's ATMS (1986a), the knowledge base is restricted to Horn clauses; assumption literals are not allowed to be justified; and the type of explanations allowed is restricted to a set of assumption literals. In such a restricted context, many non-Horn problems cannot be encoded in the ATMS. Moreover, in the ATMS a set of assumptions containing n literals has potentially 2' environments, or in our terminology — extensions (de Kleer, 1986c, p 198). To further restrict the expressiveness of the ATMS in exchange for tractability limits the utility of the ATMS. Since computational abduction is inherently a hard problem, a new approach to research in this area is needed. For instance Levesque (1989) proposed an approximation of abduction using a logic of belief. In this chapter, the concept of approximation of abduction is studied through the approximation of the set of minimal implicates, and more specifically by answering question B. Question B suggests sacrificing global consistency and global minimality of explanation with respect to the knowledge base. Nevertheless, we can define a new notion of descriptive adequacy for approximation in abduction which is to satisfy the local consistency and minimality of explanation with respect to the amount of computational effort expended. This criterion of satisfying local properties with respect to computational effort expended is very useful. It has the flavour of an any-time algorithmic strategy (Dean and Boddy, 1988), that is the more computational effort is spent the closer the system comes to satisfying the global consistency and global minimality criteria. This strategy is extremely useful because it provides the flexibility of a quick approximated explanation under restricted resources, or a more rigorous quality of explanation when resources are available. Additionally, if computational resources are limited and the computational effort for finding minimal explanations requires more than the allocated resources, then it is better to have an approximated explanation that satisfies the adequacy criteria of approximation, than to have no answer at all.  6.1 ENTRODUC, 10N^  104  6.1.1 Approximation What is an approximation? One possible definition is the characteristic of a computed property being close or near an ideal property. In the numerical domain, the difference between the desired property and the approximated property, in numerical terms, is the measure of error of the approximation. In the absence of numeric terms, a property is expressed by a set of logical sentences, and the metric for symbolic approximation is the difference in logical properties between the desired set and the approximated set. However, such a metric for approximation is not straightforward in symbolic domains. The problem is how to compare two logical properties represented by two sets of symbols? For example, assume the desired property of an implicate is of being minimal with respect to the knowledge base E. In the case of an explanation for a given query, the desired properties are those of minimality and consistency of the explanation with respect to E. The difference between the desired property and the approximation will be the measure of the approximation adequacy. For instance, an explanation, which is consistent and minimal with respect to a subset of the knowledge base, differs from an explanation that is consistent and minimal with respect to the  whole knowledge base. In the generation of explanations from a set E, there are a number of compromises we can make to save space or computation time. Essentially, what we trade for these savings are global consistency and minimality of explanations, or minimality of the set of implicates from which explanations are computed. All of the computations described in the following sections seek to compute a set of implicates which approximate the set of minimal implicates of E, while using less space or time. We will examine the properties of these sets of minimal implicates and the explanations they generate to find their adequacy and their value in various application settings. Nevertheless, the quality of an approximation of MI (E) is tied to how useful its explanations and resource savings are to a particular  Problem-Solver in a particular setting. To evaluate our approximations we will examine four of their properties as follows: 1. Are the implicates generated by the approximation minimal globally with respect to the knowledge base E, or minimal locally with respect to a subset of E? 2. Are the explanations generated from a set of approximated implicates minimal and consistent globally with respect to the knowledge base E, or minimal and consistent locally with respect to a subset of E? 3. What is the intended resource saving, in terms of space and time, of the approximation?  6.1 INTRODUCTION^  105  4. What is the extendable parameter of the approximation? In regard to our goal of designing any -time strategies, an extendable parameter is a parameter that we alter to extend a set of approximated implicates of E closer to the set M/ (E).  6.1.2 Implicates and Explanations Revisited To facilitate the presentation, we shall first reiterate the role of implicates in abduction. Given a formula E and a clause P, P is an implicate of E if E P. An implicate P of E is minimal if there is no other implicate P' P of E such that P' subsumes P. In more familiar terms, the set of all implicates of E is the set of all logical consequences E in CNF (ie. I (E)innotation2.2.1). Thus, the set of all minimal implicates of E is the set MI(E) = {M I no M' M, for M and M' E  Studying the set of minimal implicates is of great importance in the computational aspect of abduction. In abduction, an explanation E (a clause) for G with respect to E is defined as (1)E E —+ G and (2)E U E is consistent. Similarly, a minimal explanation E of G with respect to E is one such that no proper subset of E is an explanation for G with respect to E. If the set MI(E) is known a priori , finding a minimal implicate E^G E^(E) ensures that E is a valid explanation for G and is consistent with E. For example, let E {a A b g, /}. The conjunction a A b cannot be an explanation for g because it is inconsistent with a in E. The implicate Tz E MI (E) ensures that the clause a A b —f g is not in MI (E) and therefore the only explanation for g in E is g itself. Additionally, the minimality of an implicate guarantees to some extent the minimality of an explanation. Unfortunately, it does not guarantee it absolutely. To achieve such a guarantee, the set of all explanations of G with respect to E must be available. This is an inherent property of minimality as discussed in theorem 2.3.1 in chapter 2. For example, let E={a A b g, a g}. The explanation a A b for g is not minimal because a alone is an explanation for g. Again, { a^g } E M./ (E) ensures that the clause a A b^G will not be considered. Thus, the minimality of an implicate plays two important roles in finding an explanation: 1. to ensure consistency of the explanation E, and 2. to achieve, to some extent, the minimality of E.  6.1 INTRODUCTION^  106  6.1.3 Constraints and Approximation When using a compiled knowledge base, we observe that many of the minimal implicates compiled are not used in any way in the query processing. For illustration, consider a formula E = fa^b, b^c, c^d, d^gl where g is the query literal. The set of all minimal implicates of E is { a --4 b, a —÷ c, a^d, a —> g, b^c, b^d, b^g, c^d, c^g, d^g, a^a, b —> b, c —+ c, d —÷ d,g  The set of all minimal explanations of g with respect to E is the set { a, b, c, d, g}. Notice that the set of so called "intermediate" clauses involved in the transitive closure for g, for instance a^c, a^d, b d ..., is not used to process the query g after E's compilation. One possible simplification of the compiled knowledge base, if we have prior knowledge of which literals are likely to appear in queries, is to keep only those minimal implicates that have common vocabulary with the set of queries, and forget those that do not have common vocabulary with the set of queries. The following table illustrates those implicates that are kept and those that are ignored. original  keep  forget  a—b b—>c c—÷d  a—pg b—>g c,g  a,c a—>d b—pd  d —± g  Such a scenario arises very commonly in circuit diagnosis, where the query g is usually some observation of the inputs and outputs, and the "intermediate" clauses are those describing the circuits in between the input and the output. Better yet, why not just compute (during compilation) minimal implicates that are "relevant", that is those that have common vocabulary with the set of queries, assuming the vocabulary is known a priori. Obviously, such knowledge-guided computation is an approximation of the set of all minimal implicates and consequently the explanation obtained from this approximated set of implicates may or may not satisfy global consistency and global minimality requirements.  6.2 QUERY-BASED IMPLICATES^  107  Another possible approximation method for computing minimal implicates we will call resourcebounded approximation. The strategy is to compute minimal implicates of a certain length n, where since an implicate is a clause, its length is the number of literals it contains. Again, the question which arises regarding resource-bounded approximation is what will be the properties of explanations obtained from this approximated set of implicates with respect to consistency and minimality? The idea of knowledge-guided and resource-bounded approximation of implicates suggests that a general scheme of implicate approximation can be defined for the purpose of abduction 2 . Definition 6.1.1 (Selective Implicates) A clause C is a selective implicate of E if E C and 7Z(C) holds for some constraint R. The clause C is a selective minimal implicate of E if there is no other implicate C' C of E such that C' subsumes C.  In general, a set of minimal implicates of E that is selective will be a subset of I (E) and may be a subset of MI (E). We can view this restricted set as a form of approximation of the minimal implicates of E. The differences in properties between the minimal explanations for the query G with respect to E obtained from the restricted set, and the unrestricted set will be the measurement of the success of the approximation.  6.2 Query-based Implicates As suggested in the previous section, a useful restriction R. is to select implicates that have common literals with the query. Intuitively, assuming we know a priori the vocabulary of the queries Q, we should only compute the implicates that share this vocabulary.  6.2.1 Definition and Properties of Query-based Implicates One application for query-based approximation is the notion of compile on-demand in the framework of the CMS. Let E be a set of clauses, for each computation of an explanation for a query Q; we will begin by compiling the set of implicates related by vocabulary to Q. If the Q related implicates are already present, the system requires minimal effort to detect the fact, and produces no new Q related implicates. Subsequently, we find the explanation for Q from this set of Q related implicates. Thus, over a sequence of queries the set of implicates will accumulate. If the vocabulary of E is a subset of the vocabulary of all the queries, then this technique is equivalent to compiling MI (E). Thus, 2 Researchers in designing logic minimization algorithms for VLSI synthesis also used extensively methods for approximating prime implicants in logic minimization (Brayton et aL, 1984).  6.2 QUERY-BASED IMPLICATES^  108  this scheme satisfies the adequacy criteria for an any-time strategy in computation, that is the more queries with different vocabulary are posed, the closer we come to the set MI (E). Additionally, if some of the Q-related minimal implicates are removed because of limited storage, then the above scheme will regenerate those that are missing. The restoration process relies on the assumption that the original knowledge base, E, is available.  Definition 6.2.1 (Query based Implicate) Let E be a formula and Q = {iv, . • • qu} be a set of distinguished literals that occur in the queries. A clause C is a query based implicate of E restricted by Q if E C and C n Q 0 0. The clause C is a minimal query based implicate of E, restricted by Q, if there is no other implicate C' 0 C of E such that C' subsumes C. -  -  -  Example 6.2.1 Consider again the simple circuit example in figure 6.1. Again, we shall assume a simple fault model such that inconsistent values on the input and output wires reflect the abnormality of the inverter. The circuit is an inverter I, with input X, and output Y.  Y ^ 0  X 0  Figure 6.1: An Abnormal Inverter If the input is X = 0 and the output is Y = 1, the inverter I is not abnormal denoted by the predicate  --,ab(I) that is, X = 0 A Y = 1 -- -,a1)(I). Similarly, to describe the abnormality of the inverter, we need the fact X =OA Y = 0 -- ab(I). Additionally, we include the equality axioms X = 0 -÷ -X = 1 and -,X =1 -i X = 0 to describe the fact that wire X can have exactly one value (exclusive) and wire  X must have one value (existence). Thus, our knowledge base E in CNF form contains the following information: E = { (i)  -,  X = 0 V ab(I) V Y = 1,^(v) -- X =1 V ab(I) V Y = 0, ,  (ii) - X = 0 V -- ab(I) V Y = 0,^(vi) - X = 1V -- ab(I) V Y = 1, ,  (iii)  ,  ,  ,  X =OV X =1,^(vii) -iX = 0 V - X = 1, ,  (iv) Y =OV Y =1,^(vzzz) Y = 0 V -1. 7 = 11. The observation for the inverter circuit in example 6.2.1 is X = 0 --- Y = 0, and by clausal form transformation, the set of literals which occur in the query is Q = { - X = 0, Y = 0}. We shall use ,  Mil QI(E) to denote the set of all minimal query-based implicates of E restricted by Q. The minimal query-based implicates of E restricted by Q for the circuit example are enumerated below.  ▪•  ^  • 109  6.2 QUERY-BASED IMPLICATES^ MINI(E) = { qtb(I) V = 0 V Y = 0,^-,ab(I) V = 0 V Y = 1, -- ab(I)V X= 1 V Y= 0,^ab(I) V = 0 V Y= 1, --  ,  ab(I)V =0V il/ =0,^ab(I) V X =OV Y= 0, -  ab(I) V = 1 V Y = 0, = 1 V^=0,^Y=1V Y=0,  = 0 V X = 0,^--,Y=OV Y=0). To compare, the following set denotes some minimal implicates of E not generated because they do not have common vocabulary with Q.  mi(E)  -  NQ1(E)= {  -ab(I)V X = 1V ,Y=1,^- ab(I)V^=1V -  ,  -,  Y=0,  - ab(I)V -0( = 1 V Y = 1,^-- ab(I) V X=OV^= 0, ,  ,  - ab(I)V X = 0 V Y =1,^ab(I) V X =0V--- Y =1, ,  ,  ab(I)V^=1V ,Y=1,^ab(I)V X=1V-- Y=0, ,  -  ab(I)V X =1V Y =1, X =OV X =1,^=0V--,Y =1,  X=1V—,X=1,^Y=1V-iY=1,^ We shall use E  QI  }  C to denote a restricted entailment meaning E C and C n Q 0 for some  set of query literals Q. The following lemma 6.2.1 describes a property of this restricted entailment.  ^Lemma 6.2.1 Given a formula E, a set of query literals Q and a clause C c Q, E^C if there is a C' E M./1(21 (E) that subsumes C. Proof : if: Let E  Q  I C. If there is no proper subset C' of C such that E C', then by minimality C E MIS (E).  Assume there is such a proper subset C' of C. Since C' C C and C C Q , therefore C' C Q. Hence, by the definition of minimal query-based implicate (definition 6.2.1), C' E MIS QI (E) contradicting C is minimal.  only if: Let C' E^(E) and C' subsumes C. By definition 6.2.1, E C'. Since C' subsumes C and C C Q, therefore E =I QI C.^ QED -  Note that the relationship between the restricted entailment and subsumption is false for the case C ¢ Q. To construct such a case, let the condition be C  g  Q. Since E^Qi C, C n Q^0, thus,  6.2 QUERY-BASED IMPLICATES^  110  C — Q 0. If we let C'^C — Q and assume that E^C', then C' C C therefore C M/i cd i (E)•  Moreover, C' M/1 Q (E) either because c' n Q = 0. Intuitively, the above example states that the relationship between restricted entailment and subsumption is not preserved if the consequence C has non-query related literals. Other trivial facts concerning minimal implicates and minimal query-based implicates are: 1. MI (E) C I (E) and  2. M/10(E) C I (E). Alternately, the set M/10 (E) can be defined in terms of I (E) as follows: let /(E) be the set of all logical consequences of E in CNF, thus MI(E) = SUB( I (E) ) and the set of query-based minimal implicates restricted by Q with respect to E is M./10(E) = {PIP E MI (E), P n Q 0}.  Proposition 6.2.1 Let E be a formula, MI(E) be the set of minimal implicates of E and MIpi (E) be the set of query-based minimal implicates of E restricted by Q, the set MliQi (E) C MI (E).  Proof : Let C E MIIQI (E) and assume that C MI (E). By definition 62.1 the clause C is an implicate and it is minimal with respect to E. According to the definition of minimal implicate, C is also a minimal implicate, contradicting the assumption. Therefore C E (E). QED The inclusion properties of the sets I (E) , MI (E) and AlliQI(E) are illustrated in figure 6.2.  Figure 6.2: Set Inclusion Properties of I, MI and M/10 of E.  6.2 QUERY-BASED IMPLICATES^  111  6.2.2 Explanations Generated From Query based Implicates -  Recall that an explanation for a query G with respect to a formula E is (1) E E^G and (2) E U E is consistent. An explanation E is minimal if no proper subset of it has the same property (definition 1.1.1). To compute the set of minimal explanations from M/ (E), one computes the set  ME(G,MI(E))  ,  SUB({E IM EMI(E),M nG 00and—iE =M — G}).  Since our motivation is to compute the set of minimal explanations from a smaller set of minimal implicates M/10 (E), the question is what are the discrepancies between the minimal explanations obtained from MI (E) and Mil Q (E). Recall that the set M Q I (E) is computed given a priori a set of literals, assumed to contain literals in the queries' vocabulary, for selectively constraining the implicates. When searching for an explanation for an actual query G, we do not place any restriction on G; the query G may have no common literal with Q. In this case, the set Q can act like a set of assumptions, and query-based implicates are assumption-based implicates. Thus, potentially we can use this query-based approximation method to approximate assumption-based reasoning in chapter 4. Nevertheless, we shall first investigate the properties of this query-based approximation. The two properties we are investigating for an explanation E of G, with respect to a knowledge base E, are  minimality and consistency. Let the set ME(G,MI1Q (E)) be the set of all minimal explanations for G with respect to E restricted by the set of query literals Q, that is  ^ME(G,  MII Q I(E)) = SUB({E I M E M/i (E), M n G 00 and^= M— G}).  Corollary 6.2.1 Let E be a formula, Q be a set of query literals and G be a non-empty clause. If E E  ME(G, Mho (E)) then E is consistent with E. Proof : If E E ME(G MIIQI (E)), then E^U G for non-empty G and^U G is minimal. Assume that E^but^C^U G) thus contradicting^U G is minimal. Consequently E U E is ,  consistent.^  QED  In terms of minimality, if E E ME(G, MII Q I (E)) then E is minimal for G with respect to MII QI(E). Unfortunately, E is no longer minimal with respect to E globally. To demonstrate the above fact, we need to show that ME(G, MII Q I(E))^ME(G, MI(E)). First, we show that ME(G, MII Q I(E)) ME(G, MI(E)) as illustrated by the following example. Let E =  6.2 QUERY-BASED IMPLICATES^  112  {aVbVc, aV dV cV q},Q = {q} and G = bV cV q. Thus, a Vdv cVq E MA Q 1(E) and both  a V by c and aVdvcVq are in MI(E). From MA0(E) the explanation A^E ME(G, MA0(E)). Conversely, from MI(E), only -' a E ME(G, MI(E)) because —'a subsumes the explanation ^A —'d. Thus the explanation -'a A —,c/ in ME(G, A/1110(E)) is not in ME(G, MI(E)). Conversely, ME(G,MI(E)) ME (G , MII Q I(E)) either, as shown above; that is the explanation a E ME(G, MI(E)) is not in ME(G, MA0 (E)). This is simply stating the fact that a minimal explanation obtained from a smaller subset MIT (E) is not guaranteed to be minimal with respect to explanations obtained from its superset MI (E). There is however a relationship between these two sets which is expressed by the following corollary. Corollary 6.2.2 Let E be a formula, Q be a set of query literals and G be a non-empty clause. If E E ME(G, MI10 (E)) then there exists an E ME(G,MI(E)) such that E' subsumes E.  Proof : Let E E ME(G, M110(E)), thus by the definition of ME(G, MA (E)), there exists M E^Q i (E) such that^= M — G and M n G 0. Since M is minimal with respect to E, M E MI (E) and = M — G. By the minimality of ME(G, MI(E)), there is an E' E ME(G, MI(E)) that subsumes E. QED Intuitively, the explanation obtained from the set ME(G, MA0 (E)) is less minimal than the one obtained from the set ME (G , MI(E)). It is less minimal precisely in the sense that there is another explanation, possibly different, from ME(G, MI(E)) that subsumes it. Fortunately, there is a special case in which these two sets are equal. If the query G is a unit clause, that is it contains a single literal, and G fl Q 0, then ME(G, QI(E)) = ME(G, MI(E)) as expressed in the following lemma 6.22. Lemma 6.2.2 Let E be a formula, Q be a set of query literals and G a unit clause such that G n Q 0. The set ME(G, Mho (E)) = ME(G, MI(E)). Proof : Let E E ME(G, QI (E)) and obviously (— EU G) E MA0 (E). Assume that E ME(G, MI(E)), then there is an E' E ME(G, MI(E)) such that it subsumes E. Since G is unit clause, (—E' U G) E MI (E) and since (—E' U G)n Q 0, G) E MIIQI (E). But then U G) C ( — EU G) because C —'E, thus contradicting (— E U G) E MIIQI (E), therefore E E ME(G, MI (E)). ,  ,  ,  Let E E ME(G, MI(E)) and (— E U G) E MI(E). Assume that E ME(G, Ad 110(E)) that is, there is an E' E ME(G, MII Q I (E)) such that it subsumes E. Consequently, (—'E' U G) E^Q 1(E) and by proposition 6.2.1,^U G) E MI(E). But then E' E ME(G, MI(E)) contradicting E is minimal. QED ,  -  6.3 PROBLEMS WITH COMPUTING QUERY-BASED IMPLICATES ^  113  In summary, explanations obtained from the set Mil Qi(E) preserve consistency and sacrifice minimality globally with respect to E. Nevertheless, they do preserve minimality with respect to MIS Q I(E) locally, that is the explanation is minimal and consistent with respect to MilQi(E). This is precisely the adequacy of approximation we desired. In the special case, where the query G is a unit clause and has non-empty intersection with Q, we preserve both properties and gain by retaining and searching only a subset of the space of minimal implicates. Also, if the set Q grows to include V, the set of vocabulary of E, then MII QI(E) = MI(E).  6.3 Problems with Computing Query-based Implicates To compute a minimal query-based implicate, according to definition 6.2.1, we must determine that no proper subset of it is an implicate of E. This implies that a minimal query-based implicate relies on the fact that all other minimal implicates (without restriction) of E are known. This implies that when Q is a small subset of V, the set Mil Q i (E) saves space compared to MI(E). However, the time needed to compute the set M/i Q I (E) is equal to that required to compute MI(E). Example 6.3.1 To illustrate this fact, let the query set of literals Q = {q},  E= {-ia V b1, -41 V b2,^, bn--1 V bn,^, —19 Vq,pV^. —,  We can derive two implicates, and V q, using clauses in E, tabulated as two derivation sequences shown below: non-query-based implicate —,ct V  bl  —b1 V b2 —  11 2 ,  query-based implicate q pV -'a  V b3 q  ▪  V b„  The implicate^derived from the left sequence, is a non-query-based implicate and it subsumes a V q which is a query-based implicate derived from the right sequence. Thus, to ensure the minimality of a V q, the long derivation sequence involving non-query-based implicates on the left is required.  6.3 PROBLEMS WITH COMPUTING QUERY-BASED IMPLICATES ^  114  Intuitively, a clause is minimal with respect to E if we know that no other clause in E subsumes it. Also note that none of the clauses in the left sequence are query-based implicates because they have empty intersection with Q. Consequently, to ensure a query-based implicate is minimal, other implicates, query-based or not, must be generated. Although these generated non-query-based implicates are discarded afterwards, the time required to generate them is as much as the time needed to generate MI (E). Ideally, we would like to have an algorithm to compute MIS Q 1(E) without computing all the minimal implicates. We shall investigate such possibility using an approximation algorithm to generate minimal  query-based implicates.  6.3.1 Approximating Minimal Query - based Implicates In generating MIS Q IP, we observed that the minimality requirement in the definition of query-based implicate is the cause for consuming computation time. To address this drawback, we relax the requirement of minimality by defining minimality with respect to clauses that are also query-based. Subsequently, we use a natural method for computing implicates called a consensus operation (definition 3.2.1), augmented with the restriction suggested by our query-based philosophy and the minimality relaxation suggested above to approximate Mil (21(E). As suggested above, we define a variant of minimal query-based implicate as follows:  Definition 6.3.1 (Approximated Minimal Query-based Implicate) A clause C is an approximated minimal query-based implicate of E restricted by Q if C is a query-based implicate of E and there is no other query-based implicate of E such that C' subsumes C. The above definition suggests that the minimality of a query-based implicate is verified with respect to other query-based implicates, as oppose to the set of all implicates. For example, let E = (1) a V b, (2) (3)  —  1p V q, (4) p V (5) h V cv q, (6) — 11, V ,  and the set of query literals Q {q}. First, the consensus of (1) and (2) yields an implicate a, which is not a query-based implicate because it does not contain q. Second, the consensus of (3) and (4) yields an implicate q V a, which is an approximated minimal query-based implicate because it is not subsumed by any other query-based implicate. Note that a does subsume it, but a is not a query-based implicate. Finally, the consensus of (5) and (6) yields the implicate c V q V a, which is not an approximated minimal  query-based implicate because it is subsumed by the query-based implicate q V —Ia.  6.3 PROBLEMS WITH COMPUTING QUERY-BASED IMPLICATES ^  115  Intuitively, the set of all approximated minimal query-based implicates, denoted by MI I Q I (E), contains the set M/i cj i (E). Proposition 6.3.1 Let E be a formula and Q be a set of query literals. The set MIIQI (E) c MI IQI ( E )' Proof : Let the clause C E MI IQ' (E) and assume that C MII Q I (E). By the definition 6.2.1 of query-based -  implicate, the clause C is an implicate of E, C n Q 0 0 and there is no other implicate C' of E that subsumes C. Since C is minimal with respect to E, by definition 6.3.1, C is an approximated minimal query-based implicate of E, contradicting the assumption. Therefore C E Mil iQi (E). QED Since the set MI1 QI (E) C MI (E), the intersection of MI(E) and Mil /91 (E) is the set MilQi (E) as shown in the following figure 6.3, and is stated formally in proposition 6.3.2. I(E)  Figure 6.3: Set Inclusion Properties of I, MI, MII Q I and MI( Q 1 of E.  Proposition 6.3.2 Let E be a set of clauses and Q be a set of query literals. The set MII Q I (E) = MI(E)nmi6 (E). Proof : Assume that the clause C E MI(E) n mil io (E) and C c M/1 Q 1 (E). Hence, C E MI(E) and ,  C E MII Q I (E). By definition 6.3.1, C E M/1 1(21 (E) implies that Cn Q 0 0. By the assumption, C E MI (E)  implies that C is minimal with respect to E. Therefore, by the definition (6.2.1) C is a minimal querybased implicate, that is C E MA 0 (E). Conversely, let the clause C E Milo (E). By propositions 6.2.1 and 6.3.1, C E MI (E) n MII Q I (E). QED In fact, definition 6.3.1 suggests a systematic algorithm to compute the set M/I 'QI (E). To implement this, we need the consensus operation described in definition 3.2.1 of chapter 3. Every consensus obtained from clauses in E is an implicate of E. In order to obtain a query-based implicate, the consensus operation is given the additional restriction that CS(A, B, x) n Q 0 0 for some set of query literals Q. Obviously, CS(A, B, x) n1Q = 0 if both A n Q = 0 and B n Q = 0. This suggests that the consensus  6.4 RESTRICTED GENERALIZED CONSENSUS^  116  operation for finding query-based implicates is guided by participating clauses that have non-empty intersection with the set of query literals. Unfortunately, the definition (6.3.1) of M/( Qi (E) contains more implicates than those generated solely from the restricted consensus operation. For example, if E = { a V b} and Q = { ql , , q n }, then every aVbVq, for 1 < i < n, is an approximated minimal query-based implicate of E. This also implies that the size of M/(Qi (E) can be as large as M/ (E). However, we can restrict our implicate generation to those generated by the restricted consensus operation, and ignore those approximated minimal query-based implicates of E formed through disjunction. Intuitively, this strategy advocates lazy computation in terms of sacrificing completeness. Using this approach, we should obtain a subset of M./ 1 Q 1 (E) which is smaller than MI (E) and M/( Qp (E) but contains Mil (21(E).  6.4 Restricted Generalized Consensus In this section, we shall characterize a method to compute approximated minimal query-based implicates which sacrifices completeness. This method is intended to use more space than Mil Q 1(E) but less than M/(Qp (E) in exchange for not computing all the minimal implicates of E. To compute such a subset of the set of approximated minimal query-based implicates, consider first the definition of a restricted generalized consensus.  6.4.1 Definition and Properties of Restricted Generalized Consensus Definition 6.4.1 (Restricted Generalized Consensus) Let C = {C1, ... , CO and Q = {ql, • ..,q.}. A generalized consensus of C, restricted by Q, is defined as GCS(C) =  C1  if C = {Ci} andCinQO 0  S= CS( GCS({C1,...,C,,_1}), C,,, x)  if C = {C1, . . . , C,,} and S n Q  undefined  0  otherwise  Note that the definition implies the order of clauses in C is crucial because, if rearranged, they might not yield a restricted generalized consensus. That is, when ICI > 2, GCS(C) is not commutative. For example, let C = {(1) a V b, (2) b V c, (3) V q} and Q = fql.  1. GCS({1, 2,3}) = undefined because CS(1, 2, b)n Q = 0. 2. GCS({1 , 3, 2}) = undefined because there is no consensus between clause (1) and (3).  6.4 RESTRICTED GENERALIZED CONSENSUS ^  117  3. GCS({3,2,1}) = CS( CS(3,2, c), 1, b) = CS( CS(^V q,^V c, = CS(^V q,  -'a V  c), --ra V  b, b)  b, b)  --- a V q ,  Fortunately, if a generalized consensus exists for a set of clauses C restricted by Q, then any permutation of C that has a generalized consensus restricted by Q will yield the same consensus. Theorem 6.4.1 Let C = {C1, . , C„} be a set of clauses and GCS(C) be a generalized consensus restricted by Q for the ordering in C. For any permutation C' of C such that GCS(C') exists, then GCS(C') = GCS(C). Proof : Observe that each consensus operation CS (A, B, x) involves removing a pair of complementary literals, say { x , --z}. Thus GCS(C) = S has all the pairs of complementary literals {x1, al} • • • , {xn _ 1i -x„_1} removed by the sequence of consensus operations --  CS(ci c2,^cS(CS(Ci, C2, xi), C3, x2), . . . , cs(GCS({CA,^,^C7i, xn-1) ,  to yield S. For any permutation C' of C such that GCS(C') = S', if the same set of complementary literals {x i ,^, {rn-i , x2,1} is removed, then S' = S. If S'^S, then there is at least a pair of complementary literals {y, }, y , 1 < j < n "I used in place of some {x i , --az }. Since every clause Ck,i. < k < n participates in the restricted generalized consensus operation to produce S', thus {x i , -ad E S' contradicting the definition that GCS(C') = S' is fundamental. QED --,  As a consequence of the above theorem, the set of all possible consensus of a set of clauses C restricted by Q is the set of all possible generalized consensus of the members of the powerset of C restricted by Q. Additionally, we shall speak of the minimality of a consensus in terms of the subsumption relation. Corollary 6.4.1 Let C = {C1, . ,C,} be a set of clauses. The set of all minimal consensus of C restricted by Q is g(C) SLIB({GCS(S)1VS c^.  Finally, the set inclusion properties amongst G(E), MII Q I (E) and M1(0 (E) are expressed in the following lemma. Lemma 6.4.1 Let E be a formula, Q be a set of query literals and g(E) be the set of all minimal consensus restricted by Q.  1. G(E) C M/1 0 (E) and 2. A4/10 (E) c G(E).  6.4 RESTRICTED GENERALIZED CONSENSUS^  118  Proof : (1) g(E) C MCQ1 (E) : Assume that there is an S E g(E) such that S MI(Qi (E). Observe that every minimal consensus restricted by Q is an implicate of E. Thus S is an query-based implicate and since S E G(E) implies that no proper subset of S is in g(E), S is a approximated minimal query-based implicate (definition 6.3.1) contradicting S MI(Qi (s).  g(E) : Let S E^Qi(E). By the definition 6.2.1, S is an implicate of E, S is minimal and S n Q 0. By corollary 6.4.1,the set g(E) contains all the implicates that are minimal and have QED non-empty intersection with Q, therefore S E G(E).^ (2) MA QI (E) C  I (Z)  Figure 6.4: Set Inclusion Properties of I, MI, MIIQI MI(Qi and the approximation g of E. ,  Figure 6.4 illustrates the set inclusion relationship amongst I(E), MI(E), MI1 Q 1(E), M/1 10 (E) and the approximation G(E) denoted by the circular dotted line. The partition in the dotted circle, 2 = (E) —^Q I(E), is outside of Mil I (E) and contains those approximated minimal query-based implicates  that are not minimal globally with respect to E. As shown in example 6.3.1, the implicate ^V q is a query-based implicate generated by the restricted generalized consensus operation, but is not minimal with respect to E globally. In fact, we can characterize this property of the set Z exactly. First, we note that g(E) = MII QI (E) U Z.  Corollary 6.4.2 Let E be a formula, Q a set of query literals and Z a clause. If Z E Z then there exists a clause M E MI(E) such that M fl Q = 0 and M subsumes Z. Proof : Assume that Z E 2 thus Z E g(E). Since Z is a query-based implicate and it is not minimal by the fact that it is not in M/1 91(E), then there is an implicate that subsumes it. If there is an implicate M E I (E) that subsumes it, then by the definition of g(E), Z g(E) contradicting the fact that Z E g(E). Thus, the only minimal implicate M that can subsume Z is one resides outside of Milo (E). By minimality, M E MI(E) and M n Q = 0.  QED  6.4 RESTRICTED GENERALIZED CONSENSUS^  6.4.2 An algorithm for computing  119  gm  Intuitively, the restricted generalized consensus suggests that the search for a query-based implicate, through a chain of restricted consensus operations, should always select participating clauses that have a non-empty intersection with Q. This fact is stated more precisely in corollary 6.4.3. Corollary 6.4.3 Let E be a formula and Q a set of query literals. If S c E such that VS, E S (S, n Q = 0), then GCS(S') = undefined for all S' C S. Any subset S of E, such that every member of it has an empty intersection with Q, can be safely ignored for purposes of restricted consensus. Recall that in the definition of restricted generalized consensus (definition 6.4.1), the GCS of a set of clauses can be computed via a sequence of restricted consensus of two clauses. Thus by searching for two clauses at a time such that at least one of the clauses has non-empty intersection with Q ensures the elimination of redundant search as suggested by corollary 6.4.3. We shall introduce a naive method for computing restricted consensus in algorithm 6.1. Algorithm: Naive QBIG Input: A formula E and a set of query literals Q. Output: The set g(E). Let temp <— 0 While temp 0 E do temp <— E  E E u CS(A, B, x) for some A,B E E such that A n^0 or Bn Q0 0.  end Ei—Eu{ {q,^I Vq E Q} E<— QBIG-Subsumption(E, Q) end  Algorithm 6.1: Algorithm Naive QBIG Finally, to obtain the subset of approximated minimal query-based implicates, the subsumption operation is performed according to the rule that clause A subsumes clause B only if A C B and both clauses have non-empty intersection with Q. Algorithm 6.2 shows a simple restricted subsumption method. To illustrate the search space, consider the following set of clauses in E and assume that the query literals are Q = { q, ,  6.4 RESTRICTED GENERALIZED CONSENSUS ^  120  Algorithm: QBIG-Subsumption Input: A formula E and a set of query literals Q. Output: Minimal clauses of E restricted by Q. Let temp <— 0 While temp 0 E do temp 4— E  E<—E—AforsomeAEEsuchthat1BEE(BcA),AnQ00andBn(200. end end  Algorithm 6.2: Algorithm QBIG-Subsumption  (1)  a4^c  (2)  a l A a2,^c —.).^d  (3)  a3 A al,^d —). 41  (4)  a4 A a2,^d --> 42  The set of minimal implicates are depicted in figure 6.5. The original clauses are enclosed in solid boxes and the derived minimal implicates are outlined by dotted boxes. A solid arrow between boxes indicates potential consensus and a dotted arrow denotes subsumption relation. The numbers in brackets denote the clauses involved in generating the implicate. For example, box (2, 3) is the consensus of clauses (2) and (3). Notice that the dotted box (1, 2) is not an query-based implicate because it has no common literals with Q. Also note that clause (1, 2) is also the intermediate clause that produces the other two implicates denoted by dotted boxes (1, 2, 3) and (1, 2, 4) respectively. Alternatively, the other two implicates (2, 3) and (2, 4), which are query-based implicates, are also capable of producing the query-based implicates (1, 2, 3) and (1, 2, 4) respectively. Thus, following the algorithm QBIG, we first select a clause that has non-empty intersection with Q, for example clause (3), resolve it with clause (2) with respect to literal -, d to produce clause (2, 3). Subsequently, clause (2, 3) resolves with clause (1) with respect to literal —pc to produce clause (1, 2, 3). Similarly, when clause (4) is chosen to resolve with clause (2) with respect to literal —4, it yields clause (2, 4). A subsequent consensus operation with clause (1) with respect to literal —i c produces clause (1, 2, 4). Notice that clause (1, 2) is never produced using algorithm QBIG and thus the computational saving. The remaining question regarding this approximation is how large is the set g(E)? The answer is that it is a subset of M/( Qi (E) (lemma 6.4.1) but because we sacrificed global minimality, it may be larger  6.4 RESTRICTED GENERALIZED CONSENSUS ^ (1)  (2,3) [—ai v..  a2 v —a3 V ^C  (3 )  I  1—a, —a  (1,2,3) 1—a, v —a2 v —a3 v  -  —  —a4 v  (2,4) —A t v —az v  V q11  — a, v a 3 v  2v  121  d v q, I  a4 V ql 1  1  —a2 v —a4 v  —  d  v  (  12 I  —  d 1 (1,2)  a4^'12  1  (4) : sub.sumes s  1-71 v --as V -74 V q2 1 (1,2,4)  v —q,^v —ch1  Figure 6.5: Minimal Implicates Consensus Graph than MilQi(E) by a significant amount. That is, the space denoted by Z can contain a lot of non-global minimal implicates. Example 6.4.1 To illustrate this fact, let the query literals Q = {q},  E=^V bi , —1b1 V b2, . • • ,^, -'b,,, ^pV q,  non-query-based implicate ^query-based implicate •  ▪ —  ▪  V bi^  V b2^ 1b2V b3^  V b n^p  Vq p V V p V —la V 12  V^V trn--1  pV  a^  —,  aV  cc V t ni  qV^V q V t m  Notice that there can be in implicates in g (E) that are not minimal globally with respect to the non-query-based implicate a. Nevertheless, this is justified in the sense that this is the price we pay for not spending the effort to find the minimal implicate la from the set of non-query-based implicates. This tradeoff is reasonable if n is significantly larger that in. Finally, in the worst case -  6.4 RESTRICTED GENERALIZED CONSENSUS^  122  where every clause in E has non-empty intersection with Q, this method will have the same complexity as computing all the minimal implicates. Thus, the query-based implicate computation is an any-time algorithm. Obviously the above algorithm is naive and further improvement can be achieved but we shall leave this investigation for future work.  6.4.3 Explanations Generated From g(E) Recall that our motivation is to compute the set of minimal explanations from a smaller set of minimal implicates Mlio (E), thus saving space. We will now investigate the properties of explanations generated from the set G(E). Lemma 6.4.1 stated that Mlio (E) c g(E), thus, the properties of explanations obtained from the set g(E) inherit at least those obtained from he set MI1 Q 1 (E). Recall from figure 6.4 and corollary 6.4.2, there exist implicates in the set c,(E) that are not minimal globally with respect to E. This is illustrated by the area denoted by Z in figure 6.4. This property implies the explanations obtained from implicates in this subset 2 are not consistent globally with respect to E. Since the subset Z is not known a priori, the question remains whether we can distinguish when the explanations obtained from the set G(E) can guarantee consistency. We shall compute the set of minimal explanations obtained from the set g(E) as follows: ME(G, g(E)) =  SUB({E M e g(E), mn Goo and  M — G}).  Lemma 6.4.2 Let E be a formula, Q be a set of query literals, g(E) be the set of implicates approximated from  algorithm QBIG and G be a clause. If E E ME(G, g(E)) and (— E U G) c Q, then E U E is consistent. ,  Proof : Since E E ME(G, g(E)) and (-E U G) C Q, by the definition of G(E),^U G) is a minimal  query-based implicate, that is, (--,E U G) E M./10(E). Assume that E is inconsistent with E, that is, there is an E' C E such that E^But^C^U G) contradicting (-,E U G) E^P. Therefore  there cannot be such a and consequently E U E is consistent. QED In short, lemma 6.4.2 states that if the explanation (to be precise, the negation of the explanation) and the query G contain only query literals from Q, we are certain that the explanation is consistent. Nevertheless, to ensure minimality, we require that G is a unit clause in addition to the condition stated in lemma 6.4.2. This is stated more formally in lemma 6.4.3. Lemma 6.4.3 Let E be a formula, Q be a set of query literals, g(E) be the set of implicates computed from  algorithm QBIG and G be a unit clause. E E ME(G, g(E)) and (— E U G) C Q iff E E ME(G ,MI(E)) and ( E uG) C Q. ,  -  6.4 RESTRICTED GENERALIZED CONSENSUS ^  123  Proof :  if: Since E E ME(G, G(E)),^U G) E G(E) and is minimal. Additionally, (-E U G) C Q implies that (-E U G) E M1)0(E). Since G is a unit clause, E E ME(G, MII Q I(E)) and by lemma 6.2.2, E E ME(G, MI(E)).  onlyif: Let E E ME(G, MI(E)) and since (-,E U G) C Q and G is a unit clause, by lemma 6.2.2, E E ME(G, NOP). Hence (-tE U G) E^QI (E) and it is minimal. Since M/i Q (E) C g(E) by lemma 6.4.1, (- E U G) E _op. Again by minimality and the fact that G is a unit clause, E E ME(G, g(E)). QED ,  Consider example 6.3.1 again, the algorithm QBIG will only derive the implicate a V q but not the long chain for non-query-based implicate te a. Thus if the query is the literal q, then the explanation a obtained from a q is inconsistent globally with respect to E. In short, if we sacrifice minimality in implicates, we introduce inconsistency in explanations, except in the two special cases in lemma 6.4.2 and 6.4.3. Nevertheless, an explanation obtained from g(E) is consistent and minimal locally with respect to g(E). This is useful in that we can view G(E) as our current knowledge base and have no knowledge of what E is. Now, the tradeoff becomes that between the saving over computing all the minimal implicates, versus relaxing global consistency in explanation. One might argue that global consistency of an explanation is crucial and it should be required at any cost, but as indicated in example 6.3.1, to derive is expensive. On the other hand, one could argue that obtaining an explanation quickly is better, for two major reasons. First, obtaining an explanation of some sort is better than not as in example 6.3.1: if the query is q, there will be no explanation if we insist on global consistency. Thus, from the information processing point of view, the user is left guessing which part of the explanation is inconsistent. Second, since reasoning is continuous, asking more queries will eventually lead to the detection of the inconsistency. For example, after obtaining the explanation a for the query q, we can ask for the explanation of the query a, thus adding a to the set of query literals Q. If the explanation for a is II, then a is a consequence of E, thus a is inconsistent with E (see chapter 2 section 2.4). This chapter argues for the second proposition above, that is relaxing global minimality and consistency in favour of saving time and space for explanations that are locally consistent and minimal. In a much looser argument, one can view such approximation as lazy reasoning where one works on only the easily accessible facts. As the demand for precision increases, more work is required.  6.5 ATMS IMPLICATES^  124  6.5 ATMS implicates In this section, we shall demonstrate the use of the definition of selective implicates in defining ATMS implicates. The purpose is merely an exercise to show the generality of the definition, and that the formalization of ATMS is feasible following the original motivation of Reiter and de Kleer (Reiter and de Kleer, 1987). Let E be a consistent set of clauses, and A {ai, ...an} be a set of distinguished positive literals called assumptions. Definition 6.5.1 (ATMS implicate) A clause C is an ATMS-implicate of E if E C and -  1. C= q for a literal q E A (a premise); 2. C=^q for a literal q § I A and {al ,^, a n,} C A; 3. C = a l A ... A a m —> ^ (or —al V ... V -- a,n ) where {—a i ,^, am} C A (a nogood). ,  —  A clause C is an ATMS-minimal implicate of E if no proper subset C' of C is an ATMS-implicate of E.  Thus, the definition is also an approximation of implicates and minimal implicates with added restrictions. Interestingly, using the above restrictions, it can be shown that every ATMS-minimal implicate of E is minimal globally with respect to E. Proposition 6.5.1 (ATMS minimal implicate) If C is an ATMS-minimal implicate of E, then C is a minimal implicate of E. -  Proof : Assume the clause C is an ATMS-minimal implicate of E and C is not minimal globally with respect to E. Then, there is a C' C C such that E C'. By the definition of ATMS-minimal implicate (definition 6.5.1):  1. If C = q then the only clause that subsumes it is the empty clause D. Since E is consistent, the empty clause cannot be derived. Thus C must be minimal. 2. if C = a l A ... A a, —+ q or a l v^v — a rn V q), then C' can either be ,  (a)  C^..., a m } which is a nogood;  (b) C' = q which is a premise; or  (c)^= ak, A ... A ak m^q such that { a k„ . • • ak m^{ al ,^, a ni } In all the cases, C' is an ATMS implicate of E which contradicts the assumption that C is ATMSminimal.  ^  6.6 LENGTH-BASED IMPLICATES^  125  3. if C = a i A . A a, ^ or (—, a i V v . . . V a m ) which is a nogood, then the only clause that subsumes it is another smaller nogood C', which contradicts C being ATMS-minimal.^QED Let  MIATMS  (E) be the set of all ATMS-minimal implicates. In terms of finding explanation from  MIATMS (s), if the query G does not contain any assumption literals from A, then explanations for G  generated from MIATMS (E) are consistent. However, if G contains assumption literals, then there can be no explanation because of the restriction in condition (2) of definition 6.5.1. The ATMS-implicate approach is computing consistent explanations by sacrificing expressiveness, that is only HORN clauses and non-assumption queries are expressible. One efficient algorithm to compute ATMS-minimal implicates is de Kleer's algorithm in his original ATMS (1986a). The ATMS algorithm exploits all the restrictions mentioned above so that computing minimal ATMS-implicates is fast. Using the above definition (6.5.1) would allow us to study variants of ATMS and their corresponding algorithms by varying the restrictions 3 . For example, one interesting variation is to allow multiple definitions of sets of assumption literals A z , for some integer i > 0. Thus, for each A z , we build a window (set) of ATMS-minimal implicates on demand. Searching for explanations for a query can switch among windows depending on the focus of the sets of assumption literals.  6.6 Length-based Implicates In this section, we describe a resource-bounded approximation scheme using the length of a clause as the restriction.  ^Definition 6.6.1 (Length-n Implicate) A clause L is a length-n implicate of E if E^L and ILI < n for some natural number n. A clause L is a length-n minimal implicate of E if no proper subset of L is a length-n implicate of E. The motivation for such a definition is based on the idea of resource bounding for computing time and storage. For instance, under stringent storage requirements, requesting length-5 minimal implicates proceeds by computing the consensus of two clauses A and B such that IAUBI < 7 or ICS (A, B, x)I < 5. Thus after removing the complementary literals, the size of the consensus must be less than or equal to 5 literals. Such a constraint will avoid generating implicates of size greater than 5 and potentially save time and storage. Obviously if n > VI, the size of the vocabulary, then this strategy is equivalent to 3 For  non-Horn extension in ATMS, see NATMS in (de Meer, 1988).  6.7 CONCLUSIONS^  126  generating all the minimal implicates. Also note that if the clause L is a length-n minimal implicate of E, then L is minimal for implicates of any length and thus for E. Corollary 6.6.1 Let E be a formula and MI S „ (E) be the set of all length-n minimal implicates. If L E Mi<„(E)  then L E MI(E). Proof : Let L E M.1<„ (E) and note that L can only be subsumed by another implicate smaller than L. By the definition of length-n minimal implicate (definition 6.6.1), the minimality of L for length-n ensures no other implicate of length greater than n can subsume L. Consequently L is minimal with respect to E and L E MI(E).  QED  As a consequence, an explanation E for a query G generated from length-n minimal implicates guarantees the consistency of E with respect to E. Unfortunately, it does not guarantee the minimality of the explanation E for all lengths as illustrated by the following example. Example 6.6.1 Let E = {(1)aVbVqi,(2)avcVqi Vq21, the query G =CV(iiVq2, and the designated  query's vocabulary Q = fqi,q21. The implicate (1) has length 3 and (2) has length 4. The explanation generated from length-3 implicates is a V b and from length-4 implicates is "a" which subsumes "a V b". Nevertheless, at the expense of minimality of the explanation, this idea has the advantage of being  compile on-demand and also satisfies the requirement for an any-time strategy. For example, given a query G, generate the explanations for G from the set of all length-n minimal implicates. If more precision is required, generate minimal implicates of length n + 1 and so on. This again, has the flavour of  any-time computation in which the length of an implicate is used in guiding the computation of a partial subset of minimal implicates. As the length limit increases, the set of minimal implicates becomes more complete. With regard to the issue of computation, generating smaller implicates first, has the advantage of subsuming larger implicates. This is similar to the unit-resolution strategy in theorem proving where a unit literal is resolved first. Other uses for this definition include the formalization of constraint satisfaction problems in ATMS as presented in (de Kleer, 1989).  6.7 Conclusions This chapter proposed to incorporate symbolic approximation into computational abduction. A scheme of approximation strategies was presented and two approaches to approximation in abduction, namely  6.7 CONCLUSIONS^  127  knowledge-guided and resource-bounded approximation were proposed. The proposal advocated sacrificing global consistency and minimality in abduction and retaining local consistency and minimality. The minimality of an implicate plays two important roles in finding an explanation: to ensure consistency of the explanation E; and to achieve, to some extent, the minimality of E. A general definition for approximated implicates called selective implicates was presented. Three instances of  selective implicates including query-based, ATMS and length-based implicates were studied. We pursued an in depth study of the properties of query-based minimal implicates (knowledgeguided approximation). The computation of these implicates is facilitated by relaxing the minimality criteria, to derive approximated query-based minimal implicates. The QBIG algorithm, using the idea of  approximated query-based minimal implicates and restricted generalized consensus, computes the set g (E) which is larger that MA Q I (E) but does not require the computation of all minimal implicates of E. The explanation for a given query generated from the set M/1  Q1  (E) deviates from the explanation  generated from the set of minimal implicates of E. The difference is that an explanation generated from MIS QI (E) is consistent, but not necessarily minimal with respect to E. The explanation for a given query generated from the set G(E) deviates from the explanation generated from the set of minimal implicates of E in two respects. First, the approximated subset of minimal implicates may contain globally non-minimal implicates, which in turn introduce inconsistency in explanations with respect to the whole knowledge base. Second, the minimality of an explanation is sacrificed because not all minimal implicates are available. Exceptions to the these two discrepancies were also discovered. Nonetheless, these explanations are consistent and minimal locally with respect to C; (E) An ATMS-implicate (knowledge-guided approximation) was defined to demonstrate the generality of the definition of selective implicates and finally, a length-based implicate (resource-bounded approximation) was introduced to further illustrate the notion of approximating implicates. The following figure 6.6 summarizes the various approximation methods pursuant to our evaluation criteria. As for future work, specific algorithms based on the consensus method for generating specific  selective implicates must be investigated. Further investigation into new instances of selective implicates based upon particular application domains should be rewarding.  MI(E)  11111 Q I (E)  g(E)  IIIIATms (E)  MI< n (E)  Property of implicates wrt. E  Minimal  Minimal  Not minimal  Minimal  Minimal  Quality of explanations wrt. E  Minimal Consistent  Not minimal Consistent  Not minimal Inconsistent  Minimal Consistent (Restricted queries)  Not minimal Consistent  Property of implicates wrt. approximated set  Minimal  Minimal  Minimal  Minimal  Minimal  Quality of explanations wrt. approximated set  Minimal Consistent  Minimal Consistent  Minimal Consistent  Minimal Consistent  Minimal Consistent  Intended resource saving  nil  space  time+space  time+space  time+space  Extendable parameter  nil  Q^V  Q^V  A^V  n^cc  GLOBAL  LOCAL  Figure 6.6: Approximation Adequacy  Chapter 7  Diagnostic Reasoning In this chapter, we present a uniform computational framework for both abduction-based and consistencybased diagnostic reasoning using the ACMS. The task of computing Boolean circuit diagnosis and circuit inquiry are demonstrated in great detail using a 1-bit full adder.  7.1 Introduction Diagnosis is defined as an act of investigation or analysis of the cause or nature of a condition, situation, or problem (Mish, 1986). A diagnostic reasoning system, as studied in AI, is a computational system that performs diagnosis. Many diagnostic systems employ some form of rule-based production system (Buchanan and Shortliffe, 1984). The knowledge encoded in such a system is usually in the form of a relation between possible causes and possible effects. Usually, causes represent the possible states of the system components, for example malfunctioning or correct states, or possible diseases in the medical domain, while effects are the results of the causes. For instance, one relation is that effect causes and such a representation describes the normal state of a system. The reason for this can be illustrated by an example: if arthritis is known to cause aching_elbow, the formula aching_elbow arthritis is equivalent to - arthritis ,  which describes the condition of a normal person with respect to arthritis. Conceptually, we can model the domain of circuit diagnosis as follows: given a set of facts SD (the system description) describing the circuit and an observation OBS, a diagnosis for the observation OBS is a description of the normality or abnormality of the components in the circuitry. The normality or abnormality - ab(C) or ab(C), of a component is the cause for the effect which is the observed set of ,  inputs and outputs for the circuitry. Within the logical framework, there are two methodologies namely 129  7.2 CONSISTENCY-BASED DIAGNOSTIC REASONING^  130  consistency-based and abduction-based diagnostic reasoning. A comprehensive study on the adequacy of  these methodologies can be found in (Poole, 1988b). In the consistency-based diagnostic reasoning paradigm (Reiter, 1987; de Kleer et al., 1990), the system to be diagnosed is described by a set of logical formulae together with a predefined set of possible causes representing the components' possible abnormality. The objective of the diagnosis is to extract every minimal subset of causes that is consistent with the system description SD and the observation OBS. More formally, given a predefined set of possible causes A, a minimal diagnosis for (SD, OBS) (de Kleer et al., 1990) is a sentence A U{ cause I cause E A — A} for a minimal set A C A such that SD  UA^cause I cause E A—^U OBS is consistent.  In abduction-based diagnostic reasoning (Poole, 1988b), the problem is posed as an abduction problem. That is, to find an explanation, which is a set of causes, that can explain the observation G with respect to the knowledge base. More formally, the system SD is described by a set of formula together with a set of possible causes A. Given an observation OBS, a minimal diagnosis for (SD, OBS) is a minimal conjunction of causes E C A such that SD E OBS and SD U E is consistent. Note that there is no requirement for A to contain only positive literals. Instead, if the observation OBS is about the effects, then the encoding of the system description must be in the form cause —f effect. Conversely, if the OBS is about causes, then effect--4 cause is the proper encoding. Obviously if the OBS is related to both causes and effects, then both encodings must be present. Actually, the notion of abduction-based diagnostic reasoning studied here covers more than the conventional notion of fault diagnosis. It includes the idea of inquiry into system behaviour in both normal and faulty states. The response to a query can be an explanation, a conditional explanation, a set of extensions, a direct consequence or many other options. The variety of question answering modes provided by the ACMS will be the focus of the exercise in this chapter. To simplify the discussion, we assume a propositional diagnostic engine and leave the issue of the protocol between the diagnostic engine and the ACMS for future research.  7.2 Consistency-Based Diagnostic Reasoning The system's knowledge or system description is encoded as a set of formulae (SD) expressing the ontology of the domain and its tasks. The strategy of the encoding can be of the form (i) cause effect, (ii) effect^cause or both, where causes and effects are formulae. Without lost of generality, we will assume a cause to be a literal. We shall designate a set of causes A = {cause i ,^, cause, } where each cause s is a distinguished literal. Furthermore, an observation ( OBS) is a set of formulae expressing the  131  7.2 CONSISTENCY-BASED DIAGNOSTIC REASONING^  observed behavior of the system. Occasionally, there is also a set of constraints C embedded in SD expressing relations between causes, for example, certain causes can be mutually exclusive with respect to the same effect'. In consistency-based diagnostic reasoning as described earlier, the system to be diagnosed is described by a set of formulae and a set of possible causes A = {cause ' , , cause. } where each cause, is a distinguished positive literal. The objective is to extract every minimal subset of causes that is consistent with the system description SD and the observation OBS. That is, a minimal diagnosis for (SD, OBS) is a sentence A U{- , cause I cause  E  A — Al for a minimal set A C A such that  SD U A U{cause I cause E A — A} U OBS is consistent. (1)  In order to find such a minimal diagnosis, we need to use the notions of conflict set (definition 4.3.2) and hitting set (definition 4.3.3). A set T C A is an inconsistent subset of causes with respect to SD and OBS if SD  U OBS U  cause I cause E T} is inconsistent. Such a set T is a minimal inconsistent subset of causes if no  proper subset of it is an inconsistent subset of causes. Thus, if SD U OBS U {-'causer, — causek} is ,  inconsistent or SD U OBS cause' V ... V causek, then using theorem 2.2.2, there is a prime implicate P of PI (SD U OBS) that subsumes cause r V . . . V causek. Also, by the minimality of prime implicates,  we know that the causes in P are the minimal inconsistent subset of causes. There is a close relationship between the minimal inconsistent subsets of causes and the set of minimal diagnoses for (SD, OBS). Notice that in equation (1), the set of causes A — A cannot be a superset of a minimal inconsistent subset T for otherwise A — A is inconsistent. Assuming we have all the minimal inconsistent subsets of causes, say Ti, T2 and T3, then equation (1) is consistent if the set A — A is not a superset of any minimal inconsistent subset T2, that is, for every T„ T2 n A 0 0. Suppose Tr , . , Tn are all the minimal inconsistent subsets of causes with respect to SD and OBS, where T, = {cause2i, , cause i k z } for 1 < i < n. Let T, = cause d Clearly, SD U OBS r  A • • • A Tn .  DNF formula equivalent to T1  V • V cause i k z  for 1 < i < n.  Finally, let D = Di V • • V D r„ be a minimal (number of conjuncts)  A • • • A T.  Since there are no complementary literals among the rs  and consequently among the D i , D is unique and minimal and can be computed using normal form transformation and subsumption 2 . It can be shown, following Reiter's theorem 4.4 (1987) and theorem 3 of (de Kleer et al., 1990), that the set {D1, . , D n,} is the set of minimal diagnoses for (SD, OBS). 1  This section is based on (Kean and Tsiknis, 1993).  2 The  existence of complementary literals in D does not ensure minimality and therefore uniqueness. This problem is similar to the minimization of Boolean functions in switching theory (Bartee et at., 1962).  7.2 CONSISTENCY-BASED DIAGNOSTIC REASONING^  132  In this framework the ACMS can be used to compute all the minimal inconsistent subsets of causes as follows. When an observation OBS is made, the Problem-Solver transmits to the ACMS all the clauses that are related to OBS. A clause is related to OBS in case it contains non-logical symbols (propositional symbols) that occur in OBS or occur in another clause that is related to OBS 3 . Obviously, the observation OBS is also transmitted to the ACMS and in addition, the Problem-Solver supplies the ACMS with a set A of distinguished positive literals that represents causes. The ACMS computes the set of prime implicates, PI (OBS), and returns a subset of prime implicates, such that each prime implicate P consists solely of causes (P C A), to the Problem-Solver. As discussed earlier, these prime implicates are the minimal inconsistent subsets of causes. The Problem-Solver then computes minimal diagnoses from the set of minimal inconsistent subsets of causes, using the normal form transformation technique. Finally, observations (or measurements), arriving in incremental fashion, can also be accommodated in our framework. A measurement is simply treated as an additional observation. Whenever a measurement M is performed, the result is transmitted to the ACMS, which incrementally computes the new set of prime implicates and subsequently, the minimal inconsistent subsets of causes, which in turn may lead to a new set of minimal diagnoses. Example 7.2.1 A medical diagnosis involves identifying a disease or illness from its signs and symptoms. The  following set of propositional formulae, taken and simplified from (Poole et al., 1986), describes the type of symptoms (effects) that are produced by several diseases (causes). A = {tennis_elbow, dishpan_hands, arthritis}. SD = aching_elbow tennis_elbow V arthritis, aching_hands dishpan_hands V arthritis, aching_knee arthritis}. OBS = aching_elbow, aching_hands}. PI (SD U OBS) = tennis_elbow V arthritis, — (*) dishpan_hands V arthritis,— (*) aching_hands, aching_elbow, - aching_knee V arthritis). ,  The prime implicate indicated by (*) is a clause which consists solely of causes that is, the minimal inconsistent subset of causes. The conjunction of all the minimal inconsistent subsets of causes  is T = (tennis_elbow V arthritis) A (dishpan_hands V arthritis) and the minimal DNF of T is D = arthritis V (tennis_elbow A dishpan_hands) ,which gives two minimal diagnoses for the observation namely, "arthritis" alone and "tennis_elbow A dishpan_hands". 3 Craig's interpolation lemma (Shoenfield, 1967, p 80) can be used to show that these clauses are sufficient for our purpose. Note that the Problem Solver ACMS protocol we describe here is a rather simple and therefore inefficient one. A thorough study of Problem Solver ACMS protocols is among the issues for our future research. -  -  -  -  7.2 CONSISTENCY-BASED DIAGNOSTIC REASONING  ^  133  Example 7.2.2 A second example deals with circuit diagnosis. Consider a full adder (Reiter, 1987) shown in figure 7.1. The gates Xi and X2 are xor gates; Ai and A2 are and gates; and 01 is an or gate.  N 0  L  M  Al  Q  Figure 7.1: A 1-bit Full Adder The system is described by the following set of clauses: = {ab(Xi), ab(X2), ab(Ai), ab(A2), ab(Oi)} SD =^= 0) V — (L = 0) V ab (Xi) V (N = 0),  = 0) V — (M = 0) V ab(X2) V (R = 0),  = 0) V (L = 0) V ab(Xi) V -,(N = 0) ,  = 0) V (M = 0) V ab(X2) V — (R = 0) ,  ,  ,  (K = 0) v (K  = 0) V ab(Xi) V^= 0),  0) V (L = 0) v ab(Xi) V (N^0),  (K = 0) V (L = 0) V ab(Ai) V --,(Q = 0) ,  ,  (N = 0) V — (M = 0) V ab(X2) V (R = 0), ,  (N  0) V (M = 0) V ab(X2) V (R 0),  (M  0) V (N = 0) V ab(A2) V^= 0), = 0) V ab(A2) V (P 0),  = 0) V ab(Ai) V (Q = 0), = 0) V ab(A i ) V (Q = 0 ), = 0) V — (Q = 0) V ab(0i) V (S = 0) , ,  = 0) V ab(A2) V (P = 0), (P = 0) V ab(0i) V — (S = 0) , ,  (Q = 0) V ab(Ai) V — (S = 0) } ,  The causes considered here are possible abnormalities of the components and are represented by the predicate ab(_). The system description contains, for each component, a set of clauses that describe the normal state (correct function) of the component. As an illustration, the first clause in SD describing gate Xi is equivalent to "(K = 0) A (L = 0) A (N = 1) ab (Xi)" . Similarly, the second clause for gate Xi is the same as "(K = 0) A (L = 1) A (N = 0) ab (Xi)" . For simplicity, we have chosen to use a one value system that is, for every wire in the system, the value can be 0 or not equal to 0, thus the fact that a wire A has a value 1 is represented by the proposition - (A = 0). Alternatively one can use both 0 and 1 values together with some additional clauses expressing the constraint that each wire has at most one value. ,  7.3 ABDUCTION-BASED DIAGNOSTIC REASONING^  When the observation4 OBS =^= 0) A (L = 0)^= 0) A to the ACMS, it computes the the set of prime implicates PI (SD U OBS) =^ab(A2) V — (P = 0) V ab(Xi ), ,  –,  (R = 0) A (S =  0) is transmitted  ab(A2) V ab(Xi ) V ab(01), — (*)  ab(X2) V ab(A2) V (P = 0),  ab(Xi) V — (N = 0),  ab(X2) V ab(Xi), — (*)  ab(A1) V (Q = 0),  = 0) V ab(A2) V (P = 0),  134  ,  (N = 0) V ab(A2) V — (P = 0), ,  (N = 0) V ab(A2) V ab(01),^(N = 0) V ab(X2), (Q = 0) V ab(01),^(P = 0) V ab(01), = 0),^= 0),^= 0), L = 0,9 = 0}  and returns the prime implicates "ab(A2) V ab(Xi) V ab(01)" and "ab(X2)V ab(X1)" which constitute the minimal inconsistent subsets of causes. Consequently, by transformation we obtain "ab(A2) A ab(X2)", "ab(01) A ab(X2)" and "ab(X1)" as the minimal diagnoses for (SD, OBS). Suppose now that point P was measured and found to have value 1. Let H = PI (SD U OBS). The clause — (P = 0) is sent to the ACMS and the ACMS incrementally generates the new set of prime implicates ,  P/(11 u^= 0)1) = { ab(Xi) V -- (N = 0),^—n(N = 0) V ab(A2),^(Lb(*) V (Q = 0), ,  (N = 0) V ab(X2),^ab(X2) V ab(Xi), — (*)^ab(X2) V ab(A2), — (*) --n(M = 0),^= 0),^= 0),^= 0), S = 0, L 0, ab(01) — (*)} .  The prime implicates " a b (X2) V a b (Xi)" " a b (X2) V ab(A2)" and " a b ( 0i)" are the new minimal inconsistent subsets of causes making "ab(X2) A ab(01)" and "ab(Xi) A ab(A2) A ab(0 1 )" the new minimal diagnoses for the added observation.  7.3  Abduction-based Diagnostic Reasoning  In the abduction-based diagnostic reasoning paradigm (Poole, 1988b), the system SD is described by a set of sentences, together with some possible constraints. Additionally, we have a set of causes A = feause i , eausen1 where each cause, is a distinguished literal and can be either positive or negative. Given an observation OBS, a minimal diagnosis for (SD, OBS) is a minimal conjunction of causes E C A such that SD E —+ OBS and SD U E is consistent. Such a conjunct E is called a minimal 4 Note  that for the consistency method, the observation has to be represented as the conjunction "input A output" instead of  "input^output".  7.3 ABDUCTION-BASED DIAGNOSTIC REASONING ^  135  explanation for OBS with respect to SD. Obviously, a conjunct E is a minimal explanation for OBS with respect to SD, and is propositionally equivalent to inv(E), the minimal support for OBS with respect to SD. We shall call these supports cause based minimal support for OBS. The role of the ACMS in this framework is now clear. The Problem-Solver transmits to the ACMS the clauses in SD that are related to the observation, and indicates to the ACMS the set of distinguished literals that denote causes. This set of causes is represented in the set of assumptions A of the ACMS. When the Problem-Solver requests the assumption-based explanations of the observation OBS, the ACMS computes them using the method for computing assumption-based minimal explanations described in chapter 4 5 . Thus, the minimal explanations obtained will be all the minimal diagnoses for (SD, OBS). Similarly, measurements are treated as additional observations. More specifically, if a measurement M is performed, the new minimal diagnoses are obtained as the minimal explanations for OBS A M with respect to SD. Example 7.3.1 The domain of example 7.2.1 has the following description in this paradigm. Note that if we  define the disease to be a cause and the symptom to be its effect, then given the OBS about symptoms, the encoding must be cause —s effect. A = {tennis_elbow, dishpan_hands, arthritis}. SD = tennis_elbow^aching_elbow, dishpan_hands^aching_hands, arthritis^aching_elbow, arthritis —> aching_hands, arthritis —> aching_knee}. Suppose we observe OBS = aching_elbow A aching_hands. Since PI (SD) = {—itennis_elbow V aching_elbow, — dishpan_hands V aching_hands, ,  —arthritis V aching_elbow,^arthritis V aching_hands, — arthritis V aching_knee}, ,  the set {- arthritis, -tennis_elbow V - dishpan_hands} is the set of cause based minimal supports for the observation. Thus, by transformation, we obtain "arthritis" and "tennis_elbow A dishpan_hands" as the minimal diagnoses for (SD, OBS). Example 7.3.2 We now consider the circuit presented in example 7.2.2. In this paradigm, SD describes both the normal and erroneous states. Specifically, for each component in the circuit, SD contains a set of clauses that define the normal state of the component (as 5 Alternatively, we could use the ACMS to generate all the minimal supports for OBS and assign to the Problem Solver the responsibility of filtering out the cause based ones. -  73 ABDUCTION-BASED DIAGNOSTIC REASONING^  136  in example 7.2.2) followed by a similar set that specifies the faulty state of that component. The set of causes A is the set of all normal and faulty states represented by ab(X) and -- ab(X) where X is a component. Additionally, the observation is in the form input —p output which is arguably a more natural description of the state of a circuit component. The interested reader can find discussions on these issues in (Poole, 1988b) and should note that the representation presented above is crucial for the correctness of this paradigm. ,  In this example, the procedure for computing the minimal diagnoses deviates slightly from the general procedure set out in this section. For efficiency reasons, instead of computing the minimal explanations of OBS with respect to SD, we compute the minimal explanations of output with respect to SD U {input}. This is justified by the fact that for any E, SD E -+ (input -* output), the same is true for SD (E A input) -f output or simply SD U {input} E output. Consequently, when  =  OBS = — (K = 0) A (L = 0) A - (M = 0) -- -- (R = 0) A (S = 0) ,  ,  ,  is observed, the Problem-Solver sends to the ACMS the clauses in SD together with the input HK = 0), (L = 0), -(M = 0)}. Subsequently, the Problem-Solver asks for the cause based minimal supports for the output "--,(R = 0) A (S = 0)". The negation of the cause based minimal supports shown below are the explanations for OBS: { -,ab(X2) A — ab(01) A ab(Xi) A — ab(A2) A -iab(Ai), ,  ,  -- ab(X2) A ab(Xi) A ab(01) A ab(Ai), --iab(X2) A ab(X1) A ab(0i) A ab(A2), ,  ab(X2) A ,ab(01) A ab(A2) A -iab(Xi) A ab(Ai), ab(X2) A — ab(A2) A ab(Xi) A ab(01), —  ,  ab(X2) A  —,  —,  —,  ab(Xi) A ab(0i) A ab(Ai) }.  The following table 7.1 shows the corresponding faulty (ab (_)) and normal (--, ab (_)) components in each explanation: Notice that in row (5), the gate Al does not have a status. Regardless of the status of A1, if gates X2 and 01 are faulty and gates A2 and X1 are normal, then the observation is explained. Also, to emulate the result shown earlier, that is minimize the faulty components, the minimal explanations are filtered according to only faulty components. Restricting our computation to the faulty column, the rows are extracted and subsumption is applied to yield {X1}, {X2, A2} and {X2, 01 }. Conversely, the maximal set of normal components that explain the observation can be obtained similarly. First, the rows under the normal column are extracted then the inverse of subsumption is performed, that is no superset of a row is allowed in another row. In the above table, the maximal supersets of normal components that explain the observations are {X2, 01, A2, Al}, {0 1 , X1 , A l l and {A2, X1}.  137  7.4 ABDUCTION-BASED DIAGNOSTIC INQUIRY^ faulty 1 2 3 4 5 6  normal  X1  X1 X1 X2  01 01 A2  X2  01 01  X2  Al A2  Al  X2  01  A2  X2 X2 01  X1  Al  A2 X1  Al  Xi  Table 7.1: The diagnoses for - (R = 0) A (S = 0). ,  Note that it is not necessarily the case that the maximal superset of normal components is the difference between the set of all components and the set of faulty components. The minimal explanation in row (5) is such an example. In general, there are potentially many possible types of causes and whether to maximize or minimize the causes is domain dependent. Thus, the task of extracting preferred causes is performed by the Problem-Solver and the task of the ACMS is to return all the minimal explanations for each query. Finally, we assume that the same measurement as in example 7.2.2 was performed, that is point P was measured and found to have value 1. To compute the new minimal diagnoses, the Problem-Solver asks the ACMS for the cause based minimal supports of the new output: "-(R =  0)A (S = 0)A -1( P  = 0)". The  set { , ab (X2)A a b ( 01)A a b (X i )A a b (Az), ab(X2) A ab(01)A -wb(A2)A--iab(X1)} contains the two minimal —  explanations for the new observation - (K = 0) A (L = 0) A - (M = 0) —> - (R = 0) A (S ,  ,  ,  =  0) A -(P = 0)  with respect to SD.  7.4 Abduction-Based Diagnostic Inquiry The notion of diagnosis presented here covers more than the conventional notion of fault diagnosis. It includes inquiries about the system behavior in both normal and faulty states. This is usually performed before an actual fault or problem has occurred. The response to a query can be an explanation, a conditional explanation, a set of extensions, a direct consequence or take many other forms. The variety of modes of question answering provided by the ACMS in this domain will be the focus of this exercise 6 . Consider the 1-bit full adder (figure 7.1) again. The task here is to investigate the system behavior given the system description (SD) of the circuit and assuming some hypothetical observation on the inputs and outputs (OBS). Descriptions of the system's behavior are expressed by the normality or abnormality of the components encoded as assumptions. The normality and abnormality of a 6 This  section is based on (Kean and Tsiknis, 1992b).  138  7.4 ABDUCTION-BASED DIAGNOSTIC INQUIRY^  component Xi are expressed as ab(X1) and ab(X1 ) respectively. Thus, the complete set of assumptions for SD is the set A = {ab(X1), ab(X2), ab(Ai), ab(A2), ab(01),-- ab(X1), - ab(X2), - ab(A1), ,  ,  ,  -,  ab(A2), - ab(01)} ,  For all the queries from here on, if the set of assumptions is not explicitly stated, the above will be the intended set of assumptions. We shall also assume equality and inequality axioms in SD which are not explicitly stated. The following set SD defines both the normal component specification, e.g. K=OAL=OAN=0— - ab(Xi); and the abnormal component specification, for example, ,  K=OAL=OAN ab(X1). SD =^Normal Component Specification  -.ab(X2), K =0AL=OAN^N =0AM =OAR=0 - ab(X1 ), N=OAM=1AR=1 ab(X2), K =0AL=1AN=1 K =1 A L = OAN=1-4 - ab(X1 ), N 1AM=OAR=1-4 -ab(X2), K =1 A L =1 A N =0 - ab(X1 ), N=1AM=1AR=0, ab(X2), ,  ,  ,  ,  -,  ,  ,  -,  K =1A L=1 A Q =1 --.ab(Ai), K = A^Q =0 L =0 A Q^-,ab(Ai), ,  M =1AN=1AP=1 ab(A2), M =0 A^P =0 -- ab(A2), ab(A2), N =0AP=0 ,  -,  ,  ,-,  P = OA Q =0AS=0, ab(01), P =1 A^S = 1 -* Q = 1 A S = 1^-- ab(01 ), -,  ,  Abnormal Component Specification K =OA L = 0 A N =1^ab(X1),^N =OA M =OAR =1 -4 K=OAL=1AN=0 ab(X1), N=OAM=1AR=0, K =1 A L=0A N=0, ab(Xi ), N =1 AM =OAR =0 K =1AL=1AN=1— ab(X1 ), N=1AM=1AR=1, ,  K=1AL=1AQ=0-+  Ii =0A^Q^1  L=OAQ=1  ,  ab(A l ),  ab(Al),  ab(A i ),  M=1AN=1AP=0, M = 0 A^P =1 ,  N =0 A P =1  ab(X2), ab(X2), ab(X2), ab(X2),  ab(A2),  ab(A2), ab(A2),  P=0 A Q=0 AS =1 , ab(01 ), P =1 A^S=O-- ab(Oi), Q^A S =0 , ab(01 )).  Also, for all the queries that follow, we will assume the set PI (SD) is available through compilation. Consider a scenario where the following wire values (as shown in figure 7.1): K = 1, L 0, M = 1, R = 1 and S = 0 are assumed. This hypothetical observation is encoded in the form K =1 A L^A M^R=1 A S 0^(OBS.1)  as in input —f output. The task is to find the assumption based minimal explanation E for OBS with respect to SD that is, SD U E OBS and SD U E is consistent. The set of all such E is:  ^K  7.4 ABDUCTION-BASED DIAGNOSTIC INQUIRY ^  139  ME(OBS .1,7) = { ab(Xi) A - ab(X2) A - ab(Ai) A -iab(A2) A -- ab(Oi), ab(Xi) A ab(Ai) A ab(01) A ab(X2), ab(Xi) A ab(A2) A ab(Oi) A -ab(X2), ab(X2) A ab(A2) A -- ab(Xi) A - ab(A i ) A -ab(01), ab(X2) A ab(Oi) A - ab(Xi) A ab(A2), ab(X2) A ab(Ai) A ab(01) A ab(X1)) • ,  ,  ,  --,  ,  ,  ,  -,  --,  Each member in the set of ME(OBS .1,7) (for instance the fourth explanation in which gates are abnormal while the rest of the gates are normal) will explain the observation OBS.1.  X2 and A2  To illustrate the idea of relevancy in explanation, consider another hypothetical observation *S= 0^  =1AL=0  —  (OBS.2)  There are three assumption based minimal explanations for OBS.2, namely ME(OBS .2,7) { ab(Xi) A ab(Ai) A - ab(A2) A -,ab(01), ab(Xi) A ab(A2) A ab(01), ab(A i ) A ab(0 1 )}. ,  --,  Notice that these explanations do not mention the gate X2 and this is simply because the gate X2 is not relevant or simply not related to the hypothetical observation. Let us proceed to demonstrate an inquiry using conditional explanation. Assuming another hypothetical observation ^K=1AM=1A  -- ab(A2) A ab(01)^S= 0,^(OBS.3) ,  where not abnormal of gate A2 and abnormal of gate 01 is knowledge that we have also postulated. The inquiry here is intended to investigate the outcome of such postulation. For simplicity, we shall request the assumption based prime conditional explanations only and ignore the trivial ones. Recall that a conditional explanation is an explanation in the form Ant A A ssurnp, where Ant does not contain any assumption. The following is the set of prime conditional explanations (PCE) for the above hypothetical observation (OBS.3). PCE(OBS.3,7) = L = 1 A ab(Xi), L = 0 A ab(Ai), R = 1 A ab(X2), ab(Xi ) A ab(Ai), N = 1, Q = 1, P = 1,  L = A - iab(Xi), L = 1 A -iab(Ai), R = 0 A ab(X2), - ab(Xi) A ab(Ai), K = 0,^ab(A2), M = 0,^ ab(0i), S = 0 }. -  --,  ,  -,  -,  Consider the first explanation which indicates that if L = 1, then the abnormality of gate Xi will explain OBS.3. Let us trace through the circuit in figure 7.1. It shows that when L = 1, with K = 1 and the  7.4 ABDUCTION-BASED DIAGNOSTIC INQUIRY^  140  explanation ab(Xi), the output is N 1. Since gate A2 is normal and M = 1, the wire P 1. Finally, the gate 01 is abnormal by our postulation and hence the output S = 0, regardless of the status of Q. We now focus on the issue of finding extension generating subsets of assumptions. Recall that an extension generating subset is a maximal subset of assumptions that is consistent with the theory. Therefore, the extension generating subsets of SD alone are the set of all maximal subsets of assumptions that are consistent with SD. Since SD is encoded with complete knowledge that, is it contains descriptions of both the normal and abnormal states of components, there are 2 5 maximal consistent subsets of assumptions. These subsets range from all 5 gates being normal to all 5 gates being abnormal. To make the investigation more interesting, let us consider finding extension generating subsets of SD augmented with a new fact. Let the new fact be K=1AL=OAM=1AR=1AS=0 (FA CT.1 ) and let E = SD U FACT .1 that is, the augmented knowledge base. Since PI(SD) has been computed, the set PI(E) is computed incrementally. The procedure to find generating subsets involves three successive steps: (1) find all the minimal conflict sets with respect to E; (2) compute the minimal hitting sets from the conflict sets; and (3) extract the extension generating subsets of assumptions from the hitting sets. First, by lemma 4.3.3, E a is minimal conflict set of (E, A) if E E MI(E) and inv(E) C A. Thus, using the method stated by corollary 4.3.1, we obtain the following set of minimal conflict sets (MCS) for E. MCS(E) =  ab(X1), -,ab(X1 )}, ab(X2), ab(X2)}, ab(Ai), ab(A2), -ab(A 2 )}, ab(01),-- ab(01)},  {  -,  ,  {- ab(X1), ab(X2)}, ab(Xi), ab(X2)}, ab(A1),- ab(01)}, ab(X2), -iab(A2),^(001 , { ab(A2), -- ab(X2), - ab(01)}, { ab(Xi), ab(A2), iab(01)}, {-,ab(X1 ), -iab(A2), - ab(01)} , { ab(01),--iab(X2),-- ab(A1), -- ab(A2)}, { ab(X2), ab(A2), ab(01), -iab(A1)}, ab(Xi), 0400, ab(Ai), - ab(A2)} , ,  -,  ,  ,  ,  --  ,  ,  ,  -  ,  ab(A2), ab (00 , ab (Xi) , -iab(Ai)}}  7.4 ABDUCTION-BASED DIAGNOSTIC INQUIRY ^  141  Notice that the first five minimal conflict sets are simply the trivial ones that is, the minimal contradictions from the assumption set A. The sixth conflict set says that both gates Xi and X2 being normal is inconsistent with E. Similarly, the seventh conflict set says that both gates Xi and X2 being abnormal is also inconsistent with E. This information reveals that gate X 1 being normal/abnormal precludes gate X2 being normal/abnormal and vice versa. Subsequently, using the transformation method described for computing hitting sets (lemma 4.3.4) and its optimization, we obtain the following set of all minimal hitting sets (MKS) for E. MHS(E)  = { { ab(01), ab(A2), iab(A1), ab(X2), ab(X1)}, {- ab(Oi), -,ab(A2), ab(Ai) , ab(X2), ab(X1)} , ab(A2), ab(A i ), ab(X2), ab(Xi)}, -,  -,  -  --,  ,  -,  -,  (16(00, ab(A2), --,ab(X2), ab(Xi)}, {-,ab(0 1 ), ab(A2), - ab(Ai) , ab(X2), iab(X1)}, {- ab(01), ab(A2), ab(A i ), - ab(X2), ab(Xi)}, ab(Oi), - ab(A2), ab(Ai), - ab(X2), ab(X1)) , { ab(01), ab(A2), ab(Ai) , ab(X2),-- ab(Xi)}} ,  --  ,  ,  ,  ,  ,  Finally, by theorem 4.3.3 an extension generating subset is simply the set difference of A from a minimal hitting set (A - M for M E MHS(E)). Thus, the set of all extension generating subsets (EXT) for E are as follows: EXT(E)  = { {- ab(Xi), ab(X2), ab(Ai), ab(A2), ab(Oi)}, ab(Xi ), -pab (X2), ab(Ai), ab(A2), ab(Oi)}, ,  ab(Xi), -ab(X2), - ab(Ai) , ab(A2), ab(Oi)}, {-,ab(X1 ), ab(X2), ab(Ai), -ab(A2), ab(Oi)}, ab(Xi ), - ab(X2), ab(A1), ab(A2), ab(Oi)}, ab(X2), - ab(211), iab(A2), ab(Oi)}, {-,ab(X1), ab(X2), - ab(A1), ab(A2), --iab(01)} , ab(Xi) , - ab(X2), ab(Ai) , - ab(A2), ab (00} }. ,  -,  ,  -  ,  ,  ,  Continuing with the example, we shall discuss the decision problems of explainability and agreeability. An explainable observation is simply an observation that has an explanation or contrariwise, an inexplicable OBS is one that has no explanation. Consider the following hypothetical observation K=1AL=OAM=1A ab(Xi) R = 1.  (OBS.4)  Its minimal explanations are ab ( ) and a b(X2). Thus OBS.4 is explainable with respect to the SD and the assumption set A. Consider the scenario that we are only interested in the positive assumptions restated as follows: A' = lab(X1), ab(X2), ab(Ai), ab(A2), ab(Oj)}.  Under this new set of assumptions, there is no explanation for OBS.4 with respect to SD and A'. An inexplicable observation may indicate to the system designer that there are insufficient assumptions,  142  7.4 ABDUCTION-BASED DIAGNOSTIC INQUIRY ^  or at the other extreme, as a strategy to focus attention on certain assumptions. Also note that OBS.4 is agreeable with respect to SD and A, that is the observation OBS.4 is explainable but the negation OBS.4), which is K = 1AL,OAM,1Aab(Xi)AR=0,^  (OBS.5)  is not explainable. For instance, there is no assumption-based explanation for the input K = 1 therefore OBS.5 is not explainable. Intuitively the agreeability property says that OBS.4 is consistent in some extension, but there exist other extensions that the observation is not consistent with. One useful result would be to find those extensions that the observation is inconsistent with. We shall investigate such a method using direct consequence later.  =  One feature of direct consequence is that it allows the system to find the prime conflict sets of a given observation with respect to SD, modulo assumptions. Simple propositional reasoning will show that this is true. As in the definition of direct consequence (definition 4.2.5), SD U OBS  C and by definition  of conflict set (definition 4.3.2), the set inv(C) is a conflict set for SD U OBS. Since a direct consequence C has the property that SD C, therefore this set inv(C) is a non-trivial conflict set which means that the conjunction of the set inv(C) is not a contradiction by itself. By virtue of the minimality of a direct consequence, this set inv(C) is a prime conflict set for SD U OBS. Moreover, using these prime conflict sets and constructing trivial ones on-the-fly, we can compute the extension generating subsets with respect to SD U OBS without actually computing the prime implicates of it, as was done in adding the new fact FACT.1. For example, the minimal direct consequences of OBS.5 are ab(Xi) and ab(X2) and hence the minimal conflict sets with respect to SDU OBS.5 are MCS(SDU OBS.5) = { { ab(X2)} { ab(Xi)}, {— ab(0i), (0(01)1, {— ab(A2), ab(A2)}, {—ab(A i ), ab(A1)}}. —,  ,  ,  And using the same method of computing extension generating subsets, the set of generating subsets for SDU OBS5 is EX. T(SDUOBS.5) = {  {ab(Xi ), ab(X2), ab(Ai), ab(A2), ab(01)1, lab(X1), ab(X2), ab(A i ), ab(A 2 ), —ab(Oi )}, { ab (Xi), ab(X2), ab(Ai), ab(A2) , ab(01)}, { ab (Xi), ab(X2), ab(ili), nab(A2),-- ab(01)), { ab (Xi ), ab(X2),—,ab(Ai), ab(A2), ab (00} , { ab (XI), ab(X2), ab(A2), ab(01)}, { ab(Xi), ab(X2), — ab(Ai), ab(A2), ab(Oi)}, { ab (Xi) , ab(X2),— ab(A1),— ab(A2), ab(01)) }. —,  —  ,  --,  ,  —,  ,  ,  --,  7.5 CONCLUSIONS^  143  Note that the extensions of OBS.5, which is the negation of OBS.4, will be the extensions that are inconsistent with OBS.4 with respect to the same SD and A. Another interesting usage of direct consequence is to vary the definition by interchanging the role of assumptions between the observation and the direct consequence. In this case, the observation is comprised solely of assumption literals, and the converse for direct consequence. This gives us a definition of prediction; that is we compute the most direct outcome (consequence) under the observed assumption. This is merely a hint of the vast range of applications for assumption-based reasoning.  7.5 Conclusions In this chapter, a uniform computational framework using the ACMS for performing both abductionbased and consistency-based diagnostic reasoning was demonstrated. In the consistency-based approach, a diagnosis was computed via the notion of a minimal implicate called a conflict set, and through transformation of these conflict sets we obtained the consistency-based diagnosis. In the abduction-based approach, a diagnosis was formulated as finding an assumption-based explanation. Furthermore, a variety of reasoning strategies such as direct consequence, conditional explanation and extension were demonstrated. These are not possible in other TMS systems. The ontological issues of representing knowledge for diagnostic reasoning was not addressed here. These issues include the relationship between cause and effect, which may not be obvious. For instance, in the medical diagnosis example (example 7.2.1), the effect of aching knee is caused by arthritis, encoded as aching _knee arthritis. Thus, the system designer is required to know the fact that arthritis is a necessary, sufficient and relevant cause for the effect of aching knee. The interested reader can refer to (Copi, 1982, chapter 12) for a thorough investigation in the issue of cause and effect. Another issue is that of which encoding, effect cause or cause -f effect, to choose when generating the set SD? For instance, if aching _knee —> arthritis (effect cause) is our encoding, then asking the question "what causes the effect aching knee?" in the abduction based approach will not provide arthritis as an answer. Thus, it is required that the chosen representation of the KB is reflected by the type of questions which can be asked. Also, notice that in the circuit example, the observation changed from a conjunction of effects (inputs and outputs) in the consistency-based approach, to an implication input output (effect s effect2) in the abduction-based approach. Again, such distinction is necessary in order for the two approaches to work, and it reveals the dependency of these approaches on the knowledge representation (Poole, 1988b).  Chapter 8  Conclusions The thesis in this dissertation is that inference should be separated from domain dependent problem solvers in a computational reasoning framework. The result of such separation is the creation of a separate domain independent inference engine, which is portable and applicable to many application domains. The significance of such a portable reasoning utility is that it prevents repetitive building of inference engines, in different applications of computational knowledge engineering and problem solving. According to Allan Ramsay (1988, p 215), "if it were ever achieved it would provide significant  benefits, and anything which will make it more achievable should be encouraged". This thesis has contributed to the achievement of that goal by formalizing a domain independent abductive inference engine (CMS, ACMS). The theory of propositional abduction and methods for its computation, which we refer to as clause  management, were studied in depth. For reasons of competence and performance we used implicates as the representation for the knowledge base (KB), and presented feasible methods for computing such implicates. In addition, a framework for assumption-based reasoning using constrained abduction and deduction, was presented in detail. We further incorporated a protocol for addition and deletion (a revision process) of clauses in the ACMS which completed the specification of the task of clause management. Given the inherent complexity of abduction, we extend such a study to methods and frameworks for approximation in abduction. This thesis proposed a general strategy for studying symbolic approximation and two methods, knowledge-guided and resource-bounded, for performing approximated abduction. Finally, a detailed circuit diagnosis problem was used to demonstrate the usefulness of some of the features of the ACMS.  144  8.1 CONTRIBUTIONS^  145  8.1 Contributions In the following, a brief description of the contributions of this thesis is outlined. • In Chapter 1, this thesis proposed to adopt the framework of separating the Problem-Solver and inference engines for building a reasoning system. The proposed framework includes all three major classes of inferences: deduction, abduction and inductive generalization in the inference engines. The identification of these three classes of inferences in the theory of scientific discovery has been known since the time of Aristotle (384-322 B.C.) (Ross, 1952). Nevertheless, this thesis is the first to suggest a computational framework for, and the resulting feasibility of incorporating all three types of inference into a single computational system called the KMS. As a step toward this proposed system, abduction inference is studied in depth in this framework. • In Chapter 2, the theory of propositional abduction was presented under the title of clause management in the proposed framework of the KMS. A clause management system (CMS), first proposed by Reiter and de Kleer (1987), was studied and extended. There were two major extensions to Reiter and de Kleer's work. First, the division of the set of minimal implicates into two disjoint sets of prime and minimal trivial implicates. This distinction is important because in the actual computation of a support or an explanation for a unit clause query, only the set of prime implicates is computed and kept, whereas the set of minimal trivial implicates is computed on-the-fly. Second, the algorithm was extended to allow queries in the form of a conjunction of clauses. Consequently, we have an algorithm for computing explanations for any propositional sentences. Another novel result from the study was the idea of preference orderings of minimal supports for a given theory. The idea of providing a framework of preference ordering of supports, based on logical specificity independent of domain knowledge is very useful for discriminating minimal supports. In the absence of domain knowledge the canonical ordering scheme can be used; and the scheme can incorporate domain knowledge if is present. • In Chapter 3, a method for computing prime implicants/implicates incrementally was presented. the problem was defined as: Given a set of clauses .1, a set of prime implicants II of .T and a clause C, find the set of prime implicants for II U C} efficiently. The algorithm IPIA is the first incremental algorithm of this type. In the worst case, the IPIA algorithm requires 0((ii  )2k)  operations (consensus and subsumptions), where n^I and k is less than or equal to the cardinality of C. This is the case because in the worst case the problem of incremental generation of prime implicants can produce exponentially many prime implicants. The exponential nature of the problem prompted further investigation into improving the algorithm. All of the optimizations suggested are aimed at reducing the number of subsumption operations. Nevertheless, the worst  8.1 CONTRIBUTIONS^  146  case complexity of the optimized algorithm, the Optimized IPIA, remains the same as IPIA. It is expected that the Optimized IPIA have an improvement in performance over IPIA. • In Chapter 4, the principle of clause management was extended to perform assumption-based reasoning. The motivation for this study stemmed from Bolzano's argument that there are hidden components in a proposition that make it sometimes true and sometimes false (Berg, 1962). These hidden components are called assumptions, and intelligent reasoning requires the ability to reason with assumptions. The result of this study was a reasoning system that provides the specifications and computations for assumption-based reasoning, all within the framework of clause management. The concept of assumption-based theory was defined and the notions of explanation and direct consequence were presented as forms of plausible conclusion with respect to this theory. Additionally, the concept of extension and irrefutable sentences were discussed, together with other variations of explanation and direct consequence. A set of algorithms for computing these conclusions for a given theory were presented using the notion of prime implicates in an extended CMS system called an Assumption-based Clause Management System (ACMS). • In Chapter 5, the issue of revision, that is, addition and deletion were studied. The result was that the proposed ACMS is the first clause management system using the compiled approach that includes both incremental addition and deletion in its functionality. A logical scheme of indexing assumptions for the purpose of incremental deletion was presented. A simple protocol, add, delete,  explain and disagree, based on Ramsey's test (Veltman, 1985) and consistency-based diagnosis (Reiter, 1987) was suggested, and a stepwise demonstration of the protocol was shown in an example of intelligent backtracking in logic programming. This stepwise demonstration showed for the first time how a clause management system could be used with a problem solver. To demonstrate the sufficiency of this simple protocol more investigation is needed for other application domains. Nevertheless, it is expected to serve a wide variety of applications because of its simplicity and the power of its functionality. • In Chapter 6, a framework for approximating abduction in the CMS compiled approach was presented. The motivation for this study was that the complexity of "exact" abductive reasoning in terms of logical consistency and minimality is hard. An issue in approximation is the ability to guide the computational effort of the apprwdmator towards the desired result. This was achieved in two strategies namely: knowledge-guided and resource-bounded approximation. The approach taken to approximation is to sacrifice global consistency and minimality of explanation and instead, favour local consistency and minimality of explanation for its reduced computational effort. The criterion of maintaining consistency and minimality of explanation  8.2 FUTURE RESEARCH^  147  with respect to the knowledge base actually used in the computation has the flavour of an any-  time algorithm where the more computational effort is spent, the closer the result is to global consistency and minimality. The contribution of this chapter was the proposed framework for approximating abduction. The approximation methods proposed include query-based and ATMS-based implicates which act as the knowledge-guided approximations; and length-based implicates computed by a  resource-bounded approximation strategy. • In Chapter 7, two logic-based diagnostic reasoning paradigms, that is the abduction-based and consistency-based diagnostic reasoning, were presented using the framework of the ACMS. Besides demonstrating the usefulness of some of the work developed in this thesis when applied to diagnostic reasoning, the exercise also contributed in terms of capturing the computational aspects of both abduction-based and consistency-based diagnosis within a single system. The Boolean circuit for a 1-bit full adder was used as an example. In the first paradigm, a consistency-based diagnosis (Reiter, 1987) was computed via the notion of conflict sets using the set of minimal implicates (Kean and Tsiknis, 1993). This result was also put forward by de Kleer  et al. (1990) in their study of the characterization of diagnosis. In the second paradigm, abduction-based diagnostic reasoning was formulated as finding assumption-based minimal explanations. The computation of an abduction-based diagnosis was again via the set of minimal implicates. The novelty in using the ACMS was that abductionbased diagnostic reasoning was extended to perform a variety of new types of assumption-based reasoning such as finding direct consequence, extension, conditional explanation and etc, features not available in other clause management systems.  8.2 Future Research Some future research issues arised from this dissertation are outlined below. • In Chapter 1, the Deduction Communication Protocol (DCP) and Inductive Generalization Communication  Protocol (ICP) must also be defined and incorporated into the KMS framework. The theory of inductive generalization inference has been studied quite extensively in the literature, for example (Meltzer, 1970; Plotkin, 1970b; Plotkin, 1970a). Following our approach to the study of abduction, a subset of computationally feasible inductive generalization inferences must be carved out, and a domain independent inductive generalization inference engine, we will call it the Induction  Management System (IMS), together with the ICP must be designed. The obvious application for study and evaluation of such system is in machine learning.  148  8.2 FUTURE RESEARCH^  Assuming that we have all three inference engines in the KMS, one immediate problem is that of the configuration of these inference engines. The configuration ranges from all three engines functioning in parallel, independently serving the Problem-Solver (figure 1.3), to possibly a fully connected architecture as depicted in figure 8.1.  KMS Inference Engines Protocol  Problem Solver  Figure 8.1: A Fully Connected Problem-Solver-KMS Architecture The utility of theses different configurations will depend on the application domain, and certain configurations might prove to be useful to a wide class of problem solving domains. • In Chapter 2, one issue concerns the computation of preference ordering. From our initial experiment, it appears the notion of minimal implicates plays an important role in computing these preference orderings. Another observation resulting from the study of implicates is that the minimal trivial support for a conjunction of clauses is closely related to minimal models (minimal number of truth assignments). For example, if E is empty and .7 is a CNF formula, then the minimal trivial support S, that is k S V .7" and VS, can be shown to correspond to a minimal model of .1. -  • In Chapter 3, the exponential factor in the complexity of generating prime implicates incrementally may seem disappointing but there are justifications for using an incremental method and hence IPIA. The first reason is that in the actual implementation of a system, it is not unreasonable to restrict the clause size to some constant k < 8 — 10, for example. Consequently, the complexity is polynomial under such a restriction. Secondly, better methods of encoding clauses, such as bit  8.2 FUTURE RESEARCH^  149  vectors and parallelism, can also improve the run time of subsumption operations (Dixon and de Kleer, 1988). Furthermore, the average complexity of the Optimized IPIA should be investigated. • In Chapter 4, the extension to the study is the investigation of other properties R. that constrain the explanation and direct consequence for a particular application domain. For instance, it is possible that a set of constraints or a theory of constraint can be defined for the purpose of circuit diagnosis. • In Chapter 5, the protocol uses Ramsey's test (Veltman, 1985) and the theory of consistency-based diagnosis (Reiter, 1987) as its revision function. In other words, the theory of consistency-based diagnosis is one way of verifying the consistency requirement of Ramsey's test. A natural question is whether the diagnostic approach is sufficient and are there other methods? Another issue is whether the principle of least change, that is employed during the selection of multiple deletion choices, is adequate? It is conceivable that an ordering of preferences over assumptions will play a role in such selection. • In Chapter 6, the proposed framework of approximation is general enough to be applicable to other problem domains. For instance, approximating the propositional satisfiability problem based on the length of a clause can be captured using the resource bounded approximation strategy. Another question is whether we can compute all length-i implicates without generating any length-, implicates for j > i? Future attempts to apply this approximation strategy to other application domains may be rewarding. • In Chapter 7, the ontological issues of representing knowledge for diagnostic reasoning is not addressed here. These issues include the relationship between cause and effect, which may not be obvious. For instance, in the medical diagnosis example (example 7.2.1), the effect aching knee is caused by arthritis, is encoded as aching_knee^arthritis. Thus, the system designer is required to know the fact that arthritis is a necessary, sufficient and relevant cause for the effect aching knee (Copi, 1982, chapter 12). Additionally, the appropriateness of using material implication alone to represent causality has been questioned (Shoham, 1990).  Glossary Approximated minimal query-based implicate  A clause C is an approximated minimal query-based implicate of E, restricted by Q, if there is no query-based implicate C' C of E such that C' subsumes C.  Assumption-based explanation  Let T = , A) be an a-theory and the query G be a sentence. A set of sentences E is an assumption-based explanation of G from T if (1) E C A, (2)1 U E G and (3)1 U E is consistent.  Assumption-based minimal explanation  E is a minimal explanation of G if there is no other explanation E' of G such that E' subsumes E.  Assumption-based minimal trivial explanation  E is a trivial explanation of G if E^G otherwise E is non-trivial. E is a minimal trivial explanation of G if E is both minimal and trivial explanation of G.  Assumption-based prime explanation  E is a prime explanation of G if it is minimal and non-trivial.  Assumption-based direct consequence  Let T = ', A) be an a-theory and G be a sentence. The disjunctionof a set of sentences C is a direct consequence of G with respect to T if (1)C C AU inv(A), (2)T UCk C and (3).T C.  Assumption-based minimal direct consequence  C is a minimal direct consequence of G if C is a direct consequence of G and there is no other direct consequence C' of G such that C' subsumes C.  Assumption-based minimal trivial direct consequence Assumption-based prime direct consequence  C is a trivial direct consequence of G if G^C otherwise it is non-trivial. C is a minimal trivial direct consequence of G if C is both minimal and  trivial.  C is a prime direct consequence of G if it is both minimal and non-trivial.  150  151  GLOSSARY^  ATMS-implicate  A clause C is an ATMS-implicate of E if E C and (1) C = q for a literal q E A (a premise); (2)C = a l A ... A a n ,^q for a literal q cl A and {^an,} C A; (or al V ...V am) where^,^,^C A (a nogood).  ATMS-minimal implicate^A clause C is an ATMS-minimal implicate of C is an ATMS-implicate of E. Biform-Monoform  E  if no proper subset C' of  Let E = Cl A ... A Cn be a CNF formula: (1) The variable x is a biform variable in E if x E C2 and E Ci for some i, j. (2) The variable x is a monoform variable in E if x E C, for some i and T. CI for all j. (3) A literal is biform/monoform if its variable is biform/monoform.  CNF Formula^A conjunction of disjuntive clauses. Conjunctive clause^A conjunction of literals. Consensus^Let A = xA' and B -,xB' be two disjunctive/conjunctive clauses respectively. The consensus of A and B with respect to the variable x is defined as CS (A, B, x) = A'B' if A'B' is fundamental. Disagreement Set  Let o(T) (o-(F), •(A)) be a u-transformed cr-theory and a be an assumption for addition into the current set of assumptions A. A disagreement set for 'T is a minimal set A C A such that .T" U I a E U {ala E A - A} U {a} is consistent.  Disjunctive clause^A disjunction of literals. DNF Formula^A disjunction of conjuntive clauses. Fundamental clause^A clause C is fundamental if C does not contain a complementary pair of literals. Fundamental support^A clause S is a fundamental support for G with respect to E if S is a support for G and S V G is fundamental. Implicate^P is an implicate of E if E P. Length-n Implicate^A clause L is a length-n implicate of E if E^L and ILI< n for some natural number n. A clause L is a length-n minimal implicate of E if no proper subset of L is a length-n implicate of E. Literal^ A positive or negative variable.  152  GLOSSARY^  Minimal conflict set  Given an a-theory T = (F, A), C c A is a minimal conflict set of T if U C is inconsistent and no proper subset of it is inconsistent with F.  Minimal implicate  P is a minimal implicate of E if P is an implicate of E and there is no other implicate P' of E such that P' subsumes P.  Minimal support  A clause S is a minimal support for G with respect to E if S is a support for G and there is no other support 8' for G such that S' subsumes S.  Minimal trivial implicate  A clause P is a minimal trivial implicate of E if P is both a minimal and trivial implicate of E.  Minimal trivial support  A clause T is a minimal trivial support for G if T is both a trivial and minimal support for G.  Minimal trivial conflict set  C is a minimal trivial conflict set if C is a minimal conflict set and is non-fundamental.  Non-fundamental clause  A clause C is non-fundamental if C contains a complementary pair of literals. A non-fundamnetal disjunctive clause is a tautology and A nonfundamnetal conjunctive clause is a contradiction.  Prime conflict set  C is a prime conflict set of T if C is a minimal conflict set and is fundamental.  Prime implicate  P is a prime implicate of E if P is an implicate of E and there is no other implicate P' of E such that P' P.  Prime support  A clause S is a prime support for G if S is both a minimal and fundamental support for G.  Query-based implicates  A dause C is a query-based implicate of E restricted by Q if E C and cn Q 0. The clause C is a query-based minimal implicate of E restricted by Q if there is no other implicate C' C of E such that C' subsumes C.  Reiter's Hitting Set  Suppose W is a collection of subsets of A, a set H C A is a hitting set for VV if H n C 0 for each C E W. A hitting set H for W is minimal iff no proper subset of H is a hitting set for W.  Selective implicates  A clause C is a selective implicate of E if E C and R( C) holds for some constraint R. The clause C is a selective minimal implicate of E if there is no other implicate C' C of E such that C' subsumes C.  =  GLOSSARY  153  Support  A clause S is a support for G with respect to E if E S V G and E K S.  Trivial implicate  A non-fundamental clause P is a trivial implicate of any set E.  Trivial support  A clause T is a trivial support for G if T is a support for G and T V G is non-fundamental.  Variable  A symbol in the vocabulary.  Bibliography [1] B. E. Ayeb, P. Marquis, and M. Rusinowitch. Deductive/abductive diagnosis: The da-principles. In Proc. of the 9 th ECAI, pages 47-52, Stockholm, 1990. [2] T.C. Bartee, I.L. Lebow, and I.S. Reed. Theory and Design of Digital Machines. McGraw-Hill, New York, 1962. [3] Jan Berg. Bolzano's Logic. Almqvist and Wiksell, Stockholm, 1962. [4] Wolfgang Bibel. Automated Theorem Proving. Vieweg, Braunschweig, second edition, 1987. [5] N.N. Biswas. Introduction to Logic and Switching Theory. Gordon and Breach Science, 1975. [6] Karl Hans Bldsius and Hans-Jfirgen Biirckert, editors. Deduction Systems in Artificial Intelligence. Ellis Horwood series in Artificial Intelligence. Halsted Press, 1989. [7] R. K. Brayton, G. D. Hachtel, C. T. McMullen, and A. L. Sangiovanni-Vincentelli. Logic Minimization Algorithms for VLSI Synthesis. Kluwer, Boston, MA, 1984. [8] M. Bruynooghe and L.M. Pereira. Deduction revision by intelligent backtracking. In J.A. Campbell, editor, Implementations of Prolog, Ellis Horwood series in Artificial Intelligence, pages 194-215. Halsted Press, 1984. [9] Bruce G. Buchanan and Edward H. Shortliffe, editors. Rule-based expert systems : the MY CIN experiments of the Stanford Heuristic Programming Project. Addison-Wesley, Reading, Mass., 1984. [10] Tom Bylander, Dean Allemang, Michael C. Tanner, and John R. Josephson. The Computational Complexity of Abduction. Artificial Intelligence, 49:25-60, 1991. [11] A.K. Chandra and G. Markowsky. On the Number of Prime Implicants. Discrete Mathematics, 24:7-11,1978. [12] W. E Clocksin and C. S. Mellish, editors. Programming in Prolog. Springer-Verlag, Berlin, 1981. [13] P.R. Cohen and E.A. Feigenbaum. The Handbook of Artificial Intelligence, volume 1. William Kaufmann Press, Los Altos, California, 1982. [14] L. Console and P. Torasso. Integrating models of the correct behavior into abductive diagnosis. In Proc. of the 9 t h ECAI, pages 160-166, Stockholm, 1990. [15] Irving M. Copi. Introduction to Logic. Macmillian, New York, 6 edition, 1982. [16] Phillip T. Cox and Thomas Pietrzykowski. Causes for Events: Their Computations and Applications. In 8th Conference on Automated Deduction, pages 608-621, Oxford, England, 1986. 154  BIBLIOGRAPHY^  155  [17] Phillip T. Cox and Thomas Pietrzykowski. General Diagnosis by Abductive Inference. In IEEE Symposium on Logic Programming, pages 183-189,1987. [18] Phillip T. Cox. Finding backtrack points for intelligent backtracking. In J.A. Campbell, editor, Implementations of Prolog, Ellis Horwood series in Artificial Intelligence, pages 216-233. Halsted Press, 1984. [19] Martin Davis and Hilary Putnam. A Computing Procedure for Quantification Theory. Journal of ACM, 7:201-215, 1960. [20] Martin Davis. The Mathematics of Non-Monotonic Reasoning. Artificial Intelligence, 13:73-80, 1980. [21] G. de Jong. An Introduction to Explanation-based Learning. In Howard E. Shrobe, editor, Exploring Artificial Intelligence, pages 45-81. Morgan Kaufmann, 1989. [22] Johan de Kleer and Brian C. Williams. Diagnosing Multiple Faults. Artificial Intelligence, 32:97-130, 1987. [23] Johan de Kleer, Alan Mackworth, and Raymond Reiter. Characterizing Diagnosis. In Proceeding of AAAI-90, pages 324-330, 1990. [24] Johan de Kleer. Choices without Backtracking. In Proceeding of AAAI-84, pages 79-85, 1984. [25] Johan de Kleer. An Assumption-based TMS. Artificial Intelligence, 28:127-162,1986. [26] Johan de Kleer. Extending the ATMS. Artificial Intelligence, 28:163-196, 1986. [27] Johan de Kleer. Problem Solving with ATMS. Artificial Intelligence, 28:197-224, 1986. [28] Johan de Kleer. A General Labeling Algorithm for Assumption-based Truth Maintenance. In Proceeding of AAAI-88, pages 188-192, 1988. [29] Johan de Kleer. A Comparision of ATMS and CSP techniques. In Proceeding of IJCAI-89, pages 290-296, 1989. [30] Johan de Kleer. An Improved Incremental Algorithm for Generating Prime Implicates. In Proceeding of AAAI-92, pages 780-785, 1992. [31] Thomas Dean and Mark Boddy. An Analysis of Time-Dependent Planning. In Proceeding of AAAI88, pages 49-54, 1988. [32] Michael Dixon and Johan de Kleer. Massively Parallel Assumption-based Truth Maintenance. In  Proceedings of the 2nd International Workshop on Non-Monotonic Reasoning, Lecture Notes in Computer Science, pages 131-142, 1988.  [33] Jon Doyle. A Truth Maintenance System. Artificial Intelligence, 12:231-272, 1979. [34] J. J. Finger and M. R. Genesereth. RESIDUE: A Deductive Approach to Design Synthesis. Memo HPP 1, Department of Computer Science, Stanford University, 1985. Stanford Heuristic Programming Project. [35] Peter Gdrdenfors. Knowledge In Flux: Modeling the Dynamics of Epistemic States. MIT Press, 1988. [36] M. R. Genesereth. The use of design descriptions in automated diagnosis. Artificial Intelligence, 24:411-436, 1984.  BIBLIOGRAPHY^  156  [37] Mathew L. Ginsberg. A Circumscriptive Theorem Prover. In Proceedings of the 2nd International Workshop on Non-Monotonic Reasoning, Lecture Notes in Computer Science, pages 100-114,1988. [38] C. L. Hamblin. Questions in Montague English. In Barbara H. Partee, editor, Montague Grammar, pages 247-259. Academic Press, 1976. [39] Charles Hartshorne and Paul Weiss, editors. Collected Papers of Charles Sanders Peirce, volume 2. Harvard University Press, 1931. [40] Carl Gustav Hempel. Philosophy of Natural Science. Prentice-Hall, Englewood Cliffs, New Jersey, 1966. [41] H. R. Hwa. A Method for Generating Prime Implicants of a Boolean Expression. IEEE Trans. on Computers, pages 637-641, June 1974. [42] H. Y. Hwang, D. S. Chao, and M. E. Valdez. A New Technique for the Minimization of Switching Functions. In Proc. IEEE Southeastcon'85, pages 299-304,1985. [43] Katsumi Inoue. Studies on Abductive and Nonmonotonic Reasoning. PhD thesis, Faculty of Engineering, Kyoto University, Japan, 1992. [44] Alex Kean and George Tsiknis. An Incremental Method for Generating Prime Implicants/Implicates. Technical report 88-16, Department of Computer Science, University of British Columbia, 1988. [45] Alex Kean and George Tsiknis. An Incremental Method for Generating Prime Implicants/Implicates. Journal of Symbolic Computation, 9:185-206, 1990. [46] Alex Kean and George Tsiknis. A Correct Optimized IPIA. Technical report 92-12, Department of Computer Science, University of British Columbia, 1992. [47] Alex Kean and George Tsiknis. Assumption based Reasoning and Clause Management Systems. Computational Intelligence, 8(1):1-24,1992. [48] Alex Kean and George Tsiknis. Clause Management Systems (CMS). Computational Intelligence, 9(1):11-40,1993. [49] Alex Kean. The Approximation of Implicates and Explanations. Technical report 90-31, Department of Computer Science, University of British Columbia, 1990. [50] Alex Kean. Revision in ACMS. Journal of Experimental and Theoretical Artificial Intelligence, 4:233-246, 1992. [51] Z. Kohavi. Switching and Finite Automata Theory. McGraw-Hill, second edition, 1978. [52] Hector J. Levesque. Foundations of a Functional Approach to Knowledge Representation. Artificial Intelligence, 23:155-212,1984. [53] Hector J. Levesque. A knowledge-level account of abduction. In Proc. of the 11 th IJCAI, pages 1061-1067, Detroit, MI, 1989. [54] M. C. Loui and G. Bilardi. The Correctness of Tison's Method for Generating Prime Implicants. Technical Report R- 952, Coordinated Science Laboratory, University of Illinois at Urbana-Champaign, 1982. UILU-ENG 82-2218. [55] Alan K. Mackworth. Consistency in Networks of Relations. Artificial Intelligence, 8:99-118,1977.  BIBLIOGRAPHY^  157  [56] Pierre Marquis. A Note on Prime Implicants. CRIN 90-R-89, CRIN / ll\TRIA, 1990. [57] Piere Marquis. Extending Abduction from Propositional to First-Order Logic. In Proceedings of Fundamentals of Artificial Intelligence, Lecture Notes in Computer Science, 1991. [58] J. P. Martin and S. C. Shapiro. A Model for Belief Revision. Artificial Intelligence, 35:25-79,1988. [59] Drew McDermott and Jon Doyle. Non-Monotonic Logic I. Artificial Intelligence, 13:41-72,1980. [60] Drew McDermott. A General Framework for Reason Maintenance. Technical Report 691, Department of Computer Science, Yale University, 1989. [61] B. Meltzer. The Semantics of Induction and the Possibility of Complete Systems of Inductive Inference. Artificial Intelligence, 1:189-192,1970. [62] Frederick C. Mish, editor. Webster's Ninth New Collegiate Dictionary. Merriam-Webster Inc., 1986. [63] Gordon D. Plotkin. A Further Note on Inductive Generalization. Machine Intelligence, 6:101-124, 1970. [64] Gordon D. Plotkin. A Note on Inductive Generalization. Machine Intelligence, 5:153-163,1970. [65] David Poole, Randy Goebel, and Romas Aleliunas. Theorist: A logical Reasoning System for Defaults and Diagnosis. CS Research Report 6, Department of Computer Science, University of Waterloo, 1986. Logic Programming and Artificial Intelligence Group. [66] David Poole. A Logical Framework for Default Reasoning. Artificial Intelligence, 36:27-47,1988. [67] David Poole. Representing Knowledge for Logic-based Diagnosis. In Proceedings of International Conference on Fifth Generation Computing, Tokyo, 1988. [68] David Poole. Explanation and Prediction: An Architecture for Default and Abductive Reasoning. Computational Intelligence, 5(2), 1989. [69] Harry E. Pople. On The Mechanization of Abductive Logic. In Proceeding of IJACI-73, pages 147-152, Stanford, 1973. [70] Karl R. Popper. The Logic of Scientific Discovery. Basic Book Inc., 1959. [71] Quintus Computer Systems, Incorporated. Quintus Prolog User's Guide, 10 edition, March 1987. [72] Allan Ramsay. Formal Methods in Artificial Intelligence. Cambridge University Press, 1988. [73] Raymond Reiter and Johan de Kleer. Foundations of Assumption-Based Truth Maintenance Systems: Preliminary Report. In Proceeding of AAAI-87 , pages 183-188, Seatle, Washington, 1987. [74] Raymond Reiter and Alan Mackworth. A Logical Framework for Depiction and Image Interpretation. Artificial Intelligence, 41:125-155,1990. [75] Raymond Reiter. A Logic of Default Reasoning. Artificial Intelligence, 13:81-132, 1980. [76] Raymond Reiter. A Theory of Diagnosis from First Principle. Artificial Intelligence, 32:57-95,1987. [77] V. T. Rhyne, P. S. Noe, M. H. McKinney, and U. W. Pooch. A New Technique for the Fast Minimization of Switching Functions. IEEE Trans. on Computers, 26(8):757-764,1967.  BIBLIOGRAPHY^  158  [78] J. A. Robinson. A Machine-Oriented Logic Based on the Resolution Principle. Journal of ACM, 12:23-41, 1965. [79] W. D. Ross, editor. The Works of Aristotle. William Benton, Publisher, 1952. [80] Joseph R. Shoenfield. Mathematical Logic. Addison-Wesley, 1967. [81] Yoav Shoham. Nonmonotonic Reasoning and Causation. Cognitive Science, 14:213-252, 1990. [82] J.R. Slagle, C.L. Chang, and R.C.T. Lee. Completeness Theorems for Semantics Resolution in Consequence Finding. In Proceeding of IJACI-69, pages 281-285,1969. [83] J. R. Slagle, C. L. Chang, and R. C.T. Lee. A New Algorithm for Generating Prime Implicants. IEEE Trans. on Computers, 19(4), April 1970. [84] Guy Lewis Steele and Gerald Jay Sussman. Constraints. AI Memo 502, Artificial Intelligence Laboratory, Massachusetts Institute of Tecnology, 1978. [85] P. Tison. Generalized Consensus Theory and Application to the Minimization of Boolean Functions. IEEE Trans. on Computers, 16(4):446-456, 1967. [86] George Tsiknis and Alex Kean. Clause Management Systems (CMS). Technical report 88-21, Department of Computer Science, University of British Columbia, 1988. [87] Johan van Benthem. The Variety of Consequence, According to Bolzano. STUDIA LOGICA, XLIV(4), 1985. [88] Frank Veltman. Logics for Conditionals. University of Amsterdam Press, 1985. [89] Richard Zaffron. Identity, Subsumption, and Scientific Explanation. Philosophy, 68(23), 1971.  

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0051340/manifest

Comment

Related Items