I Introduction
A plant is operated on the basis of its manual usually; however, it is not realistic that a manual contains instructions for all cases, especially regarding abnormal ones.
For obtaining appropriate operation procedures for a wide variety of cases, multilevel flow modeling (MFM) has been studied ([1, 2, 3]). MFM is a functional modeling framework, in which a plant structure is expressed as a directed graph. The framework also has a set of influence propagation rules, which consists of ifthen rules regarding the states of related components. If the state of a component has changed, the resulting state of the other components can be obtained by applying the rules in the forward direction. Conversely, given a desired state of a component, we can obtain the states of other components to be satisfied for achieving the desired state by tracing back the propagation rules. This leads an action to a desired state.
Our contributions are as follows:

We propose a method to translate MFM into an FOL. This enables the application of techniques used in the FOL to MFM, such as inference engines and abductive reasoners [6].

Our method also enables MFM to employ planning techniques using abductive reasoners. We give an example to illustrate that the planner can solve a planning task of a toy plant by using the translated MFM. Moreover, since the FOL can express the preconditions for an action, operation procedures consisting of more than one action can automatically be derived, as is illustrated in Section V.
Ii Preliminaries
Before describing our method for translating MFM into an FOL, let us recall what MFM is. Multilevel flow modeling （MFM） is a functional modeling framework. It models a plant as an augmented directed graph, whose vertices and edges are labelled with their function types and relation types, respectively. Such a model is called an MFM model [3].
The example below illustrates the idea of MFM (Fig. 1).^{1}^{1}1For further details of MFM, refer to [3]. The structure in the left figure depicts a pipe connected to a faucet. In MFM, this structure is modeled as the graph in the right figure. Normal font and are used to represent actual structures and MFM models, respectively.
Here, and are the names of the vertices, which represent the faucet and the pipe in the left figure. They are labelled with and , which indicate the function types of source and transport (of water), respectively (see also Fig. 2 for all MFM symbols). The arrow in the diamond expresses the direction of the flow (of water). A state assigned to a vertex indicates the degree to which the component corresponding to the vertex satisfies the function corresponding to the function type. For example, to a vertex, one of is assigned; to the vertex, one of is assigned.^{2}^{2}2Although and may not be conventional, they are useful when giving an example of a procedure consisting of two consecutive actions in Section V. (We often abbreviate “ ” or “” and simply say .)
The arrow labelling the edge in the graph means that the state of affects that of , as the inflow of the faucet affects the flow of the pipe. The effect of a vertex on the related vertex are predetermined as an influence propagation rule. Fig. 3 shows the rules for the structure in Fig. 1. A rule consists of three parts: a pattern, a cause and an effect (or effects when more than two vertices are involved). Note that a rule, especially its pattern, is applicable regardless of the names of the vertices in the structure and therefore the names of vertices in the pattern are “variables” in this sense.
Given the state of a vertex, by tracing the influence propagation rules sequentially, the states of other vertices can be inferred; conversely, by tracing back the rules, the states of other vertices that lead to the given state of the vertex can be obtained. The study [1] uses this method to plan a plant operation action for a given target state of a vertex.
Iii The Target Language: FOL
The language which we use as the target language of our translation is a firstorder language (FOL).^{3}^{3}3The general definitions of firstorder language and firstorder logic are not given here. Refer to [4] and[5] for them. One of the advantageous aspects of an FOL is its expressivity. For example, an action and its preconditions can be expressed in the proposed language, as we see in Section V.
Our language is defined in three stages: its terms; its atomic formulae; and its formulae.
A term is a constant or a variable. Constants are “names in FOL” such as and , which indicate the vertices whose names are and ( is used to represent FOL). Variables are like and , etc. They can be substituted with constants. We capitalise the first letter of a constant and use a lowercase letter for a variable.
An atomic formula is given as , where , is a predicate symbol and () are terms. The predicate symbols we use are the following:

for each function type, .
means that vertex is labelled . For function, for example, means vertex is labelled . 
for each relation type, .
means that the edge from to is labelled . Thus, means that the edge from to is labelled . 
.
The meaning of is that flow is going from to ; for example, means that the flow is going from to . 
.
mean that vertex has the state , so is written to indicate that the state of is . This predicate symbol is an analogue to in event calculus[8].
The formulae are inductively constructed from atomic formulae by (conjunction), (disjunction), (negation), and (implication).^{4}^{4}4The language does not use quantifiers, but we consider all variables in a formula are universally quantified. Thus, the followings are formulae:
;
.
Iv Translation of MFM into FOL
An MFM model and the influence propagation rules can be translated into the language we have defined above.
Iva MFM models
Given an MFM model, we translate its vertices and its edges, separately. For each vertex :

if the vertex is labelled with ,

if the vertex has state .
For each edge from to :

if the edge is labelled with ,

if the flow is from to .
Fig. 1 illustrates this translation.
IvB Influence propagation rules
As mentioned above, a rule is composed of three parts: a pattern, a cause and an effect. A pattern, , can be considered as an MFM model without states. Therefore, we translate it in a similar manner to the above and obtained (the conjunction of) the resulting formulae, . Note that, in an influence propagation rule, the pattern can be considered as a precondition. The rest of the rules are its cause and its effect. Their meaning can be written in the form that the state of vertex causes the state of vertex . This is translated into
Here, and are variable and thus can be substituted with constants such as and (see also Section V). Combining these two, we obtain the translation of the propagation rule:
For example, the rule that of implies of in Fig. 3 is translated as follows:
where is the pattern and is
V Application: Planning
Having introduced the translation of MFM into FOL, we can use techniques based on firstorder logic, such as logical inference engines and abductive reasoners. We here take the latter and illustrate that the translated MFM in FOL can be used to plan a plant operation procedure.
Abductive reasoning is logical reasoning which uses ifthen (i.e. implication) rules in the reverse direction to obtain plausible hypotheses. Abduction is known to be applicable to solve a planning task [7]. As mentioned before, our method can automatically derive a procedure which consists of more than one action, because our language is expressive enough to describe actions and their preconditions.
Va Example 1: single action
Let us consider Fig. 1 and suppose that the faucet is closed and, thus, there is no water flow in the pipe. This is translated as in Fig. 4. In addition, we also suppose that the faucet can be opened, which can also be written in our FOL as follows:
In this setting, we consider a planning task to change the current state to the target state . A correct plan is opening the faucet, which can be derived automatically.
Figure 5 shows the planned procedure and inference rules used during the planning: each vertex represents an atomic formula; and each hyper edge (i.e. a forkshaped “edge” in the figure between two sets of vertices) represents an implication. Note that the direction of an arrow is reversed, since this planning method employs abduction. The planning task is solved backwards from the target state . (1) We first consider the following instance of an influence propagation rule with and :
.
Since the plant structure part, i.e. the first four literals, is already satisfied, it is enough to obtain to achieve . (2) We then consider the rule given above for action . Applying this rule in the reverse direction, we see that, to achieve , an action of on the state suffices. (3) This state is the current state and thus already satisfied.
As described above, we obtain the procedure consisting of an action , which is a correct answer as we mentioned.
VB Example 2: multiple actions
Next, a condition is imposed upon the setting above: the faucet can be opened only when it is closed. More precisely, we consider the following two actions:
;
Again, the target state is that the flow in the pipe be high, , while the current state is that the faucet is halfopen; thus, the flow in the pipe is low: . A correct plan is to closed the faucet completely at first, and then fully open it. This can be derived in a similar way to the above, and Fig. 6 shows the result of automatic planning.
Vi Summary and Future Work
In this paper, we proposed a method for translating MFM into FOL (Section IV) and a method for planning plant operation procedures and an application of translated MFM (Section V). We saw that, by following our method, plans consisting of not only one action but also multiple actions can be derived automatically (Section V).
We shall address the following issues in future work:

Introduction of the concept of time. A procedure planned by our proposed method is not a set of formulae but a graph. Therefore, we cannot apply logical techniques to plans. An approach to tackle this problem is to introduce the concept of time to our model and modify the planning method to describe the partial order of actions, which is currently represented as a graph, explicitly as formulae.

Translation from P&ID into FOL. Pipe and instrument diagram (P&ID) is a widelyused plant representation framework. If a given plant structure represented in P&ID can automatically be translated into FOL via MFM, then the automated plant operation planning technique given in this paper will be applicable at low cost.
Acknowledgment
The authors sincerely appreciate Professor Akio Gofuku for his comments and advice on the research.
References
 [1] A. Gofuku, T. Inoue, and T. Sugihara, “A technique to generate plausible counteroperation procedures for an emergency situation based on a model expressing functions of components”, Journal of Nuclear Science and Technology, vol. 54 (5), pp. 578–58, 2017.
 [2] A. Gofuku, “Counter Action Procedure Generation in an Emergency Situation of Nuclear Power Plants”, Journal of Physics: Conference Series, vol. 962. no. 1. IOP Publishing, 2018.
 [3] M. Lind, “An introduction to multilevel flow modeling”, International Electronic Journal of Nuclear Safety and Simulation, vol. 2, no. 1, pp. 22–32, 2011.
 [4] J.R. Shoenfield, Mathematical logic, Republication, AK Peters Association for Symbolic Logic, 2001.
 [5] H.B. Enderton, A mathematical introduction to logic, Academic press, 2001.
 [6] J.R. Hobbss, M.E. Stickel, D.E. Appelt and P. Martin, Paul, ”Interpretation as abduction”, Artificial intelligence, vol. 63, (1)(2) pp. 69142, 1993.

[7]
M. Shanahan, “An abductive event calculus planner”,
The Journal of Logic Programming
, vol 44 (1)(3) pp. 207240, 2000  [8] E.T. Mueller, Commonsense reasoning: an event calculus based approach, Morgan Kaufmann, 2014.
Comments
There are no comments yet.