• No results found

Separating computation and coordination in the design of parallel and distributed programs

N/A
N/A
Protected

Academic year: 2021

Share "Separating computation and coordination in the design of parallel and distributed programs"

Copied!
10
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Separating computation and coordination in the design of parallel and

distributed programs

Chaudron, M.R.V.

Citation

Chaudron, M. R. V. (1998, May 28). Separating computation and coordination in the design of

parallel and distributed programs. ASCI dissertation series. Retrieved from

https://hdl.handle.net/1887/26994

Version: Corrected Publisher’s Version

License: Licence agreement concerning inclusion of doctoral thesis in theInstitutional Repository of the University of Leiden Downloaded from: https://hdl.handle.net/1887/26994

(2)

Cover Page

The handle http://hdl.handle.net/1887/26994 holds various files of this Leiden University dissertation

Author: Chaudron, Michel

Title: Separating computation and coordination in the design of parallel and distributed programs

(3)

A

Definition of Basic Concepts

A.1

Congruence

Definition A.1.1 A relation R over a term-algebra Σ is a congruence iff

1. R is a equivalence relation on Σ,

2. for all f , for all s, s∈ Σ, if sRs, then f (s)Rf(s).

Definition A.1.2 A relation R over a term-algebra Σ is a precongruence iff

1. R is a partial order on Σ,

2. for all f , for all s, s∈ Σ, if sRs, then f (s)Rf(s).

A.2

On Multisets

Definition A.2.1 Let A be a set.

1. A multiset over A is a function M : A→ N.

2. Let M be the set of multisets; i.e. M = {M | M is a multiset}.

Definition A.2.2 Let A be a set and let M and N be multisets over A.

1. a is a member of M , denoted a∈ M, if M(a) > 0.

2. M is equal to N , denoted M = N , if M (a) = N (a) for all a∈ A.

3. M is a sub-multiset of N , denoted M ⊆ N, if M(a) ≤ N(a) for all a ∈ A. Definition A.2.3 Let A be a set and let M and N be multisets over A.

(4)

276 APPENDIX A. DEFINITION OF BASIC CONCEPTS

2. M ∩ N = {(a, min(M(a), N(a))) | a ∈ A} is the intersection of M and N.

3. M ⊖ N = {(a, M(a)− N(a))) | a ∈ A} where x. − y =.

  

x− y if x≥ y 0 otherwise is the difference between M and N .

Definition A.2.4

1. Let N and Nbe multisets. A multiset substitution that replaces N by Nis a

function σ :M → M that is written as N/N . Formally

σ(M ) =    (M ⊖ N) ∪ N′ if N ⊆ M M otherwise

To conform with conventional notation for substitution, we also write M [σ] to denote the application of σ to M .

2. The special symbol ε is used to label transitions that do not affect the multiset. Formally, it can be defined as the identity function on multisets: ε(M ) = M . This makes ε an identity for composition of multiset substitutions; i.e. ε· σ = σ =

σ· ε.

Definition A.2.5 Let M be a multiset and let σ1 = N1/M1 and σ2 = N2/M2be multisets

substitutions.

1. σ1 is independent from σ2 in M , denoted M |= σ1⊳ σ2, if N1 ⊆ (M ⊖ N2)∪ M2.

2. If σ1 and σ2 are mutually independent from each other, more succinctly called

independent, then we write M |= σ1⋊⋉σ2.

Lemma A.2.6 Let M be a multiset and let σ1 = N1′/N1 and σ2 = N2′/N2 be multiset

substitutions. If N1 ⊆ M, N2 ⊆ M and M |= σ1⋊⋉σ2, then σ2· σ1(M ) = σ1· σ2(M).

(5)

A.3. PRE-EMPTIVE NONDETERMINISTIC CHOICE 277 as follows x∈ σ2· σ1(M ) ⇔ subst. σ1, N1 ⊆ M x∈ σ2((M ⊖ N1)∪ N1′) ⇔ subst. σ2, N2 ⊆ (M ⊖ N1)∪ N1′ x∈ (((M ⊖ N1)∪ N1′)⊖ N2)∪ N2′ ⇔ def. ⊖, ∪, N1 ⊆ M, N2 ⊆ M ⊖ N1∪ N1′ M (x)− N1(x) + N1′(x)− N2(x) + N2′(x)≥ 1 ⇔ arithmetic M (x)− N2(x) + N2′(x)− N1(x) + N1′(x)≥ 1 ⇔ def. ⊖, ∪, N2 ⊆ M, N1 ⊆ M ⊖ N2∪ N2′ x∈ (((M ⊖ N2)∪ N2′)⊖ N1)∪ N1′ ⇔ subst. σ2, N1 ⊆ (M ⊖ N2)∪ N2′ x∈ σ1((M ⊖ N2)∪ N2′) ⇔ subst. σ1, N2 ⊆ M x∈ σ1· σ2(M ) 

A.3

Pre-emptive Nondeterministic Choice

In this section, we sketch the results of investigating the extension of the coordination language with an operator ⊕ , for nondeterministic choice.

Let us extend the operational semantics with an inference rule (N⊕ ) which defines the behaviour of the nondeterministic choice combinator.

(N⊕ ) hs1, Mi λ −→ hs′ 1, M′i hs1⊕ s2, Mi λ −→ hs′ 1, M′i (A.1) Figure A.1: Semantic Rule for Nondeterministic Choice

Additionally, we capture the commutativity of nondeterministic choice by defining the structural congruence

(6)

278 APPENDIX A. DEFINITION OF BASIC CONCEPTS We write Σn

i=1si to denote the nondeterministic choice over si for i : 1 ≤ i ≤ n.

We show that strong stateless, and consequently strong convex, refinement are pre-served by nondeterministic composition. Hence, the corresponding refinement notions are precongruences for the coordination language extended with nondeterministic choice. Lemma A.3.1 If s16 t1 and s26 t2, then s1⊕ s26 t1⊕ t2.

Proof Let R = {(s1⊕ s2, t1⊕ t2)| s16 t1, s26 t2}. The result follows by

straightfor-wardly shoowing that R is a strong stateless simulation.  It is straightforward to prove the following laws for nondeterministic choice. which show that (⊕ , skip) is a commutative monoid.

skip⊕ s s

s1⊕ s2 ≃ s2⊕ s1

(s1⊕ s2)⊕ s3 ≃ s1⊕ (s2⊕ s3)

Another straightforward result is the idempotency of ⊕ : s≃ s ⊕ s

Furthermore, we can show how nondeterministic choice relates to the other operators from the coordination language.

r → s[t] ⊕ r → s′[t] ⊕ r → s[t] ⊕ r → s[t] 6 r → (s ⊕ s)[t⊕ t]

c ⊲ s[t] ⊕ c ⊲ s[t] ⊕ c ⊲ s[t] ⊕ c ⊲ s[t] ≃ c ⊲ (s ⊕ s)[t⊕ t]

s1k s3 ⊕ s1k s4 ⊕ s2k s3 ⊕ s2k s4 6 (s1⊕ s2)k (s3⊕ s4)

s1; s3 ⊕ s1; s4 ⊕ s2; s3 ⊕ s2; s4 6 (s1⊕ s2); (s3⊕ s4)

The last law is the classic example of an equivalence that does not hold in bisimulation-based approaches, but does hold in trace-based approaches for reasoning about nondeterministic processes. This law shows, however, that a refinement holds in one direction. (A more common, but less general, formulation of this law is obtained by taking s1 and s2 to be equal: (s1; s3)⊕ (s1; s4) 6 s1; (s3⊕ s4).)

(7)

A.3. PRE-EMPTIVE NONDETERMINISTIC CHOICE 279 The kind of refinement made possible by nondeterministic choice is illustrated by the following law

s16 s1⊕ s2

Hence, in combination with the distribution laws, refinement laws using nondeterministic choice consist of selecting one of a number of possible disjunct alternatives.

To illuminate the relation between replication and nondeterministic choice, Lemma A.3.2 confirms the intuition that !s stands for an arbitrary number of instances of s executing in parallel.

Lemma A.3.2 For all k : k ≥ 1 : Σk

(8)
(9)

B

Glossary of Notation

Basic Concepts

M set of multisets M, N

P set of Gamma programs P, R S set of schedules s, t

C set of configurationshs, Mi

Labels

ε indicates that no rewrite occurs σ multiset substitution λ either ε or σ h i empty sequence σ sequence of σ labels λ sequence of λ labels b

λ sequence of labels where all occurences of ε have been removed λ·λconcatenation of labels

Transition Relations

1 single-step transition of program

multi-step transition of program

* sequence of zero or more transitions of program

−→1 single-step transition of schedule

−→ multi-step transition of schedule

−→* sequence of zero or more transitions of schedule

(10)

282 APPENDIX B. GLOSSARY OF NOTATION Notions of refinement

≦ strong statebased refinement ∼

= strong statebased equivalence w weak statebased refinement ≈ weak statebased equivalence 6 strong stateless refinement ≃ strong stateless equivalence - weak stateless refinement ∼ weak stateless equivalence 6⋄ strong convex refinement

=⋄ strong convex equivalence

.⋄ weak convex refinement ≃⋄ weak convex equivalence

≤φ strong generic refinement

strong generic equivalence

weak generic refinement

Referenties

GERELATEERDE DOCUMENTEN

Since expression of Serpins may facilitate the immune escape of HLA positive tumors, we next analysed the effect of Serpin expression on survival in cases with normal/partial

Separating computation and coordination in the design of parallel and distributed programs..

Deze tonen aan dat de voorgestelde methode voor het ontwikkelen van programma’s gerealiseerd kan worden met behulp van de in dit proefschrift ontwikkelde

De eerste helft van zijn vierde studiejaar (september 1990 - maart 1991) bracht hij door bij de Programming Research Group van de Universiteit van Oxford. Daar volg- de hij de

Detection of amyloid plaques in mouse models of Alzheimer’s disease by magnetic resonance imaging.. Apostolova

Peripheral blood cells were stained with HLA-A2.1 tetramers containing the tyrosinase368–376 peptide followed by staining with a panel of lineage antibodies, as described in

Blades and blade fragments seem to have been especially used for longitudinal motions, mainly on plant material (7/12). Flake and flake fragments are used in different motions on

This shape also occurs in the combination artefacts (see below). The shape is the result of intensive use in a repetitive abrasive motion, carried out from different angles. In