ASMedios de acción
4. LA ESTRATEGIA PRODUCTIVA
4.4. PLANTEO ESTRATÉGICO
In this section we look into several properties of CompA. The most fundamental one is that CompA are SIOA. Thus, we have uniform definitions of executions and trace.
Proposition 9.1:
A component automaton A is an SIOA.
Proof:
A is an SA, thus only the constraints of Definition6.2need to be checked. The first constraint follows directly from ConstraintC1, whereas the second constraint on input-enabledness follows from ConstraintC6. The disjointness of the input, output and internal state signatures as required by the third constraint follows
directly from ConstraintC3toC5.
We expect the traces of CompA to be well-formed (Definition4.3). As with AA, the idea behind the proofs of these properties is that the constraints of CompA capture the well-formedness properties.
9.2. Properties of Component Automata
Lemma 9.1 (Well-formedness of traces of component automata):
Let A(a) be a component automaton with initial actor a. Let α ∈ execs(A(a)) be an execution of A(a) such that t is the derived trace of α. Then, t is well-formed with respect to{a0| a ∈ ancestors(a)}.
Proof:
The proof follows from the constraints on component automata.
Property 1: If there is no event inα with the future u, the property holds. Assume the projection of the trace to the future u results in events t0 = e1e2e3. . .. The first premise needs to be shown is that the first event of this projected trace t0is a method call emittance event. By ConstraintC3, a method return event is present in the input signature, but only if the corresponding event core is in the set of tasks. Similar argument is fulfilled for the output signature by Constraint C4. Initially the set of tasks is empty. For an event core to be in the set of tasks, the corresponding input event has to be in the buffer (ConstraintsC7andC8). Thus, the premise holds. We proceed by proving what happens after the method call emittance event is received.
Case internal call: This case never happens because no internal call is part of the
signature, following ConstraintsC3toC5. Thus, the property trivially holds.
Case incoming method call: Let e1 be a method call emittance input event (i.e., caller(e1) ∈ envActors({a})). By ConstraintC6, e1is placed into the buffer and the future of e1 (and a) is stored in the set of received futures, effectively removing all events with the same future from the input signature (ConstraintA3). When |t0| > 1, e2must be a reaction event of e1, because no further input with the same future and actor pair may appear and no task with the same future and actor name pair is present in the set of tasks (ConstraintC7). The corresponding event core of e2 is inserted into the task set. As the input signature excludes method call events whose futures have been received previously, the automaton never returns back to the state with an input signature that contains e1. When |t0| > 2, the only option is to finish processing the task and return the result of executing the method (ConstraintC8). Then it follows that the projected trace may only contain a method call event followed by the corresponding method return event.
Case outgoing method call: Let event e1 be a method call emittance output event, that is caller(e1) = a ∧ target(e1) 6= a. e1 cannot be a reaction event as the only possibility that the future of e1 is generated by a is that e1 must be an output event. Following Constraint C8, such an event only appears in the output sig- nature. Because the generated future is stored, the same future will never be generated again (ConstraintC4). The input signature is updated accordingly to allow for the corresponding method return events. For the projected trace to pro-
ceed, only a corresponding method return event may appear as an input. That is, e2 is of the form u← b.mtd / v for some result v. Following Constraint C6, this input event is stored in the buffer. The only extension left for the projected trace is the reaction event of e2which can be done repeatedly. Thus, the property holds.
Property 2: Let α be such that trace(α) = t · e where e is an emittance event and generated by a. For any transition (s, e0, s0) such that s e0 s0 is a part ofα, the set of known actors grows monotonically (known(s) ⊆ known(s0)) following ConstraintsC6toC8. As e appears in trace(α) and generated by a, a transition (se, e, s0e) ∈ steps(A) is taken. As Property 1 holds, e can only appear once in
trace(α), meaning it cannot appear in t. For transition (se, e, s0e) to be executable, ConstraintC8must be fulfilled, particularly acq(e) ⊆ known(se). Similarly, every consecutive triple(s, e0, s0) in α must obey the ConstraintsC4andC5, maintaining the monotonicity property. As t can contain input events that are not reacted to,
known(se) ⊆ acq(t) ∪ {a0 | a ∈ ancestors(a0)}. Thus, acq(e) ⊆ acq(t) ∪ {a0 | a ∈
ancestors(a0)}.
Property 3: Follows directly from ConstraintsC8.
The definition of CompA places more guarantee such that the generated traces of a CompA are also well-formed with respect to its environment (Definition8.5).
Lemma 9.2 (Environment well-formedness of traces of CompA):
Let A be a component automaton with initial actor a andα ∈ execs(A) is an execution. Let Aenv = envActors({a}). Then the trace t = trace(α) is well- formed with respect to the environment Aenv= envActors({a}).
Proof:
Follows from ConstraintsC3andC8.
The constraints of CompA ensure that the state signature of a CompA only con- tains external emittance events and their reaction events.
Proposition 9.2 (State signature event characteristic of CompA):
Let A be a component automaton with initial actor a and
Ecmp(a) = {e | isMethod(e)∧(caller(e) /∈ ancestors(a)∨target(e) /∈ ancestors(a))} the set of external events and their corresponding reaction events with re-
9.2. Properties of Component Automata
spect to a component instance with initial actor a. Then, ∀s ∈ states(A) : sig(A)(s) ⊆ Ecmp(a) .
Proposition 9.2 (Continued)
Proof:
From ConstraintsC3andC4, ext(A)(s) ⊆ Ecmp(a). Since by ConstraintC5int(A)(s)
only adds reaction events to the emittance events in the buffer, which is only pop- ulated with input events, sig(A)(s) ⊆ Ecmp(a). The disjointness of the signatures within a CompA and between CompA follows from the disjointness of the individual actor, that the internal events can only be reaction events to input events, and the fact that the exposed actors must have the initial actor of the component as one of their ancestors.
Proposition 9.3 (Disjoint component automaton signature):
Let A be a component automaton. Then,
in(A) ∩ out(A) = in(A) ∩ int(A) = out(A) ∩ int(A) = ; .
Proof:
From the Constraint C5 it is clear that internal events are exclusively reaction events and reaction events are never categorized as input or output events. There- fore, we only need to show that in(A)∩out(A) = ;. From ConstraintC4, an output event is either a return event targeted to an actor of the component or a method call targeted to an exposed environment actor, while according to ConstraintsC3
andC8, an input event is the opposite. Therefore, the input and output signatures
are also disjoint.
Proposition 9.4 (Disjoint signatures between component automata):
Let A and A0be component automata with initial actors a and a0, respectively, where a /∈ ancestors(a0) ∧ a0 /∈ ancestors(a). Then, in(A) ∩ in(A0) = out(A) ∩
out(A0) = int(A) ∩ int(A0) = ;.
Proof:
The lemma follows from the assumption that the actors of the components being
disjoint.
The signature disjointness between a CompA and an AA also follows if the actor represented by the AA is part of the environment of CompA.
Proposition 9.5 (Disjoint signatures between AA and CompA):
Let A be a component automaton with the initial actor a and A0be an actor automaton representing actor a0 such that a0 /∈ ancestors(a). Then, in(A) ∩
in(A0) = out(A) ∩ out(A0) = int(A) ∩ int(A0) = ;.
Proof:
Follows from ConstraintsA3toA5, ConstraintsC3toC5and the assumption that
a0 /∈ ancestors(a).
The propositions above indicate that CompA, as with AA, fulfill the require- ments of the parallel composition operator. We classify SIOA that are obtained from the composition of CompA and AA as actor-based SIOA. We use s(a) to ex- tract the state of a particular actor or a component instance with the initial actor
afrom the state s of an actor-based SIOA A.
Definition 9.2 (Actor-based SIOA):
Let{A1, . . . , An} be a set of AA and CompA. The SIOA A = A1k . . . k An is an actor-based SIOA.