<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Linear Algebraic Partial Evaluation of Logic Programs⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tuan Nguyen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Katsumi Inoue</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chiaki Sakama</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Institute of Informatics (NII)</institution>
          ,
          <addr-line>2-1-2 Hitotsubashi, Chiyoda City, Tokyo</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Wakayama University</institution>
          ,
          <addr-line>930 Sakaedani, Wakayama</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In logic programming, partial evaluation performs unfolding rules of a program in advance to reduce the cost of inferencing steps. Recently, partial evaluation of logic programs has been implemented in vector spaces by computing the powers of matrix representations. It has been reported that linear algebraic partial evaluation substantially enhances the practical performance of linear algebraic methods for logic programming. However, most recent research has focused exclusively on -rules, assuming that their dependency graph is acyclic. In this paper, we introduce cycle-resolving techniques to ensure that linear algebraic partial evaluation works efectively even with cycles in the program. Additionally, we demonstrate that linear algebraic partial evaluation can also be extended to accommodate -rules. Moreover, we propose using eigendecomposition and Jordan normal form to conduct the partial evaluation in vector spaces. We compare the proposed techniques on a set of acyclic and cyclic logic programs to evaluate their efectiveness. It is shown that the iteration method for partial evaluation, especially with sparse format, is the most eficient one in general cases. However, the decomposition method has the potential for future research to leverage eigenvalues and eigenvectors of program matrices for reasoning with logic programming.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Logic programming</kwd>
        <kwd>Partial evaluation</kwd>
        <kwd>Linear algebra</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Recent research has explored using linear algebraic
methods as a compelling alternative to symbolic methods for
logical inference [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4">1, 2, 3, 4</xref>
        ]. In 2017, Sakama et al.
proposed linearizing logic program characteristics using matrix
multiplication for deductive reasoning [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This involves
converting a logic program into a matrix and using
matrixvector multiplication to realize the immediate consequence
operator [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Extensions to disjunctive and normal logic
programs were also discussed [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Another approach by
Sato et al. investigates computing 2-valued and 3-valued
completion semantics of finite propositional normal logic
programs in vector spaces [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Similarly, Aspis et al.
considered model computation in continuous vector spaces as
a root-finding problem, using Newton’s method to solve it
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Later, Takemura and Inoue proposed a diferentiable
approach by designing a continuous loss function where
supported models are optimal values [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Additionally,
using matrices and tensors to represent logical formulas and
constraints is seen as a promising way to connect symbolic
reasoning and machine learning [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Matrix representation
allows constructing / Boolean networks from state
transitions on an unprecedented scale [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Program
matrices can also be learned using machine learning methods,
as demonstrated in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], where a diferentiable inductive
logic programming framework learns logic programs from
relational datasets. This idea has been extended to a
diferentiable first-order rule learner, shown to be robust to noisy
data and scalable to large datasets [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Linear algebraic approaches have also been extended to
Partial Evaluation (PE) in Logic Programming (LP) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
Nguyen et al. reported significant runtime reductions on
both synthetic and real data, especially for transitive
closures of large network datasets [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. A similar linear
algebraic PE concept has been applied to Propositional Horn
Clause Abduction Problem (PHCAP), showing remarkable
performance gains [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Although these methods are
applied to diferent reasoning tasks, the main idea behind
linear algebraic PE in both [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] is to compute the
powers of matrix representations of logic programs ([
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]
employs abductive matrix, but it is actually the transposed
version of the program matrix in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]). Both papers use a
unified representation of a logic program in its standardized
form to perform PE in an iterative manner. However, their
methods only focus on the -rules in the program. More
importantly, they assume that the dependency graph of the
program is acyclic and do not consider the cyclic case.
      </p>
      <p>In this work, we focus on extending the capability of
linear algebraic PE. First, we propose to separate the matrix
representation of a logic program into two parts: one for
-rules and the other for -rules. In short, an -rule
is a rule that has a conjunction of literals in its body, the
head is True only if all its body literals are True. On the
other hand, an -rule has a disjunction of literals in its
body, the head is True if at least one of its body literals is
True. Each part (-rules or -rules) of a logic program
has diferent logical meanings but can be treated equally
in terms of PE computation which is basically computing
powers of a square matrix. We also propose a solution to
resolve cycles in the dependency graph of the program to
extend the capability of linear algebraic PE to the cyclic case.
Moreover, we introduce a novel way to realize PE in vector
spaces by leveraging the eigenvalues and eigenvectors.</p>
      <p>The rest of this paper is organized as follows: Section 2
reviews background knowledge of LP and dependency graphs;
Section 4 presents the iteration method for PE and
cycleresolving techniques; Section 5 demonstrates linear
algebraic PE using eigendecomposition and Jordan normal form;
Section 6 illustrates comparison of the proposed PE
methods; finally Section 7 concludes the paper.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>In this paper, we focus on propositional logic programs over
a finite (nonempty) set of atoms . A program P is called a
normal logic program if every rule  ∈ P follows the form:
ℎ ←
1 ∧ 2 ∧ ... ∧  ∧ ¬+1 ∧ ... ∧ ¬ (1)
( ≥  ≥ 0)
where ℎ and  are atoms in .</p>
      <p>For short, we write ℎ() and () to denote
the set of literals in the head and body of a rule ,
respectively. Additionally, () can be partitioned
into +() = {1, 2, ..., } and − () =
{¬+1, ¬+2, ..., ¬} which refers to the  and
 literals in ().</p>
      <p>A normal rule  is called a fact if () = ∅, a constraint
if ℎ() = ∅. A fact or a constraint can also be written
respectively as ℎ() ← ⊤ and ⊥ ← (), where ⊤
and ⊥ are special symbols representing True and False. In
case − () = ∅, the rule  is called a definite rule . A
normal program P is a definite program if − () = ∅ for
every rule  ∈ P.</p>
      <p>
        A normal logic program can be transformed into a definite
program as mentioned in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Accordingly, one can obtain a
definite program from a normal program P by replacing the
negative literals in every rule (1) and rewriting as follows:
ℎ ←
1 ∧ 2 ∧ ... ∧  ∧ +1 ∧ ... ∧ 
(2)
( ≥  ≥ 0)
where each  is the positive form of the negation ¬.
The resulting program is called the positive form of P,
denoted as P+. P+ then can be transformed into a standardized
program which is a definite program that satisfies there are
no two rules with the same head - Singly-Defined ( SD)
condition [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. A logic program P is called a SD program if
ℎ(1) ̸= ℎ(2) for any two diferent rules 1, 2 in
P. When P contains more than one rule 1, 2, . . . , 
( &gt; 1) with the same head ℎ such that ℎ(1) =
ℎ(2), · · · = ℎ() = {ℎ}, replace those rules
with a set of new rules: {ℎ ← 1 ∨ 2 ∨ . . . ∨ , 1 ←
(1), 2 ← (2), . . . ,  ← ()}
( &gt; 1), where 1, 2, . . . ,  are newly introduced atoms.
The resulting program Π is called a standardized program.
      </p>
      <p>Accordingly, Π can be seen as a finite set of rules of the
form -rules (3) and -rules (4), and there are no two
rules with the same head (SD condition):
ℎ ←
ℎ ←
1 ∧ 2 ∧ ... ∧ 
1 ∨ 2 ∨ ... ∨ 
( ≥ 0)
( ≥ 2)
(3)
(4)
For simplicity, we still use the notation ¬ in a standardized
program Π but, without ambiguity, imply that ¬ and  are
two “distinct” variables with a “special” relation.
Example 1. Given a logic program P1 = { ←  ∧ ,  ←
,  ← ¬ ℎ,  ←  ∧ ,  ← ,  ← ¬ ,  ← ¬ ,  ←
,  ← ,  ← ,  ← ,  ← ,  ← ¬ , ℎ ←
¬, ←  ∧ ℎ, ←  ∧ }.</p>
      <p>
        Standardized logic program: Π 1 = { ← 1 ∨  ∨ ¬ℎ,  ←
 ∧ ,  ←  ∨ ¬ ∨ ¬,  ← ,  ← ,  ←  ∨ ,  ←
 ∨ ¬, ℎ ← ¬ , 1 ←  ∧ , ←  ∧ ℎ, ←  ∧ }.
Here in Example 1, note that we do not need to introduce
new variables for each body atom in  ← ,  ←  and
(a) MΠ1∧ (b) MΠ1∨
a b c d e f g h x1 1¬a1¬c1¬d1¬g1¬h a b c d e f g h x1 ¬a ¬c ¬d ¬g ¬h ⊥⊥ 1/a21/b21/c2 d e f g 1/h2 x1 ¬a ¬c ¬d ¬g ¬h
(c) vn⊤eg(Π1)
(d) vΠ⊤
1
(e) MΠ
1
 ← ,  ← ¬ , because these rules have single-literal
bodies. In case the rule body has more than one atom, we
need to introduce a new variable for each body atom and
rewrite the rule as a disjunction of these new variables.
Further details about the standardization method can be
found in [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Logic Programs - Program</title>
    </sec>
    <sec id="sec-4">
      <title>Matrices - Dependency Graphs</title>
      <sec id="sec-4-1">
        <title>3.1. Matrix representation of logic programs</title>
        <p>
          We follow a similar program matrix definition as [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Our
new observation is that a standardized program Π can be
seen as a quadruple Π = ⟨Π ∧, Π ∨, Π  , Π  ⟩ where Π ∧ is
the set of non-factual -rules ((3) but strictly  &gt; 0), Π ∨
is the set of -rules (4), Π  is the set of facts ((3) where
 = 0) and Π  is the set of constraints ((3) where ℎ = ⊥).
For convenience, we assume there is a way to index all
literals in a logic program incrementally without ambiguity
so that we can easily map sets of literals to vectors. We shall
define the matrix representation of Π as a set of matrices
and vectors as follows.
        </p>
        <p>Definition 1 (Matrix of And-rules/Or-rules). Let Π =
⟨Π ∧, Π ∨, Π  , Π  ⟩ be a standardized program. Then the
matrix of And-rules MΠ∧ ( Or-rules MΠ∨ ), where MΠ∧ ∈
RΠ× Π (MΠ∨ ∈ RΠ× Π , Π is the number of atoms in
Π ), are defined as follows:</p>
        <p>1
∙ MΠ{_} [, ] =  if there is a rule  in Π {_} ( either in
the form of (3) or (4) respectively if Π {_} is Π ∧ or Π ∨) where
 = |()| ̸= 0,
∙ MΠ{_} [, ] = 0 otherwise.</p>
        <p>We define vector of negations as a column vector v such that
v[] = 1 if the corresponding atom at index  is a negation.
Similarly, vector of facts is defined as a column vector v such
that v[] = 1 if the corresponding atom at index  is a fact.
Figure 1 demonstrates the visualization of matrix/vector
representations of Π 1 in Example 1. By definitions, non-zero
elements of MΠ∧ , MΠ∨ , and MΠ are normalized by the
number of atoms in the body of the corresponding rule. It
is possible to define the matrix without normalization as
long as being consistent. In the context of logic
inferencing, we follow the normalized representation as it is more
convenient to define True as 1 and False as 0.</p>
        <p>
          We shall show the connection between this matrix
representation and the one defined in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] that has been adopted
in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] and [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] to define linear algebraic PE. Before that,
we need to define two thresholding functions:
 ⇓() =
Definition 2 (Thresholding functions).
        </p>
        <p>{︃1 if  ≥ 1 {︃1 if  &gt; 0</p>
        <p>, and  ⇑() =
0 otherwise 0 otherwise
where  is a scalar and can be extended to a vector, or a matrix
in an element-wise way.</p>
        <p>
          The program matrix MΠ can be constructed as follows:
MΠ = MΠ∧ +  ⇑(︀ MΠ∨ )︀ + diag(vΠ ⊕  ⇓ vneg(Π)) (5)
where ⊕  ⇓ is vector add with  ⇓-thresholding, diag turns
an input vector into a diagonal matrix. The reason for ⊕  ⇓
is that there might be a chance where atoms (known to be
False are included as facts) and negations are overlapping.
Program matrix MΠ in (5) is equivalent to the one defined
in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] that can be used either for fixpoint computation in
stable model computation [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] or for 1-step abduction in
Horn abduction (with restrictions to Horn clauses) [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. The
reason for the redefinition is to make the matrix
representation more intuitive so that we can develop a general PE
approach and cycle-resolving techniques to both -rules
and -rules.
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>3.2. Dependency graphs</title>
        <p>
          In order to illustrate the relationship between program
completion [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] and stable models [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ], the concept of
“dependency graph” was employed in several studies i.e. [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ].
In this section, we will extend the concept of dependency
graphs to the case of standardized programs.
        </p>
        <p>Definition 3 (Dependency graph). Given a normal logic
program P. The dependency graph of P is a directed graph
GP = (VP, EP) where VP is the set of atoms in P and EP is
determined as follows:
• There is a positive edge (, ) in EP if there is a rule
 ∈ P such that  = ℎ() and  ∈ +().
• There is a negative edge (, ) in EP if there is a rule
 ∈ P such that  = ℎ() and  ∈ − ().</p>
        <p>
          Note that the direction of an edge (, ) does not matter
unless we are consistent. However, in our paper, we persist
in the direction of edges toward the head atom of a rule. In
many studies, the definition of positive dependency graph is
usually preferred over the general dependency graph [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ].
Given a normal logic program P. The positive dependency
graph of P is a directed graph GP+ = (VP, E+
P ) such that
tGhaP+t E⊆P+ includes only positive edges of EP. P is called a
        </p>
        <p>
          GP where GP is the dependency graph of P such
tight program if GP+ is acyclic [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ], in other words, there is
no positive loop in GP+. For tight programs, the completion
semantics and the answer set semantics are equivalent to
each other [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ].
        </p>
        <p>Dependency graphs are suficient to illustrate the
relationship between literals in a normal logic program. However,
it is dificult to capture how to “interpret” a rule in a
dependency graph. For example, in Figure 2a, we can see that 
depends on , ,  , and ¬ℎ, however, it is not clear to see
that all of them are required to deduce  or which
combination is suficient. A similar argument holds for the case of
the positive dependency graph in Figure 2b.</p>
        <p>To capture the “actual meaning” of a rule, we
introduce the concept of - dependency graph which is
defined over a standardized program Π . As mentioned,
Π = ⟨Π ∧, Π ∨, Π  , Π  ⟩. We consider to define the
dependency graph of Π only over Π ∧ (-rules) and Π ∨
(-rules). Regardless of a rule in Π ∧ or Π ∨ may difer as a
conjunction or disjunction, we can always define the
dependency graph of Π ∧ and Π ∨ separately using Definition 3,
denoted as GΠ∧ and GΠ∨ respectively. Note that Π ∧ and
Π ∨ do not contain any negation by definition, therefore,
GΠ∧ and GΠ∨ are also positive dependency graphs. To
distinguish edges of GΠ∧ and GΠ∨ from each other, we
use solid and dash lines respectively.</p>
        <p>Definition 4 (- dependency graph). Given a
normal logic program P, its standardized program is Π . The
- dependency graph of Π is a directed graph GΠ such
that GΠ = GΠ∧ ∪ GΠ∨ .</p>
        <p>As can be seen in Figure 2d and Figure 2e, each graph
GΠ∧ or GΠ∨ only contains edges of the same type, either
solid or dash lines. However, in the - dependency
graph GΠ in Figure 2c, both types of edges are presented. It
is easy to construct GΠ from GΠ∧ and GΠ∨ by merging the
two graphs without any conflict. The following important
properties of GΠ can be observed:
• A node in GΠ is called an -node if it has only
incoming solid edges. Similarly, a node in GΠ is an
-node if it has only incoming dash edges.
• A node cannot have both types of incoming edges (it
is not the case for outgoing edges). In other words,
a node can only be either an -node or an
node.
• From GΠ, we can interpret that an -node is
True if all original nodes of its incoming edges are
True. Similarly, an -node is True if at least one
of the original nodes of its incoming edges is True.
By definition, the - dependency graph can capture
the semantical meaning of the original Π ∧ and Π ∨. More
importantly, a program Π ∧ and its dependency graph GΠ∧
(similar to the case of Π ∨ and GΠ∨ ) are related directly
because the program matrix and the adjacency matrix of
the dependency graph are equivalent. Note that if all
nonzero elements are 1, the program matrix MΠ∧ is exactly the
adjacency matrix of the dependency graph GΠ∧ . However,
to be consistent with the choice of normalizing rule body
to define truth values in the previous section, we denote
the adjacency matrix of GΠ∧ by  ⇑(MΠ∧ ). Similarly, we
denote  ⇑(MΠ∨ ) as the adjacency matrix of GΠ∨ .</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. Linear Algebraic Partial</title>
    </sec>
    <sec id="sec-6">
      <title>Evaluation</title>
      <sec id="sec-6-1">
        <title>4.1. Partial evaluation with iteration method</title>
        <p>
          Sakama et al. first proposed the idea of PE for computing
least models of logic programs using linear algebra [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ].
Later, a refined version of the method was published in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
Extending from this idea, Nguyen et al. have developed PE
with reduct abductive matrix (Definition 5 in [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]) for Horn
abduction [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. The reduct abductive matrix is obtained by
taking the abductive matrix (simply a transposed matrix of


− −
+
+
+ +
        </p>
        <p>
          − −

1


+
+
+

+

−
+
(a) GP1


MΠ - Definition 4 in [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ]) then removing all columns w.r.t.
-rules (4) and setting 1 at the diagonal corresponding
to all atoms which are heads of these -rules. The basic
idea can be simplified as we take MΠ∧ then append to
the diagonal of MΠ∧ all atoms we want to preserve
(rule heads, facts, negations, ...) in the partially evaluated
program. Then we take the resulting matrix to multiply with
itself iteratively until a fixed point is reached. We formalize
this idea in the following definitions.
        </p>
        <p>Definition 5 (Partial evaluation of And-rules). Given a
normal logic program P, its standardized program is Π . The
partial evaluated matrix of Π w.r.t. -rules, denoted as
peval(Π ∧), is defined as follows:
M̂︁Π∧ = MΠ∧ + diag(vΠ ⊕  ⇓ vneg(Π) ⊕  ⇓ vhead(Π∨))
M0 = M̂︁Π∧
M = M− 1 · M− 1</p>
        <p>( ≥ 1)
where vhead(Π∨) is a column vector such that vhead(Π∨)[] =
1 if the corresponding atom at index  is a head of an
rule.</p>
        <p>Definition 6 (Partial evaluation of Or-rules). Given a
normal logic program P, its standardized program is Π . The
partial evaluated matrix of Π w.r.t. -rules, denoted as
peval(Π ∨), is defined as follows:
M̂︁Π∨ = MΠ∨ + diag(vΠ ⊕  ⇓ vneg(Π) ⊕  ⇓ vhead(Π∧))
M0 = M̂︁Π∨
M = M− 1 · M− 1</p>
        <p>( ≥ 1)
where vhead(Π∧) is a column vector such that vhead(Π∧)[] =
1 if the corresponding atom at index  is a head of an
rule.</p>
        <p>
          Both Definition 5 and Definition 6 are almost identical
except for the starting point with diferent matrices MΠ∧
and MΠ∨ respectively. We say (6) and (7) reach a fixed point
at a step  ( ≥ 1) if M = M− 1. Because the matrix
multiplication performs unfolding rules [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], intuitively, the
ifxed point is reached when the program is fully unfolded.
(6)
(7)
        </p>
        <p>
          For the case of acyclic programs, it is guaranteed that the
ifxed point is reached after a finite step of iterations [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ].
Proposition 1 shows the minimum number of PE steps to
reach a fixed point for acyclic case.
        </p>
        <p>Proposition 1. For any program P with MΠ∧ (and MΠ∨ )
of the size  ×  such that the corresponding dependency
graph GΠ∧ (and GΠ∧ ) is acyclic, the suficient number of
PE steps to reach a fixed point is  = ⌈2()⌉.</p>
        <p>Proof. Consider the case with a program P2 = {1 ←
2, 2 ← 3, . . . , − 1 ← , }. Obviously, this program
has the longest dependency chain we can create from 
atoms. Indeed, unfolding P2 at the first step we have {1 ←
3, 2 ← 4, 3 ← 5, . . . , − 1 ← }, at the second
step we have {1 ← 5, 2 ← 6, 3 ← 7 . . . , − 1 ←
}, and so on. According to the pattern, if we perform
the PE for  steps, then the condition of the fixed point is
reached when 2 ≥  ⇔  ≥ 2().  is an integer, so
we have  = ⌈2()⌉. The proof is identical for the case
of Π ∨.</p>
        <p>At a fixed point, we can also compute M = (M̂︁Π∧ )2 ( ≥
1) (or M = (M̂︁Π∨ )2 ( ≥ 1) for the case of -rules)
that is basically computing powers of a matrix. Then, we
define peval(Π ∧) = unpack((M̂︁Π∧ )2 ) is the partially
evaluated program of Π ∧, where unpack((M̂︁Π∧ )2 ) is a
series of actions including: (s1) reversing the efect of
appending vΠ ⊕  ⇓ vneg(Π) ⊕  ⇓ vhead(Π∨) to the
diagonal, (s2) removing all row  if the sum of non-zero
elements on that row in (M̂︁Π∧ )2 is less than 1, and (s3)
normalizing non-zero elements of (M̂︁Π∧ )2 to satisfy
Definition 1. Step (s2) is important as an -node is True
only if all its body atoms are True. Similarly, we define
peval(Π ∨) = unpack((M̂︁Π∨ )2 ) is the partially
evaluated program of Π ∨, where unpack((M̂︁Π∨ )2 ) is a series
of actions including: (s1) reversing the efect of
appending vΠ ⊕  ⇓ vneg(Π) ⊕  ⇓ vhead(Π∧) to the diagonal, and
(s2) normalizing non-zero elements of (M̂︁Π∨ )2 to satisfy
Definition 1. peval(Π ∧) and peval(Π ∨) are introduced to
simplify the notation in the following sections.</p>
        <p>We have presented the basic idea of linear algebraic PE
of logic programs through iteratively compute powers of
matrix (M̂︁Π∧ and M̂︁Π∨ ) until a fixed point is reached.
However, a fixed point is not guaranteed in case there is a cycle
in the corresponding dependency graph (GΠ∧ or GΠ∨
respectively). For example, consider the visualization of P1
in Figure 2 where GΠ∧ has a cycle {, } while GΠ∨ has
1 1
two cycles {,  } and {, , }. In this example, (6) and (7)
cannot reach a fixed point, consequently peval(Π 1∧) and
peval(Π 1∨) cannot be computed. In the next section, we
will introduce cycle-resolving techniques to ensure that this
method also works even with cycles in GΠ∧ and GΠ∨ .</p>
      </sec>
      <sec id="sec-6-2">
        <title>4.2. Cycle resolving</title>
        <p>First, we define the local cycle in GΠ∧ and GΠ∨ .
Definition 7 (Local cycle in GΠ∧ and GΠ∨ ). Given a
normal logic program P, its standardized program is Π . A set
 of atoms is called a local cycle in GΠ∧ (or GΠ∨ ) if  is
strongly connected in GΠ∧ (or GΠ∨ ).</p>
        <p>
          The term local cycle is used to distinguish from the general
concept of a cycle in GΠ. For example in Figure 2, there
are cycles mixing both solid and dash edges at the same time
such as {, , 1}. These are not (yet) the target of our
cycle-resolving techniques in this paper. Our main focus
is to resolve the local cycles in GΠ∧ and GΠ∨ such as
{, } in GΠ∧ ; and {,  }, {, , } in GΠ∨ . We can easily
1 1
identify the local cycles in GΠ∧ and GΠ∨ by identifying
every Strongly Connected Component (SCC) in GΠ∧ and
GΠ∨ respectively. This can be done in polynomial time by
applying the Tarjan’s algorithm [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ] or using the algorithm
in [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ] which can be implemented in linear algebraic way
using GraphBLAS1 [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ].
        </p>
        <p>After identifying the local cycles, let us consider how to
resolve them. The main idea is to translate a cycle into a set
of rules preserving the same logical meaning but does not
create cyclic computation in Definition 5 and Definition 6.
This should be done diferently for -rules and -rules.
For a cycle  in GΠ∧ , obviously, there is no way to make
an -node in  become True other than the cycle 
itself. On the other hand, for a cycle  in GΠ∨ , we can
make an -node in  become True if there is any body
literal (outside from the cycle ) of that rule which is True.
Accordingly, we propose the following cycle-resolving
techniques for -rules and -rules respectively.
Algorithm 1: Cycle-resolving for -rules
1: Identify all SCCs in GΠ∧ .
2: for each SCC  in GΠ∧ do
3: for each rule  ∈ Π ∧ such that ℎ() ∈  do
4: Remove  (by setting the corresponding entries
of  in MΠ∧ to 0).
1GraphBLAS is an open-source API specification which defines standard
building blocks for graph algorithms in the language of linear algebra.
Algorithm 2: Cycle-resolving for -rules
1: Identify all SCCs in GΠ∨ .
2: for each SCC  in GΠ∨ do
3: Let  = ∅
4: for each rule  ∈ Π ∨ such that ℎ() ∈  do
5:  =  ∪ (() ∖ )
6: for each rule  ∈ Π ∨ such that ℎ() ∈  do
7: Replace  by ℎ() ← ⋁︁ .
∈
After resolving the cycles, we can apply the linear algebraic
PE of -rules and -rules as described in Definition 5
and Definition 6 respectively. Now we can prove that the
computation has a fixed point.</p>
        <p>Proposition 2. Given a resolved matrix resolve(MΠ∧ ) (or
resolve(MΠ∨ )) as input for the linear algebraic PE of
rules (or -rules), the fixed point is guaranteed to be reached
after a finite number of iterations.</p>
        <sec id="sec-6-2-1">
          <title>Proof. There are two cases:</title>
          <p>For the case of -rules, all cycles in GΠ∧ are removed.
Hence, this case is identical to the case of acyclic programs
in that the computation in Definition 5 reaches a fixed point
after a finite number of iterations.</p>
          <p>For the case of -rules, cycles still exist in GΠ∨ but all
-rules such that their head nodes are in the cycle are
updated in a way that they have incoming edges from all
body literals related to a cycle but excluding the cycle itself.
This ensures that all possible ways to make an -node
in a cycle become True are considered, so no new cases
are created during the computation in Definition 6. Thus, a
ifxed point is guaranteed.
when computing (resolve(M̂︁Π∧ ))2 to obtain peval(Π 1∧).
1
Figure 4a visualizes the dependency graph of peval(Π 1∧).
For the case of -rules, there are 2 cycles {,  } and
{, , }. They all belong to a single SCC. Hence, we only
need to resolve {, , } corresponding to three -rules:
 ← 1 ∨  ∨ ¬ℎ,  ←  ∨ ,  ←  ∨ ¬. Following
Algorithm 2, we find  = {¬, ¬ℎ, 1}. Next, we reset all
-rules corresponding to ,  , and  with the new body
{¬, ¬ℎ, 1}. The resulting matrix resolve(MΠ∨ ) is
illus1
trated in Figure 3e. Unlike the case of -rules where we
remove the cycle, here we find all possibilities to make the
cycle become True then update the rules accordingly. After
all cycles are resolved, we can apply the iteration method
described in Definition 6 to compute peval(Π 1∨). Figure 4b
visualizes the dependency graph of peval(Π 1∨).
Combining peval(MΠ∧ ) and peval(MΠ∨ ) To sum
up, we have presented the basic idea of linear algebraic PE.
We have also introduced cycle-resolving techniques to
ensure that this method also works efectively even with cycles
in GΠ∧ and GΠ∨ . Finally, we can construct the partially
(a) resolve(MΠ∧ )
1
(b) resolve(M̂︁Π1∧ ).</p>
          <p>
            (c) (resolve(M̂︁Π1∧ ))2
(d) peval(MΠ∧ )
1
a b c d e f g h x1 ¬a ¬c ¬d ¬g ¬h
a 1
b 1/2 1/2
c 1
d
e
f 1
g 1
h 1
x1 1/2 1/2
¬a 1
¬c 1
¬d 1
¬g 1
¬h
evaluated program matrix for logic inferencing in vector
spaces by combining peval(MΠ∧ ) and peval(MΠ∨ ):
peval(MΠ) =
peval(Π ∧) +  ⇑(︀ peval(Π ∨))︀
+diag(vΠ ⊕  ⇓ vneg(Π))
(8)
peval(MΠ) can be used for the fixpoint computation in
the same way as MΠ. A few modifications may be needed
to apply the idea to Horn abduction in [
            <xref ref-type="bibr" rid="ref13">13</xref>
            ], however, the
main idea remains the same. peval(MΠ) is expected to
be more eficient than MΠ in case it helps to reduce the
number of deduction steps to reach a fixpoint. Figure 4
illustrates the visualization of peval(MΠ1 ) after combining
peval(MΠ∧ ) and peval(MΠ∨ ) with dependency graphs
1 1
and matrix representations.
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>5. Partial evaluation using matrix decomposition</title>
      <sec id="sec-7-1">
        <title>5.1. Eigendecomposition</title>
        <p>
          As we have seen in the previous sections, the main idea of
PE is to compute the powers of a program matrix. While
in linear algebra, it is known that powers of a matrix M
can be computed eficiently using its eigendecomposition
M = Q · A · Q− 1, where A is a diagonal matrix of
eigenvalues and Q is a matrix of eigenvectors [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ]. Then we can
compute M = Q · A · Q− 1 that is computationally more
eficient than computing M directly, because A is just
the element-wise power of the diagonal matrix A.
        </p>
        <p>In this section, we will show how to apply
eigendecomposition to realize PE in LP. Let us consider an example:
Example 2. Given a logic program P3 = { ←  ∧ ,  ←
 ∧ ,  ← }. Standardized logic program (no change):
Π 3 = P3.</p>
        <p>There is no -rule in Π 3, so we only need to consider
  
 ⎛ 1/2 1/2 ⎞
MΠ3∧ =  ⎝ 1/2 1/2 ⎠. For computing the
eigen 1
values, it is more numerically stable to use the adjacency
ma  
 ⎛ 1 1 ⎞
trix  ⇑(MΠ3∧ ) =  ⎝ 1 1 ⎠ instead of MΠ3∧ . Next,
 1
we append needed information to the diagonal to obtain
 ⇑(M̂︁Π3∧ ), here they are identical. Let us compute the
eigenvalues of  ⇑(M̂︁Π3∧ ).</p>
        <p>⇔
⇔
⇔</p>
        <sec id="sec-7-1-1">
          <title>Eigenvalues: Eigenvectors:</title>
          <p>( ⇑(M̂︁Π3∧ ) −  I)</p>
          <p>⎛ 1 − 
 ⎜⎝


1
1 −</p>
          <p>1
−  3 + 2 2 − 1
( − 1)( 2 −  − 1)</p>
          <p>⎞
1 ⎟⎠
 2 =
 3 =
can compute powers of  ⇑(M̂︁Π∧ ) eficiently. However,
3
unlike the iteration method in which we let the method
determine a fixpoint condition, here we need to determine
the power  in advance. Fortunately, we can set a
suficiently large  to ensure that the fixpoint is reached
following Proposition 1. In this example, as  = 3, we
have a suficient number of iterations to reach the fixpoint
 = ⌈2(3) − 1⌉ = 1, then we just need to raise A to
the power of  + 1 = 2. Accordingly, the partial evaluated
matrix is:
  
 ⎛ 1 2 1 ⎞
Q · A2 · Q− 1 =  ⎝ 0 2 1 ⎠
 0 1 1
This matrix can be translated into a logic program:
peval(MΠ3∧ ) = { ←  ∧  ∧ ,  ←  ∧ ,  ←  ∧ }
¬

¬
ℎ
¬ℎ
¬
¬
ℎ
(d) MΠ1
a b c d e f g h x1 ¬a ¬c ¬d ¬g ¬h</p>
          <p>1 1 1
1/21/2
1</p>
          <p>1
which is the partial evaluated program of Π 3∧. Because there
is no -rule in this case, so peval(MΠ∧ ) is also the
par3
tially evaluated program of Π 3.</p>
          <p>
            Using eigendecomposition for partial evaluation is
computationally more eficient than the iteration method,
especially when the number of iterations is large. However, the
eigendecomposition method requires the matrix to be
diagonalizable [
            <xref ref-type="bibr" rid="ref27">27</xref>
            ], which is not always the case. Unfortunately
for the case of program matrices, we usually see that the
determinant of the matrix is 0, which means that the matrix
is not diagonalizable. In such cases, we can use the Jordan
Normal Form (JNF) to compute the powers of a matrix that
we will discuss in the next section.
          </p>
        </sec>
      </sec>
      <sec id="sec-7-2">
        <title>5.2. Jordan normal form</title>
        <p>In linear algebra, the JNF, also known as the Jordan
canonical form, is a specific type of upper triangular matrix called
a Jordan matrix.</p>
        <p>
          Definition 8 (Jordan normal form [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ]). Let  be a
⎛  1 ⎞
⎜
⎜
square  ×  matrix ⎜
⎜
⎜
⎝
 
  is identical on the diagonal and there are 1s just above
the diagonal. We call each such matrix a Jordan  -block. A
matrix M is in JNF if
⎟
⎟
⎟ such that
⎟
1 ⎠⎟
 
2
It is proved that every square matrix in R×  can
be decomposed into a matrix in JNF [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ]
according to Jordan’s theorem. Additionally, computing
powers of a Jordan matrix M is straightforward:
2
. . .
        </p>
        <p>⎞
⎟ = ⎜⎜⎜
⎟
⎠⎟ ⎝
⎛(1)
(2)</p>
        <p>. . .</p>
        <p>()
that can be simplified by computing powers
of each Jordan block. The power of a Jordan
block  of the size  ×  can be computed by:
() = ⎜⎜⎜⎝⎜⎜⎜⎜⎜⎜   ︀(︀( 1 )︀)︀ . . .−− 21 ...... ... ... ...... (︀ ︀(−−112)︀)︀  ...... −− 1+2⎟⎟⎟⎠⎟⎟⎟⎟⎟⎟
⎛  ︀( 1 )︀  − 1 2 . . . . . . (︀  )︀  − +1⎞
 
where (︀  )︀ is the binomial coeficient describing the
alge
braic expansion of powers of a binomial.</p>
        <p>Now let us consider an example to illustrate the idea of
using JNF for partial evaluation.</p>
        <p>Example 3. Given a normal logic program: P4 = { ←
,  ← ,  ← ,  ← ,  ← ¬ ,  ← ¬ ,  ←
¬,  ← ¬ ,  ← ¬ ,  ← ¬ }.</p>
        <p>Standardized logic program: Π 4 = { ←  ∨ ,  ←
 ∨ ,  ← ¬  ∨ ¬,  ← ¬  ∨ ¬,  ← ¬  ∨ ¬}.</p>
        <p>There is no -rules, so we only need to consider M̂︁Π4∨ .
The matrix is not diagonalizable as (M̂︁Π4∨ ) = 0, so we
will use the JNF to compute powers of M̂︁Π4∨ . First, let us
compute the eigenvalues of  ⇑(M̂︁Π4∨ ):
     ¬ ¬ ¬
1 1
Following the algorithm described in [30], one can find the
JNF of  ⇑(M̂︁Π4∨ ) = P · J · P− 1 where:
2The algebraic multiplicity of an eigenvalue is the number of times it
appears as a root of the characteristic polynomial.
     ¬ ¬ ¬
     ¬ ¬ ¬
1
0
1
1
0
1
0</p>
        <p>0
General approach using matrix decomposition To
summarize this section, we have shown how to use
eigendecomposition and JNF to compute the powers of a matrix in
the context of PE of logic programs. A baseline step-by-step
is as follows:</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>6. Experimental Results</title>
      <p>
        We focus on evaluating the performance of the proposed
linear algebraic PE with iteration method (I) and the
matrix decomposition method (II) using the logic programs
in Failure Modes and Efects Analysis ( FMEA) benchmarks
[31] that also has been reported in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Note that we only
measure the time for partial evaluation computation (peval
for short) not including the time for solving the abduction
problem. The dataset consists of three problem sets:
Artificial samples I (166 instances), Artificial samples II
(118 instances), and FMEA samples (213 instances). All
programs in the dataset are acyclic. We also augment the
FMEA benchmarks with cycles to evaluate the performance
in the cyclic case. The augmented benchmarks are
generated by adding randomly 1-5 cycles of the length 2-5 to each
GΠ∧ and GΠ∨ of a program P. Algorithms to be compared
are: (I) in dense matrix format, (I) in sparse (Compressed
Sparse Row (CSR)) matrix format, and (II) in dense matrix
format. Our code is implemented in Python 3.7 using numpy,
scipy, and sympy for matrices representation and
computation. We set a time out of 20s for PE computation, if a
method takes longer than that, we report it as a timeout and
its execution is set to 60s for comparison. System
environment: Intel(R) Xeon(R) Bronze 3106 @1.70GHz; 64GB DDR3
@1333MHz; Ubuntu 22.04 LTS 64bit.
      </p>
      <p>Table 1 reports the statistical data of the datasets and a
detailed comparison of the execution time of the proposed
algorithms. It can be seen that (I) is the fastest on all datasets
while (II) is significantly slower. Table 2 reports the
comparison for the cyclic case. In this case, we also report the
execution time for the cycle-resolving step (resolve for
short). peval + resolve is the total run time for this case.
Augmented cycles do not change much the structure of the
dataset, so the comparison is similar to the acyclic case.</p>
      <p>The reason for (II) being slow in our benchmark is that all
program matrices in the benchmarks are not diagonalizable,
and Algorithm 3 must call sympy for JNF decomposition.
As sympy is meant for symbolic computation, it can only
handle matrices of up to 100 atoms in a reasonable time. For
program matrices of this size, according to Proposition 1,
(I) can reach a fixed point in a few iterations, and then it
dominates (II). JNF is also known to be numerically unstable
that is a small perturbation in the input matrix can lead to a
large change in the Jordan form [32]. This leads to the low
adoption of JNF in API libraries for numerical computation
that we cannot find an available one in sparse format.</p>
      <p>In general, (I) is the best choice for linear algebraic PE in
practice because it is simple, fast, and stable.</p>
    </sec>
    <sec id="sec-9">
      <title>7. Conclusion</title>
      <p>To wrap things up, we have proposed several techniques to
extend the linear algebraic PE to accommodate -rules and
cycles in logic programs. First, the matrix representation
of a standardized program Π is separated into MΠ∧ and
MΠ∨ , then PE for -rules and -rules can be handled
similarly. Next, we introduced cycle-resolving techniques
to ensure that linear algebraic PE works efectively even
with local cycles in the Π ∧ or Π ∨. Moreover, by seeing the
PE as computing the power of the matrix representation
of the program, we can further leverage eigenvalues and
eigenvectors or program matrices to perform PE in vector
spaces. To the best of our knowledge, this is the first attempt
to incorporate matrix decomposition techniques into linear
algebraic PE for LP. Although the decomposition method
does not perform really well in practice, it opens up a new
direction for future research where we focus on leveraging
eigenvalues and eigenvectors of program matrices for
reasoning with LP. It is also important to connect LP to spectral
graph theory [33] in which researchers have also studied the
connection between the eigenvalues of the adjacency matrix
of a graph and its properties. Future work also includes
investigating to extend linear algebraic PE to globally handle
both -rules and -rules in a logic program even with
global cycles.</p>
    </sec>
    <sec id="sec-10">
      <title>Acknowledgments</title>
      <p>This work has been supported by JSPS KAKENHI Grant
Number JP21H04905 and JST CREST Grant Number
JPMJCR22D3.
[30] S. H. Weintraub, Jordan canonical form: theory and
practice, Springer Nature, 2009.
[31] R. Koitz-Hristov, F. Wotawa, Faster horn diagnosis-a
performance comparison of abductive reasoning
algorithms, Applied Intelligence 50 (2020) 1558–1572.
[32] C. Moler, C. Van Loan, Nineteen dubious ways to
compute the exponential of a matrix, twenty-five years
later, SIAM review 45 (2003) 3–49.
[33] R. A. Brualdi, Spectra of digraphs, Linear Algebra and
its Applications 432 (2010) 2181–2213.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <article-title>Linear algebraic characterization of logic programs</article-title>
          ,
          <source>in: International Conference on Knowledge Science, Engineering and Management</source>
          , Springer,
          <year>2017</year>
          , pp.
          <fpage>520</fpage>
          -
          <lpage>533</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <article-title>Abducing relations in continuous spaces</article-title>
          .,
          <source>in: IJCAI</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>1956</fpage>
          -
          <lpage>1962</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Aspis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Broda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Russo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lobo</surname>
          </string-name>
          ,
          <article-title>Stable and supported semantics in continuous vector spaces</article-title>
          ,
          <source>in: Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning</source>
          , KR 2020, Rhodes, Greece,
          <year>2020</year>
          , pp.
          <fpage>59</fpage>
          -
          <lpage>68</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Takemura</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <article-title>Gradient-based supported model computation in vector spaces</article-title>
          ,
          <source>in: Logic Programming and Nonmonotonic Reasoning</source>
          , Springer International Publishing, LNAI, volume
          <volume>13416</volume>
          ,
          <year>2022</year>
          , pp.
          <fpage>336</fpage>
          -
          <lpage>349</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>M. H. van Emden</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Kowalski</surname>
          </string-name>
          ,
          <article-title>The semantics of predicate logic as a programming language</article-title>
          ,
          <source>J. ACM</source>
          <volume>23</volume>
          (
          <year>1976</year>
          )
          <fpage>733</fpage>
          -
          <lpage>742</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <article-title>Logic programming in tensor spaces</article-title>
          ,
          <source>Annals of Mathematics and Artificial Intelligence</source>
          <volume>89</volume>
          (
          <year>2021</year>
          )
          <fpage>1133</fpage>
          -
          <lpage>1153</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          , From 3
          <article-title>-valued semantics to supported model computation for logic programs in vector spaces</article-title>
          .,
          <source>in: ICAART (2)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>758</fpage>
          -
          <lpage>765</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <article-title>Algebraic connection between logic programming and machine learning</article-title>
          ,
          <source>in: Proceedings of the 17th International Symposium on Functional and Logic Programming (FLOPS</source>
          <year>2024</year>
          ), volume
          <volume>14659</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kojima</surname>
          </string-name>
          ,
          <article-title>Boolean network learning in vector spaces for genome-wide network analysis</article-title>
          .,
          <source>in: KR</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>560</fpage>
          -
          <lpage>569</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>K.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Cao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <article-title>Learning from interpretation transition using diferentiable logic programming semantics</article-title>
          ,
          <source>Machine Learning</source>
          <volume>111</volume>
          (
          <year>2022</year>
          )
          <fpage>123</fpage>
          -
          <lpage>145</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>K.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Cao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>A diferentiable firstorder rule learner for inductive logic programming</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>331</volume>
          (
          <year>2024</year>
          )
          <fpage>104108</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>H. D.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <article-title>An eficient reasoning method on logic programming using partial evaluation in vector spaces</article-title>
          ,
          <source>Journal of Logic and Computation</source>
          <volume>31</volume>
          (
          <year>2021</year>
          )
          <fpage>1298</fpage>
          -
          <lpage>1316</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>T. Q.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <article-title>Linear algebraic abduction with partial evaluation</article-title>
          ,
          <source>in: Practical Aspects of Declarative Languages: 25th International Symposium, PADL</source>
          <year>2023</year>
          , Boston, MA, USA, January
          <volume>16</volume>
          -
          <issue>17</issue>
          ,
          <year>2023</year>
          , Proceedings, Springer,
          <year>2023</year>
          , pp.
          <fpage>197</fpage>
          -
          <lpage>215</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>J. J.</given-names>
            <surname>Alferes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Leite</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Pereira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Przymusinska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. C.</given-names>
            <surname>Przymusinski</surname>
          </string-name>
          ,
          <article-title>Dynamic updates of nonmonotonic knowledge bases</article-title>
          ,
          <source>The journal of logic programming 45</source>
          (
          <year>2000</year>
          )
          <fpage>43</fpage>
          -
          <lpage>70</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>T. Q.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <article-title>On converting logic programs into matrices</article-title>
          .,
          <source>in: ICAART (2)</source>
          ,
          <year>2023</year>
          , pp.
          <fpage>405</fpage>
          -
          <lpage>415</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>T. Q.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <article-title>Enhancing linear algebraic computation of logic programs using sparse representation</article-title>
          ,
          <source>New Generation Computing</source>
          <volume>40</volume>
          (
          <year>2022</year>
          )
          <fpage>225</fpage>
          -
          <lpage>254</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>K. L. Clark</surname>
          </string-name>
          ,
          <article-title>Negation as failure, Logic and data bases (</article-title>
          <year>1978</year>
          )
          <fpage>293</fpage>
          -
          <lpage>322</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          ,
          <article-title>The stable model semantics for logic programming</article-title>
          .,
          <source>in: ICLP/SLP</source>
          , volume
          <volume>88</volume>
          ,
          <year>1988</year>
          , pp.
          <fpage>1070</fpage>
          -
          <lpage>1080</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>F.</given-names>
            <surname>Fages</surname>
          </string-name>
          ,
          <article-title>Consistency of clark's completion and existence of stable models</article-title>
          ,
          <source>Methods Log. Comput. Sci. 1</source>
          (
          <year>1994</year>
          )
          <fpage>51</fpage>
          -
          <lpage>60</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>P.</given-names>
            <surname>Ferraris</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          ,
          <article-title>A generalization of the lin-zhao theorem</article-title>
          , Ann. Math. Artif. Intell.
          <volume>47</volume>
          (
          <year>2006</year>
          )
          <fpage>79</fpage>
          -
          <lpage>101</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>E.</given-names>
            <surname>Erdem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          ,
          <article-title>Tight logic programs</article-title>
          ,
          <source>Theory Pract. Log. Program. 3</source>
          (
          <year>2003</year>
          )
          <fpage>499</fpage>
          -
          <lpage>518</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. D.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <article-title>Partial evaluation of logic programs in vector spaces</article-title>
          ,
          <source>in: International Workshop on Answer Set Programming and Other Computing Paradigms (ASPOCP</source>
          <year>2018</year>
          ), Oxford UK,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>T. Q.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <article-title>Linear algebraic computation of propositional horn abduction</article-title>
          ,
          <source>in: 2021 IEEE 33rd International Conference on Tools with Artificial Intelligence (ICTAI)</source>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>240</fpage>
          -
          <lpage>247</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>R.</given-names>
            <surname>Tarjan</surname>
          </string-name>
          ,
          <article-title>Depth-first search and linear graph algorithms</article-title>
          ,
          <source>SIAM journal on computing 1</source>
          (
          <year>1972</year>
          )
          <fpage>146</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>Y. S. U.</given-names>
            <surname>Vishkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shiloach</surname>
          </string-name>
          ,
          <article-title>An O(log n) parallel connectivity algorithm</article-title>
          ,
          <source>J. algorithms 3</source>
          (
          <year>1982</year>
          )
          <fpage>57</fpage>
          -
          <lpage>67</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Azad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Buluç</surname>
          </string-name>
          ,
          <article-title>Parallel algorithms for ifnding connected components using linear algebra</article-title>
          ,
          <source>Journal of Parallel and Distributed Computing</source>
          <volume>144</volume>
          (
          <year>2020</year>
          )
          <fpage>14</fpage>
          -
          <lpage>27</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>G.</given-names>
            <surname>Strang</surname>
          </string-name>
          ,
          <article-title>Introduction to linear algebra 4th edition</article-title>
          , SIAM,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>G.</given-names>
            <surname>Sewell</surname>
          </string-name>
          ,
          <article-title>Computational methods of linear algebra 2nd edition</article-title>
          , World Scientific Publishing Company,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>R.</given-names>
            <surname>Piziak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. L.</given-names>
            <surname>Odell</surname>
          </string-name>
          ,
          <article-title>Matrix theory: from generalized inverses to Jordan form, Chapman</article-title>
          and Hall/CRC,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>