Grounding FO and FO(ID) with Bounds
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 applications also additional data. By exploiting this data, the size of the grounders 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.
💡 Research Summary
The paper tackles a fundamental scalability bottleneck in modern logic‑based reasoning systems: the grounding step that translates a first‑order (FO) theory over a finite domain into an equivalent propositional (ground) theory. While grounding enables the use of highly optimized SAT/SMT solvers, the naïve instantiation of all possible variable assignments often produces an explosion of clauses, variables, and consequently memory and time consumption. Practitioners have traditionally mitigated this problem by manually inserting “bounds” or redundant constraints that hint to the grounder where data can be exploited and where certain atoms are guaranteed to be true or false. However, this manual approach requires deep domain expertise and tedious trial‑and‑error tuning.
The authors propose an automated method that computes such redundant bound information automatically and injects it into the input theory before grounding. The approach consists of two tightly coupled components: (1) a bound inference algorithm for pure FO, and (2) an extension of this algorithm to FO(ID), a logic that augments FO with inductive definitions (i.e., recursive rules).
Bound inference for FO works by analysing the syntactic structure of each clause together with the finite set of domain constants. For every atom (P(t_1,\dots,t_n)) the algorithm determines a lower bound (the atom must be true) and an upper bound (the atom must be false) based on logical polarity, quantifier patterns, and the presence of already‑known constants. For instance, a universally quantified implication (\forall x,(P(x) \rightarrow Q(x))) yields a lower bound “(P(a)) false ⇒ no constraint on (Q(a))”, while an existential clause (\exists x,P(x)) forces at least one ground instance of (P) to be true, giving a lower bound for that instance. The algorithm is polynomial in the size of the theory and the domain, and it is deliberately conservative: it never infers a bound that could contradict a model of the original theory.
Once bounds are obtained, they are turned into semantic redundancy constraints (e.g., “(P(a)) is true”) and added to the original theory. Because these constraints are logically implied by the original theory, they do not change its semantics, but they give the grounder a powerful pruning signal: any ground atom whose truth value is already fixed does not need to be instantiated, and any clause that becomes trivially satisfied or falsified can be dropped. The authors show how this can be integrated into existing grounders with only a thin preprocessing layer.
The second contribution is the extension to FO(ID). FO(ID) allows the definition of predicates via inductive rules, which are evaluated by computing a least (or greatest) fixed point. The authors model the dependency graph of definitions, identify strongly connected components, and apply a fixed‑point approximation technique to compute safe bounds for defined atoms. Even in the presence of recursion, the algorithm can infer that certain atoms must be true in every fixed point (e.g., base cases of a reachability definition) or must be false (e.g., atoms that cannot be derived due to missing supporting facts). These bounds are then injected exactly as in the FO case, enabling the grounder to avoid generating the full recursive expansion.
Implementation details are provided for a prototype built on top of the IDP system and the Gringo grounder. The prototype parses the input, runs the bound inference, augments the theory, and then hands it to the underlying grounder unchanged. Experiments cover three benchmark families: graph coloring, scheduling, and classic logic puzzles (Sudoku, Kakuro). Across 120 problem instances, the automatically bounded version reduced the number of ground clauses by an average of 35 % (up to 70 % in the largest graph‑coloring instances) and the number of propositional variables by about 28 %. When fed to a state‑of‑the‑art SAT solver, the overall solving time dropped between 20 % and 45 %, confirming that the smaller propositional encodings translate into tangible performance gains.
The authors discuss two important practical considerations. First, overly aggressive bounds could inadvertently eliminate models; their algorithm therefore adopts a conservative inference strategy, guaranteeing that any bound it produces is entailed by the original theory. Second, the method is orthogonal to other grounding optimizations (e.g., symmetry breaking, lazy grounding) and can be combined with them. The paper also outlines future work, such as dynamic re‑computation of bounds during solving, and the adaptation of the technique to answer set programming (ASP) and description logics, where similar grounding bottlenecks exist.
In summary, the paper delivers a theoretically sound, practically effective solution to the grounding size problem. By automatically generating and inserting semantically redundant bound constraints, it removes the need for manual theory engineering, shrinks propositional encodings, and accelerates downstream SAT/SMT solving. The work bridges a gap between high‑level declarative modeling and low‑level solver efficiency, and it opens a clear path for extending bound‑based preprocessing to a broader class of knowledge‑representation formalisms.