23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

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.

236 Introduction to the Semantics <strong>of</strong> POOSL<br />

n-tuples v1¥¡ ¡ ¡ ¥ vn with vi ¡ Vi for i 1¥¡ ¡ ¡ ¥ n. If w is an n-tuple, then the i-th element<br />

<strong>of</strong> w is denoted by w(i), so w w(1)¥¡ ¡ ¡ ¥ w(n) .<br />

Lists<br />

An n-tuple is a list <strong>of</strong> fixed length. Sometimes it is convenient to denote lists <strong>of</strong> arbitrary<br />

length. For set V and natural number n we will let Vn denote the n-fold cartesian product<br />

<strong>of</strong> V. Note that V1 denotes the collection <strong>of</strong> all 1-tuples <strong>of</strong> the form ¡ v with v V. For<br />

n 0 we define V0 to consist <strong>of</strong> the empty list only. The empty list is denoted by <br />

, so<br />

V0 £ <br />

¦ £<br />

¨<br />

. To denote the collection <strong>of</strong> all lists with entries from V we use the notation<br />

V . More formally, V Vn ¡ ¡ ¡ ¡ ¦ n . The concatenation <strong>of</strong> lists v V and w W is<br />

again a list and is denoted by v w. V W denotes the set £<br />

¥ ¡ ¡ ¦ ¡ v w v V w W . To<br />

indicate the length <strong>of</strong> a list v, i.e. the amount <strong>of</strong> entries <strong>of</strong> v, we write ¡ v ¡ .<br />

7.4.3 Binary Relations<br />

¥ <br />

¡ ¡<br />

Binary Relations<br />

A binary relation R on two sets V and W is a subset <strong>of</strong> V W, so R V W. If two<br />

elements v V and w W are related under R, we can write v¥ w ¡ R. Often, however,<br />

we will use an infix notation and write v R w instead <strong>of</strong> v¥ w ¡ R. In case infix notations<br />

are used, relations are <strong>of</strong>ten denoted by symbols such as ¡ , ¢<br />

£ ¤<br />

relation on V and V is simply called a binary relation on V.<br />

, , and . A binary<br />

Relation Composition<br />

Binary relations can be composed into a new relation. Let R be a relation on V and W<br />

and let S be a relation on W and Z. Then the relation composition R ¥ S is a relation on V<br />

and Z. For v ¡ V and z ¡ Z, v¥ z ¡ R ¥ S if and only if there exists a w ¡ W such that<br />

v¥ w ¡ R and w¥ z ¡ S. Instead <strong>of</strong> R ¥ S we will <strong>of</strong>ten simply write RS.<br />

Reflective Transitive Closures<br />

It is <strong>of</strong>ten convenient to apply a relation zero or more times. Let R be a binary relation<br />

on V and let n be a natural number. We define R n to be the n-fold composition <strong>of</strong> relation<br />

R. For n 1, R 1 R. For n 0, R 0 is the identity relation Id on V. It is defined as follows.<br />

v¥ ¡ For each w V, v¥ £<br />

w ¡<br />

¨<br />

Id if and only if v w. To denote that R can be composed an<br />

arbitrary amount <strong>of</strong> times, we use the notation R . More formally, R Rn ¦ ¡ ¡ n .<br />

R is called the reflexive transitive closure <strong>of</strong> relation R.<br />

7.4.4 Functions<br />

Partial Functions<br />

A partial function f from V to W is a binary relation on sets V and W such that for each<br />

element v ¡ V there exists at most one element w ¡ W with v¥ w ¡ f . Instead <strong>of</strong> v¥ w ¡ f<br />

we will in general write f (v) w. The object f (v) is called the image <strong>of</strong> v under f .<br />

Domains and Ranges<br />

To denote that f is a partial function from V to W we write f : V ¦£ W. V is called the<br />

definition domain and W the co-domain <strong>of</strong> f . The collection <strong>of</strong> all elements in V that have

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

Saved successfully!

Ooh no, something went wrong!