4. Análisis de los aspectos más problemáticos pendientes de
4.1. Aspectos pendientes de desarrollo reglamentario en los que el RD925/
4.1.2. Medidas de control interno
As the logical level of the SeCo Service description framework may contain many access patterns with overlapping input and output attribute domains, an analysis of reachability within the selected set of access patterns is necessary in order to select the combination of access patterns with the full reach.
The scenario outlined in Figure 6.2 depicts the situation where access patterns share input and output attribute domains, thereby facilitating data surfacing through an input/output conduit of interconnected pattern mate- rializations. The access pattern TheaterByPhone utilizes the reseeding input strategy, as the method of populating its input attribute values dictionary. The Theater.Phone input attribute is obtained from the equivalent output domain attribute’s Theater.Phone values during the materialization process. Access Pattern TheaterByCity depends on external supply of values for the Theater.City input attribute as is the case for MovieByTitle access pattern being dependant on the external supply of values for Movie.Year, Movie.Title
6.2. Service Materialization Feasibility Model 118
Figure 6.2: Example of schema of the materialization problem at AP level and its Petri Net representation.
input attributes. As illustrated in the Figure 6.2, the output attribute val- ues Theater.City of the TheaterByPhone access pattern are passed - to TheaterByCity input attribute Theater.City in order to maintain the materi- alization process of the latter. In turn, the output attribute values Movie.Title and Movie.Year of TheaterByCity are passed to the input attributes be- longing to the same domain Move.Year, Movie.Title of the MovieByTitle access pattern in order to perform its materialization.
The above access pattern interaction can be further represented as a bi- partite graph where the input attribute domains form a set of vertices and the output attribute domains form another set of vertices of the graph. In the context of the MPMS scenario, we model the directed bipartite graph as a Petri net in which:
• The input and output attributes and their corresponding domains are a set of places,
• The input and output attribute domain values are represented as tokens that propagate through the network,
• The query is the transformation from input to output domain as well as the process of supplying output attribute domain values to the input
6.2. Service Materialization Feasibility Model 119
Figure 6.3: Bipartite graph representation of the access patterns.
Figure 6.4: Petri Net representation of the MPMS example scenario with token in p0.
attribute domain via an available connection pattern,
• The places and transitions constitute the nodes of the graph connected via directed arcs. Places may contain zero or more tokens, labelled with input and output attribute domain values and their types,
• The state often referred to as marking M, is the distribution of tokens over places. In the MPMS scenario the state is the distribution of values over input and output attribute domains of the involved access pattern.
Formally, an access pattern presented as a Petri Net appn is a triplet (Pap, Tap,
Fap):
• Pap is a finite set of places,
• Tap is a finite set of transitions (PTT = ø),
• Fap ⊆ (Pap× Tap)S(Tap× Pap) is a set of arcs (flow relation).
As followed in Chapter 4 we extend the latter definitions:
• Pap = {I,O,Ra} is a set that consists of three finite subset of input I,
output O, and ranking Ra attributes of ap,
• I ∈ P , where I is the set of attributes a1...aj ⊆ A that defines the
6.2. Service Materialization Feasibility Model 120
• O ∈ P , where O is the set of attributes a1...ak ⊆ A that defines
the output interface of ap,
• Ra ∈ P where Ra is the set of attributes a1...ap ⊆ O that defines
the ranking condition of ap.
• Tap = {tc, Tcp} is a set that consist of a single transition tc and set Tcp
where:
• tc ∈ T where tc is a transition that facilitates a materialization
call c ∈ C, as defined in chapter 4,
• tcp ∈ Tcp where tcp is a transition that facilitates execution of the
connect pattern cp,
• cp is defined as tuple < aI, aO> where attribute aI ∈ I, an input
interface of appn,1 and attribute aO ∈ O, an output interface of
appn,2.
A place p is called an input place of a transition t if and only if there exists a directed arc from p to t. In the MPMS scenario an input place is typically an input domain attribute of an involved access pattern or an output domain attribute of an access pattern connected by a connection pattern to another access pattern’s input domain attribute. A place p is called an output place of transition t if and only if there exists a directed arc from t to p. In the MPMS scenario an output place is an output domain attribute of the associated access pattern.
Tokens, which are input and output attribute domain values propagate through the net, driven by firing of the queries. Transitions are active com- ponents in a Petri net. In the MPMS scenario, there are two semantically different transitions: materialization call transition and connection pattern transition (output domain to input domain supply transition). Transitions change the state of the net according to the following firing rule:
• A transition t is said to be enabled if and only if each input place p of t contains at least one token - a value d in either input or output domain of the associated access pattern,
6.2. Service Materialization Feasibility Model 121
• An enabled transition may fire. If transition t fires, then t consumes one token from each input place p of t and produces one token for each output place p of t. In the MPMS scenario, the actual transition fir- ing represents either materialization or supply of values (tokens) from output attributes,
• In this way a sequence of states M0, M1, ...Mn is generated, such that
M0 is the initial state and Mi+1is the state reachable from Mi by firing
a transition. If several transitions are enabled at the same time, then any of these transitions may be the next to fire. In the MPMS scenario this means that as soon as there are input domain attribute values available to the access pattern, a query qkp is issued and the produced result’s rkp values are placed in the output domain attributes of the involved access pattern. Alternatively, if there is a value in the output domain attribute connected by connection pattern to another access pattern’s input attribute domain the supply transition is fired and the value passed over,
• Let M0 be the initial state of a Petri net. In the MPMS scenario the
initial place is input attribute(s) of at least one involved access pattern,
• A state is called a reachable state if and only if there exists a firing sequence M0, M1, ...Mn which enables this state. In the MPMS sce-
nario this sequence is a combination of both places whose arcs con- tain a materialization call transition and places whose arcs contain connection pattern transition,
• A terminal state is a state where none of the transitions is enabled, i.e. a state without successors. In the MPMS scenario the terminal state is either a place representing an output domain attribute with no outward connections or a place representing an output domain attribute for which a materialization call did not produce any values valid in the associated input attribute domain.
We evaluate an MPMS topology as a marked net < P N, M0 > where
6.2. Service Materialization Feasibility Model 122
• An initial marking (i.e., state) M0 - an initial input attribute belonging
to access pattern for which there are satisfied input attribute domain requirements,
• The rules of evolution T, F - a set of directed transformations between input to output domains in the same access pattern and between access patterns in form of connection patterns,
• A set of places P in input and output domains,
• A set of tokens (values) D that propagate through the net.
The reachability graph of MPMS topology < P N, M0 > is a firing sequence
G = (X, E, σ, x0) where:
• X = R(P N, M0), i.e., the states of the sequence are the reachable mark-
ings,
• E = T , i.e., the events in MPMS execution are the transitions of the net,
• For any two reachable markings M, M0:
• A reachable markings transition σ(M, t) = M0 ⇔ M [t > M0, i.e.,
there exists an arc labelled t from M to M0 on the sequence if and only if marking M0 is reachable from M on firing transition t;
• x0 = M0 , i.e., the initial state of the sequence is the initial marking.
In the example below we demonstrate all the reachable (or feasible) states in series of firing sequences for the given MPMS topology.
We present MPMS topology with three access patterns
AP 1 with I={d1}, O={ d1 , d3}, AP 2 with I={d4, d5}, O={d6} and AP 3 with I={d3}, O={d4 , d5}. The logic of the firing sequence is defined by the following reachability algorithm.
Given an MPMS net < P N, M 0 > let G be its reachability graph with set of states X constructed using the defined algorithm.
6.2. Service Materialization Feasibility Model 123
Initial Marking M0 = [1,0,0,0,0,0,0,0,0] Upon t1 firing M1 = [0,1,1,0,0,0,0,0,0], Transitions t2 and t6 are enabled
Upon t2 firing M2 = [0,1,0,1,0,0,0,0,0], transition t3 is enabled
Upon t3 firing M3 = [0,1,0,0,1,1,0,0,0], transition t4 is enabled
6.2. Service Materialization Feasibility Model 124
Upon t4 firing M4 = [0,1,0,0,0,0,1,1,0],
transition t5 is enabled Upon t5 firing M5 =[0,1,0,0,0,0,0,0,1]
6.3. Feasibility Analysis Formalization 125