Representation of Categorical Specification of Self-Configurations in Reactive Autonomic Systems Framework

Software complexity crisis brings huge obstacle to further progress in IT industry. To alleviate this problem, researchers are asked to build systems which can benefit from automation. With autonomic behavior, the real-time reactive systems can be more self-managed and adaptive to their environment. However, most of current formal approaches fail to specify such kind of system. In this paper, we proposed an approach to formally specify reactive autonomic systems. First, we used category theory to formalize reactive autonomic systems; then we focused on the categorization of self-configurations and work flows of reactive autonomic systems, and finally we used XML to specify the categorical models. In doing so, it can help to build the foundation of reactive autonomic systems with autonomic features and verify emergent behaviors.


Introduction
Real-time reactive systems can be very complex, and difficult to test and error-finding.Race conditions in real-time reactive systems are hard to be found by only inputting sample data and checking the results, as certain errors are time-based and only occur when processes send or receive data at particular time, in particular in sequence or after learning.In order to find those errors, all possible state combinations of the processes have to be executed, which are exponential in the number of states [1].Formal method could provide systems M. Zhu  with known safety properties since a formal specification can be used to check for particular types of errors and as inputs for model checking.Category theory has been proposed as a framework to offer specification structure.It has a rich body of theory to reason objects and their relations.Moreover, category theory adopts a correct by construction approach by which components can be specified, proved and composed in the way of preserving their properties.Unfortunately, most of current formal approaches fail to specify Reactive Autonomic System (RAS) and do not address well on verifying emergent behaviors, which is an important characteristic for the RAS.
To handle above mentioned problem, as a continuation of research [2] [3] [4], we first discuss how to model RAS and its configurations in category theory; then, we show how to transform the self-configuration properties to the categorical representations, and we use XML to specify the representations.The rest of this paper is organized as follows: Section 2 gives an overview of the related work.Section 3 introduces background knowledge required to understand the remaining content of the paper.Section 4 introduces categories that represent RAS model and its configurations respectively.Section 5 shows how to transform the categorical self-configuration and the properties into categories, and uses XML to specify the categories.Finally, Section 6 concludes the work.

Related Work
In this section, research work related to this paper is introduced.

Real-Time Reactive Systems
Seshia proposes an architecture for automatically recovering a class of reactive systems from run-time failures [5].The system comprises executions which can be divided into several rounds and each round performs a new unit of work.The framework leverages parallelism to proactively explore the space of repairs before a failure is occurred.Paper [6] presents a self-adapting loop according to system-specific adaptation knowledge that includes the types and properties of autonomic components, behavior constraints as well as strategies for adaptation.
This system is an integral part of a real-time system which controls the behavior of computing environment and evaluates its global behavior.Grammar Systems (CGS).This system provides a model with a high degree of flexibility.Based on eco-grammar systems, the formal model used in this paper can be defined as an evolutionary multi-agent system.Category theory is applied to study relationships between geometrical models for concurrency and classical models [12].

Background
In this section, background and work related to our research are introduced.

Reactive Autonomic Systems (RAS)
The Reactive Autonomic Systems (RAS) architecture model (Figure 1) is a four-layer architecture that consists of Reactive Autonomic Objects (RAO), Reactive Autonomic Components (RAC), Reactive Autonomic Component Groups (RACG) as well as the RAS.The autonomic features are implemented by RAO Leaders (RAOL), RAC Supervisors (RACS) and RACG Managers (RACGM) at the RAC, RACG as well as RAS layer respectively [2].In this layered architecture model, each tier communicates only with the tier immediately above or below it.
Thus, the independence of those tiers makes their modularity, encapsulation, hierarchical decomposition and reuse possible.
1) RAO is modeled as a labeled transition system augmented with ports, resources, attributes and the logical assertion on those attributes as well as time constraints [13].More specifically, it is modeled as a 9-tuple (P, ε, Θ, X, L, Φ, Λ, γ, R) where P, ε, Θ, X, L, Φ, Λ, γ are specified as in [14]: • P is a finite set of ports associated with each port-type and the null-type P 0 whose only port is the null port P 0 .• ε is a finite set of events and includes the silent-event tick.
• Θ is a finite set of states where Θ 0 : Θ, is the initial state; there is no final state.
• X is a finite set of typed attributes: abstract data types and port reference types.
• L is a finite set of LSL traits for the abstract data type used in X.

Reactive Autonomic Objects (RAO)
• Φ is a function-vector (Φ s , Φ at ) which Φ s associates with each state Θ a set of sub states and Φ at associates with each state Θ a set of attributes.
• Λ is a finite set of transition specifications.
• γ is a finite set of time-constraints.
• R models the set of resources available locally for the object to support its functionality.
2) RAC is a set of synch.Ronously communicating RAO, where one of the RAO is assigned as a leader (RAOL) of the rest (workers).The workers are responsible for reactive tasks, while the RAOL works on autonomic tasks such as coordinating the self-monitoring at component level.Thus, the RAOL has a different set of states from the workers, which states are autonomic behavior related instead of reactive behavior related.The reactive and autonomic natures of formal specifications for the RAOL enable them to implement autonomic functionalities in a real-time reactive system.In order to coordinate the work as well as communication between the RAO, a RAC specification consists of Members, Configure, Leader, Supervisor, Neighbors and Repository.The RAC is the minimum centralized Reactive Autonomic Element (RAE) that has the ability of self-management in RAS.
Similarly to the RAO, the reactive behavior of a RAC consists of n collaborating.RAO is specified as a 9-tuple (P syn , ε syn , Θ syn , X syn , L syn , Φ syn , Λ syn , γ syn , R syn ) [13]: • P syn is a set of port-types allowing for a synchronous communication between the RAO.
• Θ syn is a finite set of reachable and valid Synchronous Production Machine (SPM) state.
• X syn is a union of the finite sets syn 1 X , …, syn n X .
• L syn is a union of the finite sets of Larch Specification Language (LSL) traits for Abstract Data Type (ADT) used in the RAO.

Category Theory
Category theory has a rich body of theory to reason objects as well as their relations, and it is abstract enough for a wide range of different specification languages [15].Categorytheory for the software specification has adopted a correct by construction approach by which components are specified, proved and composed in the way of preserving their properties [15].Moreover, category theory can provide techniques to manipulate and reason diagrams for building hierarchies of system complexity, allowing systems to be used as components of more complex systems and inferring properties of the systems from their configurations [12].
As there is no such kind of formalization for self-configurations of RAS, we propose to use category theory to formalize the self-configurations.To understand this paper, we introduce the definition of category.
Definition 1: A category consists of objects and morphisms.A morphism f: A → B has object A as its domain and object B as its codomain, respectively.If there are morphisms f: A → B and g: B → C, then there is also a morphism g f: A Every object X has an identity morphism Id X .For every morphism f:

Categorical Representations of RAS Model
In order to categorize the self-configuration of RAS, we need to formalize RAS model by using category theory first.In this section, we build categorical repre- Proposition 1: RAC can be specified as a category RAC with a set of objects |RAC| and morphisms so that for each RAO i , RAO j ∈ |RAC|, there is a set of morphisms f: RAC (RAO i , RAO j ) mapping the RAO i to RAO j which indicate the communication between them as f: i RAO i → RAO j 。 Proof: All what we need is to prove: 1) the existence of composition and identity morphism, and 2) prove associativity.Let RAO 1 , RAO 2 and RAO 3 be three RAO such that RAO 1 can interact with RAO 2 , which can interact with RAO 3 .Then RAO 1 can communicate with RAO 3 (indirectly through RAO 2 ), which means the existence of a composition of morphisms between RAO 1 and RAO 3 .The identity morphism does exist as a natural representation of internal communications.Let f, g and h be the morphisms such that f: RAO 1 → RAO 2 , g: RAO 2 → RAO 3 and h: Proposition 2: The RACG may also be specified as a category RACG with a set of objects |RACG| and morphisms such that for each RAC m , RAC n ∈ |RACG|, there is a set of morphisms f: RACG (RAC m , RAC n ) mapping the RAC m to the RAC n that indicate the communication between them as f: RAC m → RAC n .
Proof: All what we need is to prove: 1) the existence of composition and identity morphism, and 2) prove associativity.Let RAC 1 , RAC 2 and RAC 3 be three RAC such thatRAC 1 can interact with RAC 2 , which can interact with RAC 3 .Then RAC 1 can communicate with RAC 3 (indirectly through RAC 2 ), which means the existence of a composition of morphisms between RAC 1 and RAC 3 .The identity morphism does exist as a natural representation of internal communications.Let f, g and h be the morphisms such that f: RAC 1 → RAC 2 , g: RAC 2 → RAC 3 and h: Proposition 3: The RAS may also be specified as a category RAS with a set of objects |RAS| and morphisms such that for each RACG x , RACG y ∈ |RAS|, there is a set of morphisms f: RAS (RACG x , RACG y ) mapping the RACG x to the RACG y that indicate their communications as f: RACG x → RACG y .
Proof: All what we need is to prove: 1) the existence of composition and identity morphism, and 2) prove associativity.Let RACG 1 , RACG 2 and RACG 3 be three RACG such that RACG 1 can communicate with RACG 2 , which can interact with RACG 3 .Then RACG 1 can interact with RACG 3 (indirectly through RACG 2 ), which means the existence of a composition of morphisms between RACG 1 and RACG 3 .The identity morphism does exist as a natural representation of internal communications.Let f, g and h be the morphisms such that f: RACG 1 → RACG 2 , g: RACG 2 → RACG 3 and h:

Categorical Representations of Self-Configurations of RAS Model
Based on the categorical representations of RAS model in Section 3, in this section, M. Zhu et al.Proposition 4: The configuration of a RAC is a category denoted as CONFIG (RAC), where objects are RAO and morphisms are connections between those RAO as CONFIG (RAO i , RAO j ) or CONFIG (RAO j , RAO i ).
Proof: The proof of Proposition 4 is similar to the proof of Proposition 1, where the morphism connection in Proposition 4 is similar to the morphism communication in Proposition 1.
Proof: The proof of Proposition 5 is similar to the proof of Proposition 2, where the morphism connection in Proposition 5 is similar to the morphism communication in Proposition 2.
The XML specification of the category CONFIG (RACG) can be described as follows: <CATEGORY name = "RACG-Configuration"> <OBJECT> <OBJECT name = "RACi" type = "RAC-Typei"/> <OBJECT name = "RACj" type = "RAC-Typej"/> Proof: All what we need is to prove: 1) the existence of composition and identity morphism, and 2) prove associativity.Let Obj 1 , Obj 2 and Obj 3 be three messages such that Obj 1 occurs before Obj 2 , which occurs before Obj 3 .Then Obj 1 occurs before Obj 3 (indirectly through Obj 2 ), which means the existence of a composition of morphisms between Obj 1 and Obj 3 .The identity morphism does exist as a natural representation of interactions with occurrence.Let f, g and h be the morphisms such that f: Obj 1 → Obj 2 , g: Obj 2 → Obj 2 and h: Obj

Conform
Journal of Computer and Communications sentations of RAS model including RAC, RACG, and RAS.

Figure 5
Figure 5 illustrates the categorical representations and the corresponding proofs in Proposition 1 -3.
et al.

Self-Configuration in Reactive Autonomic Systems Self
Λ syn is a finite set of transition specifications.•γsyn is a finite set of time-constraints.•Rsyn is a set of resources available in the RAO; it is defined as a union of all R i :i: [1 ... n].3) RACG is a set of centralized or distributed RAC that cooperate in fulfillment of group tasks by synchronous communications.It is the minimum RAE which can independently accomplish complete real-time reactive tasks in RASF.The autonomic behavior at group level is coordinated by a supervisor (RACS).-configuration is an essence of RAS.Components in RAS are able to configure themselves automatically according to high level policies (business level objectives), which specify what is required instead of how they are implemented.
• 4) RAS is made up of centralized or distributed RACG with asynchronous communication.It provides an integrated interface for users to delegate computing tasks, monitor systems and manage repositories.A manager (RACGM) is Journal of Computer and Communications responsible for coordinating autonomic behavior at system level.3.2.