# A Composition Method to Model Collective Behavior

Junsup Song, Moonkun Lee

► To cite this version:

Junsup Song, Moonkun Lee. A Composition Method to Model Collective Behavior. 11th IFIP Working Conference on The Practice of Enterprise Modeling (PoEM), Oct 2018, Vienna, Austria. pp.121-137, 10.1007/978-3-030-02302-7_8. hal-02156460

HAL Id: hal-02156460

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

Submitted on 14 Jun 2019

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
# A Composition Method to Model Collective Behavior

Junsup Song, Moonkun Lee

Chonbuk National University
567 Beakje-dearo Deokjin-gu
Jeonju-si Jeonbuk 54896, Republic of Korea
e-mail:moonkun@jbnu.ac.kr

**Abstract.** It is very important to understand system *behaviors* in collective pattern for each knowledge domain. However, there are structural limitations to represent collective behaviors due to the size of system components and the complexity of their interactions, causing the state explosion problem. Further composition with other systems is mostly impractical due to exponential growth of their size and complexity. This paper presents an abstraction method to model the collective behaviors, based on a new concept of domain engineering: *behavior ontology*. Firstly, the ontology defines each collective behavior of a system from *active ontology*. Secondly, the behaviors are formed in a quantifiably abstract lattice, called *n:2-Lattice*. Thirdly, a lattice can be composed with other lattices based on quantifiably common elements. The composition can be interpreted as behavioral composition, and can reduce all the unnecessary composition not related to the behaviors in the lattices. In order to demonstrate the feasibility of the method, two examples, Emergency Medical Service and Health Care Service systems, are selected and implemented on a Behavior Ontology tool, called PRISM, which has been developed on ADOxx Meta-Modelling Platform.

**Keywords:** Collective Behavior; Behavior Ontology; n:2-Lattice; Domain Engineering; PRISM; ADOxx

## 1 Introduction

There are strong needs to represent system *behaviors* for each knowledge domain in some collective patterns. However, the needs cannot be easily satisfied due to the structural limitations caused by the considerable size of system components and the complexity of their interactions, generally known as *state explosion problem* [1]. Further composition with other systems seems to be impractical due to exponential growth of such explosion caused by their size and complexity [2].

In order to overcome these limitations, this paper presents an abstraction method to model the collective behaviors of systems, based on a new concept of domain engineering: *behavior ontology* [3]. The previous researches have been reported in the literatures [3]. However, the present research in this paper extended the previous researches with other domains and further made composition of the system behaviors possible so that composite collective system behaviors can be constructed for larger and more complex domains. The approach is shown in Fig. 1, as follows:
1) Firstly, a class hierarchy of a domain is constructed based on active ontology, where all the actors of a domain and their interactions are defined as classes.

2) Secondly, each collective behavior of the domain is defined in *regular expression* [4], where each behavior is defined as a sequence of interactions among actors. The behaviors will be presented in a hierarchical order based on their inclusion relations, forming a special lattice, called *n:2-Lattice* [5].

3) Thirdly, each behavior is quantifiably abstracted with a notion of cardinality and capacity for actors in behavior. This notion will be used to select appropriate behaviors and their relations from the lattice and to make quantitatively equivalent composition with other lattices.

4) Fourthly, the abstract behavior lattice, *Abstract n:2-Lattice*, is constructed.

5) Finally, two abstract behavior lattices can be composed for common actors with same cardinality and capacity between two lattices. It implies quantitatively equivalent composition of two types of collective behaviors.

<figure><img src="image_2.png" /><figcaption>Fig. 1. An Engineering and Composite Approach to Model Collective Behaviors</figcaption></figure>

In order to demonstrate the feasibility of the approach, *Emergency Medical Service* (EMS) [3] and *Health Care Service* (HCS) systems are presented for each steps. The examples show that the method is very effective and efficient to construct a hierarchy of collective behaviors in a lattice and that the composition of two collective behaviors is systematically performed by the composition operation of two lattices. Further, a tool, called PRISM, has been developed on ADOxx Meta-Modelling Platform [6] in order to demonstrate its feasibility and practicality.

This paper is organized as follows. Section 2 presents the approach in steps with an example for both EMS and HCS. Section 3 presents an application of an instance to EMS and HCS examples. Section 4 analyzes the approach and compares it with other approaches. Finally, conclusions and future research will be discussed in Section 5.

## 2 Approach

This section presents each steps of the approach to model collective behaviors for a system.
## 2.1 Step 1: Active Ontology (AO)

### [Def. 2.1] Actor (Ac)

Actor is defined as a set of classes, that is, *Class C<sub>1</sub>, ..., C<sub>n</sub> ∈ Ac*. It implies a set of components in a system, and is represented as a set of classes in Active Ontology.

### [Def. 2.2] Interaction (It)

Interaction is defined as a set of an ordered relation between two actors, that is, *Interaction a<sub>1</sub>, ..., a<sub>m</sub> ∈ It*, where for each interaction *a<sub>i</sub> = ⟨C<sub>i<sub>s</sub></sub>, C<sub>i<sub>t</sub></sub>⟩<sub>in</sub>*, *Class C<sub>i<sub>s</sub></sub>, C<sub>i<sub>t</sub></sub> ∈ Ac*. It implies that Ac *C<sub>i<sub>s</sub></sub>* moves in Ac *C<sub>i<sub>t</sub></sub>*, as an interaction between two actors, as defined in Def. 2.1.

### [Def. 2.3] Active Ontology (AO)

Active Ontology is defined as AO = ⟨Ac, It⟩, based on Def. 2.1 and 2.2. It consists of a set of system components as a set of classes and a set of interactions among the classes.

The first step is to design Active Ontology for EMS and HCS services. Active ontology consists of classes and subclasses in the domain, including their interactions.

<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Active Ontology for Emergency Medical Service (EMS) and Health Care Service (HCS)</figcaption></figure>

### A. Emergency Medical Service (EMS)

EMS service contains four classes: *Ambulance* (A), *Patient* (P), and *Place* (PL). Note that *Place* contains *Location* (L) and *Hospital* (H) as subclasses. Similarly, *Hospital* includes *Bill* (Bi) as subclass, too. The system's elements represent in the left side of Fig.2.

*   **Actors:** There are 5 different kinds of actors:

1) *Patient* (P) : Person to be transported.

2) *Ambulance* (A) : Actor to deliver object.

3) *Location* (L) : Place for Patient to be delivered from.

4) *Hospital* (H) : Place for Patient to be delivered to.

5) *Bill* (Bi) : Bill received by Patient from Hospital.

*   **Interactions:** There are 6 kinds of interactions:

1) *a*<sub>1</sub> = ⟨A, L⟩<sub>in</sub> : Ambulance goes to Location

2) *a*<sub>2</sub> = ⟨P, A⟩<sub>in</sub> : Patient gets on Ambulance.

3) *a*<sub>3</sub> = ⟨A, H⟩<sub>in</sub> : Ambulance goes to Hospital.

4) *a*<sub>4</sub> = ⟨P, A⟩<sub>out</sub> : Patient gets off Ambulance.

5) *a*<sub>5</sub> = ⟨P, H⟩<sub>in</sub> : Patient goes to Hospital.
6) $a_6 = \langle Bi, P \rangle_{in}$ : Hospital sends Bill to Patient.

## B. Health Care Service (HCS)

This system contains two classes: Customer (C) and Insurance Company (I). And Customer has one subclass: Bill (B). The right side of Fig. 2 shows the relationship between classes and subclass.

*   **Actors:** There are 3 different kinds of actors:

1) Customer (C) : Person to be insured.

2) Insurance Company (I) : Company to insure.

3) Bill (Bi) : Payment requested by Insurance Company to Customer.

*   **Interactions:** There are 3 kinds of interactions:

1) $a_1 = \langle C, I \rangle_{in}$ : Customer contacts to Insurance Company.

2) $a_2 = \langle Bi, I \rangle_{in}$ : Customer sends a Bill to Insurance Company.

3) $a_3 = \langle Bi, I \rangle_{out}$ : Insurance Company pays the Bill for Customer.

## 2.2 Step 2: Regular Behaviors (RB)

[Def. 2.4] Regular Behavior (RB)

Regular behavior is defined as a sequence of interactions: $RB_i = \langle a_1, ..., a_n \rangle$, where $a_1, ..., a_n \in A$, by Def. 2.2.

It follows the basic notion of regular expression, i.e., ` +` for repetition, ` | ` for choice, etc. For example, $\langle a_1 \rangle^+$ implies that Actor repeats Interaction $a_1$, and $a_1, \langle a_2, a_3, \langle a_4 \rangle^+ \rangle^+ | \langle a_1, a_2, a_3, \langle a_4 \rangle^+ \rangle^+$ implies that Actor performs either $a_1, \langle a_2, a_3, \langle a_4 \rangle^+ \rangle^+$ or $\langle a_1, a_2, a_3, \langle a_4 \rangle^+ \rangle^+$ behaviors.

By the definition, each collective behavior is defined as a sequence of interactions from step 1. In order to quantify the behaviors, all behaviors are divided into two kinds of behaviors: the one with one main actor and the other with more than one actors. In the other words, there are different views by different actors. For example, in EMS there are four kind of actors, represented as B(L, A, H, P). Then, there are two behaviors, represented as B(n, 1, n, n) for 1 Ambulance and B(n, n, n, n) for n Ambulances. Similarly to B(C, I) for HCS, B(1, n) for 1 Customer and B(n, n) for n Customer.

### A. EMS for B (n, 1, n, n)

There are total 18 behaviors possible and are defined in regular expression as follows:

1) $RB_1 = \langle a_1, a_2, a_3, a_4, a_5, a_6 \rangle$: An Ambulance goes to a Location, gets a Patient on, goes to a Hospital, gets the patient off, who goes to the hospital, and the hospital sends a Bill to the patient.

2) $RB_2 = \langle a_1, a_2, a_3, a_4, a_5, \langle a_6 \rangle^+ \rangle$: An Ambulance goes to a Location, gets a Patient on, goes to a Hospital, gets the patient off, who goes to the hospital, and the hospital sends number of Bills to the patient.

3) $RB_3 = \langle a_1, a_2, a_3, a_4, a_5, a_6 \rangle^+$: A repeating behavior of $B_1$.

4) $RB_4 = \langle a_1, a_2, a_3, a_4, a_5, \langle a_6 \rangle^+ \rangle^+$: A repeating behavior of $B_2$.

5) $RB_5 = \langle a_1, \langle a_2 \rangle^+, a_3, \langle a_4, a_5, a_6 \rangle^+ \rangle^+$: An Ambulance goes to a Location, gets Patients on, goes to a Hospital, gets the patients off, who go to the hospital, and the hospital sends a Bill to each patient. And it repeats itself.
6) $RB_6 = \langle a_1, \langle a_2 \rangle^+, a_3, \langle a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \rangle^+$: An Ambulance goes to a Location, gets Patients on, goes to a Hospital, gets the patients off, which go to the hospital, and the hospital sends Bills to each patient. And it repeats itself.

7) $RB_7 = \langle a_1, \langle a_2 \rangle^+, \langle a_3, a_4, a_5, a_6 \rangle^+ \rangle^+ \rangle^+$: An Ambulance goes to a Location, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospital, and the hospital sends Bill to each patient. And it repeats itself.

8) $RB_8 = \langle a_1, \langle a_2 \rangle^+, \langle a_3, a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \rangle^+$: An Ambulance goes to a Location, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospital, and the hospital sends Bills to each Patient. And it repeats itself.

9) $RB_9 = \left\{ \begin{array}{c} a_1, \langle a_2 \rangle^+, \\ a_3, \langle a_4, a_5, a_6 \rangle^+ | \langle a_3, a_4, a_5, a_6 \rangle^+ \end{array} \right\}^+$: A repeating behavior of $B_5$, $B_7$.

10) $RB_{10} = \left\{ \begin{array}{c} a_1, \langle a_2 \rangle^+, \\ a_3, \langle a_4, a_5, \langle a_6 \rangle^+ \rangle^+ | \langle a_3, a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \end{array} \right\}^+$: A repeating behavior of $RB_6$, $RB_8$.

11) $RB_{11} = \langle \langle a_1, a_2 \rangle^+, a_3, \langle a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \rangle^+$: An Ambulance goes to Locations, gets Patients on, goes to a Hospital, gets the patients off, who go to the hospital, and the hospital sends Bill to each Patient. And it repeats itself.

12) $RB_{12} = \langle \langle a_1, a_2 \rangle^+, \langle a_3, a_4, a_5, a_6 \rangle^+ \rangle^+ \rangle^+$: An Ambulance goes to Locations, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospital, and the hospital sends Bill to each patient. And it repeats itself.

13) $RB_{13} = \langle \langle a_1, a_2 \rangle^+, a_3, \langle a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \rangle^+$: An Ambulance goes to Locations, gets Patients on, goes to a Hospital, gets the patients off, which go to the hospital, and the hospital sends Bills to each Patient. And it repeats itself.

14) $RB_{14} = \langle \langle a_1, a_2 \rangle^+, \langle a_3, a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \rangle^+$: An Ambulance goes to Locations, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospitals, and the hospital sends Bills to each Patient. And it repeats itself.

15) $RB_{15} = \left\{ \begin{array}{c} \langle a_1, a_2 \rangle^+, \\ a_3, \langle a_4, a_5, a_6 \rangle^+ | \langle a_3, a_4, a_5, a_6 \rangle^+ \end{array} \right\}^+$: A repeating behavior of $B_{11}$, $B_{12}$.

16) $RB_{16} = \left\{ \begin{array}{c} \langle a_1, a_2 \rangle^+, \\ a_3, \langle a_4, a_5, \langle a_6 \rangle^+ \rangle^+ | \langle a_3, a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \end{array} \right\}^+$: A repeating behavior of $B_{13}$, $B_{14}$.

17) $RB_{17} = \left\{ \begin{array}{c} a_1, \langle a_2 \rangle^+ | \langle a_1, a_2 \rangle^+, \\ a_3, \langle a_4, a_5, a_6 \rangle^+ | \langle a_3, a_4, a_5, a_6 \rangle^+ \end{array} \right\}^+$: A repeating behavior of $B_9$, $B_{15}$.

18) $RB_{18} = \left\{ \begin{array}{c} a_1, \langle a_2 \rangle^+ | \langle a_1, a_2 \rangle^+, \\ a_3, \langle a_4, a_5, \langle a_6 \rangle^+ \rangle^+ | \langle a_3, a_4, a_5, \langle a_6 \rangle^+ \rangle^+ \end{array} \right\}^+$: A repeating behavior of $B_{10}$, $B_{16}$.

## B. HCS for B (1, n)

There are total 4 behaviors possible and are defined in regular expression as follows:

1) $RB_1 = \langle a_1, a_2, a_3 \rangle$: A customer calls to an Insurance Company, then sends a Bill to, and Insurance Company pays the Bill.

2) $RB_2 = \langle a_1, \langle a_2, a_3 \rangle^+ \rangle^+$: A customer calls to an Insurance Company, then sends some Bills to, and Insurance Company pays the Bills.
3) $RB_3 = \langle\langle a_1, a_2, a_3 \rangle^+ \rangle^+: \text{ A customer calls to an Insurance Company, then sends a Bill to, and Insurance Company pays the Bill. And it repeats itself}$

4) $RB_4 = \langle a_1, \langle a_2, a_3 \rangle^+ | \langle a_1, a_2, a_3 \rangle^+ \rangle^+: \text{ A repeating behavior of } B_2, B_3.$

Note that regular behaviors for EMS B(n. 1, n, n) and HCS B(1, n) are presented here
due to the size of the example. However similar approach can be made for n actors.

2.3 Step 3: Abstract Behaviors (AB)

In the second step, the regular behaviors from Step 2 are abstracted with respect to a
number of actors and their capacity as follows:

• Cardinality: The number of actors in behavior.

• Capacity: The Capability of actor in behavior.

[Def. 2.5] Abstract Behaviors (AB)

Abstract behavior is defined as a tuple of actors with their cardinality and capaci-
ty: $AB_i(A_{(o_1,...,o_n)}^{(x)}, B_{(o_1,...,o_n)}^{(x)}, ..., Z_{(o_1,...,o_n)}^{(x)})$, where $A, B, ..., Z \in Ac$ by Def. 2.1,
the cardinality and capacity of each actor are $x$ and $(o_1, ..., o_n)$, respectively. Fur-
ther $AB$ implies abstraction of these behaviors.

A. EMS for B (n, 1, n, n)

18 regular behaviors are abstracted as shown in Fig 3, by Def. 2.5. For example, the cardinality and capacity of $A_{(1,2,2)}^{(3)}$, $\langle 3 \rangle$ and $\langle 1,2,2 \rangle$ represent the number of Ambulances and the number of Patients for each Ambulance, respectively.

B. HCS for B (1, n)

4 regular behaviors are abstracted in the lattice as shown in Fig 4.

2.4 Step 4: Abstract Behavior Lattice (ABL)

[Def. 2.6] Inclusion Relations

Inclusion Relations is defined as a relation two behaviors of Def 2.4: $RB_i \subseteq RB_j$,
where $RB_i = \langle a_{i_1}, \dots, a_{i_n} \rangle$, $RB_j = \langle a_{j_1}, \dots, a_{j_m} \rangle$, and $\langle a_{i_1}, \dots, a_{i_n} \rangle$ is a sub-
sequence of $\langle a_{j_1}, \dots, a_{j_m} \rangle$. Further, if $RB_i \subseteq RB_j$, then $AB_i \subseteq AB_j$, where $AB_i$ and
$AB_j$ are the abstract behaviors of $RB_i$ and $RB_j$.

[Def. 2.7] Abstract Behavior Lattice (ABL)

Abstract Behavior Lattice is defined a lattice constructed by Def. 2.5 on abstract behaviors.

Lattice can be constructed from Step 3, based on the inclusion relations among behav-
iors. Here we present the lattices for EMS and HSC examples.
<figure><img src="image_4.png" /><figcaption>Fig. 3. Abstract Behavior Lattice for EMS B(n, 1, n, n) and B(n, n, n)</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Fig. 4. Abstract Behavior Lattice for HCS B(1, n) and B(n, n)</figcaption></figure>
## A. EMS for B(n, 1, n, n) and HCS for B(1, n)

The Fig. 3 and 4 show the inclusion relations in EMS for B(n, 1, n, n) and HCS for B(1, n) with arrows, from which the abstract behavior lattices for EMS B(n, 1, n, n) and HCS B(1, n) are constructed as shown in Fig. 5. Note that the EMS lattices are shown in the left side of Fig. 5, and the HCS lattices in the right side of the figure.

## 2.5 Step 5: Composition

The last step is to make composition of two lattices for EMS and HCS. The steps of the composition are as follows:

1. Firstly, the common actors between two abstract behavior lattices have to be selected. For the example, Patient from EMS is defined to be a common actor with Customer from HCS.

2. Secondly, cardinality of the composition has to be selected for the common actors. For the example, there are two cases: one for the single cardinality and the other for the plural cardinality.

**A. Composition for EMS(L, A, H, P) ⊗<sub>EMS(P)=HCS(C)&|P|=|C|=1</sub> HCS(C, I)**

This is the first case of the composition for EMS and HCS with respect to Patient of Cardinality 1: $EMS(L, A, H, P) ⊗_{EMS(P)=HCS(C)&|P|=|C|=1} HCS(C, I)$. $EMS(P) = HCS(C)$ implies that Patient from EMS is defined to be a common actor with Customer from HCS, and $|P| = |C| = 1$ implies that their cardinality is singular. The two top lattices of Fig. 5 shows the possible composition for EMS and HCS, and the top lattice of Fig. 6 shows that result of the composition: $(EMS(L, A, H, P) ⊗_{EMS(P)=HCS(C)&|P|=|C|=1} HCS(C, I))(L, A, H, P = C, I)|_{P|=|C|=1} = B(n, n, n, 1, n)$. There are total 4 possible collective behaviors, which is the half of the total composition with the same cardinality, that is, 8 behaviors, 2 from EMS by 4 from HCS, and is 1/18 of the total composition with the different cardinality, that is 72 behaviors, 18 from EMS by 4 from HCS.

**B. Composition for EMS(L, A, H, P) ⊗<sub>EMS(P)=HCS(C)&|P|=|C|=n</sub> HCS(C, I)**

This is the second case of the composition for EMS and HCS with respect to Patient of Cardinality $n$: $EMS(L, A, H, P) ⊗_{EMS(P)=HCS(C)&|P|=|C|=n} HCS(C, I)$. $EMS(P) = HCS(C)$ implies that Patient from EMS is defined to be a common actor with Customer from HCS, and $|P| = |C| = n$ implies that their cardinality is plural. The two bottom lattices of Fig. 5 shows the possible composition for EMS and HCS, and the bottom lattice of Fig. 6 shows that result of the composition: $(EMS(L, A, H, P) ⊗_{EMS(P)=HCS(C)&|P|=|C|=n} HCS(C, I))(L, A, H, P = C, I)|_{P|=|C|=n} = B(n, n, n, n, n)$. There are total 36 possible collective behaviors, which is half of the total composition with the same cardinality, that is, 72 behaviors, 24 from EMS by 3 from HCS. Note that there are 8 more behaviors for EMS B(n, n, n, n) with n Ambulances and 3 more behaviors with HCS B(n, n) for n Customers. It is also 5.06% of the total composition with the different cardinality, that is, 189 behaviors, (18+8) from EMS by (4+3) from HCS.
<figure><img src="image_6.png" /><figcaption>Fig. 5. Composition with Plural Cardinality for EMS and HCS</figcaption></figure>
<figure><img src="image_7.png" /><figcaption>Fig. 6. The result of the composition in Fig. 7.</figcaption></figure>
### 3 Application

This section describes how the lattice can be used for specific instance of EMS and HCS occurrences. Fig. 7 shows the case of $EMS(L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)})$: 1 Location with 3 Patients, 2 Ambulances with seats of 1 and 2, 2 Hospitals with beds of 2 and 1, and 3 Patients with bills of 2, 1, and 2. The behaviors at Level 3 are omitted here, but contain detailed information about all the capabilities with IDs. Fig. 7 shows the case of $HCS(C_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)})$: 3 Customers with bills of 2, 1 and 2, and 2 Insurance Companies with payments of 4 and 1. Other behaviors at Level 3 will contain detailed information about all the capabilities with IDs.

Fig. 8 shows the composition of $EMS(L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)})$ and $HCS(C_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)})$: $EMS \otimes_{P=C} HCS(L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)})$. It represents that 3 Patients are transported to 2 Hospitals with 2 and 1 Beds by 2 Ambulance with 1 and 2 Seats for emergency treatments, received 2, 1, and 2 Bills from 2 Hospitals, respectively, and claimed the bills to 2 Insurance Companies for 4 and 1 Payments. This composition can be automatically generated between the abstract behavior lattices as shown in Fig. 5 and 6. The shaded behavior at the left top of Fig. 5 shows the behavior of $EMS(L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)})$. The shaded behaviors below show each individual behavior in it. The shaded behavior at the right top of the figure shows the behavior of $HCS(C_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)})$. The lower ones show each individual behavior in it. The lines show the matching composition for both behaviors with respect to the same cardinality and capacity for the common actor, that is, $EMS(P) = HCS(C)$. Finally, Fig. 6 shows the composite behavior for $EMS(L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)})$ and $HCS(C_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)})$, that is, $EMS \otimes_{P=C} HCS(L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)})$, on the lattice of $(EMS(L, A, H, P) \otimes_{EMS(P)=HCS(C) \& |P|=|C|=n} HCS(C, I))(L, A, H, P = C, I)|_{P|=|C|=n} = B(n, n, n, n, n)$.

<figure><img src="image_8.png" /><figcaption>**Fig. 7.** Example of EMS AB $(L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)})$ and HCS AB $(C_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)})$</figcaption></figure>
<figure><img src="image_9.png" /><figcaption>Fig. 8. Composition of EMS and HCS: $EMS \otimes_{P=C} HCS = \langle L_{(3)}^{(1)}, A_{(1,2)}^{(2)}, H_{(2,1)}^{(2)}, P_{(2,1,2)}^{(3)}, I_{(4,1)}^{(2)} \rangle$</figcaption></figure>

# 4 Analysis and Comparison with Implementation

## 4.1 Analysis

The most common approach to address problem of system complexity is the size of system states in other approaches, or the number of behaviors in the approach in this paper. Consequently, the efficiency of the approaches can be measured by the degree of reduction of the complexity with respect to the system states or the number of behaviors.

This paper has presented a new approach to reduce system complexity based on the new notion of Abstract Behaviors Lattice (ABL). It guarantees that the complexity is reduced inverse-exponentially by the definition of the *abstract behavior* lattice. Further, this method represents composition of two systems with common actors in the minimum states. Table 1 shows the comparing between the Reduction-by-Choice (RbC) method [7] and our approach. Note that the RbC method was compared with other reduction methods in order to prove the efficiency of the method. Table 1 shows the results of comparison with the RbC method for the case of $B_{EMS}(L_4^2, A_4^2, H_4^2, P_4^4)$, $B_{HCS}(C_4^4, I_4^1)$, and their composition. It shows how drastically the complexities are reduced by the ABL method.

<table><caption>Table 1. Comparing Choice method and our method in the same condition</caption><thead><tr><th rowspan="2">Methods</th><th rowspan="2">Original States</th><th colspan="2">Choice</th><th rowspan="2">Our Methods</th></tr><tr><th>Conjunction</th><th>Complement</th></tr></thead><tbody><tr><td>EMS</td><td>746496</td><td>36</td><td>6</td><td>4</td></tr><tr><td>HCS</td><td>--</td><td>--</td><td>--</td><td>1</td></tr><tr><td>EMS ⊗ HCS</td><td>≥ 746496</td><td>≥ 36</td><td>≥ 6</td><td>4</td></tr></tbody></table>
## 4.2 Comparison

In order to comprehend general patterns of behavior of specific targets, i.e., humans or animals, large amount of data are collected by using various sensors, and the data can be used to extract useful information for analysis of the patterns and behavior, i.e., healthcare services based on human living patterns [8]. Such a data collection method using the sensors can increase degree of correctness of the patterns and behavior, but may require large amount of time and efforts to collect the data. Further the method only focuses on the patterns of the singular entities, but as a whole.

However, the method in the paper abstracts all the possible interactive behaviors among objects in the system based on system perspective, that is, as a whole, but as the singular entities. Therefore it is possible to comprehend all the bidirectional behavioral patterns of objects in the systems. In addition, it is possible to reduce the time and efforts to collect the data, including refinement, since the method models conceptually all the possible occurrence cases of the behaviors by limiting combinational conditions from the initial interactions to the target interactions among objects in the systems, not from collecting randomly unconditional data using sensors. For example, in the perspective of Ambulance from the example, an initial interaction can be the state before transport, a target interaction can be the state after transport, and a condition can be the capacity of Ambulance, that is, 1.

Table 2 shows the summary of the comparison.

<table><caption>Table 2. Comparing between Behavior Ontology and General Behavior Modeling</caption><thead><tr><th></th><th>Behavior Ontology</th><th>General</th></tr></thead><tbody><tr><th>Target</th><td>System components<br>(Multi-Target, Actors)</td><td>Single-Target</td></tr><tr><th>Data collection method</th><td>Conceptual modeling</td><td>Sensor collection</td></tr><tr><th>Amount of data</th><td>Limited state, Constraint</td><td>Big data</td></tr><tr><th>Direction of Behavior</th><td>Interactive</td><td>Unidirectional</td></tr></tbody></table>

The advantages of the method in the paper can be further summarized as follows:

1) The system behaviors are modeling quantitatively and abstracted based on normalization of their quantities in a mathematical structure, namely n:2-Lattice. And further the lattice provides a mathematical base to predict and analyze collective system behaviors.

2) The lattice can be used to reorganize abstract system views with respect to main actor concepts and makes possible the analysis of the behaviors with respect to the individual or combinational actors, for example, Ambulance or Patient views from the example.

3) The lattice can be used to define mathematical relations between collective behaviors of the collecting groups. For example, the group with 1 Ambulance and the group with n Ambulances. The relationship can be represented as a lattice for the lattices.

4) Composition of two lattices is possible with respect to the common main actors. This is the main topic of the paper, and it gives general capability of the
method to apply to the real example.

Most importantly, in the perspective of composition, the method provides one of the
possible solutions to handle the state explosion problem. Generally the problem is
known as one of the most fundamental problem in computer science, and there are a
number approaches to handle complexity of the explosion. The best known ones can
be summarized as follows:

* A compositional analysis of finite state systems to deal with state explosion due to process composition, they tried to reduce base on synchronous and asynchronous execution and showed the method by process algebra [9, 10].

* A technique to cluster states into equivalent classes which uses a graphical representation into text form [11]. It uses Communicating Real-Time State Machines (CRSMs) that works on automatic verification of finite state real-time systems.

* A technique to reduce possible infinite time space into finite time space which is developed for a compositional specification theory for components [12].

Compare to these approaches, the approach in the paper reduces the states with re-
spect to the types of behaviors, that is, a sequence of interactions among actors. Fur-
ther, it represents the composition of two system states with respect to the same cardi-
nality and capacity of the common actors. In Section 4.1, the outstanding degree of
reduction of the states has been demonstrated and compared with others quantitatively
with the examples.

**4.3 Implementation: PRISM**

In order to demonstrate the feasibility of the approach in this paper, a tool, called PRISM, has been developed on ADOxx Meta-Modeling Platform [6], and reported as a Behavior Ontology tool [13].

5 Conclusion and Future research

This paper presented a method for knowledge engineering and composition to model collective behaviors of systems. The method was based on a sequence of processes from constructing active ontology, defining regular behaviors, abstracting regular behaviors, constructing abstract behavior lattice, and finally generating a composite abstract behavior lattice from two abstract behavior lattices. The method was demonstrated with two examples: EMS and HCS systems. And the composite lattice for EMS ⊗ HCS was generated. Application of the examples was shown with the instance examples on these lattices. The efficiency of the method was shown with numbers for reduction of the system state. The method can be considered one of the most innovative approaches for collective representation of knowledge engineering and their composition, as well as state minimization.

The future research includes developing meta-modeling the method and its instantiation to target domains, as well as application to the real systems.
**Acknowledgment.** This work was supported by Basic Science Research Programs through Space Core Technology Development Program through the NRF(National Research Foundation of Korea) funded by the Ministry of Science, ICT and Future Planning(NRF-2014M1A3A3A02034792), and Basic Science Research Program through the National Research Foundation of Korea(NRF) funded by the Ministry of Education(NRF-2015R1D1A3A01019282).

References

1. Haxthausen, A. E., Peleska, J.: Formal development and verification of a distributed railway control system. In: Software Engineering IEEE Transactions, vol. 26, no. 8, pp. 687-701. (2000)

2. Choe, Y., Lee, S. and Lee, M.: SAVE: An Environment for Visual Specification and Verification of IoT. In: Enterprise Distributed Object Computing Workshop, pp. 1-8. IEEE Press, Vienna, Austria (2016)

3. Lee, M.: Composition Model for Cloud Services with Behavior Ontology. In: 2013 COMPSACW. (2013). doi: 10.1109

4. McNaughton, R., Yamada, H.: Regular expressions and state graphs for automata. In: IRE transactions on Electronic Computers, vol. 9, no. 1, pp. 39-47. IEEE Press, (1960). doi: 10.1109/TEC.1960.5221603

5. Choe, Y., Lee, M.: A Lattice Model to Verify Behavioral Equivalence. In: 2014 UKSim-AMSS 8th European Modelling Symposium (2014)

6. Fill, H. G., Karagiannis, D.: On the conceptualisation of modelling methods using the ADOxx meta modelling platform. In: Enterprise Modeling and Information Systems Architectures, vol. 8, no. 1, pp. 4-25. (2013). doi: 10.18417/emisa.8.1.1

7. Choe, Y., Lee, M.: A Process Algebra Construct Method for Reduction of States in Reachability Graph: Conjunctive and Complement Choices. In: Journal of KIISE, vol. 43, no. 5, pp. 541-552. (2016)

8. Yassine, A., Singh, S., and Alamri, A.: Mining human activity patterns from smart home big data for health care applications. In: IEEE Access, vol. 5, pp. 13131-13141. (2017)

9. Clarke, E. M., Emerson, E. A and Sifakis, J.: Model Checking: Algorithmic Verification and Debugging. In: Communications of the ACM, vol. 52, no. 11, pp. 74-84. (2009)

10. Yeh, W. J., Young, M.: Compositional Reachability Analysis Using Process Algebra, In: Proceedings of the symposium on Testing, analysis, and verification, pp. 49-59. (1992)

11. Chen, T., et al.: A Compositional Specification Theory for Component Behaviors. In: European Symposium on Programming, pp. 148-168. Springer Berlin Heidelberg, (2012)

12. Raju, S. C.: An Automatic Verification Technique for Communicating Real-Time State Machines. In: Technical Report 93-07-08, Dept. of Computer science and Engineering, University of Washington. (1993)

13. Rahmani, M., Song, J., Lee, M.: PRISM: A Knowledge Engineering Tool to Model Collective Behaviors of Real-time IoT Systems. In: 2017 Practicing Open Enterprise Modeling. (2017)