Reasoning About Inconsistent Formulas
Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence. Survey track. Pages 4899-4906.
https://doi.org/10.24963/ijcai.2020/682
Keywords
- Constraints and Satisfiability: general
Abstract
The analysis of inconsistent formulas finds an ever-increasing range of applications, that include axiom pinpointing in description logics, fault localization in software, model-based diagnosis, optimization problems, but also explainability of machine learning models. This paper overviews approaches for analyzing inconsistent formulas, focusing on finding and enumerating explanations of and corrections for inconsistency, but also on solving optimization problems modeled as inconsistent formulas.
- [Alviano et al., 2015] Mario Alviano, Carmine Dodaro, and Francesco Ricca. A MaxSAT algorithm using cardinality constraints of bounded size. In IJCAI, pages 2677-2683, 2015. IJCAI
- [Ansótegui et al., 2013] Carlos Ansótegui, Maria Luisa Bonet, and Jordi Levy. SAT-based MaxSAT algorithms. Artif. Intell., 196:77-105, 2013.
- [Arif et al., 2015] M. Fareed Arif, Carlos Mencía, and Joao Marques-Silva. Efficient MUS enumeration of Horn for- mulae with applications to axiom pinpointing. In SAT, pages 324-342, 2015.
- [Bacchus and Katsirelos, 2015] Fahiem Bacchus and George Katsirelos. Using minimal correction sets to more effi- ciently compute minimal unsatisfiable sets. In CAV, pages 70-86, 2015.
- [Bacchus and Katsirelos, 2016] Fahiem Bacchus and George Katsirelos. Finding a collection of MUSes incrementally. In CPAIOR, pages 35-44, 2016.
- [Bacchus et al., 2014] Fahiem Bacchus, Jessica Davies, Maria Tsimpoukelli, and George Katsirelos. Relaxation search: A simple way of managing optional clauses. In AAAI, pages 835-841, 2014.
- [Bailey and Stuckey, 2005] James Bailey and Peter J. Stuckey. Discovery of minimal unsatisfiable subsets of constraints using hitting set dualization. In PADL, pages 174-186, 2005.
- [Bakker et al., 1993] R. R. Bakker, F. Dikker, F. Tempel- man, and P. M. Wognum. Diagnosing and solving over- determined constraint satisfaction problems. In IJCAI, pages 276-281, 1993.
- [Belov and Marques-Silva, 2011] Anton Belov and Joao Marques-Silva. Minimally unsatisfiable boolean circuits. In SAT, pages 145-158, 2011.
- [Belov et al., 2012] Anton Belov, Inês Lynce, and Joao Marques-Silva. Towards efficient MUS extraction. AI Commun., 25(2):97-116, 2012.
- [Ben-Ari, 2012] Mordechai Ben-Ari. Mathematical Logic for Computer Science. Springer, 2012.
- [Bendík et al., 2018] Jaroslav Bendík, Ivana Cerná, and Nikola Benes. Recursive online enumeration of all min- imal unsatisfiable subsets. In ATVA, pages 143-159, 2018.
- [Birnbaum and Lozinskii, 2003] Elazar Birnbaum and Eliezer L. Lozinskii. Consistent subsets of inconsistent systems: structure and behaviour. J. Exp. Theor. Artif. Intell., 15(1):25-46, 2003.
- [Brandt et al., 2018] Felix Brandt, Christian Saile, and Christian Stricker. Voting with ties: Strong impossibili- ties via SAT solving. In AAMAS, pages 1285-1293, 2018.
- [Brewka et al., 2019] Gerhard Brewka, Matthias Thimm, and Markus Ulbricht. Strong inconsistency. Artif. Intell., 267:78-117, 2019.
- [Chinneck and Dravnieks, 1991] John W. Chinneck and Erik W. Dravnieks. Locating minimal infeasible constraint sets in linear programs. ORSA Journal on Computing, 3(2):157-168, 1991.
- [Davies and Bacchus, 2011] Jessica Davies and Fahiem Bac- chus. Solving MAXSAT by solving a sequence of simpler SAT instances. In CP, pages 225-239, 2011.
- [de Siqueira N. and Puget, 1988] J. L. de Siqueira N. and Jean-Francois Puget. Explanation-based generalisation of failures. In ECAI, pages 339-344, 1988.
- [Dershowitz et al., 2006] Nachum Dershowitz, Ziyad Hanna, and Alexander Nadel. A scalable algorithm for minimal unsatisfiable core extraction. In SAT, pages 36-41, 2006.
- [Felfernig et al., 2012] Alexander Felfernig, Monika Schu- bert, and Christoph Zehentner. An efficient diagnosis algo- rithm for inconsistent constraint sets. AI EDAM, 26(1):53- 62, 2012.
- [Grégoire et al., 2014] Éric Grégoire, Jean-Marie Lagniez, and Bertrand Mazure. An experimentally efficient method for (MSS, CoMSS) partitioning. In AAAI, pages 2666- 2673, 2014.
- [Grégoire et al., 2018] Éric Grégoire, Yacine Izza, and Jean- Marie Lagniez. Boosting MCSes enumeration. In IJCAI, pages 1309-1315, 2018. IJCAI
- [Hemery et al., 2006] Fred Hemery, Christophe Lecoutre, Lakhdar Sais, and Frédéric Boussemart. Extracting MUCs from constraint networks. In ECAI, pages 113-117, 2006.
- [Ignatiev et al., 2015] Alexey Ignatiev, Alessandro Previti, Mark H. Liffiton, and Joao Marques-Silva. Smallest MUS extraction with minimal hitting set dualization. In CP, pages 173-182, 2015.
- [Ignatiev et al., 2019a] Alexey Ignatiev, António Morgado, Georg Weissenbacher, and Joao Marques-Silva. Model- based diagnosis with multiple observations. In IJCAI, pages 1108-1115, 2019.
- [Ignatiev et al., 2019b] Alexey Ignatiev, Nina Narodytska, and Joao Marques-Silva. Abduction-based explanations for machine learning models. In AAAI, pages 1511-1519, 2019.
- [Ignatiev et al., 2019c] Alexey Ignatiev, Nina Narodytska, and Joao Marques-Silva. On relating explanations and adversarial examples. In NeurIPS, pages 15857-15867, 2019.
- [Ignatiev et al., 2019d] Alexey Ignatiev, Nina Narodytska, and Joao Marques-Silva. On validating, repairing and re- fining heuristic ML explanations. CoRR, abs/1907.02509, 2019.
- [Junker, 2004] Ulrich Junker. QUICKXPLAIN: preferred explanations and relaxations for over-constrained prob- lems. In AAAI, pages 167-172, 2004.
- [Kleine Büning and Kullmann, 2009] Hans Kleine Büning and Oliver Kullmann. Minimal unsatisfiability and au- tarkies. In Handbook of Satisfiability, pages 339-401. 2009.
- [Korovin, 2013] Konstantin Korovin. Inst-Gen -A modu- lar approach to instantiation-based automated reasoning. In Programming Logics -Essays in Memory of Harald Ganzinger, pages 239-270, 2013.
- [Koshimura et al., 2012] Miyuki Koshimura, Tong Zhang, Hiroshi Fujita, and Ryuzo Hasegawa. QMaxSAT: A par- tial Max-SAT solver. JSAT, 8(1/2):95-100, 2012.
- [Kullmann and Marques-Silva, 2015] Oliver Kullmann and Joao Marques-Silva. Computing maximal autarkies with few and simple oracle queries. In SAT, pages 138-155, 2015.
- [Le Berre and Parrain, 2010] Daniel Le Berre and Anne Par- rain. The Sat4j library, release 2.2. J. Satisf. Boolean Model. Comput., 7(2-3):59-6, 2010.
- [Lewis, 1980] Harry R. Lewis. Complexity results for classes of quantificational formulas. J. Comput. Syst. Sci., 21(3):317-353, 1980.
- [Li and Manyà, 2009] Chu Min Li and Felip Manyà. MaxSAT, hard and soft constraints. In Handbook of Satis- fiability, pages 613-631. 2009.
- [Liberatore, 2005] Paolo Liberatore. Redundancy in logic I: CNF propositional formulae. Artif. Intell., 163(2):203- 232, 2005.
- [Liffiton and Sakallah, 2008] Mark H. Liffiton and Karem A. Sakallah. Algorithms for computing minimal unsatisfiable subsets of constraints. J. Autom. Reasoning, 40(1):1-33, 2008.
- [Liffiton et al., 2016] Mark H. Liffiton, Alessandro Previti, Ammar Malik, and Joao Marques-Silva. Fast, flexible MUS enumeration. Constraints, 21(2):223-250, 2016.
- [Lonsing and Egly, 2015] Florian Lonsing and Uwe Egly. Incrementally computing minimal unsatisfiable cores of QBFs via a clause group solver API. In SAT, pages 191- 198, 2015.
- [Lynce and Marques-Silva, 2004] Inês Lynce and Joao Marques-Silva. On computing minimum unsatisfiable cores. In SAT, 2004.
- [Marques-Silva and Previti, 2014] Joao Marques-Silva and Alessandro Previti. On computing preferred MUSes and MCSes. In SAT, pages 58-74, 2014.
- [Marques-Silva et al., 2013a] Joao Marques-Silva, Federico Heras, Mikolás Janota, Alessandro Previti, and Anton Belov. On computing minimal correction subsets. In IJ- CAI, pages 615-622, 2013. IJCAI
- [Marques-Silva et al., 2013b] Joao Marques-Silva, Mikolás Janota, and Anton Belov. Minimal sets over monotone predicates in boolean formulae. In CAV, pages 592-607, 2013.
- [Marques-Silva et al., 2015] Joao Marques-Silva, Mikolás Janota, Alexey Ignatiev, and António Morgado. Efficient model based diagnosis with maximum satisfiability. In IJ- CAI, pages 1966-1972, 2015. IJCAI
- [Marques-Silva et al., 2016] Joao Marques-Silva, Alexey Ig- natiev, Carlos Mencía, and Rafael Peñaloza. Efficient rea- soning for inconsistent Horn formulae. In JELIA, pages 336-352, 2016.
- [Marques-Silva et al., 2017] Joao Marques-Silva, Mikolás Janota, and Carlos Mencía. Minimal sets on propositional formulae. problems and reductions. Artif. Intell., 252:22- 50, 2017.
- [Martins et al., 2014] Ruben Martins, Saurabh Joshi, Vasco M. Manquinho, and Inês Lynce. Incremental car- dinality constraints for MaxSAT. In CP, pages 531-548, 2014.
- [McMillan and Amla, 2003] Kenneth L. McMillan and Nina Amla. Automatic abstraction without counterexamples. In TACAS, pages 2-17, 2003.
- [Mencía et al., 2015] Carlos Mencía, Alessandro Previti, and Joao Marques-Silva. Literal-based MCS extraction. In IJCAI, pages 1973-1979, 2015. IJCAI
- [Mencía et al., 2016] Carlos Mencía, Alexey Ignatiev, Alessandro Previti, and Joao Marques-Silva. MCS extraction with sublinear oracle queries. In SAT, pages 342-360, 2016.
- [Mencía et al., 2019] Carlos Mencía, Oliver Kullmann, Alexey Ignatiev, and Joao Marques-Silva. On computing the union of MUSes. In SAT, pages 211-221, 2019.
- [Metodi et al., 2014] Amit Metodi, Roni Stern, Meir Kalech, and Michael Codish. A novel SAT-based approach to model based diagnosis. J. Artif. Intell. Res., 51:377-411, 2014.
- [Morgado et al., 2013] António Morgado, Federico Heras, Mark H. Liffiton, Jordi Planes, and Joao Marques-Silva. Iterative and core-guided MaxSAT solving: A survey and assessment. Constraints, 18(4):478-534, 2013.
- [Morgado et al., 2014] António Morgado, Carmine Dodaro, and Joao Marques-Silva. Core-guided MaxSAT with soft cardinality constraints. In CP, pages 564-573, 2014.
- [Nadel, 2010] Alexander Nadel. Boosting minimal unsatis- fiable core extraction. In FMCAD, pages 221-229, 2010.
- [Narodytska et al., 2018] Nina Narodytska, Nikolaj Bjørner, Maria-Cristina V. Marinescu, and Mooly Sagiv. Core- guided minimal correction set and core enumeration. In IJCAI, pages 1353-1361, 2018.
- [Nilsson and Maluszynski, 1995] Ulf Nilsson and Jan Maluszynski. Logic, programming and Prolog. Wiley, 1995.
- [Peñaloza et al., 2017] Rafael Peñaloza, Carlos Mencía, Alexey Ignatiev, and Joao Marques-Silva. Lean kernels in description logics. In ESWC, pages 518-533, 2017.
- [Polikarpova et al., 2016] Nadia Polikarpova, Ivan Kuraj, and Armando Solar-Lezama. Program synthesis from polymorphic refinement types. In PLDI, pages 522-538, 2016.
- [Previti et al., 2017] Alessandro Previti, Carlos Mencía, Matti Järvisalo, and Joao Marques-Silva. Improving MCS enumeration via caching. In SAT, pages 184-194, 2017.
- [Previti et al., 2018] Alessandro Previti, Carlos Mencía, Matti Järvisalo, and Joao Marques-Silva. Premise set caching for enumerating minimal correction subsets. In AAAI, pages 6633-6640, 2018.
- [Reiter, 1987] Raymond Reiter. A theory of diagnosis from first principles. Artif. Intell., 32(1):57-95, 1987.
- [Rosa et al., 2010] Emanuele Di Rosa, Enrico Giunchiglia, and Marco Maratea. Solving satisfiability problems with preferences. Constraints, 15(4):485-515, 2010.
- [Rothenberg and Grumberg, 2016] Bat-Chen Rothenberg and Orna Grumberg. Sound and complete mutation-based program repair. In FM, pages 593-611, 2016.
- [Sebastiani and Vescovi, 2009] Roberto Sebastiani and Michele Vescovi. Axiom pinpointing in lightweight description logics via Horn-SAT encoding and conflict analysis. In CADE, pages 84-99, 2009.
- [Seidl et al., 2012] Martina Seidl, Florian Lonsing, and Armin Biere. qbf2epr: A tool for generating EPR formulas from QBF. In PAAR@IJCAR, pages 139-148, 2012.
- [Si et al., 2017] Xujie Si, Xin Zhang, Radu Grigore, and Mayur Naik. Maximum satisfiability in software analy- sis: Applications and techniques. In CAV, pages 68-94, 2017.
- [Terra-Neves et al., 2017] Miguel Terra-Neves, Inês Lynce, and Vasco M. Manquinho. Introducing Pareto minimal correction subsets. In SAT, pages 195-211, 2017.
- [Wieringa, 2012] Siert Wieringa. Understanding, improving and parallelizing MUS finding using model rotation. In CP, pages 672-687, 2012.
- [Xie and Luo, 2016] Huiyuan Xie and Jie Luo. An algorithm to compute minimal unsatisfiable subsets for a decidable fragment of first-order formulas. In ICTAI, pages 444- 451, 2016.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
In a wide range of settings, one must reason about inconsistent formulas. This is the case for example when debugging inconsistent system specifications, e.g. for understanding which constraints make the system inconsistent. This is also the case in model-based diagnosis [Reiter, 1987], where the system representation is inconsistent with its expected input-output behavior. In turn, model-based diagnosis finds a number of significant applications, that include axiom pinpointing in description logics, software fault localization, type error debugging, spreadsheet debugging, or analysis of inconsistent knowledge bases, to name a few. Inconsistency is also often used when solving optimization problems, e.g. in
In this paper we focus on inconsistent formulas of monotonic logics, e.g. first-order logic and its fragments. However, there is also interest in non-monotonic logics [Brewka et al., 2019]. When analyzing inconsistent formulas, a number of computational problems arise. In some settings, one is interested in explaining one possible reason of inconsistency. In some other settings, the goal is to propose ways to correct the source of inconsistency. Finally, in yet some other settings, the purpose is to enumerate all explanations or corrections of an inconsistent formula.
The purpose of this paper is to provide an overview of recent work on reasoning about inconsistent formulas. The paper addresses the problems of explaining and correcting inconsistency, but also highlights enumeration of explanations and corrections, and briefly overviews how inconsistency is exploited when solving optimization problems. The paper also demonstrates that most of the algorithms proposed in recent years for reasoning about inconsistency, most of which originally devised in the context of analyzing propositional formulas, can be also be applied in any monotonic logic.
The paper is organized as follows. Section 2 introduces the definitions and notation used throughout the paper. Section 3 covers approaches for finding (or extracting) subset-minimal explanations and corrections. Section 4 overviews the relationship between reasoning about inconsistency and optimization problems. Section 5 highlights algorithms for the enumeration of both corrections and explanations. A sample of practical applications is briefly discussed in Section 6. Finally, the paper concludes in Section 7.
2 Preliminaries
Basic definitions. The paper assumes definitions standard for first-order logic (FOL) [Ben-Ari, 2012]. We will be interested in formulas expressed in some (decidable) fragment of FOL 1 , and so respecting monotonicity of entailment. For simplicity, we will not consider the use of function symbols, but that does not affect the results in the paper. Throughout, FOL formulas will be represented in clausal form and will most often be inconsistent. In general, we consider an inconsistent FOL formula F, such that some clauses in F can be relaxed (i.e. allowed not to be satisfied) to restore consistency, whereas others cannot. Thus, we assume that F is partitioned into two first-order subformulas F = B∪S, where S contains the relaxable (soft) clauses, and B contains the non-relaxable clauses. B can be viewed as background knowledge, which is assumed to be consistent and must always be satisfied.
The paper uses other standard notation. P ⊨Q denotes that any model of P is also a model of Q. As a result, P ⊨⊥ is used to denote that P is inconsistent, and P ⊭⊥ denotes that P is consistent. Set notation will be used to improve readability. For example, P ∪Q⊨R is used to denote ∧c∈P∪Qc ⊨R.
Generalizations from the propositional domain. This paper covers the analysis of inconsistent formulas in very generic terms, opting not to focus exclusively on propositional formulas. A number of concepts often used in the propositional domain can be easily generalized to different fragments of first-order logic. These will prove instrumental in showing how different algorithms, often described for propositional formulas, can in fact be generalized well beyond. A simple observation is that propositional variables can be viewed as predicate symbols. Thus, concepts such as reification of clauses, or constraints over propositional variables, can be used in more general settings. For example, pseudo-boolean constraints, including cardinality constraints, can be readily used in fragments of FOL. Furthermore, although QBF may seem to involve non-standard quantification (from a FOL perspective), there are well-known translations from QBF to EPR [Seidl et al., 2012], and so the proposed generalizations also extend to QBF.
1 As a result, the results presented in the paper apply in different settings, including SAT, ILP, CSP, QBF, SMT (specific theories), among others. Decidability is expected, since we will need to be able to answer decision problems both positively and negatively.
Subset-minimal explanations and corrections. Given an inconsistent clausal formula F, we are interested in identifying the clauses that are responsible for unsatisfiability among those that can be relaxed, as defined next.
Definition 1 (MUS). Let F = B∪S be an inconsistent set of clauses (F ⊨⊥). M ⊆ S is a Minimal Unsatisfiable Subset (MUS) iff B ∪M⊨⊥ and ∀M′⊊M, B ∪M′ ⊭⊥.
Informally, an MUS provides the minimal information that needs to be added to the background knowledge B to obtain inconsistency; thus, an MUS represents an explanation for the causes of inconsistency. Alternatively, one might be interested in correcting the formula, removing some clauses to achieve consistency.
Definition 2 (MCS). Let F = B ∪ S be an inconsistent set of clauses (F ⊨⊥). C ⊆ S is a Minimal Correction Subset (MCS) iff B ∪ S \ C ⊭⊥ and ∀C′⊊C, B ∪ S \ C ′ ⊨⊥.
With each MCS C, one associates a Maximal Satisfiable Subset (MSS), given by S \ C. Moreover, there exists a wellknown (subset-)minimal hitting set (MHS) relationship between MUSes and MCSes:
Proposition 1. MCSes are MHSes of MUSes and vice-versa.
The MHS relationship between MUSes and MCSes was first demonstrated in the context of model-based diagnosis [Reiter, 1987] and later investigated for propositional formulas in clausal form [Birnbaum and Lozinskii, 2003].
Recent years have witnessed the proposal of a large number of novel algorithms for the extraction and enumeration of MUSes and MCSes [Menc´ıa et al., 2015; Bacchus and Katsirelos, 2015; Liffiton et al., 2016; Bacchus and Katsirelos, 2016; Menc´ıa et al., 2016; Previti et al., 2018; Gr´egoire et al., 2018; Narodytska et al., 2018; Bend´ık et al., 2018], where MUS enumeration algorithms build on the MHS relationship between MUSes and MCSes.
Tractable theories have also been studied, as Horn formulas [Marques-Silva et al., 2016]. In addition, there has been interest in computing the union of all MUSes [Menc´ıa et al., 2019], which can be approximated by the so-called lean kernel [Kleine B¨uning and Kullmann, 2009; Kullmann and Marques-Silva, 2015; Pe˜naloza et al., 2017].
Minimal sets over monotone predicates (MSMP). The similarity among solutions for a number of apparently unrelated problems motivated the proposal of a unifying paradigm, MSMP [Marques-Silva et al., 2013b; MarquesSilva et al., 2017], consisting in computing minimal sets over a monotone predicate. In this setting, a predicate P: 2R → {0, 1}, defined over a reference set R, is monotone if whenever P(R0) holds, with R0 ⊆ R, then P(R1) also holds, with R0 ⊆ R1 ⊆ R. By defining different problems as instances of MSMP, one can devise algorithms that can be used to solve different problems, many of which are related with the analysis of inconsistent formulas. Earlier work [Marques-Silva et al., 2017] proposed a partition of MSMP problems into three classes, depending on the type of monotone predicate considered. (Due to space constraints, the predicate forms are only hinted at in this paper.)
Maximum satisfiability and optimization problems. Given F = B ∪ S, with B ∪ S ⊨⊥, the maximum satisfiability (MaxSAT) problem asks for the largest subset S ′ of S, such that B ∪ S ′ ⊭⊥. A cost can be associated with each clause in S, and so the MaxSAT problem corresponds instead to selecting the subset S ′ of the largest cost. There is a wellknown relationship between MaxSAT solutions and MSSes, in that every MaxSAT solution is an MSS, and so the complement of a MaxSAT solution is an MCS. Furthermore, it is well-known that standard optimization problems can be cast as MaxSAT (where MaxSAT can be interpreted at the propositional level, but also within any fragment of FOL):
where wi ≥ 0, and each pi can be viewed as a 0-place predicate. In this case, just let B ≜M, S ≜ {(¬pi)} and associate with each clause ci in S a cost wi. Thus, F = B ∪ S is inconsistent and an MSS (in terms of cost) of F is a solution to the optimization problem.
Running example. Figure 1 shows an example 2 , used throughout this paper to illustrate the operation of algorithms for extracting and enumerating MUSes and MCSes. As it can be observed, the example is written in Bernays-Sch¨onfinkel's fragment of first-order logic, also referred to as effectively propositional logic (EPR) 3 . It is well-known that EPR is NEXP-complete [Lewis, 1980]. In this example, we have a knowledge base (see Figure 1a) with a number of general statements about parents (P) of new newborn children (N) being proud (R), and that fathers or mothers are parents. We also indicate that there should be no proud people (with the objective of finding proud parents). Moreover, we also have statements about concrete people {aw, rw, hw, pw, mw}. We declare the general statements as hard, denoting that we are certain that the statements are true. In contrast, the information about concrete people is declared as soft, denoting that we are uncertain about whether the information is true or not. The set of statements is inconsistent. Using an existing reasoner for EPR [Korovin, 2013] as an oracle, we can identify two minimal explanations (MUSes) of inconsistency as well as four minimal corrections (MCSes) for eliminating inconsistency. These sets are shown in Figure 1b. The justification for the inconsistencies serve to convey the facts that aw and rw can be inferred to be proud parents, and this is inconsistent with the requirement of no one being proud. As can be observed, the MUSes are MHSes of the MCSes and vice-versa.
2 Adapted from [Nilsson and Maluszynski, 1995, Section 3.1].
3 By using EPR, we highlight that most of the proposed algorithms generalize beyond the propositional cases and beyond oracles for NP. There are dedicated algorithms for the analysis of EPR formulas [Xie and Luo, 2016], but these are fundamentally different from the algorithms studied here.
| Hard? | Knowledge base | Clause ID's |
|---|---|---|
| Yes | ∀x∀y. (P(x, y) ∧ N(y) →R(x)) ∀x∀y. (F(x, y)→P(x, y)) ∀x∀y. (M(x, y)→P(x, y)) ∀x. (¬R(x)) | B |
| No | c1 = F(rw, hw), c2 = N(hw), c3 = F(aw, pw), c4 = N(pw), c5 = M(mw, rw), c6 = ¬N(rw) | S = { c1, c2, c3, c4, c5, c6 } |
| Type | Computed sets |
|---|---|
| MUSes | {{F(rw, hw), N(hw)}, {F(aw, pw), N(pw)}} |
| MCSes | {{F(rw, hw), F(aw, pw)}, {F(rw, hw),N(pw)}, {F(aw, pw), N(hw)}, {N(hw), N(pw)}} |
| Algorithm 1: Deletion-based minimal set computation | |
| Function DELETION(P, B, S, R) | |
| 1 2 | M←R; foreach u ∈ M do // Inv: P(B, S,M) if P(B, S,M\ {u}) then M ← M \ {u}; |
| 3 | |
| 4 | |
| 5 | |
| return M; | |
3 Subset-Minimal Sets
This section overviews approaches for extracting subsetminimal explanations and corrections of inconsistency 4 .
Subset-minimal explanations. Given an inconsistent formula F = B ∪ S, there is a fairly straightforward algorithm for finding one MUS. Starting from a set of clauses M ≜ S, iteratively remove one clause u fromM. If B ∪ (M- {u}) is inconsistent, then we can safely discard u. Otherwise, we must keep u, to preserve inconsistency. After analyzing all clauses of S, the resulting set M is an MUS of F. Variants of this algorithm have been studied since at least the early 90s [Chinneck and Dravnieks, 1991; Bakker et al., 1993; Dershowitz et al., 2006]. Algorithm 1 represents a possible instantiation of this approach for computing MUSes, but which also exploits the MSMP framework. As a result, one must specify which predicate to use for MUS extraction. Following [Marques-Silva et al., 2013b; Marques-Silva et al., 2017], we use the predicate P(B, S,W) ≜ ¬SAT(B ∧W), with W ⊆ R, and R ≜ S. The SAT test for the running example needs to decide the satisfiability of an EPR formula. In general, SAT must solve the decision problem for the logic used to represent B and R. Figure 2 summarizes a possible execution of Algorithm 1 on the formula from Figure 1. Clearly, the computed MUS depends on the order of clauses considered. In this case, the computed MUS is {c3, c4} ≜ {F(aw, pw),N(pw)} which, together with B, is inconsistent and minimal.
4 We consider clausal representations. Analysis of non-clausal formulas has also been investigated in the past [Liffiton and Sakallah, 2008; Belov and Marques-Silva, 2011].
| M (line 2) | u | P(B, S,M\ {u}) | Action |
|---|---|---|---|
| {c1, c2, c3, c4, c5, c6} | c1 | 1 | Drop c1 |
| {c2, c3, c4, c5, c6} | c2 | 1 | Drop c2 |
| {c3, c4, c5, c6} | c3 | 0 | Keep c3 |
| {c3, c4, c5, c6} | c4 | 0 | Keep c4 |
| {c3, c4, c5, c6} | c5 | 1 | Drop c5 |
| {c3, c4, c6} | c6 | 1 | Drop c6 |
| {c3, c4} | - | - | - |
| Algorithm | Oracle Calls | Reference |
|---|---|---|
| Insertion | O(km) | [de Siqueira N. and Puget, 1988] |
| MCS MUS | O(km) | [Bacchus and Katsirelos, 2015] |
| Deletion | O(m) | [Chinneck and Dravnieks, 1991] |
| Linear ins. | O(m) | [Belov et al., 2012] |
| Dichotomic | O(k log(m)) | [Hemery et al., 2006] |
| QuickXplain | O(k +k log( mk )) | [Junker, 2004] |
| Progression | O(k log(1+ mk )) | [Marques-Silva et al., 2013b] |
It is simple to conclude that Algorithm 1 requires Θ(|R|) predicate tests. There is no known approach for computing one MUS that improves asymptotically on this bound. A number of algorithms for MUS extraction have been proposed over the years e.g. [Junker, 2004; Marques-Silva et al., 2013b] but without exception, in the worst-case, the number of predicate calls is Ω(|S|). Depending on the target decision problem, different optimizations can be envisioned for MUS extraction, e.g. [Belov et al., 2012; Wieringa, 2012; Lonsing and Egly, 2015]. Table 1 summarizes the query complexity of well-known algorithms for extracting a single MUS, where m and k denote the number of clauses in S and the size of the largest minimal set respectively.
Subset-minimal corrections. Given an inconsistent formula F = B ∪ S, the following approach can be used for finding one MCS. Starting from a set of clauses M ≜ ∅, iteratively consider one clause u ∈ S. If B ∪M∪ {u} is consistent, add u to M. After considering all clauses in S, the clauses that could not be added to M denote an MCS of F. Such an algorithm has been used since at least the mid 00s [Bailey and Stuckey, 2005], and has more recently
| M (line 2) | u | P(B, S,M\ {u}) | Action |
|---|---|---|---|
| {c1, c2, c3, c4, c5, c6} | c1 | 1 | Drop c1 |
| {c2, c3, c4, c5, c6} | c2 | 0 | Keep c2 |
| {c2, c3, c4, c5, c6} | c3 | 1 | Drop c3 |
| {c2, c4, c5, c6} | c4 | 0 | Keep c4 |
| {c2, c4, c5, c6} | c5 | 1 | Drop c5 |
| {c2, c4, c6} | c6 | 1 | Drop c6 |
| {c2, c4} | - | - | - |
Function CLD(P, B, S, R) 1 X ← ∅; 2 (R′ , Y ) ← ReifyClauses(R, X); 3 D← DCLAUSE(Y ); 4 while true do 5 (st , M) ← P(B, S, R′ ∧ D); 6 if ¬st then return M ← SetElements(R, Y ); 7 X ← PickSatisfiedRVars(M, Y ); 8 (R′ , Y ) ← ReifyClauses(R, X); 9 D ← DCLAUSE(Y );
been referred to as basic linear search (BLS) [Marques-Silva et al., 2013a]. As implicit in earlier work [Marques-Silva et al., 2013b; Marques-Silva et al., 2017], by changing the predicate used, Algorithm 1 corresponds to BLS, as outlined above. For this case, the predicate to use is defined as follows: P (B, S, W) ≜ SAT(B ∧ (S \ W)), with W ⊆ R and R ≜ S. Figure 3 illustrates the execution of Algorithm 1 for computing an MCS. The computed set is {c2, c4} ≜ {N(hw), N(pw)}. A number of optimizations to the BLS algorithm have been proposed in earlier work [Marques-Silva et al., 2013a; Menc´ıa et al., 2015]. These include, among others, exploiting models to save a number of predicate tests.
BLS is one of a number of algorithms that have been proposed for extracting MCSes. A conceptually simple solution is to find an MCS using maximum satisfiability [Liffiton and Sakallah, 2008]. In practice, solvingMaxSAT, even if requiring fewer oracle calls in the worst case, is not as effective as other alternatives. One of the most widely used methods for the extraction of MCSes is the Clause D (CLD) algorithm [Marques-Silva et al., 2013a]. For some kinds of MSMP problems, the CLD algorithm can be used.
Algorithm 2 summarizes the main steps of CLD. One starts by reifying each clause ci ∈ S with a fresh relaxation variable (or 0-place predicate): (ri ∨ ci), thus creating a replacement R′ for the original R. Moreover, a disjunction is created with a literal ¬ri for each ri variable (this is the D clause). Then, the algorithm iteratively tests B ∪ R′ ∪ {D}. (Observe that this requires at least one ri to be assigned value 0.) If this formula is satisfiable, then some soft clause(s) ci can be satisfied without assigning ri to 1. Thus, we recreate the formula by dropping any ri assigned value 0 and recreate the D clause without the corresponding literals. The process is repeated until the D clause contains a set of literals that, given the other clauses, cannot be satisfied. These literals identify an MCS 5 . In contrast to the deletion-based approach, as well as to many other algorithms for MUS extraction, CLD expects the oracle call to return a model, from which it can identify the clauses that will no longer be reified. Thus, the predicate call must test for consistency and not for inconsistency. Nevertheless, as shown in earlier work, a large number of minimal set problems are defined by testing for consistency.
| Algorithm | Oracle Calls | Reference |
|---|---|---|
| Linear search | O(m) | [Bailey and Stuckey, 2005] |
| MaxSAT | O(logm) | [Liffiton and Sakallah, 2008] |
| Clause D | O(m-k) 6 | [Marques-Silva et al., 2013a] |
| FastDiag | O(k +k log mk ) | [Felfernig et al., 2012] |
| Progression | O(k log(1+ mk )) | [Marques-Silva et al., 2013b] |
| LBX 7 | O(n) | [Menc´ıa et al., 2015] |
| CMP | O(m2 ) | [Gr´egoire et al., 2014] |
| UCD | O(k +k log( mk )) | [Menc´ıa et al., 2016] |
| UBS, LOPZ | O(√mlogm) | [Menc´ıa et al., 2016] |
Table 2 summarizes the query complexity of well-known algorithms for extracting a single MCS, where n is the number of variables in S, and m and k have the same meaning as before, with the exception of CLD, where k is the size of the smallest MCS. Moreover, there are algorithms that compute an MCS by modifying the oracle, imposing a fixed branching preference [Rosa et al., 2010; Bacchus et al., 2014].
4 Cardinality- &PreferredMinimal Sets
Solving maximum satisfiability. MaxSAT is solved by finding smallest (cost) MCSes. A well-known approach for solving MaxSAT is branch-and-bound search (B&B) [Li and Many`a, 2009]. Since the mid 00s, experimental evidence from a number of applications showed that B&B does not scale in practice [Morgado et al., 2013; Ans´otegui et al., 2013]. An alternative approach consists in reifying all the soft clauses, i.e. replace (ci), with ci ∈ S, with (ri ∨ ci), obtaining Sr; and then defining a constraint X ≜ ∑i wi × ri ≤ τ , where τ ranges from 0 to ∑i wi. As a result, finding the smallest value of τ, such that B ∧ Sr ∧ X is consistent, can then be achieved with linear search [Le Berre and Parrain, 2010], by refining lower or upper bounds on the value of τ, or with binary search [Koshimura et al., 2012]. When the number of soft clauses is large, the representation or handling of X can be a problem. Motivated by this drawback, two approaches for solving MaxSAT using SAT oracles have been proposed since the mid 00s, both of which reason about inconsistency. Core-guided approaches relax soft clauses on demand (see [Morgado et al., 2013; Ans´otegui et al., 2013] for surveys of earlier work and [Martins et al., 2014; Morgado et al., 2014; Alviano et al., 2015] for recent improvements). An alternative is based on the iterative computation of minimum hitting sets (MinHS) on clauses describing (minimal) unsatisfiable cores [Davies and Bacchus, 2011]. Core-guided approaches reify clauses on demand given identified (minimal) unsatisfiable subsets. Cardinality (for unweighted problems) or pseudo-boolean constraints (for weighted problems) are then specified using the relaxation variables and existing lower or upper bounds. MinHS approaches do not reify clauses on demand. Instead, computed (minimal) unsatisfiable subsets serve as sets that must be hit when selecting the next minimum cost subset of clauses whose satisfiability is to be tested. Not surprisingly, both approaches generalize beyond the propositional case.
5 The propositional version admits optimizations, including the fact that reification is unnecessary. Some optimizations are not restricted to the propositional version.
6 In the propositional case one obtains O(min(n, m - k)).
7 LBX can only be used with non-quantified formulas.
Smallest explanations. The previous section argued that existing algorithms for computing an MUS require Θ(|S|) calls to a suitable oracle. In contrast, computing a cardinalityminimal (or smallest) MUS (SMUS) seems to require solving a computationally harder problem. For the case of propositional logic, deciding whether there exists an MUS of size not greater than some k is complete for ΣP2 [Liberatore, 2005], and so computing a smallest MUS requires a logarithmic number of calls to a ΣP2 oracle. The state of the art in computing smallest explanations is FORQES [Ignatiev et al., 2015]. As with other methods studied in this paper, the FORQES algorithm generalizes beyond the propositional case. Earlier work proposed worst-case exponential propositional encodings for this problem [Lynce and Marques-Silva, 2004].
Computing preferred sets. In propositional logic, preferences of inclusion of clauses in MUSes and MCSes are hard for the second level of the polynomial hierarchy [MarquesSilva and Previti, 2014]. Preferences of non-inclusion of clauses in MUSes and MCSes are in FP NP . Similar increases in complexity are expected to hold beyond the propositional case.
5 Enumeration of Minimal Sets
Enumeration of minimal corrections. Enumeration of MCSes can be achieved by enumerating MaxSAT solutions [Liffiton and Sakallah, 2008]. More recent work proposed dedicated algorithms for MCS enumeration [MarquesSilva et al., 2013a; Bacchus et al., 2014; Previti et al., 2017; Previti et al., 2018; Gr´egoire et al., 2018; Narodytska et al., 2018]. To implement enumeration of MCSes, one needs to prevent the same MCS from being computed again. This can be done by blocking the selection of the set of clauses corresponding to an MCS. Most recent work focuses on how to optimize the enumeration process.
Enumeration of minimal explanations. To our best knowledge, enumeration of minimal explanations is harder than the enumeration of minimal corrections, and cannot be obtained directly by iterative extraction of MUSes 8 . One
8 Implicit enumeration of all possible sets [Reiter, 1987; Bailey and Stuckey, 2005] could be considered, but these approaches do not scale in practice [Liffiton and Sakallah, 2008].
Function MINSETENUM(PXYZ, B, S) 1 (N , P) ← (∅, ∅); 2 while true do 3 (st λ, λ) ← FindMHS(N , P); 4 if ¬stλ then break; 5 (st ρ, ρ) ← ChkXYZ(B, S, Cls(λ)); 6 if stρ then 7 τ ← GetXYZ(PXYZ, B, S, S \ Cls(λ)); 8 ReportXYZ(τ ); 9 N ← N ∪ NegClIDs(τ ); 10 else 11 ReportABC(Cls(λ)); 12 P ← P ∪ PosClIDs(Cls(λ));
| ABC | XYZ | ChkXYZ | GetXYZ |
|---|---|---|---|
| MCS | MUS | ¬SAT(B ∧S \ Cls(λ)) | MUS |
| MUS | MCS | SAT(B ∧ Cls(λ)) | MCS |
well-known solution is the enumeration of all MCSes, from which all the MUSes can be obtained by computing all the minimal hitting sets. This was implemented for example in the CAMUS tool [Liffiton and Sakallah, 2008]. A difficulty of these approaches is that MUSes can be computed only after all the MCSes have been computed, which can be exponential in number. A recent alternative is the MARCO algorithm [Liffiton et al., 2016], which iteratively enumerates both MUSes and MCSes, and can be configured such that only one kind of minimal set needs to be extracted.
Algorithm 3 outlines a modified MARCO algorithm, where the preference for a specific kind of minimal set is made explicit. The two configurations are shown in Table 3. Let us focus on the one that gives preference to finding MUSes (the other one is analogous). In this case, XYZ is set to MUS, and ABC to MCS. The algorithm maintains two sets of sets of indices (where index ij is associated to clause cj ∈ S): N, with sets blocking all MUSes found; and P, with sets blocking all MCSes found. Iteratively, a minimal hitting set (MHS) λ of N subject to P is computed, which induces the set of clauses Cls(λ). Then, if ¬SAT(B∧S\Cls(λ)) holds, an MUS is extracted from S \ Cls(λ), which is blocked in N. Otherwise, Cls(λ) represents an MCS, which is blocked in P. The process continues until no MHS exists, guaranteeing that all MUSes and MCSes have been reported. Figure 4 illustrates the execution of Algorithm 3 on the running example. Improvements to MARCO have been proposed in recent years [Bacchus and Katsirelos, 2016; Narodytska et al., 2018; Bend´ık et al., 2018]. Besides, MARCO and variants have a growing number of applications [Polikarpova et al., 2016; Rothenberg and Grumberg, 2016; Brandt et al., 2018].
| N | P | (stλ, λ) | stρ | MUS/MCS | N update | P update |
|---|---|---|---|---|---|---|
| ∅ {{¬i1, ¬i2}} {{¬i1, ¬i2}, {¬i3, ¬i4}} {{¬i1, ¬i2}, {¬i3, ¬i4}} {{¬i1, ¬i2}, {¬i3, ¬i4}} {{¬i1, ¬i2}, {¬i3, ¬i4}} {{¬i1, ¬i2}, {¬i3, ¬i4}} | ∅ ∅ ∅ {{i1, i3}} {{i1, i3}, {i1, i4}} {{i1, i3}, {i1, i4}, {i2, i3}} {{i1, i3}, {i1, i4}, {i2, i3}, {i2, | (1, ∅) (1, {i1}) (1, {i1, i3}) (1, {i1, i4}) (1, {i2, i3}) (1, {i2, i4}) i4}} (0, -) | 1 1 0 0 0 0 - | {c1, c2} {c3, c4} {c1, c3} {c1, c4} {c2, c3} {c2, c4} - | {¬i1, ¬i2} {¬i3, ¬i4} - - - - - | - - {i1, i3} {i1, i4} {i2, i3} {i2, i4} - |
6 Example Applications
This section provides a brief glimpse of the applications of reasoning about inconsistency. Optimizing linear cost functions subject to sets of constraints is ubiquitous in a growing range of domains. One well-known application domain is program analysis [Si et al., 2017]. Additional examples include Pseudo-Boolean Optimization but also optimization subject to quantified constraints and multi-objective optimization [Terra-Neves et al., 2017]. The relationship between the analysis of inconsistent formulas and model-based diagnosis (MBD) can be traced to the seminal work of Reiter [Reiter, 1987]. Approaches based on solving MaxSAT or computing MCSes have been proposed [Metodi et al., 2014; Marques-Silva et al., 2015; Ignatiev et al., 2019a]. A concrete instantiation of MBD is axiom pinpointing. In this respect, several of the algorithms presented in this paper have been applied to axiom pinpoiting in EL+ ontologies [Sebastiani and Vescovi, 2009; Arif et al., 2015]. In addition, MUS extraction finds application in formal verification and model checking [McMillan and Amla, 2003; Nadel, 2010]. Explainability is arguably a strategic area in Machine Learning (ML). Most existing approaches for explaining ML models are heuristic, with recent results raising concerns about the global validity of the computed explanations [Ignatiev et al., 2019d]. Recent work relates explanations with prime implicants, and so with analyzing inconsistent formulas [Ignatiev et al., 2019b]. Furthermore, recent work has also shown important links between explanations, adversarial examples and the seminal work of Reiter [Ignatiev et al., 2019c].
7 Conclusions &Research Directions
This paper overviews solutions for the analysis of inconsistent formulas, including the identification of minimal corrections and minimal explanations, but also their enumeration. The paper highlights that most of the algorithms proposed for reasoning about inconsistent formulas generalize beyond the propositional case, being applicable in more expressive logics. Motivated by the many existing applications, the recent fast pace of improvement of algorithms for inconsistency analysis is expected to continue in the near future.
Acknowledgements
This work is supported by the AI Interdisciplinary Institute ANITI, funded by the French program "Investing for the Future - PIA3" under Grant agreement no ANR-19-PI3A0004, by the Spanish Government under project TIN201679190-R and by the Principality of Asturias under grant IDI/2018/000176.
@inproceedings{ijcai2020p682,
title = {Reasoning About Inconsistent Formulas},
author = {Marques-Silva, Joao and Mencía, Carlos},
booktitle = {Proceedings of the Twenty-Ninth International Joint Conference on
Artificial Intelligence, {IJCAI-20}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Christian Bessiere},
pages = {4899--4906},
year = {2020},
month = {7},
note = {Survey track},
doi = {10.24963/ijcai.2020/682},
url = {https://doi.org/10.24963/ijcai.2020/682},
}
TY - CPAPER TI - Reasoning About Inconsistent Formulas AU - Marques-Silva, Joao AU - Mencía, Carlos T2 - Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2020 SP - 4899 EP - 4906 DO - 10.24963/ijcai.2020/682 UR - https://doi.org/10.24963/ijcai.2020/682 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: