Architecture Modeling - SPES 2020
Architecture Modeling - SPES 2020
Architecture Modeling - SPES 2020
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Architecture</strong> <strong>Modeling</strong><br />
For our application as specifications, the logical formulas in question will denote sets of traces<br />
of valuations of connections, resp., ports. Then we can define satisfaction of contracts by components<br />
(and systems).<br />
Definition 6.3.3 (Satisfaction) A component M satisfies a formula G, written M |= G, if and<br />
only if [[M]] ⊆ [[G]]. Similarly, it satisfies a contract C, written M |= C, if and only if [[M]] ⊆ [[C]].<br />
Thus, we have<br />
6.3.2 Contracts: Properties<br />
M |= (As,Aw,G) ⇔ [[M]] ∩ [[As]] ∩ [[Aw]] ⊆ [[G]] .<br />
To be able to base the design process on contracts, we need operations on contracts and related<br />
properties. The most basic relation between contracts is that of entailment, which is called<br />
refinement here.<br />
Definition 6.3.4 (Refinement) A contract C ′ = (A ′ s,A ′ w,G ′ ) refines a contract C = (As,Aw,G),<br />
written C ′ ⇒ C, if<br />
[[C ′ ]] ⊆ [[C]] and[[As]] ⊆ [[A ′ s]] ,<br />
i. e. if it is (in total) more restrictive and its strong assumption is less restrictive. Equivalently,<br />
C ′ ⇒ C if form(C ′ ) ⇒ form(C) and As ⇒ A ′ s in the usual logical meaning of implication.<br />
Thus, a component satisfying a refinement of a contract C satisfies also C. The second part of the<br />
condition for refinement states that the strong assumption may only get weaker in refinements.<br />
As a consequence, the strong assumption of a contract will always remain sufficient to establish<br />
the strong assumption made by a component satisfying a refinement. In practice, refinement<br />
usually removes nondeterminism from the guarantee, thus strengthening it, and/or permits more<br />
environment behaviour, weakening the assumption(s). This relation is called dominance.<br />
Definition 6.3.5 (Dominance) A contract C ′ = (A ′ s,A ′ w,G ′ ) dominates a contract C =<br />
(As,Aw,G), written C ′ C, if A ′ s ⇐ As, A ′ w ⇐ Aw and G ′ ⇒ G.<br />
It is easy to see that dominance implies refinement but not vice versa. In practice, dominance is<br />
easier to establish (i. e., less complex to check) and often sufficient for refinement proofs to go<br />
through.<br />
In the design process, often more general relations than refinement are called for because A<br />
specification should be implementable. We capture this intuition by the notion of (strong) consistency.<br />
Definition 6.3.6 (Consistency) Let the interface I of a component in HRC be given.<br />
1. A contract C (resp., a set of contracts C ) over I is weakly consistent if [[C]] is nonempty<br />
(resp., <br />
C∈C [[C]] is nonempty).<br />
2. A contract C (resp., set of contracts C ) over I is strongly consistent if the receptive kernel<br />
of [[C]] (resp., <br />
C∈C [[C]]) w.r.t. the inports in I is nonempty.<br />
Weak consistency is consistency in the logical sense, a necessary condition for every meaningful<br />
specification. Strong consistency takes the direction of ports into account, guaranteeing the<br />
existence of an implementation on the semantic level. It is more difficult to check than weak<br />
consistency.<br />
Whether the direction of ports is taken into account in a contract can be defined on the logical<br />
level.<br />
146/ 156