# knowledge_compilation_meets_logical_separability__ca57ea03.pdf Knowledge Compilation Meets Logical Separability Junming Qiu1, 2, Wenqing Li1, 2, Zhanhao Xiao3, Quanlong Guan1, 2*, Liangda Fang1, 4, 5*, Zhao-Rong Lai1, 2, Qian Dong1 1 Jinan University, Guangzhou 510632, China 2 Guangdong Institute of Smart Education, Guangzhou 510632, China 3 Sun Yat-sen University, Guangzhou 510006, China 4 Pazhou Lab, Guangzhou 510330, China 5 Guangxi Key Laboratory of Trusted Software, Guilin University of Electronic Technology, Guilin 541004, China {2040697476jnu, eskii0706}@stu2020.jnu.edu.cn; xiaozhh9@mail.sysu.edu.cn; {gql, fangld, laizhr, dongq8}@jnu.edu.cn Knowledge compilation is an alternative solution to address demanding reasoning tasks with high complexity via converting knowledge bases into a suitable target language. Interestingly, the notion of logical separability, proposed by Levesque, offers a general explanation for the tractability of clausal entailment for two remarkable languages: decomposable negation normal form and prime implicates. It is interesting to explore what role logical separability on earth plays in problem tractability. In this paper, we apply the notion of logical separability in three reasoning problems within the context of propositional logic: satisfiability check (CO), clausal entailment check (CE) and model counting (CT), contributing to three corresponding polytime procedures. We provide three logical separability based properties: CO-logical separability, CE-logical separability and CT-logical separability. We then identify three novel normal forms: CO-LSNNF, CE-LSNNF and CT-LSNNF based on the above properties. Besides, we show that every normal form is the necessary and sufficient condition under which the corresponding procedure is correct. We finally integrate the above four normal forms into the knowledge compilation map. Introduction Knowledge compilation (KC) has been attracted interests in many areas of AI, for example, model-based diagnosis (Huang and Darwiche 2005; Mateescu, Dechter, and Marinescu 2008), explainable machine learning (Shih, Darwiche, and Choi 2019; Darwiche and Hirth 2020), probabilistic inference (Martires, Dries, and De Raedt 2019; Shih, Choi, and Darwiche 2019) and planning (Palacios et al. 2005; Huang 2006) and so on. As an alternative solution to address demanding reasoning tasks with high complexity, KC converts knowledge bases into a target language in which such reasoning tasks can be tractably accomplished. Darwiche and Marquis (2002) proposed two criteria to evaluate target compilation languages: succinctness (the size of complied knowledge bases) and tractability (the supported polytime queries and transformations). In general, more succinct languages are less tractable and vice versa. *Both are corresponding authors. Copyright 2022, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. One of primary purposes of KC is to design a suitable target language that achieves a good trade-off between succinctness and tractability for one or more specific reasoning tasks. In the past decades, many prominent target compilation languages were developed, particularly, decomposable negation normal form (DNNF), the subset of negation normal form (NNF) satisfying the -decomposability property (Darwiche 2001a). The author also designed two polytime procedures for satisfiability check and clausal entailment check, which are correct for DNNF. In other words, DNNF supports polytime satisfiability check and clausal entailment check. One question worth investigation is the intrinsic reason why DNNF supports such polytime queries. It actually can be answered by the notion of logical separability which was first proposed by Levesque (1998). Roughly speaking, a conjunction φ is logically separable, if the clausal entailment problem of a conjunction φ can be decomposed to entailment problems for every conjunct of φ. It is easily verified that any conjunction appearing in a DNNF-formula is logically separable due to the -decomposability property. In addition, prime implicate normal form (PI) supports polytime clausal entailment check as the conjunction of prime implicates is logically separable. Hence, logical separability offers a thorough explanation for why both DNNF and PI supports clausal entailment check. It is interesting to explore what role logical separability on earth plays in problem tractability. In the paper (Levesque 1998), Levesque also defined a normal form, namely Levesque s normal form (LNF), s.t. the entailment check is tractable for a class of knowledge bases. However, after that, the idea of logical separability has hardly been applied to language design for other reasoning problems. It motivates us to take logical separability into account to design succinct target languages in which reasoning problems are tractably solved. In this paper, we focus on three reasoning problems in the context of propositional logic: satisfiability check, clausal entailment check and model counting. For these three reasoning problems, we start by providing three polytime procedures CO, CE and CT , and then give definitions of logical separability based properties: CO-logical separability, CE-logical separability and CT-logical separability, The Thirty-Sixth AAAI Conference on Artificial Intelligence (AAAI-22) respectively. We also propose three novel normal forms: CO-LSNNF, CE-LSNNF and CT-LSNNF, each of which satisfies the above logical separability based properties, respectively, and show that every normal form is the necessary and sufficient condition under which the corresponding procedure is correct. In addition, CO-LSNNF, CE-LSNNF and CT-LSNNF are complete languages. For CO-LSNNF, we provide two interesting theoretical results: (1) any language supports polytime satisfiability check iff it is polynomially translatable into CO-LSNNF; and (2) CO-LSNNF is equally succinct to NNF. For CE-LSNNF, we show that if a language is polynomially translatable into CE-LSNNF, then it supports polytime clausal entailment check; and make a comparison to LNF which is a strictly less succinct than CE-LSNNF. For CT-LSNNF, we prove that (1) if a language is polynomially translatable into CT-LSNNF, then it supports polytime model counting, and (2) CT-LSNNF is polynomially equivalent to d-DNNF. Furthermore, we analyze the computational complexity of the membership problems of the three logical separabilitybased normal forms. Finally, we analyze the relative succinctness of CO-LSNNF, CE-LSNNF, CT-LSNNF and LNNF compared to the languages considered in (Darwiche and Marquis 2002; Fargier and Marquis 2014) and investigate which of the queries and transformations can be accomplished in polytime for them. Preliminaries The NNF Languages Throughout this paper, we fix a finite set X of variables. A literal is a variable (positive literal) or a negated one (negative literal). For a positive (resp. negative) literal x (resp. x), its complementary literal is x (resp. x). Let Y X. A Y-literal is a literal x or x where x Y. A term (resp. clause) is , , or a conjunction (resp. disjunction) of literals. We say a term (resp. clause) is non-trivial if every variable appears at most once. Throughout this paper, we consider a wide range of complete propositional languages, all of which are the subsets of negation normal form (NNF). A NNF-formula is a rooted, directed acyclic graph (DAG), of which each leaf node is labeled by , , or literals; and each internal node is labeled by (conjunction) or (disjunction). We use a lower-case Greek letter (e.g. α, β) to denote a propositional formula. We use Var(α) (resp. Lit(α)) to denote the set of variables (resp. literals) appearing in α. We use |α| to denote the size of α (i.e. the number of its DAG edges). A Y-interpretation ω is a set of Y-literals s.t. each variable of Y appears exactly once. Let Var(α) Y. We use ω |= α to denote ω satisfies α, which is defined as usual. A Y-model of α is a Y-interpretation satisfying α. We use Mod Y(α) to denote the set of Y-models of α. For simplicity, in the case Y = X, we omit the subscript X, and Mod(α) denotes the set of X-models of α. We say α is satisfiable, if Mod(α) = ; otherwise, it is unsatisfiable. As mentioned in (Darwiche and Marquis 2002), a language qualifies as a target language if it supports polytime clausal entailment check. NNF is not a desired target language as it does not support such a query unless P = NP. But many of its subsets, with one or more restrictions, do. Conjunctive normal form (CNF) is the conjunction of nontrivial clauses while its dual, disjunctive normal form (DNF), is the disjunction of non-trivial terms. A prime implicate c of α is an implicate of α and there is no implicate c = c s.t. α |= c and c |= c. Prime implicates (PI) is the subset of CNF where each formula α is a conjunction of all of the prime implicates of α. Its dual, prime implicants (IP), can be similarly defined. Decomposable NNF (DNNF) (Darwiche 2001a) is the subset of NNF satisfying -decomposability, requiring the sets of variables of the children of each -node in a formula to be pairwise disjoint. Deterministic DNNF (d-DNNF) (Darwiche 2001b) is the subset of DNNF satisfying determinism, requiring the children of each -node in a formula to be pairwise logically contradictory. KROM (Krom 1970) is the subset of CNF in which each clause contains at most two literals. HORN (Horn 1951) is the subset of CNF in which each clause contains at most a positive literal. K/H is the union of KROM and HORN. Renamable Horn (ren H) is the subset of all CNF-formulas α for which there is a subset Y of Var(α) s.t. the formula obtained by substituting in α every Y-literal l by its complement l is a HORN-formula. Fargier and Marquis (2014) applied disjunctive closure principle to KROM, HORN, K/H and ren H and obtained KROM[ ], HORN[ ], K/H[ ] and ren H[ ], respectively. We remark that the above normal forms are not only defined in purely syntactic style but also based on semantics. For example, CNF and DNF are syntactic normal forms. On the other hand, PI and d-DNNF are based on clausal entailment and satisfiability, respectively and hence being semantic normal forms. Succinctness and Polynomial Translations We now consider two notions of translations on two subsets of NNF: succinctness and polynomial-translation. Definition 1. Let L1 and L2 be subsets of NNF. We say L1 is at least as succinct as L2, denoted L1 s L2, if there is a polynomial p s.t. for every formula α L2, there is an equivalent formula β L1 s.t. |β| p(|α|). L2 is polynomially translatable into L1, denoted L1 p L2, if there exists a (deterministic) polynomial-time algorithm f s.t. for every formula α L2, we have an equivalent formula f(α) L1. Succinctness only considers polynomial-space translations, that is, the size of the L1-formula β equivalent to α is required to be polynomial in the size of L2-formula α. Polynomial-translation is a more strict relation than succinctness, requiring polynomial-time translations, that is, any L2-formula can be tractably transformed into an equivalent L1-formula. Furthermore, we have L1 p L2 implies that L1 s L2 (Fargier and Marquis 2014). The two relations s and p are clearly reflexive and transitive, i.e. pre-orders over subsets of NNF. The notation s denotes the symmetric part of s, that is, L1 s L2 iff L1 s L2 and L2 s L1. On the other hand,