Advertisement

Model-Intersection Problems and Their Solution Schema Based on Equivalent Transformation

  • Kiyoshi Akama
  • Ekawit Nantajeewarawat
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 631)

Abstract

Model-intersection (MI) problems are a very large class of logical problems that includes many useful problem classes, such as proof problems on first-order logic and query-answering (QA) problems in pure Prolog and deductive databases. We propose a general schema for solving MI problems by equivalent transformation (ET), where problems are solved by repeated simplification. The correctness of this solution schema is shown. This general schema is specialized for formalizing solution schemas for QA problems and proof problems. The notion of a target mapping is introduced for generation of ET rules, allowing many possible computation procedures, for instance, computation procedures based on resolution and unfolding. This theory is useful for inventing solutions for many classes of logical problems.

Keywords

Model-intersection problem Query-answering problem Equivalent transformation Problem solving 

1 Introduction

This paper introduces a model-intersection problem (MI problem), which is a pair \(\langle \textit{Cs}, \varphi \rangle \), where \(\textit{Cs}\) is a set of clauses and \(\varphi \) is a mapping, called an exit mapping, used for constructing the output answer from the intersection of all models of \(\textit{Cs}\). More formally, the answer to a MI problem \(\langle \textit{Cs}, \varphi \rangle \) is \(\varphi (\bigcap \textit{Models}(\textit{Cs}))\), where \(\textit{Models}(\textit{Cs})\) is the set of all models of \(\textit{Cs}\). The set of all MI problems constitutes a very large class of problems and is of great importance.

MI problems includes as an important subclass query-answering problems (QA problems), each of which is a pair \(\langle \textit{Cs}, a \rangle \), where \(\textit{Cs}\) is a set of clauses and a is a user-defined query atom. The answer to a QA problem \(\langle \textit{Cs}, a \rangle \) is defined as the set of all ground instances of a that are logical consequences of \(\textit{Cs}\). Characteristically, a QA problem is an “all-answers finding” problem, i.e., all ground instances of a given query atom satisfying the requirement above are to be found. Many logic programming languages, including Datalog, Prolog, and other extensions of Prolog, deal with specific subclasses of QA problems.

The class of proof problems is also a subclass of MI problems. In contrast to a QA problem, a proof problem, is a “yes/no” problem; it is concerned with checking whether or not one given logical formula is a logical consequence of another given logical formula. Formally, a proof problem is a pair \(\langle E_1, E_2 \rangle \), where \(E_1\) and \(E_2\) are first-order formulas, and the answer to this problem is defined to be “yes” if \(E_2\) is a logical consequence of \(E_1\), and it is defined to be “no” otherwise.

Historically, among these three kinds of problems, proof problems were first solved, e.g., the tableaux method [8] and the resolution method [12] have been long well known. After that, QA problems on pure Prolog were solved based on the resolution principle. The theory of SLD-resolution was used for the correctness of Prolog computation. So it has been believed that Prolog computation is an inference process. This approach can be called a proof-centered approach. Many solutions proposed so far for some other classes of logical problems are also basically proof-centered.

In this paper, we prove that a QA problem is a MI problem (Theorem 3), and a proof problem is also a MI problem (Theorem 4). Together with the inclusion relation between proof problems and QA problems shown in [2], we have
$$ \text {P}\textsc {roof} \subset \text {QA} \subset \text {MI}, $$
where Proof, QA, and MI denote the class of all proof problems, the class of all QA problems, and the class of all MI problems, respectively. The class of all MI problems is larger than the class of all QA problems and that of all proof problems. It is a more natural class to be solved by the method presented in this paper. A general solution method for MI problems can be applied to any arbitrary QA problem and any arbitrary proof problem. This can be called a MI-centered approach.

MI problems are axiomatically constructed on an abstract structure, called a specialization system. It consists of abstract atoms and abstract operations (extensions of variable-substitution operations) on atoms, called specializations. These abstract components can be any arbitrary mathematical objects as long as they satisfy given axioms. Abstract clauses can be built on abstract atoms. This is a sharp contrast to most of the conventional theories in logic programming, where concrete syntax is usually used. In Prolog, for example, usual first-order atoms and substitutions with concrete syntax are used, and there is no way to give a foundation for other forms of extended atoms and for various specialization operations other than the usual variable-substitution operation.

An axiomatic theory enables us to develop a very general theory. By instantiating a specialization system to a specific domain and by imposing certain restrictions on clauses, our theory can be applied to many subclasses of MI problems.

We propose a general schema for solving MI problems by equivalent transformation (ET), where problems are solved by repeated simplification. We introduce the concept of target mapping and propose three target mappings. Since transformation preserving a target mapping is ET, target mappings provide a strong foundation for inventing many ET rules for solving MI problems on clauses.

An ET-based solution consists of the following steps: (i) formalize an initial MI problem on some specialization system, (ii) prepare ET rules, (iii) construct an ET sequence, and (iv) compute an answer mapping for deriving a solution.

To begin with, Sect. 2 recalls the concept of specialization system and formalizes MI problems on a specialization system. QA problems and proof problems are embedded into the class of all MI problems. Section 3 defines the notions of a target mapping and an answer mapping, and introduces a schema for solving MI problems based on ET preserving answers/target mappings. The correctness of this solution schema is shown. Section 4 introduces three target mappings for clause sets. Among them, \(\mathbb {MM}\) is a target mapping that associates with each clause set a collection of its specific models computed in a bottom-up manner. Section 5 presents solution schemas for QA problems and proof problems based on the solution schema for MI problems in Sect. 3. Section 6 shows examples of solutions of a QA problem and a proof problem based on the solution schemas in Sect. 5. Section 7 concludes the paper.

The notation that follows holds thereafter. Given a set A, \(\textit{pow}({A})\) denotes the power set of A and \(\textit{partialMap}(A)\) the set of all partial mappings on A (i.e., from A to A). For any partial mapping f from a set A to a set B, \(\textit{dom}(f)\) denotes the domain of f, i.e., \( \textit{dom}(f) = \{ a \mid (a \in A) \ \& \ (f(a)\text { is defined}) \}\).

2 Clauses and Model-Intersection Problems

2.1 Specialization Systems

A substitution \(\{ X/f(a), Y/g(z) \}\) changes an atom p(X, 5, Y) in the term domain into p(f(a), 5, g(z)). Generally, a substitution in first-order logic defines a total mapping on the set of all atoms in the term domain. Composition of such mappings is also realized by some substitution. There is a substitution that does not change any atom (i.e., the empty substitution). A ground atom in the term domain is a variable-free atom.

Likewise, in the string domain, substitutions for strings are used. A substitution \(\{ X/\mathrm{``}aYbc\text {''}, Y/\mathrm{``}xyz\text {''} \}\) changes an atom \(p(\mathrm{``}X5Y\text {''})\) into \(p(\mathrm{``}aYbc5xyz\text {''})\). Such a substitution for strings defines a total mapping on the set of all atoms that may include string variables. Composition of such mappings is also realized by some string substitution. There is a string substitution that does not change any atom (i.e., the empty substitution). A ground atom in the string domain is a variable-free atom.

A similar operation can be considered in the class-variable domain. Consider, for example, an atom \(p(X:\textit{animal}, Y:\textit{dog}, Z:\textit{cat})\) in this domain, where \(X:\textit{animal}\), \(Y:\textit{dog}\), and \(Z:\textit{cat}\) represent an animal object, a dog object, and a cat object, respectively. When we obtain additional information that X is a dog, we can restrict \(X:\textit{animal}\) into \(X:\textit{dog}\) and the atom \(p(X:\textit{animal}, Y:\textit{dog}, Z:\textit{cat})\) into \(p(X:\textit{dog}, Y:\textit{dog}, Z:\textit{cat})\). By contrast, with new information that Z is a dog, we cannot restrict \(Z:\textit{cat}\) and the above atom since Z cannot be a dog and a cat at the same time. More generally, such a restriction operation may not be applicable to some atoms, i.e., it defines a partial mapping on the set of all atoms. Composition of such partial mappings is also a partial mapping, and we can determine some composition operation corresponding to it. An empty substitution that does not change any atom can be introduced. A ground atom in the class-variable domain is a variable-free atom.

In order to capture the common properties of such operations on atoms, the notion of a specialization system was introduced around 1990.

Definition 1

A specialization system \(\varGamma \) is a quadruple \(\langle \mathcal{A}, \mathcal{G}, \mathcal{S}, \mu \rangle \) of three sets \(\mathcal{A}\), \(\mathcal{G}\), and \(\mathcal{S}\), and a mapping \(\mu \) from \(\mathcal{S}\) to partialMap \((\mathcal{A})\) that satisfies the following conditions:
  1. 1.

    \((\forall s^{\prime },s^{\prime \prime }\in \mathcal{S}) (\exists s\in \mathcal{S}): \mu (s)=\mu (s^{\prime }) \circ \mu (s^{\prime \prime })\).

     
  2. 2.

    \((\exists s\in \mathcal{S})(\forall a\in \mathcal{A}): \mu (s)(a)=a\).

     
  3. 3.

    \(\mathcal{G}\subseteq \mathcal{A}\).

     

Elements of \(\mathcal{A}\), \(\mathcal{G}\), and \(\mathcal{S}\) are called atoms, ground atoms, and specializations, respectively. The mapping \(\mu \) is called the specialization operator of \(\varGamma \). A specialization \(s\in \mathcal{S}\) is said to be applicable to \(a\in \mathcal{A}\) iff \(a\in \textit{dom}(\mu (s))\).    \(\square \)

Assume that a specialization system \(\varGamma = \langle \mathcal{A}, \mathcal{G}, \mathcal{S}, \mu \rangle \) is given. A specialization in \(\mathcal{S}\) will often be denoted by a Greek letter such as \(\theta \). A specialization \(\theta \in \mathcal{S}\) will be identified with the partial mapping \(\mu (\theta )\) and used as a postfix unary (partial) operator on \(\mathcal{A}\) (e.g., \(\mu (\theta )(a) = a\theta \)), provided that no confusion is caused. Let \(\epsilon \) denote the identity specialization in \(\mathcal{S}\), i.e., \(a\epsilon = a\) for any \(a \in \mathcal{A}\). For any \(\theta , \sigma \in \mathcal{S}\), let \(\theta \circ \sigma \) denote a specialization \(\rho \in \mathcal{S}\) such that \(\mu (\rho ) = \mu (\sigma ) \circ \mu (\theta )\), i.e., \(a(\theta \circ \sigma ) = (a\theta )\sigma \) for any \(a \in \mathcal{A}\).

2.2 User-Defined Atoms, Constraint Atoms, and Clauses

Let \(\varGamma _\mathrm{u} = \langle \mathcal{A}_\mathrm{u}, \mathcal{G}_\mathrm{u}, \mathcal{S}_\mathrm{u}, \mu _\mathrm{u} \rangle \) and \(\varGamma _\mathrm{c} = \langle \mathcal{A}_\mathrm{c}, \mathcal{G}_\mathrm{c}, \mathcal{S}_\mathrm{c}, \mu _\mathrm{c} \rangle \) be specialization systems such that \(\mathcal{S}_\mathrm{u} = \mathcal{S}_\mathrm{c}\). Elements of \(\mathcal{A}_\mathrm{u}\) are called user-defined atoms and those of \(\mathcal{G}_\mathrm{u}\) are called ground user-defined atoms. Elements of \(\mathcal{A}_\mathrm{c}\) are called constraint atoms and those of \(\mathcal{G}_\mathrm{c}\) are called ground constraint atoms. Hereinafter, assume that \(\mathcal{S}= \mathcal{S}_\mathrm{u} = \mathcal{S}_\mathrm{c}\). Elements of \(\mathcal{S}\) are called specializations. Let TCon denote the set of all true ground constraint atoms.

A clause on \(\langle \varGamma _\mathrm{u}, \varGamma _\mathrm{c} \rangle \) is an expression of the form
$$ a_1, \ldots , a_m \leftarrow b_1, \ldots , b_n, $$
where \(m \ge 0\), \(n \ge 0\), and each of \(a_1, \ldots , a_m, b_1, \ldots , b_n\) belongs to \(\mathcal{A}_\mathrm{u} \cup \mathcal{A}_\mathrm{c}\). It is called a definite clause iff \(m = 1\) and \(a_1 \in \mathcal{A}_\mathrm{u}\). It is called a positive unit clause iff it is a definite clause and each of \(b_1, \ldots , b_n\) belongs to \(\mathcal{A}_\mathrm{c}\). It is a ground clause on \(\langle \varGamma _\mathrm{u}, \varGamma _\mathrm{c} \rangle \) iff each of \(a_1, \ldots , a_m, b_1, \ldots , b_n\) belongs to \(\mathcal{G}_\mathrm{u} \cup \mathcal{G}_\mathrm{c}\). Let Cls denote the set of all clauses on \(\langle \varGamma _\mathrm{u}, \varGamma _\mathrm{c} \rangle \).

2.3 Interpretations and Models

An interpretation is a subset of \(\mathcal{G}_\mathrm{u}\). Unlike ground user-defined atoms, the truth values of ground constraint atoms are predetermined by TCon (cf. Sect. 2.2) independently of interpretations. A ground constraint atom g is true iff \(g \in \text {TC}\textsc {on}\). It is false otherwise.

A ground clause \(C = (a_1, \ldots , a_m \leftarrow b_1, \ldots , b_n)\) is true with respect to an interpretation \(G \subseteq \mathcal{G}_\mathrm{u}\) (in other words, G satisfies C) iff at least one of the following conditions is satisfied:
  1. 1.

    There exists \(i \in \{ 1, \ldots , m \}\) such that \(a_i \in G \cup \text {TC}\textsc {on}\).

     
  2. 2.

    There exists \(j \in \{ 1, \ldots , n \}\) such that \(b_j \notin G \cup \text {TC}\textsc {on}\).

     

A clause C is true with respect to an interpretation \(G \subseteq \mathcal{G}_\mathrm{u}\) (in other words, G satisfies C) iff for any specialization \(\theta \) such that \(C\theta \) is ground, \(C\theta \) is true with respect to G. A model of a clause set \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) is an interpretation that satisfies every clause in \(\textit{Cs}\).

Note that the standard semantics is taken in this paper, i.e., all models of a formula are considered instead of specific ones, such as those considered in the minimal model semantics [6, 11] (i.e., the semantics underlying logic programming) and those considered in stable model semantics [9, 10] (i.e., the semantics underlying answer set programming).

2.4 Model-Intersection (MI) Problems

Let Models be a mapping that associates with each clause set the set of all of its models, i.e., Models \((\textit{Cs})\) is the set of all models of \(\textit{Cs}\) for any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\).

Assume that a person A and a person B are interested in knowing which atoms in \(\mathcal{G}_\mathrm{u}\) are true and which atoms in \(\mathcal{G}_\mathrm{u}\) are false. They want to know the unknown set G of all true ground atoms. Due to shortage of knowledge, A still cannot determine one unique true subset of \(\mathcal{G}_\mathrm{u}\). The person A can only limit possible subsets of true atoms by specifying a subset Gs of \(\textit{pow}({\mathcal{G}_\mathrm{u}})\). The unknown set G of all true atoms belongs to \(\textit{Gs}\). One way for A to inform this knowledge to B compactly is to send to B a clause set \(\textit{Cs}\) such that \(\textit{Gs} \subseteq \textit{Models}(\textit{Cs})\). Receiving \(\textit{Cs}\), B knows that \(\textit{Models}(\textit{Cs})\) includes all possible intended sets of ground atoms, i.e., \(G \in \textit{Models}(\textit{Cs})\). As such, B can know that each ground atom outside \(\bigcup \textit{Models}(\textit{Cs})\) is false, i.e., for any \(g \in \mathcal{G}_\mathrm{u}\), if \(g \notin \bigcup \textit{Models}(\textit{Cs})\), then \(g \notin G\). The person B can also know that each ground atom in \(\bigcap \textit{Models}(\textit{Cs})\) is true, i.e., for any \(g \in \mathcal{G}_\mathrm{u}\), if \(g \in \bigcap \textit{Models}(\textit{Cs})\), then \(g \in G\). This shows the importance of calculating \(\bigcap \textit{Models}(\textit{Cs})\).

A model-intersection problem (MI problem) is a pair \(\langle \textit{Cs}, \varphi \rangle \), where \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) and \(\varphi \) is a mapping from \(\textit{pow}({\mathcal{G}_\mathrm{u}})\) to some set W. The mapping \(\varphi \) is called an exit mapping. The answer to this problem, denoted by \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi )\), is defined by
$$ \textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \varphi (\bigcap \textit{Models}(\textit{Cs})), $$
where \(\bigcap \textit{Models}(\textit{Cs})\) is the intersection of all models of \(\textit{Cs}\). Note that when \(\textit{Models}(\textit{Cs})\) is the empty set, \(\bigcap \textit{Models}(\textit{Cs}) = \mathcal{G}_\mathrm{u}\).

2.5 Query-Answering (QA) Problems

Let \(\textit{Cs}\subseteq \text {C}\textsc {ls}\). For any \(\textit{Cs}^\prime \subseteq \text {C}\textsc {ls}\), \(\textit{Cs}^\prime \) is a logical consequence of \(\textit{Cs}\), denoted by \(\textit{Cs}\models \textit{Cs}^\prime \), iff every model of \(\textit{Cs}\) is also a model of \(\textit{Cs}^\prime \). For any \(a \in \mathcal{A}_\mathrm{u}\), a is a logical consequence of \(\textit{Cs}\), denoted by \(\textit{Cs}\models a\), iff \(\textit{Cs}\models \{ (a \leftarrow ) \}\).

A query-answering problem (QA problem) in this paper is a pair \(\langle \textit{Cs}, a \rangle \), where \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) and a is a user-defined atom in \(\mathcal{A}_\mathrm{u}\). The answer to a QA problem \(\langle \textit{Cs}, a \rangle \), denoted by \(\textit{ans}_\mathrm{QA}(\textit{Cs}, a)\), is defined by
$$ \textit{ans}_\mathrm{QA}(\textit{Cs}, a) = \{ a\theta \mid (\theta \in \mathcal{S}) \ \& \ (a\theta \in \mathcal{G}_\mathrm{u}) \ \& \ (\textit{Cs}\models (a\theta \leftarrow )) \}. $$

Theorem 1

For any \(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\) and \(a \in \mathcal{A}_\mathrm{u}\),
$$ \textit{ans}_\mathrm{QA}(\textit{Cs}, a) = \textit{rep}(a) \cap (\bigcap \textit{Models}(\textit{Cs})), $$
where \(\textit{rep}(a)\) denotes the set of all ground instances of a.

Proof:

Let \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) and \(a \in \mathcal{A}_\mathrm{u}\). By the definition of \(\models \), for any ground atom \(g \in \mathcal{G}_\mathrm{u}\), \(\textit{Cs}\models g\) iff \(g \in \bigcap \textit{Models}(\textit{Cs})\). Then
$$ \begin{aligned} \textit{ans}_\mathrm{QA}(\textit{Cs}, a)&=\{ a\theta \mid (\theta \in \mathcal{S}) \ \& \ (a\theta \in \mathcal{G}_\mathrm{u}) \,\, \& (\textit{Cs}\models (a\theta \leftarrow )) \}\\&=\{ g \mid (\theta \in \mathcal{S}) \ \& \ (g = a\theta ) \& (g \in \mathcal{G}_\mathrm{u}) \& (\textit{Cs}\models (g \leftarrow )) \}\\&=\{ g \mid (g \in \textit{rep}(a)) \ \& \ (\textit{Cs}\models (g \leftarrow )) \}\\&=\{g \mid (g \in \textit{rep}(a)) \ \& \ (g \in (\bigcap \textit{Models}(\textit{Cs}))) \}\\&=\textit{rep}(a) \cap (\bigcap \textit{Models}(\textit{Cs})). \end{aligned}$$
   \(\square \)

Theorem 1 shows the importance of the intersection of all models of a clause set. By this theorem, the answer to a QA problem can be rewritten as follows:

Theorem 2

Let \(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\) and \(a \in \mathcal{A}_\mathrm{u}\). Then \(\textit{ans}_\mathrm{QA}(\textit{Cs}, a) = \textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi _1)\), where for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \(\varphi _1(G) = \textit{rep}(a) \cap G\).

Proof:

It follows from Theorem 1 and the definition of \(\varphi _1\) that \(\textit{ans}_\mathrm{QA}(\textit{Cs}, a) = \varphi _1(\bigcap \textit{Models}(\textit{Cs})) = \textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi _1)\).    \(\square \)

This is one way to regard a QA problem as a MI problem, which can be understood as follows: The set \(\bigcap \textit{Models}(\textit{Cs})\) often contains too many ground atoms. The set \(\textit{rep}(a)\) specifies a range of interest in the set \(\mathcal{G}_\mathrm{u}\). The exit mapping \(\varphi _1\) focuses attention on the part \(\textit{rep}(a)\) by making intersection with it.

Theorem 3 below shows another way to formalize a QA problem as a MI problem.

Theorem 3

Assume that the specialization system for first-order logic is used. Let \(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\) and \(a \in \mathcal{A}_\mathrm{u}\). Then
$$ \textit{ans}_\mathrm{QA}(\textit{Cs}, a) = \textit{ans}_\mathrm{MI}(\textit{Cs}\cup \{ (p(x_1, \ldots , x_n) \leftarrow a) \}, \varphi _2), $$
where p is a predicate that appears in neither \(\textit{Cs}\) nor a, the arguments \(x_1, \ldots , x_n\) are all the mutually different variables occurring in a, and for any \(G \subseteq \mathcal{G}_\mathrm{u}\),
$$ \varphi _2(G) = \{ a\theta \mid (\theta \in \mathcal{S}) \ \& \ (p(x_1, \ldots , x_n)\theta \in G) \}. $$

Proof:

By Theorem 1 and the definition of \(\varphi _2\),
$$\begin{aligned} \textit{ans}_\mathrm{QA}(\textit{Cs}, a)&= \textit{rep}(a) \cap (\bigcap \textit{Models}(\textit{Cs}))\\&=\varphi _2(\bigcap \textit{Models}(\textit{Cs}\cup \{ (p(x_1, \ldots , x_n) \leftarrow a) \}))\\&=\textit{ans}_\mathrm{MI}(\textit{Cs}\cup \{ (p(x_1, \ldots , x_n) \leftarrow a) \}, \varphi _2). \end{aligned}$$
   \(\square \)

In logic programming [11], a problem represented by a pair of a set of definite clauses and a query atom has been intensively discussed. In the description logic (DL) community [4], a class of problems formulated as conjunctions of DL-based axioms and assertions together with query atoms has been discussed [13]. These two problem classes can be formalized as subclasses of QA problems considered in this paper.

2.6 Proof Problems

A proof problem is a pair \(\langle E_1, E_2 \rangle \), where \(E_1\) and \(E_2\) are first-order formulas, and the answer to this problem, denoted by \(\textit{ans}_\mathrm{Pr}(E_1, E_2)\), is defined by
$$ \begin{array}{l} \textit{ans}_\mathrm{Pr}(E_1, E_2) = \left\{ \begin{array}{ll} \mathrm{``}\text {yes''} &{} \text {if }E_2 \text { is a logical consequence of }E_1, \\ \mathrm{``}\text {no''} &{} \text {otherwise.} \end{array} \right. \end{array} $$
It is well known that a proof problem \(\langle E_1, E_2 \rangle \) can be converted into the problem of determining whether \(E_1 \wedge \lnot E_2\) is unsatisfiable [5], i.e., whether \(E_1 \wedge \lnot E_2\) has no model. As a result, \(\textit{ans}_\mathrm{Pr}(E_1, E_2)\) can be equivalently defined by
$$ \begin{array}{l} \textit{ans}_\mathrm{Pr}(E_1, E_2) = \left\{ \begin{array}{ll} \mathrm{``}\text {yes''} &{} \text {if }{} \textit{Models}(E_1 \wedge \lnot E_2) = \emptyset , \\ \mathrm{``}\text {no''} &{} \text {otherwise.} \end{array} \right. \end{array} $$

Theorem 4

Let \(\langle E_1, E_2 \rangle \) be a proof problem. Let \(\textit{Cs}\) be the set of clauses obtained by transformation of \(E_1 \wedge \lnot E_2\) preserving satisfiability. Let \(\varphi _3: \textit{pow}({\mathcal{G}_\mathrm{u}}) \rightarrow \{ \mathrm{``}\text {yes''}, \mathrm{``}\text {no''} \}\) be defined by: for any \(G \subseteq \mathcal{G}_\mathrm{u}\),
$$ \begin{array}{l} \varphi _3(G) = \left\{ \begin{array}{ll} \mathrm{``}yes\text {''} &{} \,\,if \,\,G = \mathcal{G}_\mathrm{u}, \\ \mathrm{``}no\text {''} &{} otherwise. \end{array} \right. \end{array} $$
Then \(\textit{ans}_\mathrm{Pr}(E_1, E_2) = \textit{ans}_\mathrm{MI}(\textit{Cs},\varphi _3)\).

Proof:

Let b be a ground user-defined atom that is not an instance of any user-defined atom occurring in \(\textit{Cs}\). If m is a model of \(\textit{Cs}\), then \(m - \{ b \}\) is also a model of \(\textit{Cs}\). Obviously, \(m - \{ b \} \ne \mathcal{G}_\mathrm{u}\). Therefore, (i) if \(\textit{Models}(\textit{Cs}) \ne \emptyset \), then \(\bigcap \textit{Models}(\textit{Cs}) \ne \mathcal{G}_\mathrm{u}\), and (ii) if \(\textit{Models}(\textit{Cs}) = \emptyset \), then \(\bigcap \textit{Models}(\textit{Cs}) = \bigcap \{\} = \mathcal{G}_\mathrm{u}\). Hence \(\textit{ans}_\mathrm{Pr}(E_1, E_2) = \textit{ans}_\mathrm{MI}(\textit{Cs},\varphi _3)\).    \(\square \)

3 Solving MI Problems by Equivalent Transformation

A general schema for solving MI problems based on equivalent transformation is formulated and its correctness is shown (Theorem 9).

3.1 Preservation of Partial Mappings and Equivalent Transformation

Terminologies such as preservation of partial mappings and equivalent transformation are defined in general below. They will be used with a specific class of partial mappings called target mappings, which will be introduced in Sect. 3.2.

Assume that X and Y are sets and f is a partial mapping from X to Y. For any \(x, x^\prime \in \textit{dom}(f)\), transformation of x into \(x^\prime \) is said to preserve f iff \(f(x) = f(x^\prime )\). For any \(x, x^\prime \in \textit{dom}(f)\), transformation of x into \(x^\prime \) is called equivalent transformation (ET) with respect to f iff the transformation preserves f, i.e., \(f(x) = f(x^\prime )\).

Let \(\mathbb {F}\) be a set of partial mappings from a set X to a set Y. Given \(x, x^\prime \in X\), transformation of x into \(x^\prime \) is called equivalent transformation (ET) with respect to \(\mathbb {F}\) iff there exists \(f \in \mathbb {F}\) such that the transformation preserves f. A sequence \([x_0, x_1, \ldots , x_n]\) of elements in X is called an equivalent transformation sequence (ET sequence) with respect to \(\mathbb {F}\) iff for any \(i \in \{ 0, 1, \ldots , n-1 \}\), transformation of \(x_i\) into \(x_{i+1}\) is ET with respect to \(\mathbb {F}\). When emphasis is placed on the initial element \(x_0\) and the final element \(x_n\), this sequence is also referred to as an ET sequence from \(x_0\) to \(x_n\).

3.2 Target Mappings and Answer Mappings

Given a MI problem \(\langle \textit{Cs}, \varphi \rangle \), since \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \varphi (\bigcap \textit{Models}(\textit{Cs}))\), the answer to this MI problem is determined uniquely by \(\textit{Models}(\textit{Cs})\) and \(\varphi \). As a result, we can equivalently consider a new MI problem with the same answer by switching from \(\textit{Cs}\) to another clause set \(\textit{Cs}^\prime \) if \(\textit{Models}(\textit{Cs}) = \textit{Models}(\textit{Cs}^\prime )\). According to the general terminologies defined in Sect. 3.1, on condition that \(\textit{Models}(\textit{Cs}) = \textit{Models}(\textit{Cs}^\prime )\), transformation from \(x = \textit{Cs}\) into \(x^\prime = \textit{Cs}^\prime \) preserves \(f = \textit{Models}\) and is called ET with respect to \(f = \textit{Models}\), where (i) \(x, x^\prime \in \textit{pow}({\text {C}\textsc {ls}})\) and (ii) \(\textit{Models}(x), \textit{Models}(x^\prime ) \in \textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\). We can also consider an ET sequence \([ \textit{Cs}_0, \textit{Cs}_1, \ldots , \textit{Cs}_n ]\) of elements in \(\textit{pow}({\text {C}\textsc {ls}})\) with respect to a singleton set \(\{ \textit{Models} \}\). MI problems can be transformed into simpler forms by ET preserving \(\textit{Models}\).

In order to use more partial mappings for simplification of MI problems, we extend our consideration from the specific mapping \(\textit{Models}\) to a class of partial mappings, called GSetMap, defined below.

Definition 2

GSetMap is the set of all partial mappings from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\).    \(\square \)

As defined in Sect. 2.4, \(\textit{Models}(\textit{Cs})\) is the set of all models of \(\textit{Cs}\) for any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\). Since a model is a subset of \(\mathcal{G}_\mathrm{u}\), \(\textit{Models}\) is regarded as a total mapping from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\). Since a total mapping is also a partial mapping, the mapping \(\textit{Models}\) is a partial mapping from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\), i.e., it is an element of GSetMap.

A partial mapping M in GSetMap is of particular interest if \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\) for any \(\textit{Cs}\in \textit{dom}(M)\). Such a partial mapping is called a target mapping.

Definition 3

A partial mapping \(M \in \text {GS}\textsc {et}\text {M}\textsc {ap}\) is a target mapping iff for any \(\textit{Cs}\in \textit{dom}(M)\), \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\).    \(\square \)

It is obvious that:

Theorem 5

The mapping Models is a target mapping.    \(\square \)

The next theorem provides a sufficient condition for a mapping in GSetMap to be a target mapping.

Theorem 6

Let \(M \in \mathrm{GS}\textsc {et}\mathrm{M}\textsc {ap}\). M is a target mapping if the following conditions are satisfied:
  1. 1.

    \(M(\textit{Cs}) \subseteq \textit{Models}(\textit{Cs})\) for any \(\textit{Cs}\in \textit{dom}(M)\).

     
  2. 2.

    For any \(\textit{Cs}\in \textit{dom}(M)\) and any \(m_2 \in \textit{Models}(\textit{Cs})\), there exists \(m_1 \in M(\textit{Cs})\) such that \(m_1 \subseteq m_2\).

     

Proof:

Assume that Conditions 1 and 2 above hold. Let \(\textit{Cs}\in \textit{dom}(M)\). By Condition 1, \(\bigcap M(\textit{Cs}) \supseteq \bigcap \textit{Models}(\textit{Cs})\). We show that \(\bigcap M(\textit{Cs}) \subseteq \bigcap \textit{Models}(\textit{Cs})\) as follows: Assume that \(g \in \bigcap M(\textit{Cs})\). Let \(m_2 \in \textit{Models}(\textit{Cs})\). By Condition 2, there exists \(m_1 \in M(\textit{Cs})\) such that \(m_1 \subseteq m_2\). Since \(g \in \bigcap M(\textit{Cs})\), g belongs to \(m_1\). So \(g \in m_2\). Since \(m_2\) is any arbitrary element of \(\textit{Models}(\textit{Cs})\), g belongs to \(\bigcap \textit{Models}(\textit{Cs})\). It follows that \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\). Hence M is a target mapping.    \(\square \)

Definition 4

A partial mapping A from \(\textit{pow}({\text {C}\textsc {ls}})\) to a set W is an answer mapping with respect to an exit mapping \(\varphi \) iff for any \(\textit{Cs}\in \textit{dom}(A)\), \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = A(\textit{Cs})\).    \(\square \)

If M is a target mapping, then M can be used for computing the answers to MI problems. More precisely:

Theorem 7

Let M be a target mapping and \(\varphi \) an exit mapping. Suppose that A is a partial mapping such that \(\textit{dom}(A) = \textit{dom}(M)\) and for any \(\textit{Cs}\in \textit{dom}(M)\), \(A(\textit{Cs}) = \varphi (\bigcap M(\textit{Cs}))\). Then A is an answer mapping with respect to \(\varphi \).

Proof:

Let \(\textit{Cs}\in \textit{dom}(A)\). Since \(\textit{dom}(A) = \textit{dom}(M)\), \(\textit{Cs}\) belongs to \(\textit{dom}(M)\). Since M is a target mapping, \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\). Thus \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \varphi (\bigcap \textit{Models}(\textit{Cs})) = \varphi (\bigcap M(\textit{Cs})) = A(\textit{Cs})\). So A is an answer mapping with respect to \(\varphi \).    \(\square \)

3.3 ET Steps and ET Rules

Next, a schema for solving MI problems based on equivalent transformation (ET) preserving answers is formulated. The notions of preservation of answers/target mappings, ET with respect to answers/target mappings, and an ET sequence are obtained by specializing the general definitions in Sect. 3.1.

Let \(\pi \) be a mapping, called state mapping, from a given set State to the set of all MI problems. Elements of State are called states.

Definition 5

Let \(\langle S,S^\prime \rangle \in \text {S}\textsc {tate} \times \text {S}\textsc {tate}\). \(\langle S,S^\prime \rangle \) is an ET step with respect to \(\pi \) iff if \(\pi (S)= \langle \textit{Cs}, \varphi \rangle \) and \(\pi (S^\prime ) = \langle \textit{Cs}^\prime , \varphi ^\prime \rangle \), then \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \textit{ans}_\mathrm{MI}(\textit{Cs}^\prime , \varphi ^\prime )\).

   \(\square \)

Definition 6

A sequence \([S_0, S_1, \ldots , S_n]\) of elements of State is an ET sequence with respect to \(\pi \) iff for any \(i \in \{ 0,1, \ldots , n-1 \}\), \(\langle S_i, S_{i+1} \rangle \) is an ET step with respect to \(\pi \).    \(\square \)

The role of ET computation constructing \([S_0, S_1, \ldots , S_n]\) is to start with \(S_0\) and to reach \(S_n\) from which the answer to the given problem can be easily computed.

The concept of ET rule on State is defined by:

Definition 7

An ET rule r on State with respect to \(\pi \) is a partial mapping from State to State such that for any \(S \in \textit{dom}(r)\), \(\langle S, r(S) \rangle \) is an ET step with respect to \(\pi \).    \(\square \)

We also define ET rules on \(\textit{pow}({\textsc {Cls}})\) as follows:

Definition 8

An ET rule r with respect to a target mapping M is a partial mapping from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\text {C}\textsc {ls}})\) such that for any \(\textit{Cs}\in \textit{dom}(r)\), \(M(\textit{Cs}) = M(r(\textit{Cs}))\).    \(\square \)

We can construct an ET rule on State based on target mappings.

Theorem 8

Assume that M is a target mapping and r is a partial mapping from \(\textit{pow}({\mathrm{C}\textsc {ls}})\) to \(\textit{pow}({\mathrm{C}\textsc {ls}})\). Let \(\bar{r}\) be defined as a partial mapping from \(\mathrm{S}\textsc {tate}\) to \(\mathrm{S}\textsc {tate}\) such that for any \(S \in \mathrm{S}\textsc {tate}\), if \(\pi (S) = \langle \textit{Cs}, \varphi \rangle \), then \(\pi (\bar{r}(S)) = \langle r(\textit{Cs}), \varphi \rangle \). If r is an ET rule with respect to M, then \(\bar{r}\) is an ET rule on \(\mathrm{S}\textsc {tate}\).

Proof:

Assume that r is an ET rule with respect to M. Let \(S \in \text {S}\textsc {tate}\) such that \(\pi (S) = \langle \textit{Cs}, \varphi \rangle \). Then
$$\begin{aligned} \textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi )&=\varphi (\bigcap \textit{Models}(\textit{Cs}))\\&= (\text {since }M \text {is a target mapping})\\&=\varphi (\bigcap M(\textit{Cs}))\\&=(\text {since } r \text { is an ET rule with respect to }M)\\&=\varphi (\bigcap M(r(\textit{Cs})))\\&=(\text {since }M \text { is a target mapping})\\&=\varphi (\bigcap \textit{Models}(r(\textit{Cs})))\\&=\textit{ans}_\mathrm{MI}(r(\textit{Cs}), \varphi ). \end{aligned}$$
   \(\square \)

3.4 Correct Solutions Based on ET Rules

Assume that
  • \(\varphi \) is an exit mapping,

  • \(\text {P}\textsc {rob} = \textit{pow}({\text {C}\textsc {ls}}) \times \{ \varphi \}\),

  • \(\text {S}\textsc {tate}\) is a set of states and \(\pi \) is a state mapping for \(\text {S}\textsc {tate}\) such that for any \(S \in \text {S}\textsc {tate}\), the second component of \(\pi (S)\) is \(\varphi \), and

  • A is an answer mapping with respect to \(\varphi \).

The proposed solution schema for MI problems consists of the following steps:
  1. 1.

    Assume that a MI problem \(\langle \textit{Cs}, \varphi \rangle \) in \(\text {P}\textsc {rob}\) is given as an input problem.

     
  2. 2.

    Prepare a set R of ET rules on \(\text {S}\textsc {tate}\) with respect to \(\pi \).

     
  3. 3.

    Take \(S_0\) such that \(\pi (S_0) = \langle \textit{Cs}, \varphi \rangle \) to start computation from \(S_0\).

     
  4. 4.

    Construct an ET sequence \([ S_0, \ldots , S_n ]\) by applying ET rules in R, i.e., for each \(i \in \{ 0, 1, \ldots , n-1 \}\), \(S_{i+1}\) is obtained from \(S_i\) by selecting and applying \(r_i \in R\) such that \(S_i \in \textit{dom}(r_i)\) and \(r_i(S_i) = S_{i+1}\).

     
  5. 5.

    Assume that \(\pi (S_n) = \langle \textit{Cs}_n, \varphi \rangle \). If the computation reaches the domain of A, i.e., \(\textit{Cs}_n \in \textit{dom}(A)\), then compute the answer by using the answer mapping A, i.e., output \(A(\textit{Cs}_n)\).

     
Fig. 1.

Target mappings, an answer mapping, and ET computation paths.

Given a set \(\textit{Cs}\) of clauses and an exit mapping \(\varphi \), the answer to the MI problem \(\langle \textit{Cs}, \varphi \rangle \), i.e., \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \varphi (\bigcap \textit{Models}(\textit{Cs}))\), can be directly obtained by the computation shown in the leftmost path in Fig. 1. Instead of taking this computation path, the above solution takes a different one, i.e., the lowest path (from \(\textit{Cs}\) to \(\textit{Cs}^\prime \)) followed by the rightmost path (through A) in Fig. 1.

The selection of \(r_i\) in R at Step 4 is nondeterministic and there may be many possible computation paths for each MI problem. Every output computed by using any arbitrary computation path is correct. When the set R gives at least one correct computation path for each MI problem in \(\text {P}\textsc {rob}\), R can be regarded as an algorithm for \(\text {P}\textsc {rob}\).

Theorem 9

The above procedure gives the correct answer to \(\langle \textit{Cs}, \varphi \rangle \).

Proof

Since \([ S_0, \ldots , S_n ]\) is an ET sequence, \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \textit{ans}_\mathrm{MI}(\textit{Cs}_n, \varphi )\). Since A is an answer mapping with respect to \(\varphi \), \(\textit{ans}_\mathrm{MI}(\textit{Cs}_n, \varphi ) = A(\textit{Cs}_n)\). Hence \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = A(\textit{Cs}_n)\).    \(\square \)

3.5 Computation Cost for Solving MI Problems

We next explain the basic structure of computation cost of the solution in Sect. 3.4. For the discussion below, the following notation is assumed:
  • For any S, \(S^\prime \in \text {S}\textsc {tate}\), let \(\textit{trans}(S, S^\prime )\) denote the transformation of S into \(S^\prime \), and \(\textit{time}(\textit{trans}(S, S^\prime ))\) denote the computation time required for this transformation step.

  • Let \(\pi \) be a state mapping. For any answer mapping A and \(S \in \text {S}\textsc {tate}\), let \(\textit{comp}(A, S)\) denote the computation of \(A(\textit{Cs})\), where \(\pi (S) = \langle \textit{Cs}, \varphi \rangle \), and let \(\textit{time}(\textit{comp}(A, S))\) denote the amount of time required for this computation.

With this notation, the time of the solution in Sect. 3.4 using an ET sequence \([S_0, S_1, \ldots , S_n]\) and an answer mapping A is evaluated by
$$ \mathcal {T}_\mathrm{MI} = \Sigma _{i=1}^n \textit{time}(\textit{trans}(S_{i-1}, S_i)) + \textit{time}(\textit{comp}(A, S_n)). $$
A basic strategy to obtain an efficient solution is to minimize (i) the time for final computation, i.e., \(\textit{time}(\textit{comp}(A, S_n))\), (ii) the computation time of each transformation step in the ET sequence from \(S_0\) to \(S_n\), i.e., \(\textit{time}(\textit{trans}(S_{i-1}, S_i))\) for each \(i \in \{ 1, \ldots , n \}\), and (iii) the total number of computation steps, i.e., n.

4 Target Mappings for Clauses

Next, three target mappings are introduced, i.e., \(\tau _1\) for sets of positive unit clauses, \(\tau _2\) for sets of definite clauses, and \(\mathbb {MM}\) for sets of arbitrary clauses.

4.1 A Target Mapping for Sets of Positive Unit Clauses

Let \(\text {PU}\textsc {cl}\) denote the set of all positive unit clauses. A partial mapping \(\tau _1 \in \text {GS}\textsc {et}\text {M}\textsc {ap}\) is defined as follows:
  1. 1.
    For any \(F \subseteq \text {PU}\textsc {cl}\), \(\tau _1(F)\) is the singleton set \(\{ m_F \}\), where
    $$ \begin{aligned} m_F = \{ a \theta \mid&((a \leftarrow b_1, \ldots , b_n) \in F) \ \& \ (\theta \in \mathcal{S}) \ \& \\&(a\theta \in \mathcal{G}_\mathrm{u}) \ \& \ (\{ b_1\theta , \ldots , b_n\theta \} \subseteq \text {TC}\textsc {on}) \}. \end{aligned}$$
     
  2. 2.

    For any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) such that \(\textit{Cs}\not \subseteq \text {PU}\textsc {cl}\), \(\tau _1(\textit{Cs})\) is undefined.

     

Theorem 10

\(\tau _1\) is a target mapping.

Proof:

Assume that \(F \subseteq \text {PU}\textsc {cl}\). Let \(\tau _1(F) = \{ m_F \}\). Obviously, \(m_F\) is a model of F. Hence \(\tau _1(F) = \{ m_F \} \subseteq \textit{Models}(F)\). So the first condition of Theorem 6 is satisfied for \(\tau _1\).

Now assume that \(F \subseteq \text {PU}\textsc {cl}\) and \(m \in \textit{Models}(F)\). Let \(\tau _1(F) = \{ m_F \}\). Then \(m_F \in \tau _1(F)\) and \(m_F \subseteq m\). So the second condition of Theorem 6 is also satisfied for \(\tau _1\). Thus \(\tau _1\) is a target mapping by Theorem 6.    \(\square \)

4.2 A Target Mapping for Sets of Definite Clauses

Let Dcl denote the set of all definite clauses. Given a definite clause C, the atom in the left-hand side of C is called the head of C, denoted by \(\textit{head}(C)\), and the set of all user-defined atoms and constraint atoms in the right-hand side of C is called the body of C, denoted by \(\textit{body}(C)\). Assume that D is a set of definite clauses in Dcl. The meaning of D, denoted by \(\mathcal{M}(D)\), is defined as follows:
  1. 1.
    A mapping \(T_D\) on \(\textit{pow}({\mathcal{G}})\) is defined by: for any set \(G \subseteq \mathcal{G}\), \(T_D(G)\) is the set
    $$ \begin{aligned} \{ \textit{head}(C\theta ) \mid&(C \in D) \ \& \ (\theta \in \mathcal{S}) \ \& \\&(\text {each user-defined atom in }\textit{body}(C\theta ) \text { is in }G) \ \& \\&(\text {each constraint atom in }\textit{body}(C\theta ) \text { is true}) \}. \end{aligned}$$
     
  2. 2.

    \(\mathcal{M}(D)\) is then defined as the set \(\bigcup ^{\infty }_{n=1}T^n_D(\emptyset )\), where \(T^1_D(\emptyset ) = T_D(\emptyset )\) and for each \(n > 1\), \(T^n_D(\emptyset ) = T_D(T^{n-1}_D(\emptyset ))\).

     

Then a partial mapping \(\tau _2 \in \text {GS}\textsc {et}\text {M}\textsc {ap}\) is defined below.

  1. 1.

    For any \(D \subseteq \text {D}\textsc {cl}\), \(\tau _2(D)\) is the singleton set \(\{ \mathcal{M}(D) \}\).

     
  2. 2.

    For any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) such that \(\textit{Cs}\not \subseteq \text {D}\textsc {cl}\), \(\tau _2(\textit{Cs})\) is undefined.

     

Theorem 11

\(\tau _2\) is a target mapping.

Proof:

Let \(D \subseteq \text {D}\textsc {cl}\). Since \(\mathcal{M}(D)\) is a model of D, \(\tau _2(D) = \{ \mathcal{M}(D) \} \subseteq \textit{Models}(D)\). So the first condition of Theorem 6 is satisfied for \(\tau _2\). Let \(m \in \textit{Models}(D)\). Since \(\mathcal{M}(D)\) is the least model of D, \(\mathcal{M}(D) \subseteq m\). So the second condition of Theorem 6 is satisfied for \(\tau _2\). By Theorem 6, \(\tau _2\) is a target mapping.

   \(\square \)

Theorem 12

For any \(F \subseteq \mathrm{PU}\textsc {cl}\), \(\tau _2(F) = \tau _1(F)\).

Proof:

For any \(F \subseteq \text {PU}\textsc {cl}\), \(\tau _2(F) = \{ \mathcal{M}(F) \} = \{ m_F \} = \tau _1(F)\).    \(\square \)

4.3 A Target Mapping for All Clause Sets

Given a clause C, the set of all user-defined atoms and constraint atoms in the left-hand side of C is denoted by \(\textit{lhs}(C)\) and the set of all those in the right-hand side of C is denoted by \(\textit{rhs}(C)\). A clause is said to be positive if there is at least one user-defined atom in its left-hand side; it is said to be negative otherwise.

It is assumed henceforth that (i) for any constraint atom c, not(c) is a constraint atom; (ii) for any constraint atom c and any specialization \(\theta \), \(not(c)\theta = not(c\theta )\); and (iii) for any ground constraint atom c, c is true iff not(c) is not true.

The following notation is used for defining a target mapping \(\mathbb {MM}\) for arbitrary clauses in Cls (Definition 9).

  1. 1.

    Let \(\textit{Cs}\) be a set of clauses possibly with constraint atoms. \(\textsc {mv}\mathrm{R}\textsc {hs}(\textit{Cs})\) is defined as the set \(\{ \textsc {mv}\mathrm{R}\textsc {hs}(C) \mid C \in \textit{Cs}\}\), where for any clause \(C \in \textit{Cs}\), \(\textsc {mv}\mathrm{R}\textsc {hs}(C)\) is the clause obtained from C as follows: For each constraint atom c in \(\textit{lhs}(C)\), remove c from \(\textit{lhs}(C)\) and add not(c) to \(\textit{rhs}(C)\).

     
  2. 2.
    Let \(\textit{Cs}\) be a set of clauses with no constraint atom in their left-hand sides. For any \(G \subseteq \mathcal{G}\), \(\mathrm{G}\textsc {inst}(\textit{Cs}, G)\) is defined as the set
    $$ \begin{aligned} \{ \textsc {rm}\mathrm{C}\textsc {on}(C\theta ) \mid&(C \in \textit{Cs}) \ \& \ (\theta \in \mathcal{S}) \ \& \\&(\text {each user-defined atom in }C\theta \text { is in } G) \ \& \\&(\text {each constraint atom in }\textit{rhs}(C\theta ) \text { is true}) \}, \end{aligned}$$
    where for any clause \(C^\prime \), \(\textsc {rm}\mathrm{C}\textsc {on}(C^\prime )\) is the clause obtained from \(C^\prime \) by removing all constraint atoms from it.
     
  3. 3.
    Let \(\textit{Cs}\) be a set of clauses possibly with constraint atoms. For any \(G \subseteq \mathcal{G}\), \(\mathrm{I}\textsc {nst}(\textit{Cs}, G)\) is defined by
    $$ \mathrm{I}\textsc {nst}(\textit{Cs}, G) = \mathrm{G}\textsc {inst}(\textsc {mv}\mathrm{R}\textsc {hs}(\textit{Cs}), G). $$
     
  4. 4.
    Let \(\textit{Cs}\) be a set of ground clauses with no constraint atom. We can construct a set of definite clauses from \(\textit{Cs}\) as follows: For each clause \(C \in \textit{Cs}\),
    • if \(\textit{lhs}(C) = \emptyset \), then construct a definite clause the head of which is \(\bot \) and the body of which is \(\textit{rhs}(C)\), where \(\bot \) is a special symbol not occurring in \(\textit{Cs}\);

    • if \(\textit{lhs}(C) \ne \emptyset \), then (i) select one arbitrary atom a from \(\textit{lhs}(C)\), and (ii) construct a definite clause the head of which is a and the body of which is \(\textit{rhs}(C)\).

    Let \(\mathrm{D}\textsc {c}(\textit{Cs})\) denote the set of all definite-clause sets possibly constructed from \(\textit{Cs}\) in the above way.

     

Proposition 1

Let \(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\). For any \(m \subseteq \mathcal{G}\), m is a model of \(\textit{Cs}\) iff m is a model of \(\mathrm{I}\textsc {nst}(\textit{Cs}, \mathcal{G})\).

Proof:

\(\mathrm{I}\textsc {nst}(\textit{Cs}, \mathcal{G})\) is obtained from \(\textit{Cs}\) by (i) moving constraint atoms in the left-hand sides of clauses into their right-hand sides, (ii) instantiation of variables into ground terms, (iii) removal of clauses containing false constraint atoms in their right-hand sides, and (iv) removal of true constraint atoms from the remaining clauses. Each of the operations (i), (ii), (iii), and (iv) preserves models.    \(\square \)

A mapping \(\mathbb {MM}\) is defined below.

Definition 9

A mapping \(\mathbb {MM}\in \text {GS}\textsc {et}\text {M}\textsc {ap}\) is defined by
$$ \mathbb {MM}(\textit{Cs}) = \{ \mathcal{M}(D) \mid (D \in \mathrm{D}\textsc {c}(\mathrm{I}\textsc {nst}(\textit{Cs}, \mathcal{G}))) \ \& \ (\bot \notin \mathcal{M}(D)) \} $$
for any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\).    \(\square \)

Theorem 13

\(\mathbb {MM}\) is a target mapping.

Proof:

First, we show that the first condition of Theorem 6 is satisfied for \(\mathbb {MM}\). Let \(\textit{Cs}\subseteq \text {C}\textsc {ls}\). Suppose that \(m \in \mathbb {MM}(\textit{Cs})\). Let \(\textit{Cs}^\prime = \mathrm{I}\textsc {nst}(\textit{Cs}, \mathcal{G})\). Then there exists D such that \(m = \mathcal{M}(D)\), \(D \in \mathrm{D}\textsc {c}(\textit{Cs}^\prime )\), and \(\bot \notin \mathcal{M}(D)\). We show that m is a model of \(\textit{Cs}^\prime \) as follows:
  • Let \(C_P\) be a positive clause in \(\textit{Cs}^\prime \). Since \(D \in \mathrm{D}\textsc {c}(\textit{Cs}^\prime )\), there exists \(C \in D\) such that \(\textit{head}(C) \in \textit{lhs}(C_P)\) and \(\textit{body}(C) = \textit{rhs}(C_P)\). Since m satisfies C, m also satisfies \(C_P\). Hence m satisfies every positive clause in \(\textit{Cs}^\prime \).

  • Let \(C_N\) be a negative clause in \(\textit{Cs}^\prime \). Since \(D \in \mathrm{D}\textsc {c}(\textit{Cs}^\prime )\), there exists \(C^\prime \in D\) such that \(\textit{head}(C^\prime ) = \bot \) and \(\textit{body}(C^\prime ) = \textit{rhs}(C_N)\). Since \(\bot \notin \mathcal{M}(D)\), m does not include \(\textit{body}(C^\prime )\). So \(\textit{rhs}(C_N) \not \subseteq m\), whence m satisfies \(C_N\). Hence m satisfies every negative clause in \(\textit{Cs}^\prime \).

So m is a model of \(\textit{Cs}^\prime \). By Proposition 1, m is a model of \(\textit{Cs}\), i.e., \(m \in \textit{Models}(\textit{Cs})\).

Next, we show that the second condition of Theorem 6 is satisfied for \(\mathbb {MM}\). Let \(\textit{Cs}\subseteq \text {C}\textsc {ls}\). Suppose that \(m^\prime \in \textit{Models}(\textit{Cs})\), i.e., \(m^\prime \) is a model of \(\textit{Cs}\). Let \(\textit{Cs}^\prime = \mathrm{I}\textsc {nst}(\textit{Cs}, \mathcal{G})\). By Proposition 1, \(m^\prime \) is also a model of \(\textit{Cs}^\prime \). Let D be a set of definite clauses obtained from \(\textit{Cs}^\prime \) by constructing from each positive clause C in \(\textit{Cs}^\prime \) a definite clause \(C^\prime \) as follows:
  1. 1.
    Select an atom a from \(\textit{lhs}(C)\) as follows:
    1. (a)

      If \(\textit{rhs}(C) \subseteq m^\prime \), then select an atom \(a \in \textit{lhs}(C) \cap m^\prime \).

       
    2. (b)

      If \(\textit{rhs}(C) \not \subseteq m^\prime \), then select an arbitrary atom \(a \in \textit{lhs}(C)\).

       
     
  2. 2.

    Construct \(C^\prime \) as a definite clause such that \(\textit{head}(C^\prime ) = a\) and \(\textit{body}(C^\prime ) = \textit{rhs}(C)\).

     

It is obvious that \(m^\prime \) is a model of D. Let \(m^{\prime \prime } = \mathcal{M}(D)\). Since \(m^{\prime \prime }\) is the least model of D, \(m^{\prime \prime } \subseteq m^\prime \). Since \(m^\prime \) is a model of \(\textit{Cs}^\prime \), \(m^\prime \) satisfies all negative clauses in \(\textit{Cs}^\prime \). Since \(m^{\prime \prime } \subseteq m^\prime \), \(m^{\prime \prime }\) also satisfies all negative clauses in \(\textit{Cs}^\prime \). It follows that \(\bot \notin \mathcal{M}(D)\). Hence \(m^{\prime \prime } \in \mathbb {MM}(\textit{Cs})\).

So \(\mathbb {MM}\) is a target mapping by Theorem 6.    \(\square \)

Theorem 14

For any \(D \subseteq \mathrm{D}\textsc {cl}\), \(\mathbb {MM}(D) = \tau _2(D)\).

Proof:

Let \(D \subseteq \text {D}\textsc {cl}\). Then \(\mathrm{D}\textsc {c}(\mathrm{I}\textsc {nst}(D, \mathcal{G}))\) is the singleton set \(\{ \mathrm{I}\textsc {nst}(D, \mathcal{G}) \}\). Obviously, \(\mathcal{M}(D) = \mathcal{M}(\mathrm{I}\textsc {nst}(D, \mathcal{G}))\) and \(\bot \notin \mathcal{M}(\mathrm{I}\textsc {nst}(D, \mathcal{G}))\). It follows that
$$ \begin{aligned} \mathbb {MM}(D)&= \{ \mathcal{M}(D^\prime ) \mid (D^\prime \in \mathrm{D}\textsc {c}(\mathrm{I}\textsc {nst}(D, \mathcal{G}))) \ \& \ (\bot \notin \mathcal{M}(D^\prime )) \}\\&=\{ \mathcal{M}(\mathrm{I}\textsc {nst}(D, \mathcal{G})) \}\\&=\{ \mathcal{M}(D) \}\\&=\tau _2(D). \end{aligned}$$
   \(\square \)

5 Solutions for QA Problems/Proof Problems

ET solutions for QA problems/proof problems on clauses are given by specializing the solution schema of Sect. 3.

5.1 A Solution for QA Problems

First, we solve a QA problem by using an answer mapping that is determined by the target mapping \(\tau _1\) given in Sect. 4.1 (i.e., \(\tau _1(F) = \{ m_F \}\) for any \(F \subseteq \text {PU}\textsc {cl}\)).

  1. 1.

    Assume that a QA problem \(\langle \textit{Cs}, a \rangle \) is given.

     
  2. 2.

    Transform \(\langle \textit{Cs}, a \rangle \) into a MI problem \(\langle \textit{Cs}\cup \{ (p(x_1, \ldots , x_n) \leftarrow a) \}, \varphi _2 \rangle \), where p is a predicate that appears in neither \(\textit{Cs}\) nor a, the arguments \(x_1, \ldots , x_n\) are all the mutually different variables occurring in a, and \(\varphi _2\) is the exit mapping defined in Sect. 2.5, i.e., for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \( \varphi _2(G) = \{ a\theta \mid (\theta \in \mathcal{S})\ \& \ (p(x_1, \ldots , x_n)\theta \in G) \}\).

     
  3. 3.

    Prepare a set R of ET rules to transform MI problems preserving their answers. For simplicity, we only use rules that do not change the second argument of a state (i.e., do not change the exit mapping).

     
  4. 4.

    Transform \(\langle \textit{Cs}\cup \{ (p(x_1, \ldots , x_n) \leftarrow a) \}, \varphi _2 \rangle \) equivalently by using ET rules in R.

     
  5. 5.

    If the transformation sequence reaches a MI problem of the form \(\langle F, \varphi _2 \rangle \), where F is a set of positive unit clauses with p-atoms in their heads, then the answer \(\varphi _2( m_F )\) is obtained.

     

5.2 A Solution for Proof Problems

Next, we apply the solution schema of Sect. 3 to proof problems. Since for any clause set \(\textit{Cs}\), \(\textit{Models}(\textit{Cs}) = \emptyset \) iff \(\bigcap \textit{Models}(\textit{Cs}) = \mathcal{G}_\mathrm{u}\) by the proof of Theorem 4, we use here an answer mapping that maps obviously unsatisfiable clause sets to “yes” and maps obviously satisfiable ones to “no”.

  1. 1.

    Assume that a proof problem \(\langle E_1, E_2 \rangle \) is given.

     
  2. 2.

    Transform \(E_1 \wedge \lnot E_2\) into a conjunctive normal form \(\textit{Cs}\) in order to obtain a MI problem \(\langle \textit{Cs}, \varphi _3 \rangle \), where \(\varphi _3\) is the exit mapping defined in Sect. 2.6, i.e., for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \(\varphi _3(G) = \mathrm{``}\text {yes''}\) if \(G =\mathcal{G}_\mathrm{u}\), and \(\varphi _3(G) = \mathrm{``}\text {no''}\) otherwise.

     
  3. 3.

    Prepare a set R of ET rules to transform MI problems preserving their answers. For simplicity, we only use rules that do not change the second argument of a state (i.e., do not change the exit mapping).

     
  4. 4.

    Transform \(\langle \textit{Cs}, \varphi _3 \rangle \) equivalently by using ET rules in R.

     
  5. 5.

    If the transformation sequence reaches a MI problem of the form \(\langle \textit{Cs}^\prime , \varphi _3 \rangle \), where \(\textit{Cs}^\prime \) is a clause set that contains the empty clause, then the answer is “yes”. If the transformation sequence reaches a MI problem of the form \(\langle \textit{Cs}^\prime , \varphi _3 \rangle \), where \(\textit{Cs}^\prime \) is a set of positive clauses, then the answer is “no”.

     

For transformation to a conjunctive normal form at Step 2, the usual Skolemization [5] is used. Since resolution and factoring are ET rules [1], the solution for proof problems here includes the usual proof method using resolution. More precisely, for any computation path by the “resolution” proof method using the resolution and factoring inference rules, there is a corresponding MI-based computation path using resolution and factoring ET rules. We may find a better computation path by using other sets of ET rules. For instance, one disadvantage of using inference rules is an increase in the number of clauses, and this disadvantage can be solved by the use of unfolding and definite-clause removal ET rules.

6 Example

Usual first-order atoms are used for illustration below. To apply the proposed theory in this section, a specialization system \(\langle \mathcal{A}_\mathrm{u}, \mathcal{G}_\mathrm{u}, \mathcal{S}, \mu _\mathrm{u} \rangle \) corresponding to the usual first-order space is used, where \(\mathcal{A}_\mathrm{u}\) is the set of all first-order atoms, \(\mathcal{G}_\mathrm{u}\) is the set of all ground first-order atoms, \(\mathcal{S}\) is the set of all substitutions on \(\mathcal{A}_\mathrm{u}\), and \(\mu _\mathrm{u}\) provides the specialization operation corresponding to the usual application of substitutions in \(\mathcal{S}\) to atoms in \(\mathcal{A}_\mathrm{u}\).
Fig. 2.

Clauses representing the background knowledge of the modified mayDoThesis problem.

6.1 Problem Description

Let \(\textit{Cs}\) be the set consisting of the clauses \(C_1\)\(C_{27}\) in Fig. 2. These clauses are obtained from the \(\textit{mayDoThesis}\) problem given in [7] with some modification.1 All atoms appearing in Fig. 2 belong to \(\mathcal{A}_\mathrm{u}\). The unary predicates NFP, FP, FM, Co, AC, BC, St, and Tp denote “non-teaching full professor,” “full professor,” “faculty member,” “course,” “advanced course,” “basic course,” “student,” and “topic,” respectively. The clauses \(C_9\)\(C_{11}\) together provide the conditions for a student to do his/her thesis with a professor, where \(\textit{mayDoThesis}(s, p)\), \(\textit{curr}(s, t)\), \(\textit{expert}(p, t)\), \(\textit{exam}(s, c)\), and \(\textit{subject}(c, t)\) are intended to mean “s may do his/her thesis with p,” “s studied t in his/her curriculum,” “p is an expert in t,” “s passed the exam of c,” and “c covers t,” respectively, for any student s, any professor p, any topic t, and any course c.

Let a be the atom \(\textit{mayDoThesis}(\textit{paul}, x)\). We consider the QA problem \(\langle \textit{Cs}, a \rangle \), which is to find all students who may do their theses with \(\textit{paul}\). Let \(\varphi \) be defined by: for any \(G \subseteq \mathcal{G}_\mathrm{u}\),
$$ \varphi (G) = \{ \textit{mayDoThesis}(paul, x) \mid ans(x) \in G \}, $$
where ans is a unary predicate denoting “answer.” The QA problem \(\langle \textit{Cs}, a \rangle \) above can then be transformed into a MI problem \(\langle \textit{Cs}\cup \{ C_0 \}, \varphi \rangle \), where \(C_0\) is the clause given by:
$$\begin{aligned} C_{0}: ans(x) \leftarrow \textit{mayDoThesis}(\textit{paul}, x) \end{aligned}$$
Using rules for transformation of clauses given in Sects. 6.26.3, how to compute the answer to the MI problem \(\langle \textit{Cs}\cup \{ C_0 \}, \varphi \rangle \) is illustrated in Sect. 6.4.

6.2 Unfolding Operation

Assume that:
  • \(\textit{Cs}\subseteq \text {C}\textsc {ls}\).

  • D is a set of definite clauses in Cls.

  • \(\textit{occ}\) is an occurrence of an atom b in the right-hand side of a clause C in \(\textit{Cs}\).

By unfolding \(\textit{Cs}\) using D at \(\textit{occ}\), \(\textit{Cs}\) is transformed into
$$ (\textit{Cs}- \{ C \}) \cup (\bigcup \{ \textit{resolvent}(C, C^\prime , b) \mid C^\prime \in D \}), $$
where for each \(C^\prime \in D\), \(\textit{resolvent}(C, C^\prime , b)\) is defined as follows, assuming that \(\rho \) is a renaming substitution for usual variables such that C and \(C^\prime \rho \) have no usual variable in common:
  1. 1.

    If b and \(\textit{head}(C^\prime \rho )\) are not unifiable, then \(\textit{resolvent}(C, C^\prime , b) = \emptyset \).

     
  2. 2.
    If they are unifiable, then \(\textit{resolvent}(C, C^\prime , b) = \{C^{\prime \prime }\}\), where \(C^{\prime \prime }\) is the clause obtained from C and \(C^\prime \rho \) as follows, assuming that \(\theta \) is the most general unifier of b and \(\textit{head}(C^\prime \rho )\):
    1. (a)

      \(\textit{lhs}(C^{\prime \prime }) = \textit{lhs}(C\theta )\)

       
    2. (b)

      \(\textit{rhs}(C^{\prime \prime }) = (\textit{rhs}(C\theta ) - \{ b\theta \}) \cup \textit{body}(C^\prime \rho \theta )\)

       
     

The resulting clause set is denoted by \(\text {U}\textsc {nfold}(\textit{Cs}, D, \textit{occ})\).

Theorem 15

Assume that:
  1. 1.

    \(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\).

     
  2. 2.

    D is a set of definite clauses in \(\textit{Cs}\).

     
  3. 3.

    \(\textit{occ}\) is an occurrence of an atom in the right-hand side of a clause in \(\textit{Cs}- D\).

     
  4. 4.

    \(\varphi \) is an exit mapping.

     
Then
  • \(\mathbb {MM}(\textit{Cs}) = \mathbb {MM}(\mathrm{U}\textsc {nfold}(\textit{Cs}, D, \textit{occ}))\), and

  • \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \textit{ans}_\mathrm{MI}(\mathrm{U}\textsc {nfold}(\textit{Cs}, D, \textit{occ}), \varphi )\).    \(\square \)

6.3 Other Transformations

Definite-Clause Removal. Assume that (i) D is a set of definite clauses in \(\textit{Cs}\), (ii) the heads of all definite clauses in D are atoms with the same predicate symbol, say p, (iii) no p-atom appears in any clause in \(\textit{Cs}- D\), and (iv) \(\varphi \) only refers to q-atoms, where \(q \ne p\). Then \(\textit{Cs}\) can be transformed into \(\textit{Cs}- D\).

Elimination of Subsumed Clauses and Elimination of Valid Clauses. A clause \(C_1\) is said to subsume a clause \(C_2\) iff there exists a substitution \(\theta \) for usual variables such that \(\textit{lhs}(C_1)\theta \subseteq \textit{lhs}(C_2)\) and \(\textit{rhs}(C_1)\theta \subseteq \textit{rhs}(C_2)\). If a clause set \(\textit{Cs}\) contains clauses \(C_1\) and \(C_2\) such that \(C_1\) subsumes \(C_2\), then \(\textit{Cs}\) can be transformed into \(\textit{Cs}- \{ C_2 \}\).

A clause is valid iff all of its ground instances are true. Given a clause C, if some atom in \(\textit{rhs}(C)\) belongs to \(\textit{lhs}(C)\), then C is valid. A valid clause can be removed.

Side-Change Transformation. Assume that p is a predicate occurring in a clause set \(\textit{Cs}\) and p does not appear in a query atom under consideration. The clause set \(\textit{Cs}\) can be transformed by changing the clause sides of p-atoms as follows: First, determine a new predicate notp for p. Next, move all p-atoms in each clause to their opposite side in the same clause (i.e., from the left-hand side to the right-hand side and vice versa) with their predicates being changed from p to notp.

Side-change transformation is useful for deriving a new set of clauses to which unfolding with respect to p-atoms can be applied, when each clause C in \(\textit{Cs}\) satisfies the following two conditions: (i) there is at most one p-atom in the right-hand side of C, and (ii) if there is exactly one p-atom in the right-hand side of C, then all user-defined atoms in the left-hand side of C are p-atoms.
Fig. 3.

Clauses obtained by application of unfolding and application of basic transformation rules

Fig. 4.

Clauses obtained by further application of transformation rules

6.4 ET Computation

The clause set \(\textit{Cs}\cup \{ C_0 \}\), consisting of \(C_0\)\(C_{27}\), given in Sect. 6.1 is transformed using ET rules provided by Sects. 6.26.3 as follows:
  • By (i) unfolding using the definitions of the predicates \(\textit{mayDoThesis}\), \(\textit{FP}\), \(\textit{Tp}\), \(\textit{curr}\), \(\textit{subject}\), \(\textit{expert}\), \(\textit{St}\), \(\textit{exam}\), \(\textit{funcf}_0\), and \(\textit{FM}\), (ii) removing these definitions using definite-clause removal, and (iii) removal of valid clauses, the clauses \(C_0\)\(C_{27}\) are transformed into the clauses \(C_{28}\)\(C_{42}\) in Fig. 3.

  • Side-change transformation for \(\textit{NFP}\) enables (i) unfolding using the definitions of \(\textit{teach}\), \(\textit{Co}\), and \(\textit{AC}\), (ii) elimination of these definitions using definite-clause removal, (iii) removal of valid clauses, and (iv) elimination of subsumed clauses. By such side-change transformation followed by transformation of these four types, \(C_{28}\)\(C_{42}\) are transformed into the clauses \(C_{43}\)\(C_{46}\) in Fig. 4.

  • Side-change transformation for \(\textit{notNFP}\) enables unfolding using the definitions of \(\textit{BC}\) and \(\textit{NFP}\). By unfolding and definite-clause removal, \(C_{43}\)\(C_{46}\) are transformed into \(C_{45}\), i.e., \((ans(\textit{john}) \leftarrow )\).

As a result, the MI problem \(\langle \textit{Cs}\cup \{ C_0 \}, \varphi \rangle \) in Sect. 6.1 is transformed equivalently into the MI problem \(\langle \{ (ans(\textit{john}) \leftarrow ) \}, \varphi \rangle \). Hence
$$\begin{aligned} \textit{ans}_\mathrm{MI}(\textit{Cs}\cup \{ C_0 \}, \varphi )&=\textit{ans}_\mathrm{MI}(\{ (ans(\textit{john}) \leftarrow ) \}, \varphi )\\&=\varphi (\bigcap \textit{Models}( \{ (ans(\textit{john}) \leftarrow ) \} ))\\&=\{ \textit{mayDoThesis}(\textit{paul}, \textit{john}) \}. \end{aligned}$$

6.5 A Proof Problem and Its Solution

By modifying the QA problem in Sect. 6.1, we have a proof problem that determines whether there is a student who may do his/her thesis with \(\textit{paul}\).

This proof problem is formalized as a MI problem \(\langle \textit{Cs}\cup \{ C_0 \} \cup \{ C_{neg} \}, \varphi \rangle \), where \(C_{neg}\) is the negative clause \((\leftarrow ans(x))\) and for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \(\varphi (G) = \mathrm{``}\text {yes''}\) if \(G = \mathcal{G}_\mathrm{u}\), and \(\varphi (G) = \mathrm{``}\text {no''}\) otherwise.

One way to solve this problem is to transform \(\textit{Cs}\cup \{ C_0 \} \cup \{ C_{neg} \}\) in a way similar to the transformation in Sect. 6.4. Even in the presence of the negative clause \(C_{neg}\), the same transformation rules can be applied and the clause set \(\textit{Cs}\cup \{ C_0 \} \cup \{ C_{neg} \}\) is transformed into \(\{ (ans(\textit{john}) \leftarrow ) \} \cup \{ C_{neg} \}\), from which the clause set
$$ \{ (ans(\textit{john}) \leftarrow ) \} \cup \{ (\leftarrow ) \} $$
can be obtained by unfolding. Since this clause set contains the empty clause, \(\textit{ans}_\mathrm{MI}(\textit{Cs}\cup \{ C_0 \} \cup \{ C_{neg} \}, \varphi ) = \mathrm{``}\text {yes''}\).

7 Conclusions

A model-intersection problem (MI problem) is a pair \(\langle \textit{Cs}, \varphi \rangle \), where \(\textit{Cs}\) is a set of clauses and \(\varphi \) is an exit mapping used for constructing the output answer from the intersection of all models of \(\textit{Cs}\). The class of MI problems considered in this paper has many parameters, such as abstract atoms, specializations, restriction on forms of clauses, etc. By instantiating these parameters, we can obtain theories for subclasses of QA and proof problems corresponding to conventional clause-based theories, such as datalog, Prolog, and many other extensions of Prolog.

The proposed solution schema for MI problems comprises the following steps: (i) formalize a given problem as an MI problem on some specialization system, (ii) prepare ET rules from answers/target mappings, (iii) construct an ET sequence preserving answers/target mappings, and (iv) compute the answer by using some answer mapping (possibly constructed on some target mapping).

We introduced the concept of target mapping and proposed three target mappings, i.e., \(\tau _1\) for sets of positive unit clauses, \(\tau _2\) for sets of definite clauses, and \(\mathbb {MM}\) for arbitrary sets of clauses. These target mappings provide a strong foundation for inventing many ET rules for solving MI problems on clauses. Many kinds of ET rules, including the resolution and factoring ET rules, are realized by transformations that preserve these target mappings. For instance, a proof based on the resolution principle can be regarded as ET computation using the resolution and factoring ET rules. By introducing new ET rules, we can devise a new proof method [2]. By inventing additional ET rules, we have been successful in solving a large class of QA problems [3].

By instantiation, the class of MI problems on specialization systems produces, among others, one of the largest classes of logical problems with first-order atoms and substitutions. The ET solution has been proved to be very general and fundamental since its correctness for such a large class of problems has been shown in this paper. By its generality, the theory developed in this paper makes clear the fundamental and central structure of representation and computation for logical problem solving.

Footnotes

  1. 1.

    To represent the original \(\textit{mayDoThesis}\) problem in a clausal form, extended clauses with function variables are used. To change atoms with function variables into user-defined atoms, the \(\textit{funcf}_0\) predicate is used in the clauses \(C_{24}\)\(C_{27}\).

Notes

Acknowledgments

This research was partially supported by JSPS KAKENHI Grant Numbers 25280078 and 26540110.

References

  1. 1.
    Akama, K., Nantajeewarawat, E.: Proving theorems based on equivalent transformation using resolution and factoring. In: Proceedings of the Second World Congress on Information and Communication Technologies, WICT 2012, Trivandrum, India, pp. 7–12 (2012)Google Scholar
  2. 2.
    Akama, K., Nantajeewarawat, E.: Embedding proof problems into query-answering problems and problem solving by equivalent transformation. In: Proceedings of the 5th International Conference on Knowledge Engineering and Ontology Development, Vilamoura, Portugal, pp. 253–260 (2013)Google Scholar
  3. 3.
    Akama, K., Nantajeewarawat, E.: Equivalent transformation in an extended space for solving query-answering problems. In: Nguyen, N.T., Attachoo, B., Trawiński, B., Somboonviwat, K. (eds.) ACIIDS 2014. LNCS (LNAI), vol. 8397, pp. 232–241. Springer, Heidelberg (2014). doi: 10.1007/978-3-319-05476-6_24 CrossRefGoogle Scholar
  4. 4.
    Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F. (eds.): The Description Logic Handbook, 2nd edn. Cambridge University Press, Cambridge (2007)Google Scholar
  5. 5.
    Chang, C.L., Lee, R.C.T.: Symbolic Logic and Mechanical Theorem Proving. Academic Press, Cambridge (1973)MATHGoogle Scholar
  6. 6.
    Clark, K.L.: Negation as failure. In: Gallaire, H., Minker, J. (eds.) Logic and Data Bases, pp. 293–322. Plenum Press, New York (1978)CrossRefGoogle Scholar
  7. 7.
    Donini, F.M., Lenzerini, M., Nardi, D., Schaerf, A.: \({\cal{A}}{\cal{L}}\)-log: integrating datalog and description logics. J. Intell. Inf. Syst. 16, 227–252 (1998)CrossRefGoogle Scholar
  8. 8.
    Fitting, M.: First-Order Logic and Automated Theorem Proving, 2nd edn. Springer, Berlin (1996)CrossRefMATHGoogle Scholar
  9. 9.
    Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: Proceedings of International Logic Programming Conference and Symposium, pp. 1070–1080. MIT Press (1988)Google Scholar
  10. 10.
    Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9, 365–386 (1991)CrossRefMATHGoogle Scholar
  11. 11.
    Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Berlin (1987)CrossRefMATHGoogle Scholar
  12. 12.
    Robinson, J.A.: A machine-oriented logic based on the resolution principle. J. ACM 12, 23–41 (1965)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Tessaris, S.: Questions and answers: reasoning and querying in description logic. Ph.D. thesis, Department of Computer Science, The University of Manchester, UK (2001)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  1. 1.Information Initiative CenterHokkaido UniversityHokkaidoJapan
  2. 2.Computer Science Program, Sirindhorn International Institute of TechnologyThammasat UniversityPathumthaniThailand

Personalised recommendations