Grounding FO and FO(ID) with Bounds

Grounding FO and FO(ID) with Bounds

Journal of Artificial Intelligence Research 38 (2010) 223-269 Submitted 11/09; published 05/10 Grounding FO and FO(ID) with Bounds Johan Wittocx [email protected] Maarten Mari¨en [email protected] Marc Denecker [email protected] Katholieke Universiteit Leuven Department of Computer Science Celestijnenlaan 200A, 3001 Heverlee, Belgium Abstract Grounding is the task of reducing a first-order theory and finite domain to an equivalent propositional theory. It is used as preprocessing phase in many logic-based reasoning systems. Such systems provide a rich first-order input language to a user and can rely on efficient propositional solvers to perform the actual reasoning. Besides a first-order theory and finite domain, the input for grounders contains in many appli- cations also additional data. By exploiting this data, the size of the grounder's output can often be reduced significantly. A common practice to improve the efficiency of a grounder in this context is by manually adding semantically redundant information to the input theory, indicating where and when the grounder should exploit the data. In this paper we present a method to compute and add such redundant information automatically. Our method therefore simplifies the task of writing input theories that can be grounded efficiently by current systems. We first present our method for classical first-order logic (FO) theories. Then we extend it to FO(ID), the extension of FO with inductive definitions, which allows for more concise and comprehensive input theories. We discuss implementation issues and experimentally validate the practical applicability of our method. 1. Introduction Grounding, or propositionalization, is the task of reducing a first-order theory and finite domain to an equivalent propositional theory, called a grounding. Grounding is used as a preprocessing phase in many logic-based reasoning systems. It serves to provide the user with a rich input language, while enabling the system to rely on efficient propositional solvers to perform the actual reasoning. Examples of systems that rely on grounding can be found in the area of finite first-order model generation (Claessen & S¨orensson, 2003; McCune, 2003; East, Iakhiaev, Mikitiuk, & Truszczy´nski, 2006; Mitchell, Ternovska, Hach, & Mohebali, 2006; Torlak & Jackson, 2007; Wittocx, Mari¨en,& Denecker, 2008d). Such systems are in turn used as part of theorem provers (Claessen & S¨orensson, 2003) and for lightweight software verification (Jackson, 2006). Currently, almost all Answer Set Programming (ASP) systems rely on grounding as a preprocessing phase (Gebser, Schaub, & Thiele, 2007; Perri, Scarcello, Catalano, & Leone, 2007; Syrj¨anen,2000; Syrj¨anen,2009). Also in planning systems (Kautz & Selman, 1996) and relational data mining (Krogel, Rawles, Zelezn´y,Flach, Lavrac, & Wrobel, 2003) grounding is frequently used. This large number of applications indicates the importance of grounding in logic-based reasoning systems and the need to develop efficient grounders. A basic (naive) grounding method is by instantiating the variables in the input theory by all possible combinations of domain elements. Grounding in this way is polynomial in the size of the domain but exponential in the maximum width of a formula in the input theory, and may easily produce groundings of unwieldy size. Several techniques have been developed to efficiently produce smaller groundings. There are two main categories of such techniques. In the first, the input theory is rewritten such that the maximum width of the formulas decreases. Methods like clause splitting (Schulz, 2002) and partitioning (Ramachandran & Amir, 2005) belong to this category. c 2010 AI Access Foundation. All rights reserved. Wittocx, Marien,¨ & Denecker The second type of techniques is applicable when besides the finite domain, additional data is available. This is often the case in practical model generation problems, such as the ones that are typical in ASP. In a graph problem the data could be an encoding of the input graph; in the context of planning, it could be a description of the initial and goal state, etc. Sometimes the data is explicitly available, e.g., in the form of a database, sometimes it is implicit, e.g., as a set of ground facts in the input theory. The second type of techniques aims at efficiently computing small groundings by taking the data into account. Observe that both types of techniques can be combined in a grounder. In this paper we mainly focus on a technique of the second category. To explain the intuition underlying our method, consider the following model generation problem. Example 1. Let T1 the first-order logic theory over the vocabulary fEdge; Subg, consisting of the two sentences 8u8v (Sub(u; v) ⊃ Edge(u; v)) (1) 8x8y8z (Sub(x; y) ^ Sub(x; z) ⊃ y = z); (2) T1 expresses that Sub is a subgraph of Edge with at most one outgoing edge in each vertex. Com- puting such a subgraph of a given graph G = hV; Ei can be cast as a model generation problem with input theory T1 and data G. The data can be represented as a structure Iσ for the subvocabulary Iσ σ1 = fEdgeg with domain V and Edge = E. A solution can be obtained by generating a model of T1 that expands Iσ with an interpretation of Sub. Applying the naive grounding algorithm produces jV j2 instantiations of (1) and jV j3 instantia- tions of (2). By taking the data into account, atoms over `Edge' and `=' can be substituted by their truth value in Iσ. Simplifying the resulting grounding then eliminates jEj instantiations of (1) and jV j instantiations of (2). Smart grounding algorithms interleave this substitution and simplification with the grounding process in order to avoid creating unnecessary parts of the grounding. Observe that substituting atoms over σ1 and then simplifying still produces a grounding of size O(jV j3). Indeed, the simplified grounding of (2) is the set of binary clauses :Sub(i; j) _:Sub(i; k) such that i; j; k 2 V and i 6= j. This set has size jV j3 − jV j. Some grounders apply reasoning on the ground theory to reduce it even further. In the example, the simplified grounding of (1) consists of the clauses :Sub(i; j) such that (i; j) 62 E. Since these are unit clauses, each of them is certainly true in every model of the ground theory. It follows that each binary clauses :Sub(i; j) _:Sub(i; k) such that either :Sub(i; j) or :Sub(i; k) belongs to the simplified grounding of (1) is certainly true in every model of the ground theory and thus can be omitted from the simplified grounding of (2). The result is a grounding of size jE ./1=1 Ej, where ./1=1 denotes the natural join matching the first columns. For a sparse graph, jE ./1=1 Ej is much smaller than jV j3. However, since reasoning on the ground theory does not avoid creating all instantiations of a formula, it does not significantly speed up the grounding process. One way to avoid a large grounding without relying on reasoning on the ground theory is by adding redundant information to formulas. This method is frequently used in ASP. For example, 8x8y8z(Edge(x; y) ^ Sub(x; y) ^ Edge(x; z) ^ Sub(x; z) ⊃ y = z) (3) is equivalent to (2) given (1), but its grounding (without reasoning on the ground theory) is equal to the one obtained by the kind of reasoning on the ground theory illustrated above. This illustrates how adding redundant information may sometimes dramatically reduce the size of the grounding. Since current grounders are optimized to ground formulas like (3) without trying all instances, grounding may also speed up a lot. However, manually adding redundancy to formulas has its disadvantages: it leads to more com- plex and hence, less readable theories. Worse, it might introduce errors. It requires a good under- standing of the used grounder, since it depends on the grounder what information is beneficial to add and where. Also, a human developer could easily miss useful information. 224 Grounding FO and FO(ID) with Bounds The above motivates a study of automated methods for deriving such redundant information and of principled ways of adding it to formulas. We develop an algorithm that, given a model generation problem with input theory T and input data Iσ, derives such redundant information, in the form of a pair of a symbolic upper and lower bound for each subformula of T . Each of these bounds is a formula over the vocabulary of Iσ. For instance, for Example 1, our algorithm will compute Edge(x; y) as upper bound for Sub(x; y), meaning that if Edge(x; y) is not true, then Sub(x; y) is not true either. We also show how to insert these bounds in the formulas of T . For example, inserting the upperbound Edge(x; y) for Sub(x; y) and the upperbound Edge(x; z) for Sub(x; z) transforms (2) into (3). The rest of this paper is organized as follows. In the next section we recall some notions from first-order logic (FO) and we introduce the notations used throughout the paper. In Section 3 we formally define grounding and model generation with additional data. In Section 4 we introduce upper- and lowerbounds for formulas. We present an any-time algorithm to compute them in the context of FO input theories. We show how the bounds can be used to rewrite the input theory to an equivalent theory that has a smaller grounding. Although many search problems can be cast concisely and naturally as FO model generation problems, some problems require richer logics than FO. One such logic is FO(ID), an extension of FO with inductive definitions.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    47 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us