27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

II. OVERVIEW OF MODAL TRANSITION SYSTEMS,<br />

INTERFACE AUTOMATA AND ZLANGUAGE<br />

In this section, we give a brief review of modal transition<br />

systems, interface automata and Z language.<br />

Modal transition systems have been proposed in [11]. A<br />

refinement relation and a logical characterization of refinement<br />

were also given in [11]. For a set of actions A, a modal<br />

transition system (MTS) is a triple (P, −→ □ , −→ ♦ ), where<br />

P is a set of states and −→ □ , −→ ♦ ⊆ P × A × P are transition<br />

relations such that −→ □ ⊆−→ ♦ . The transitions in −→ □ are<br />

called the must transitions and those in −→ ♦ are the may<br />

transitions. In an MTS, each must transition is also a may<br />

transition, which intuitively means that any required transition<br />

is also allowed.<br />

An interface automaton (IA) [1], introduced by de Alfaro<br />

and Henzinger, is an automata-based model suitable for specifying<br />

component-based systems. An IA consists of states,<br />

initial states, internal actions, input actions, output actions and<br />

a transition relation. The composition and refinement of two<br />

IAs are proposed in [1].<br />

Z was introduced in the early 80’s in Oxford by Abrial as<br />

a set-theoretic and predicate language for the specification of<br />

data structure, state spaces and state transformations. A boxed<br />

notation called schemas is used for structuring Z specifications.<br />

Z makes use of identifier decorations to encode intended<br />

interpretations. A state variable with no decoration represents<br />

the current (before) state and a state variable ending with a<br />

prime ( ′ ) represents the next (after) state. A variable ending<br />

with a question mark (?) represents an input and a variable<br />

ending with an exclamation mark (!) represents an output. In<br />

Z, there are many schema operators. For example, we write<br />

S ∧ T to denote the conjunction of these two schemas: a new<br />

schema formed by merging the declaration parts of S and T<br />

and conjoining their predicate parts. S ⇒ T (S ⇔ T) is similar<br />

to S∧T except connecting their predicate parts by ⇒ (⇔). The<br />

hiding operation S\(x 1 , ..., x n ) removes from the schema S the<br />

components x 1 , ..., x n explicitly listed, which must exist. The<br />

hiding operation S\(x 1 , ..., x n ) removes from the schema S the<br />

components x 1 , ..., x n explicitly listed, which must exist. Formally,<br />

S\(x 1 , ..., x n ) is equivalent to (∃ x 1 : t 1 ; ...; x n : t n • S),<br />

where x 1 , ..., x n have types t 1 , ..., t n in S. The notation ∃ x : a•S<br />

states that there is some object x in a for which S is true. The<br />

notation ∀ x : a • S states that for each object x in a, S is true.<br />

For the sake of space, more details of Z can be refereed to<br />

some books on Z [15].<br />

III. MODAL INTERFACE AUTOMATA WITH ZNOTATION<br />

This paper is based on modal ZIA, a specification language<br />

which integrates modal transition systems, interface automata<br />

and Z. Modal ZIA is defined such that apart from enabling one<br />

to deal with the modal properties, behavioral properties and<br />

the data properties of a system independently. In this section,<br />

we combine modal transition systems, inference automata and<br />

Z language to give a specification approach for software components.<br />

We first give the definition of such model. Then we<br />

define the modal refinement of modal ZIA. Furthermore, we<br />

propose and prove some properties on the modal refinement<br />

of modal ZIA.<br />

A. Model of Modal ZIA<br />

Interface automata provide a specification approach for interface<br />

behavior properties. But this approach can not describe<br />

data structures specification of states. On the other hand,<br />

Z can specify the state of a system, but is not suitable to<br />

behavioral properties. This section describes modal ZIA as a<br />

conservative extension of both interface automata and Z in<br />

the sense that almost all syntactical and semantical aspects of<br />

interface automata and Z are preserved.<br />

In the original interface automata, states and transitions<br />

are abstract atomic symbols. But in modal ZIA, states and<br />

transitions are described by Z schemas.<br />

In the rest of this paper, we use the following terminology:<br />

(1) A state schema is a schema which does not contain any<br />

variable with decoration ′ .<br />

(2) An input operation schema is an operation schema which<br />

contains input variables.<br />

(3) An output operation schema is an operation schema<br />

which contains output variables.<br />

(4) An internal operation schema is an operation schema<br />

which contains variables with decoration ′ .<br />

Intuitively, a state schema is assigned to a state which<br />

may contain many variables, this state schema describes the<br />

constraint of variables in the state. A variable with decoration<br />

′<br />

denotes a variable at next state. So a state schema does<br />

not contain any variable with decoration ′ . An input (output)<br />

operation schema is assigned to an input (output) action<br />

which may contain many input (output) variables, this input<br />

(output) operation schema describes the constraint of variables<br />

in the input (output) action. So an input (output) operation<br />

schema is an operation schema which contains input (output)<br />

variables. An internal operation schema is assigned to an<br />

internal action, this internal operation schema describes the<br />

change of variables after performing the internal action. So<br />

an internal operation schema is an operation schema which<br />

contains variables with decoration ′ .<br />

In the rest of paper, given an assignment ρ and a schema A,<br />

we write ρ |= A if ρ assigns every variable x in the declaration<br />

part of A to an element of its type set, which satisfies the<br />

predicate part of A; we write |= A if ρ |= A for any assignment<br />

ρ.<br />

Let S to be a Z schema, we use V I (S) (V O (S), V H (S)) to<br />

denote the set of input variables (output variables, internal<br />

variables) in S.<br />

Definition 1. A modal interface automaton with Z notation<br />

(modal ZIA) P = 〈S P , SP i , AI P , AO P , AH P , VI P , VO P , VH P , FS P , FA P ,<br />

G IA<br />

P , GOA P , A□ P , A♦ P , V□ P , V♦ P , T P〉 consists of the following<br />

elements:<br />

(1) S P is a set of states.<br />

(2) SP i ⊆ S P is a set of initial states. If SP i = ∅ then P is<br />

called empty.<br />

(3) A I P , AO P and AH P are disjoint sets of input, output, and<br />

internal actions, respectively. We denote by A P = A I P ∪AO P ∪AH P<br />

526

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!