09.08.2013 Views

Architecture Modeling - SPES 2020

Architecture Modeling - SPES 2020

Architecture Modeling - SPES 2020

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.

12°C < tempSelect < 35°C<br />

actTemp occurs each 20ms<br />

always abs(actTemp –<br />

flowTemp) < 0.2°C<br />

12°C < tempSelect < 35°C<br />

actTemp occurs each 20ms<br />

control occurs each 20ms<br />

with jitter 2ms<br />

<strong>Architecture</strong> <strong>Modeling</strong><br />

whenever chg(tempSelect) occurs abs(flowTemp – tempSelect) <<br />

0.5°C holds during [60s, chg(tempSelect) [<br />

whenever chg(tempSelect) occurs nomTemp = tempSelect<br />

holds during [10ms, chg(tempSelect) [<br />

Whenever actTemp occurs control.act = actTemp &&<br />

control.nom = nomTemp occurs within [12ms, 14ms]<br />

control occurs each 20ms<br />

with jitter 2ms<br />

whenever control occurs abs(flowTemp –<br />

tempSelect) < abs(actTemp- tempSelect) +<br />

epsilon holds during [10ms, control [<br />

whenever control occurs abs(flowTemp - control.nom) <<br />

abs(control.act - control.nom) + epsilon holds during [10ms, control [<br />

Figure 4.6: VIT Example with Functional Contracts: Proof Chain<br />

tempSelect. We can further calculate which epsilon is needed in G3 to achieve a maximal<br />

temperature difference of 0.5 ◦ C for the air conditioning. To this end, we need the activation frequency<br />

of the AirCondition component (20 ms), the maximum delay for control.act<br />

to become the value of the selected temperature in case of a modification of tempSelect<br />

(24 ms).<br />

The maximum change of the selected temperature is 23 ◦ C. Due to the activation period,<br />

the air condition has about 6000 cycles to achieve this temperature change (within 60 seconds<br />

minus delays). So in each cycle, the temperature change must be at least ≈ 0.004 ◦ C. Together<br />

with the assumption about the maximal deviation of airTemp from the air flow temperature<br />

(0.2 ◦ C) of C, we can further derive the guarantee of C. Due to this we have shown dominance<br />

C against the local contracts, which concludes the VIT.<br />

VIT Example for Real-Time Contracts<br />

Figure 4.7 depicts another simple decomposition situation of another part of the same system.<br />

The local components have real-time contracts associated stating about the activation pattern<br />

and maximum delays. The contract of the parent component AirTempSystem in fact specifies<br />

an end-to-end deadline. Note that all assumptions in this example are strong.<br />

The proof chain of the VIT for the example is shown in Figure 4.8. We start VIT by<br />

showing compatibility of the local contracts C1 and C2. To this end, we derive a new guarantee<br />

from the local contract C1 = (A1s,A1w,G1). According to [23], C1 implies contract<br />

C1 ′ = (A1s,A1w,G1 ′ ) where:<br />

G1 ′ = actTemp occurs each 50ms with jitter 7ms<br />

With this, one can easily show implication of the strong assumption A2s of contract C2, and<br />

thus G1 ′ =⇒ A2s. Since the whole system is acyclic, stability is not an issue here. Also<br />

receptiveness is not an issue for such real-time contracts, because the assumptions reason about<br />

input ports only, and the guarantees reason about the delay between inports and outports. The<br />

whole system thus satisfies C1 ∧C2 =⇒ A1s ∧ A2s.<br />

Furthermore, it can be shown that assumption As is a strict subset of A1s. This in advance<br />

completes the strong VIT condition, and also the first part of the dominance relation between C<br />

and C1 ∧C2 (all weak assumptions are true).<br />

57/ 156

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

Saved successfully!

Ooh no, something went wrong!