09.08.2013 Views

Architecture Modeling - SPES 2020

Architecture Modeling - SPES 2020

Architecture Modeling - SPES 2020

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

(Vehicle Longitudinal Control) that receives the acceleration commands either produced by<br />

the FollowCtrl component or by the SpeedCtrl component and processes them. Which<br />

value is forwarded is determined by the Arbitration component based on the current overall<br />

state of the ACC (not shown in the figure). Now for the FollowCtrl component suppose<br />

there exist two contracts C1 and C11, which are defined as follows:<br />

C1<br />

strong assumption always (0 ≤ speed ≤ 70 m s )<br />

weak assumption true<br />

guarantee always (−3.0 m<br />

s2 ≤ accel ≤ 3.0 m<br />

s2 )<br />

C11<br />

strong assumption always (0 ≤ speed ≤ 70 m s )<br />

weak assumption always (0 ≤ speed ≤ 50 m s )<br />

guarantee always (−2.5 m<br />

s2 ≤ accel ≤ 2.5 m<br />

s2 )<br />

Thus, the component FollowCtrl is designed to operate at travelling speeds up to 70 m s<br />

and guarantees it will issue acceleration commands in the value range [−3.0 m<br />

s2 ,3.0 m<br />

s2 ]. It may<br />

only be integrated in a context, where its environment ensures the strong assumption. Contract<br />

C11 however adds a weak assumption that actually confines the strong assumption by<br />

and guarantess acceleration commands in the value range<br />

requiring a maximum speed of 50 m s<br />

[−2.5 m<br />

s2 ,2.5 m<br />

s 2 ]. For the integration of the FollowCtrl component that means, if its con-<br />

text can even ensure the weak assumption, then the smaller range specified in the guarantee of<br />

C11 may be relied on when connecting FollowCtrl to the Arbitration and Vlc components.<br />

In that case both components can be more restrictive with regard to its own strong<br />

and weak assumptions as they only need to deal with a smaller range of acceleration values.<br />

Note that actually the same range of acceleration values must be assumed on the port named<br />

crsCtrlAccel of the Arbitration component such that it can also guarentee to provide<br />

that value range on its output port accel.<br />

2.3.1.4 Requirement Specification Language<br />

The semantics of contracts and HRC provide the formal basis for reasoning about the relation of<br />

specifications stated as contracts and about the composition of HRCs and their contracts. With<br />

the requirements specification language (RSL)(↑) described in Section 6.1 we provide syntax<br />

and semantics of a pattern-based language, which can be used to define the aspect specifications<br />

of an HRC. An instance of a pattern of the RSL can be used to specify the assumption (strong<br />

and weak) as well as the guarantee parts of a contract.<br />

PortSpec1<br />

e1<br />

ComponentA<br />

p1 p2<br />

p3<br />

refers to<br />

C1<br />

refers to<br />

Figure 2.8: Linking contracts and components<br />

PortSpec2<br />

Suppose an HRC has been defined as sketched in Figure 2.8. It has two ports p1 and<br />

p2, which are typed by two port specifications PortSpec1, PortSpec2 respectively.<br />

Now the designer can select a pattern that suits the aspect, for which a contract shall<br />

be specified. As an example assume that a latency of 10ms is to be specified from the<br />

time data arrives at port p1 to the time data is provided at port p2. Such a specification<br />

f1<br />

12/ 156

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

Saved successfully!

Ooh no, something went wrong!