# Application of a Logical Reasoning Approach Based Petri Net in Agriculture Expert System

Xia Geng, Yong Liang, Qiulan Wu

► To cite this version:

Xia Geng, Yong Liang, Qiulan Wu. Application of a Logical Reasoning Approach Based Petri Net in Agriculture Expert System. 7th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2013, Beijing, China. pp.326-341, 10.1007/978-3-642-54341-8_35. hal-01220844

HAL Id: hal-01220844

https://inria.hal.science/hal-01220844

Submitted on 27 Oct 2015

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Application of a Logical Reasoning Approach
Based Petri Net in Agriculture Expert System

Xia Geng<fnref n="1" />,ª, Yong Liang<fnref n="1" />,ᵇ, Qiulan Wu<fnref n="1" />,ᶜ

**Abstract.** First of all, a goal-guiding graphic reasoning approach that based on the predicate/transition system has been proposed for the first-order predicate logic. In process of reasoning, the premise is separated from the conclusion, which has been taken as the beginning of the backward reasoning that is purposeful and effective as well. Next, this reasoning approach has been applied in the agriculture expert system to present a method of solving problem, providing a new way for studying the reasoning mechanism of the agriculture expert system.

**Keywords:** first-order predicate logic, Predicate/transition system, goal guiding, graphic reasoning, backward reasoning, agriculture expert system

## 1 Introduction

Agriculture expert system in agriculture is to widely apply the accumulated knowledge and experiences of agricultural experts by using computer techniques which can overcome the limit of time and space, so as to turn these knowledge and experiences into productivity[1].

To construct a good reasoning mechanism is the basis of agriculture expert system. Reasoning means the process of searching the answers from knowledge base for the given problems when domain-specific knowledge has been stored into the base in a certain form. A reasoning process is to determine whether the given proposition is contained in the selected sets of the first-level of facts and clause rules[2-3]. In the reasoning processes of agriculture expert system there already have applied many approaches. Recent years, the expert system based Petri net and its application have become one of the research hotspots in the field of intelligent control and intelligent system[2]. Yet, it is not common that the Petri net model has been employed by agriculture expert system, and, theoretical system has not been established.

The first-order predicate logic has already enjoyed a wide application in computer science. For its safety and reliability, the practical results of some other logic theories turn out that, the applications in which these logic theories had been employed can get essential conclusions no more than the application in which only the first-order predicate logic had been employed, and can not get a better intelligent system[7].

Petri net offers a new way to study the first-order predicate logic reasoning. Not only the Petri net itself can provide an intuitive semantic frame for traditional logic

<footnote n="1">¹Institute of Information Science and Engineering, Shandong Agricultural University, Taian
Shandong 271000, China;</footnote>

<footnote>ªgx@sdau.edu.cn, ᵇyongl@sdau.edu.cn, ᶜzxylsg@sdau.edu.cn</footnote>
symbols, but also its properties can be used for the randomness of logic reasoning,
which finds a way for realizing the machine reasoning, and which increases the
chances for dealing with reasoning problems by using different and effective ways.
For the first-order predicate logic reasoning, predicate/transition system (Pr/T system)
of the high-level Petri net can be utilized to build the model. Based on the model,
researches of logic reasoning are divided into two types. ① For the set of Horn
clauses, the algorithm of computing T-invariants had been proposed[9,15-16]; four
reasoning algorithms that can support the conclusions obtained and can be
popularized to the first-order predicate logic had been proposed, through the
improved strategies of resolution refutation [17]. ② For the set of non-Horn clauses,
an efficient algorithm and the backward and forward approaches of analyzing T-
invariants had been put forward in accordance with the necessary and sufficient
condition of contradiction which is contained in the set of non-Horn clauses[18-19];
for propositional logics, the reasoning process is turned to solve the non-negative
integer solutions of linear equations of the incidence matrix, and this principle can be
applied for predicate logic[8].

However, the existing reasoning methods of the first-order predicate logic that based
on Pr/T system are equal to the traditional resolution refutation method, in which
premise and conclusion are put together to make up the reasoning. In such a way,
some heuristic information are not easily to be used for reasoning process, where a
large number of useless steps may exist and the reasoning processes are inefficient.
Therefore, this paper proposed, by borrowing ideas from the and/or resolution
refutation reasoning and based on the Pr/T system, a goal guiding graphic reasoning
approach of realizing the backward reasoning, which is applied in the agriculture
expert system.

## 2 Basic Concepts

We assume that our readers know well the knowledge of agriculture expert system,
Petri net, the first-order predicate logic and reasoning. For simplifying the description,
we just list some related concepts and terms here.

**Definition 1**[8]: Given that *D* is the nonempty finite set, and *V* is the nonempty finite symbol set.

If all of the symbols of *V* set are representatives of the elements of *D* set, then *V*
can be deemed as a variable set of *D*, and these symbols are the variables of *D*.

(1) Both the elements and variables of *D* are called the *D*-terms of *D*. If $f^{(n)}$ is an equation of *D* with *n* unknowns, and $v_1, v_2, ..., v_n$ are terms of *D*, then $f^{(n)}(v_1, v_2, ..., v_n)$ is also a term of *D*, and, no other terms exist.

(2) The *n*-ary vector $<v_1, v_2, ..., v_n>$ of which the components of terms of *D* is called the *n*-ary tuple of *D*, where $n>1$.

(3) The sum that multiple *n*-ary tuples of *D* are connected by “+” is called as the *n*-ary symbolic sum of *D*, symbolic sum for short. When *n*=0, it is called as the empty symbolic sum, which is represented with “NULL” or “<>”.

(4) The symbol “+” is commutative.
**Definition 2**[8]: Given that $\Sigma=(S,T;F,D,V,A_s,A_r,A_f,M_0)$ is the Pr/T system, which
meets the following:

(1) $(S,T;F)$ means the directed net, which is the basic net of $\Sigma$.

(2) D is the nonempty finite set which is called as the individual set of $\Sigma$, and there are operative symbols set $\Omega$ of D.

(3) V is a variable set of D.

(4) $A_s: S \to \pi$, where, $\pi$ is the dynamic predicate set of D, for $s \in S$, if $A_s(s)$ is a n-ary predicate, then s is called as the n-ary predicate.

(5) $A_r: T \to f_D$, where, $f_D$ is the formulary of D, for $t \in T$, $A_r(t)$ can contain only the static predicates and operative symbols of $\Omega$.

(6) $A_f: F \to f_S$, where, $f_S$ is the symbolic sum set of D. For a n-ary predicate $s \in S$, if $(s,t) \in F$ or $(t,s) \in F$, then $A_f(t,s)$ or $A_f(s,t)$ is the n-ary symbolic sum. For $t \in T$, free variables in formula $A_r(t)$ must be the free variables of the directed arc with the end of t.

(7) $M_0: S \to f_S$, for a n-ary predicate $s \in S$, $M_0(s)$ is the n-ary symbolic sum.

When describing a logic problem, the first-order predicates can be divided into two types: describing the premise and describing the conclusion.

In general, this paper adopts the method proposed in literature [14] to build the Pr/T system model for the first-order predicate.

**Definition 3:** Assume that *P* and *Q* are predicates that describe the premise and conclusion respectively. Given that $\Sigma_1 = (S, T; F, D, V, A_s, A_r, A_f, M_0)$ and $\Sigma_2 = (S, T; F, D, V, A_s, A_r, A_f, M_0)$ are Pr/T net systems corresponding to *P* and *Q* respectively, then $\Sigma_1$ is called as the premise Pr/T net system, or called as the premise net for short, and $\Sigma_2$ is called as the conclusion Pr/T net system, or called as the conclusion net.

**Definition 4:** Assume that $\Sigma = (S, T; F, D, V, A_s, A_r, A_f, M_0)$ is the conclusion net, then $\forall t \in T$ means the target transition.

**Definition 5:** The two-ary tuple of $N=(S,F)$ which meets the following conditions is called as Predicate-and/or graph, or called as Pre-and/or graph for short.

$$ (1) |S| \geq 2 $$

$$ (2) F \subseteq (S \times S) $$

$$ (3) \mathrm{dom}(F) \cup \mathrm{cod}(F) = S $$

where,

$$ \mathrm{dom}(F) = \{x \in S \mid \exists y \in S : (x, y) \in F\} $$

$$ \mathrm{cod}(F) = \{x \in S \mid \exists y \in S : (y, x) \in F\} $$

(4) $\forall s \in S$ represents an atomic predicate formula.

(5) $s_1, s_2, ..., s_n (n \geq 2)$ means that the relation between predicates is “or”, if and only if:

$$ \exists s \in S \text{ and } (s, s_i) \in F (i = 1, 2, ..., n) $$

(6) $s_1, s_2, ..., s_n (n \geq 2)$ means that the relation between predicates is “and”, if and only if:

$$ \exists s \in S \text{ and } (s_i, s) \in F (i = 1, 2, ..., n) $$
$(s_i, s) \in F(i=1,2,...,n)$ is connected with semicircle.

(7) If $\exists x \in S, s^*x = \emptyset$, then the node $x$ is called as the end-node.

**Definition 6:** Assume that $\Sigma = (S, T; F, D, V, A_S, A_R, A_F, M_0)$ is a Pr/T net system, and $\Sigma' = (S_1 \cup S_2, T', F', D, V, A_{S_1 \cup S_2}, A_R', A_F', M_0')$ is a two-level place Pr/T subnet of $\Sigma$, if and only if all of the following conditions are met:

(1) $S_2 = \{s_1, s_2, \dots, s_m\} \subseteq S(m \ge 0)$;

(2) $T' = \{t | t \in T, t^* = S_2\}$, and $T'$ is not null set;

(3) $S_1 = \{s | s \in S, \exists t \in T', \text{which makes } s^* = \{t\}\}$;

(4) $F' = \{(x_1, x_2) | x_1, x_2 \in S_1 \cup S_2 \cup T', (x_1, x_2) \in F\}$, for $\forall (x_1, x_2) \in F', A_F'(x_1, x_2) = A_F(x_1, x_2)$, $A_{S_1 \cup S_2} : S_1 \cup S_2 \to \pi$, where $\pi$ is a dynamic predicate set of $D$; $A_{T'} : T' \to true$, for $t \in T'$, $A_{T'}(t)$ is a static predicate, $M_0' : S' \to <>$. $S_2$ is the output place set of $\Sigma'$, and $S_1$ is the input place set of $\Sigma'$.

If $\Sigma$ itself is a two-level place Pr/T subnet, then this $\Sigma$ is called as a two-level place Pr/T net.

For example, fig.1 shows the basic net of a two-level place Pr/T net. In particular, both $S_2$ and $S_1$ in definition 7 can be null set, but because that no independent node shall exist in the net, they can not be null set at the same time. Besides, provisions (2) and (3) of definition 7 do not require $T'$ and $S_1$ to be the maximal set. Therefore, even $S_2$ has been determined, the obtained two-level place Pr/T subnet may not be the only one.

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** The basic net of a two-level place Pr/T net</figcaption></figure>

**Definition 7:** Assume that $\Sigma = (S, T; F, D, V, A_S, A_R, A_F, M_0)$ is a Pr/T net system, for $\forall t \in T$, if $t^* \neq \emptyset$, then make $t^* = \{s_1, s_2, \dots, s_m\} (m \ge 1)$; define $\{s_1(X_1), s_2(X_2), \dots, s_m(X_m)\}$ as the output predicate set of the transition $t$ (where, $X_i(i=1,2,\dots,m)$ is a term of $A_F(t, s_i)$). Similarly, if $t^* \neq \emptyset$, then make $t^* = \{s'_1, s'_2, \dots, s'_n\} (n \ge 1)$; define $\{s'_1(Y_1), s'_2(Y_2), \dots, s'_n(Y_n)\}$ as the input predicate set of the transition $t$ (where, $Y_i(i=1,2,\dots,n)$ is a term of $A_F(s'_i, t)$). Elements of input/output predicate set are called the input/output predicate of transition $t$.

**Definition 8:** Assume that $\Sigma = (S_1 \cup S_2, T; F, D, V, A_S, A_R, A_F, M_0)$ is a two-level place Pr/T subnet, where, $S_1$ is the input predicate set of $\Sigma$ and $S_2$ is the output predicate set. For any atomic predicate formula set, $P = \{P_1(X_1), P_2(X_2), \dots, P_n(X_n)\}$, the formula
set is successfully matched with the two-level place Pr/T subnet $\Sigma$, if and only if both
of the following conditions are met:

(1) The place set corresponding to the set $P$ meets $\{P_1, P_2, \cdots, P_n\} = S_2$;

(2) Exist a replacement $\theta$, which makes

$$
\forall t \in T, X_i \theta = A_F(t, P_i) \theta (i = 1, 2, \dots, n).
$$

For the purposes of simplifying discussion, we assume that:

(1) In definition 8, predicate symbols of the predicate formula set $P$ are different;

(2) Each directed edge of the Pr/T net system has a *n*(*n* ≥ 1) -try tuple, and no symbolic sum forms that consist of *m*(*m* ≥ 2) *n*-try tuples.

3 Pre-and/or Graph Description of the Pr/T Net System

Assume that $\Sigma$ is a two-level place Pr/T net which contains $r(r \ge 1)$ transitions.
According to the definition of the two-level place Pr/T net, $\Sigma$ can be shared
composition of $r$ two-level place Pr/T nets, each of which contains only one
transition[22].

3.1 Pre-and/or Graph of the Two-level Place Pr/T Net System Which Contains Only One Transition

The ratio of the numbers of transition's input place and output place is represented by
*m*: *n*(*m*, *n* ≥ 0). According to the different value of *m*: *n*, the discussion can be
divided into the following:

(1) 1: *n*(*n* ≥ 1), as shown in fig.2(a), and its Pre-and/or graph is shown in fig.2(b).

<figure><img src="image_3.png" /><figcaption>Fig. 2. 1: *n*(*n* ≥ 1) and its Pre-and/or graph</figcaption></figure>

(2) For 0: *n*(*n* ≥ 1), its Pre-and/or graph is similar to the fig.2(b), only that the atomic predicate formula *A*(*X*<sub>*A*</sub>) is replaced by "NULL".

(3) *m*:1(*m*≥2), as shown in fig.3(a), and its Pre-and/or graph is shown in fig.3(b).

<figure><img src="image_4.png" /></figure>
(a) $m:1(m \ge 2)$ (b) Pre-and/or graph corresponding to fig. (a)

<caption>Fig. 3. $m:1(m \ge 2)$ and its Pre-and/or graph</caption>

(4) For $m:0(m \ge 1)$, its Pre-and/or graph is similar to the fig.3(b), only that the atomic predicate formula $B(X_B)$ is replaced by "NULL".

(5) $m:n(m,n \ge 2)$, as shown in fig.4(a), and its Pre-and/or graph is shown in fig.4(b).

<figure><img src="image_5.png" /><figcaption>Fig. 4. $m:n(m,n \ge 2)$ and its Pre-and/or graph</figcaption></figure>

## 3.2 Pre-and/or Graph of the Two-level Place Pr/T Net

**Theorem 1:** Given that $\Sigma$ is a two-level place Pr/T net which contains $r(r \ge 1)$ transitions, and its Pre-and/or graph can be shared composition of the five Pre-and/or graphs described in section 3.1.

**Proof of theorem 1:** (1) when $r=1$, then the conclusion is always true.

(2) when $r > 1$, we need to prove the following three situations according to the total number ($n$) of the output places of $\Sigma$ and definition 7.

1) When $n=1$, as shown in fig.5, where, $P_i(i=1,2,\dots,r)$ is the output place set for $t_i$, and $|P_i| \ge 0$ (explanation for $P_i$ is the same hereinafter). The graph of fig.5 can be made up with $r$ subgraphs that shown in fig.6.

<figure><img src="image_6.png" /><figcaption>Fig. 5. $n=1$</figcaption></figure>
<figure><img src="image_7.png" /><figcaption>**Fig. 6.** A subgraph of fig. 5</figcaption></figure>

According to different $|P_i|$, the Pre-and/or graph of fig. 5 can be composed by Pre-and/or graphs described in conditions (1), (2) or (3) of section 3.1.

2) When $n > 1$ as shown in fig. 7, which can be composed by $r$ subgraphs that shown in fig. 8.

<figure><img src="image_8.png" /><figcaption>**Fig. 7.** $n > 1$</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>**Fig. 8.** A subgraph of fig. 7</figcaption></figure>

According to different $|P_i|$, the Pre-and/or graph of fig. 7 can be composed by Pre-and/or graphs described in conditions (1), (2) or (5) of section 3.1.

3) When $n = 0$, as shown in fig. 7 (where $|P_i| > 0$), which can be composed by $r$ subgraphs that shown in fig. 10.
<figure><img src="image_10.png" /><figcaption>Fig. 9. $n=0$</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 10. A subgraph of fig.9</figcaption></figure>

The Pre-and/or graph of fig. 9 can be composed by $r$ Pre-and/or graphs described in conditions (4) of section 3.1.

From the above, we know that theorem 1 is true. (over)

When $r > 1$, the output place $B$ of transition or $\{B_1, B_2, \cdots, B_n\}$ will appear $r$ times in the Pre-and/or graph in conditions 1) and 2). In this paper, we regulate that in the reasoning process by referring to the Pre-and/or graph, only one (set) output place inherits the “and” or “or” relations of the original Pre-and/or graph, and these relations should be drawn up in the graph. For the rest $r-1$ (set) output places, although they also inherit the original “and” or “or” relations, they do not need to be drawn up for conciseness of the graph.

# 4 Graphic Reasoning of the First-order Predicate Logic

## 4.1 The Goal Guiding Graphic Reasoning Approach of the First-order Predicate Logic

We assume that the general form of the first-order predicate logic that needed to be proved is: $P: A_1, A_2, \cdots, A_m \to B$, in which, both the premise $A_i(i=1,2,\cdots,m)$ and conclusion $B$ are the first-order predicate formulas, and $B$ should be represented by prenex normal form without universal quantifiers. Specific steps of the goal guiding graphic reasoning approach of the first-order predicate logic are shown as follows:

**Step1** Build the Pr/T net systems for $A_1, A_2, \cdots, A_m$, respectively, and merge the same places to obtain the premise net, which is assumed to be $\Sigma_1 = (S_1, T_1; F_1, D, V, A_{s1}, A_{r1}, A_{F1}, M_{01})$. Build the Pr/T net systems for predicate formulas which are after the quantifiers of $B$ to obtain the conclusion net, which is assumed to be $\Sigma_2 = (S_2, T_2; F_2, D, V, A_{s2}, A_{r2}, A_{F2}, M_{02})$ [14]. Rename some variables to so that the same variables will not appear on the input/output arcs of different transitions;
**Step2** For each target transition $t_i$ ($i=1$ to $|T_2|$), initialize the corresponding Pre-and/or graph $G_i$ ($i=1, 2, \dots, |T_2|$) to be null;

**Step3** for ($i=1$ to $|T_2|$):

**Step3.1**

(1) If the output predicates of $t_i$ belong to a non-null set, then we assume the predicate set to be $Q_i = \{P_1(X_1), P_2(X_2), \dots, P_n(X_n)\} (n \ge 1)$, and these $n$ atomic predicate formulas, which are taken as the beginning of the reasoning, are represented by $n$ end-nodes of $G_i$. If $t \in T_i$ and $t^* = \emptyset$, then another end-node marked with "NULL" should be added to $G_i$, which is also the beginning of reasoning;

(2) If the output predicates of the target transition $t_i$ belong to a null set, then only one end-node that marked with "NULL" should be established as the beginning of reasoning;

**Step3.2**

If (any subset of $Q_i$ can not successfully match with any two-level place Pr/T subne in the premise net $\Sigma_i$), we consider that $B$ is not an effective conclusion of $A_1, A_2, \dots, A_m$, then goes to Step 5.

else:

While (a subset of $Q_i$ is successfully matched with a certain two-level place Pr/T subnet $\Sigma'_i$ in the premise net $\Sigma_i$), do:

**Step3.2.1** Add the Pre-and/or graph of $\Sigma'_i$ into $G_i$ (if a node is involved in $n(n \ge 2)$ times of successful matching processes, then copy it for $n$ times in $G_i$ to make the Pre-and/or graphs adding into $G_i$ independent with each other);

**Step3.2.2** Obtain a new set of end-nodes;

**Step3.2.3** If the atomic predicate formula of an end-node is the input predicate of the target transition $t_i$ after replacement, then this end-node is marked as "terminational node";

**Step3.2.4** Given that $Q_i$ is the atomic predicate formula set of non-terminational end-nodes.

}

};

**Step3.3**

If there is in $G_i$ a subgraph $G'_i$, which meets:

(1) the atomic predicate formula set of the output predicate set of the target transition $t_i$ is equal to that of the reasoning beginnings of $G'_i$;

(2) the atomic predicate formula set of all the "terminational nodes" in subgraphs is equal to the input predicate set of the target transition $t_i$ after a certain replacement. then, it proves that the reasoning of the target transition $t_i$ is successful. Otherwise, the reasoning is unsuccessful, which proves that $B$ is not an effective conclusion of $A_1, A_2, \dots, A_m$, then goes to step 5.

};
**Step4** If the reasoning of each target transition $t_i(i=1,2,\cdots,|T_2|)$ is successful, and replacements in reasoning process are coincident, then it proves that B is an effective conclusion of $A_1, A_2, \cdots, A_m$, else, it is not an effective conclusion.

**Step5** End the reasoning.

In the above-mentioned approach, if the atomic predicate formula which is added to the Pre-and/or graph $G_i(i=1,2,\cdots,|T_2|)$ is equal to an existing atomic predicate formula of $G_i$ after replacement, then the merging should be made under the condition that no new end-node is added to $G_i$. When making merging, the following should be met:

(1) If both nodes are marked as the “terminational nodes”, then these two nodes needed to be merged, otherwise not;

(2) In order to keep the original reasoning relations, the two nodes are not really merged into one node, but connected through a dotted line.

Step 1 regulates that the same variable shall not appear on the input/output arc of different transitions in $\Sigma_1$ and $\Sigma_2$. Therefore, if a replacement exists in Step 3.3, then it must be consistent with the replacement in Step 3.2.3. It can be known from section 3.1 that, when Pre-and/or graph $G_i(i=1,2,\cdots,|T_2|)$ has $n(n \ge 2)$ “terminational nodes”, then there are $n$ terminational nodes that represent the “and” relation between predicates,and there are directed path from these “terminational nodes” to the beginning of reasoning. Thus, for the target transition $t_i$, we assume its input predicate set to be $I_i = \{P_1(X_1), P_2(X_2), \cdots, P_n(X_n)\}(n \ge 0)$, and output predicate set to be $O_i = \{Q_1(X_1), Q_2(X_2), \cdots, Q_m(X_m)\}(m \ge 1)$. When the two conditions in Step 3.3 are met, then the following proposition is true:

$P_1(X_1) \wedge P_2(X_2) \wedge \cdots \wedge P_n(X_n) \rightarrow Q_1(X_1) \vee Q_2(X_2) \vee \cdots \vee Q_m(X_m)$, i.e. the reasoning of the target transition $t_i$ is successful, and Step 3.3 is correct. For other steps, it is obvious that they are effective and reasonable. Hence, for the first-order predicate logic, the proposed goal-guiding graphic reasoning approach is also effective and reasonable.

## 4.2 Application Example

**Example:**

if $\forall x(C(x) \rightarrow W(x) \wedge R(x)) \wedge \exists x(C(x) \wedge Q(x))$,
prove that $\exists x(Q(x) \wedge R(x))$.

**Proof of the example:** According to literature [14] and Step1 of the goal-guiding graphic reasoning approach, we get the premise and conclusion nets, as shown in fig.11(a) and 11(b), respectively. The reasoning process of the target transitions $t_1'$ and $t_2'$ is shown in fig.11(c) from the top to bottom. Because the two conditions in Step3.3 of the goal-guiding graphic reasoning approach are satisfied, the reasoning of $t_1'$ and $t_2'$ can be considered to be successful, and replacements in the reasoning process are consistent, thus the conclusion is true.
<figure><img src="image_12.png" /><figcaption>(b) Conclusion net (c) Reasoning process of the target transitions $t_1'$ and $t_2'$</figcaption></figure>

<caption>**Fig. 11.** Premise and conclusion nets and the reasoning processes</caption>

In fig.11(c), a dotted line represents a predicate formula of the premise net which is obtained by replacing the predicate formula of the corresponding node. In essence, the two nodes connected by the dotted line represent one node.

# 5 Application of the Goal-guiding Graphic Reasoning Approach in Agriculture Expert System

At present, production rule has become a knowledge representation mode which enjoys the most artificial intelligent application, and which has been employed in many successful expert systems to represent knowledge[2]. In this paper, we assume that the agriculture expert system use the production rule representation. for instance:

IF wz= suburbs, and nyhxptr=large

THEN it means a large quantity of carbon emission per unit area

The goal-guiding graphic reasoning approach can not only prove the already known results, but also solve questions in agriculture expert system. Specific steps as follows:

**Step1** Build proper predicate formulas for production rules of the knowledge base and conclusions to be solved;

**Step2** According to literature [14] and Step1 of the goal-guiding graphic reasoning approach, build the Pr/T net model for production rules of the knowledge base and conclusions to be solved, to get the premise net $\Sigma_1$ and the conclusion net $\Sigma_2$;

**Step3** Do Step2-Step4 of the goal-guiding graphic reasoning approach;

**Step4** If the question that need to be solved is an effective conclusion, then the value of the variable in $\Sigma_1$ that obtained by replacing in the reasoning process is just
the answer of the question; if the question is not an effective conclusion, then there is no answer for the question.

**Example** Take the judgment of several common pest and disease damages during the cotton seedling period. In such an agriculture expert system knowledge base, the production rule representation of syndromes and diseases is described as follows[20]: Diseases during the cotton seedling period:

IF systemic and cotyledon foliage and appear one of syndromes of yellow net, purple plague, ralstonia solanacearum and yellows.

THEN the cotton would be withered.

IF local and cotyledon foliage and appear water-soaked dots or small spots and turbid juice when wiped on the glass.

THEN it shows the angular.

IF local and cotyledon foliage and appear pyorrhea or incrustation on the extended scab.

THEN it shows the angular.

IF local and rhizome and appear tawny and annular constriction.

THEN it shows the seedling blight.

IF local and root and appear arachnoid tomentum with soil particles but not the cotton fiber.

THEN it shows the seedling blight.

IF local and rhizome and burst of long-thin spindle-shaped fibers.

THEN it shows the anthracnose.

IF local and cotyledon foliage and appear small dots with ashen in the center and dull-red in outer area.

THEN it shows the anthracnose.

IF local and rhizome and appear dark brown long round spot and constriction.

THEN it shows the redroot.

Here we do not list the diseases during cotton budding, blossing and boll opening periods.

Table 1 lists the relations between the predicates and syndromes, in which x represents a disease.

<table><caption>**Table 1.** Relations between the predicates and syndromes</caption><thead><tr><th>Predicate</th><th>Syndrome</th><th>Predicate</th><th>Syndrome</th></tr></thead><tbody><tr><td>Q1(x)</td><td>Systemic</td><td>P4(x)</td><td>pyorrhea or incrustation on the extended scab</td></tr><tr><td>Q2(x)</td><td>Local</td><td></td><td></td></tr><tr><td>Q3(x)</td><td>Rhizome</td><td>P5(x)</td><td>tawny</td></tr><tr><td>Q4(x)</td><td>cotyledon foliage</td><td>P6(x)</td><td>annular constriction</td></tr><tr><td>Q5(x)</td><td>root</td><td>P7(x)</td><td>arachnoid tomentum with soil particles</td></tr><tr><td>Q6(x)</td><td>seeding period</td><td></td><td></td></tr><tr><td>Q7(x)</td><td>budding period</td><td>P8(x)</td><td>cotton fiber</td></tr><tr><td>Q8(x)</td><td>blossing period</td><td>P9(x)</td><td>burst of long-thin spindle-shaped fibers</td></tr><tr><td>Q9(x)</td><td>Boll-opening period</td><td></td><td></td></tr><tr><td>P1(x)</td><td>yellow net, purple plague, ralstonia solanacearum and yellows</td><td>P10(x)</td><td>small dots with ashen in the center and dull-red in outer area</td></tr><tr><td>P2(x)</td><td>water-soaked dots or small spots</td><td>P11(x)</td><td>dark brown long round spot</td></tr><tr><td></td><td></td><td>P12(x)</td><td>constriction</td></tr></tbody></table>
<table><thead><tr><th>Predicate</th><th>Syndrome</th><th>Predicate</th><th>Syndrome</th></tr></thead><tbody><tr><td rowspan="3">P3(x)</td><td rowspan="3">turbid juice when wiped on the glass</td><td>R(x,A1)</td><td>x is blight</td></tr><tr><td>R(x,A2)</td><td>x is anthracnose</td></tr><tr><td>R(x,A3)</td><td>x is red rot</td></tr></tbody></table>

Given: during the seeding period, some rhizomes appear burst of long-thin spindle-shaped fibers, and the disease is not systemic but local, question: what is the conclusion?

Step1: Build corresponding predicate formulas for production rule representation of the knowledge base, here lists parts of them:

$$Q_6(x) \wedge Q_2(x) \wedge Q_3(x) \wedge P_9(x) \rightarrow R(x, A2)$$

$$Q_6(x) \wedge Q_2(x) \wedge Q_4(x) \wedge P_{10}(x) \rightarrow R(x, A2)$$

$$Q_6(x) \wedge Q_2(x) \wedge Q_3(x) \wedge P_5(x) \wedge P_6(x) \rightarrow R(x, A1)$$

Build predicate formulas for the conclusion that needs to be solved:

$Q_6(x) \wedge Q_2(x) \wedge Q_3(x) \wedge P_9(x) \rightarrow R(x, y)$, where, $R(x, y)$ represents that the disease x is y.

Step2: Part of the Pr/T net $\Sigma_1$ of corresponding production rules is shown in fig.12(a), and Pr/T net $\Sigma_2$ of the conclusion is shown in fig.12(b).

Step3: The reasoning process is shown in fig.12(c), from which we know that the question that needs to be solved is an effective conclusion.

<figure><img src="image_13.png" /><figcaption>Fig. 12. Premise and conclusion nets and the reasoning processes</figcaption></figure>
Step4: In the reasoning process, replacement A2/y had been used, which indicates that A2 is the answer of this question, namely, anthracnose is the conclusion.

# 6 Conclusions

In this paper, for the first-order predicate logic, a goal guiding graphic reasoning approach that based on the predicate/transition system has been proposed, and the approach has been applied in the reasoning process of agriculture expert system. Compared to other previous work, the paper has the following significance and innovation:

(1) The reasoning process of the approach proposed in this paper is started with the conclusion, so the approach is purposeful and effective with reducing many useless steps.

(2) For the approach in this paper, in process of reasoning, the premise is separated from the conclusion, avoiding the disadvantage that the causal relationship will be covered by traditional reasoning methods, therefore in this approach, the knowledge is highly readable and some heuristic information can be used in the reasoning process.

(3) When agriculture knowledge has been stored into the base in the form of the production rule, the proposed approach can be used to answer questions of the agriculture expert system, which provides a new way for studying the reasoning mechanism of the agriculture expert system.

# Acknowledgment

This research was funded by the National High Technology Research and Development Program of China (863 Program) under Grant 2013AA102301.

# References

1. Zhou Hui. The development of expert system and its application in the agriculture[J]. Southwest China Journal of Agricultural Science, 2003, 16(3):117-121.

2. Liang Ji. Study and Realization on Chemical HAZOP Expert System Based on Petri Net Modeling[D]. Beijing: Beijing University of Chemical Technology, 2007.

3. Zhao Linfeng. Citrus Cultivation and Management Expert System for Construction and Implementation[D]. Changsha, Hunan: Hunan Agricultural University, 2008.

4. Huang Lihua, Chen Liping, Wang Yanjun. Study on knowledge and model combination of agriculture expert system tool[J]. Journal of Hebei agricultural university, 2003, 26(3):93-96.

5. Li Hailong, Jiao Yansheng. Technologies for developing the national 853 IAES[J]. Sci/Tech Information Development & Economy, 2005, 15(18), 236-238.
6. Jiang Wenke, Chen Liping, Zhang Mei.Generating tools of agricultural expert system based on knowledge and the mathematical model[J]. Computer and Agriculture, 2000, (2):4-8.

7. Zhang Yuping. Deduction property of some logics applied to computer science[J]. Chinese Journal of Computers, 1999,22(6):571-576.

8. Yuan Chongyi. Petri Nets Theory and Application[M]. Beijing: Electronic Industry Press, 2005.

9. Peterka G, Murata T.Proof procedure and answer extraction in Petri net model of logic programs[J].IEEE Transactions on Software Engineering, 1989,15(2):209-217.

10. Murata, T., Zhang, D. A Predicate-transition net model for parallel interpretation of logic programs[J].IEEE Transactions on Software Engineering, 1988,14(4):481-497.

11. Lin Chuang, Wu Jianping. Logical inference of clauses in Petri net models using fixpoint[J].Journal of Software, 1999,10(4):359-365.

12. Fang Huan, Wu Zhehui, Cui Huanqing. Method extraction based on reachability tree of Pr/T net for Horn clauses set[J].Journal of System Simulation, 2005, vol.17. Supplement (1):163-165.

13. Fang Huan, Yin Yulan, Xu Yuyin. First-order predicate logic proposition proved by using Predicate/transition net[J].Computer Engineering, 2006,32(23):191-198.

14. Geng Xia, Wu Zhehui, Zhang Jijun. Modeling of first-order predicate expression by using Predicate/transition system[J].Journal of System Simulation, 2007, vol.19. Supplement (1):9-15.

15. Lin Chuang, Chandhury A, Whinston A B et al. Logical inference of Horn clauses in Petri net models[J].IEEE Transactions Knowledge and Data Engineering, 1993, 5(3):416-425.

16. Lin Chuang. Application of Petri nets to logical inference of Horn clauses[J]. Journal of Software, 1993,4(4):32-37.

17. Zhou Yi, Wu Shilin. New methods of logic inference of Petri net based on resolution refutation[J]. Journal of Computer, 1997,20(3):213-222.

18. Lin Chuang, Chanson S T and Murata T. Petri net models and efficient T-invariant analysis for logical inference of clauses[J].1996 IEEE International Conference on Systems, Man and Cybernetics, Beijing, China, October 14-17, 1996, pp. 3174-3179.

19. Lin Chuang, Wang Dingxing. Logical inference of clauses using T-invariant of Petri nets[J].Journal of Computer, 1996,19(10):762-767.

20. Liu Qiuhong, Jiao Renpu, Zhang Yu et al. Discussion on the agricultural expert system based on the production rule and principle attributed[J].Journal of Anhui Agricultural Sciences, 2008,36(10):4307-4309.

21. Zuo Xiaoling, Li Weijian, Liu Yongcai. Discrete Mathematics[M]. Shanghai: Shanghai Scientific and Technical Publishers, 1982,2-79.

22. Jiang Changjun. Dynamic invariance of Petri net[J]. Science in China (series E), 1997,27(5):567-573.

23. Murata T, Subrabmanian V S, Wakayama T. A Petri net model for reasoning in the presence of inconsistency[J]. IEEE Trans on Knowledge and Data Engineering, 1991,3(3):281-292.