• No se han encontrado resultados

OBRAS QUE REQUIEREN PROYECTO EN EDIFICIOS EXISTENTES, LEGALES, EN SUELO URBANO CONSOLIDADO Y QUE NO ALTERAN PARÁMETROS URBANÍSTICOS

ANEXO III.- MODELOS NORMALIZADOS DE DECLARACIÓN RESPONSABLE MODELO 1

OBRAS QUE REQUIEREN PROYECTO EN EDIFICIOS EXISTENTES, LEGALES, EN SUELO URBANO CONSOLIDADO Y QUE NO ALTERAN PARÁMETROS URBANÍSTICOS

In the literature, several approaches for modelling attributed graphs have been proposed of which some have been shown to be closely related. Ehrig [62], for example, relates two approaches on a categorical level. The first approach, orig- inally introduced by L¨owe et al. [135], considers attributed graphs as algebras of a specific algebraic signature ASIG = (GSIG, ASIG) being a graph structure signature GSIG extended with a data type signature DSIG. They have intro- duced a category Alg(ASIG) having ASIG-algebras as objects and correspond- ing ASIG-algebra homomorphisms as arrows. The second approach, originally introduced by Heckel et al. [100], models attributed graphs as pairs consisting of a graph and a algebra of a suitable data type signature DSIG such that the data values from the algebra are included as nodes in the graph. The category having such attributed graphs as objects and corresponding attributed graph morphisms (being pairs of graph morphisms and algebra homomorphisms) as arrows will here be denoted AttrGraph(DSIG). Ehrig et al. have shown these two categories to be isomorphic [62, 66].

The category AttrGraph(DSIG), in the sequel referred to as the standard

model for attributed graphs, has been investigated in more detail by Ehrig et

al. [65]. The authors have developed fundamental theory for the specification of typed attributed graphs and their transformation. Their notion of attributed graphs supports both node and edge attribution. We will include some of their definitions in which we leave out edge attributes and typing.

In this section we introduce our notion of attributed graphs as captured by the category that will be denoted UAttrGraph(USIG). One of the main re- sults of this chapter is that AttrGraph(DSIG) and UAttrGraph(USIG) are equivalent categories when DSIG = U(USIG). This means that all transforma- tions that can be performed in the former category have corresponding trans- formations in the latter, and vice versa, since transformations are described by pushouts, which are a special class of co-limits.

As discussed in Chapter 2, the literature on graph transformations clearly distinguishes between simple graphs and multigraphs, for which we introduced

3.5 Uniform Attributed Graphs

the categories SGraphT and Graph, respectively. The theory as developed

by Ehrig et al. [65] is based on graph transformations on multigraphs using the DPO approach, whereas the Groove approach performs graph transfor- mations on simple graphs using the SPO approach. Graph transformations on non-attributed graphs in the former setting can be simulated in the lat- ter, as we have shown in other work [22]. By first considering uniform at- tributed graphs as labelled multigraphs, we will prove the equivalence of the categories AttrGraph(SIG) and UAttrGraph(USIG) both ‘sharing’ the cat- egory Graph. In the remaining sections, uniform attributed graphs are then build in a different framework, namely using the category SGraphT of simple

graphs with corresponding morphisms as its basis.

The following definition of N-graphs is based on the E-graphs as introduced in the work of Ehrig et al. [65], except that we have omitted edge attributes, i.e., N-graphs only support node-attribution.

Definition 3.37 (N-graph). An N-graph G = (NR, NA, ER, EA) consists of

sets

• NR and NA being disjoint sets of regular graph nodes and data nodes,

respectively,

• ER and EAbeing disjoint sets of regular graph edges and attribute edges,

respectively,

together with the functions (see Fig. 3.7)

• srcR: ER→ NR and srcA: EA→ NR,

• tgtR: ER→ NR and tgtA: EA→ NA,

• labi: Ei→ Lab, for i ∈ {R, A}.

Given two N-graphs G and Gan N-graph morphism f : G → Gis a tuple

(fNR, fNA, fER, fEA) with fNi: N G i → NG ′ i and fEj: E G j → EG ′ j for i, j ∈ {R, A}

such that f commutes with all source, label and target functions.

Attributed graphs, in this approach, consist of N-graphs combined with a suitable SIG-algebra, for some signature SIG, such that the elements of the data sorts are nodes in the graph, as defined below.

Definition 3.38 (attributed graph). Let DSIG = (SD, OPD) be a signature.

An attributed graph AG = (G, A) consists of an N-graph G and a DSIG-algebra

A withU

Chapter 3. Uniform Attributed Graphs Lab ER EA NR NA srcR tgtR srcA tgtA labR labA

Figure 3.7: Set of nodes and edges of N-graphs, and their source, label, and target functions.

Let AG and AGbe two DSIG-attributed graphs. Then, an attributed graph

morphism f : AG→AG′is a pair f = (f

G, fA) such that fG: G→G′is an N-graph

morphism and fA: A → A′ is an algebra homomorphism such that the diagram

in Fig. 3.8 commutes for all s ∈ DA where the vertical arrows are inclusions.

As A′s

NG NG′

fA,s

fG,N

Figure 3.8: Commuting graph morphisms fG and algebra homomorphism fA for

attributed graphs.

In the following we will define what we call uniform attributed graphs based on uniform USIG-algebras for a given uniform signature USIG. The graph part of uniform attributed graphs are so-called U-graphs.

Definition 3.39(U-graph). A U-graph G is a graph such that the NG and EG

are partitioned as follows:

NG = NR∪ ND∪ NU

EG = ER∪ EA∪ EF∪ EΠ ,

with NR, ND, and NU being disjoint sets of regular graph nodes, data nodes,

3.5 Uniform Attributed Graphs

regular graph edges, attribute edges, functional operation edges and projection operation edges, respectively. For the different edge types, the source, target,

and label functions satisfy the following typing (see Fig. 3.9):

• srcR: ER→ NR and tgtR: ER→ NR,

• srcA: EA→ NR and tgtA: EA→ ND,

• srcF: EF→ NU and tgtF: EF→ ND,

• srcΠ: EΠ→ NU and tgtΠ: EΠ→ ND,

• labi: Ei→ Lab, for i ∈ {R, A},

• labF: EF→ O,

• labΠ: EΠ→ P.

Given two U-graphs G and G, a U-graph morphism f is a graph morphism that

respects the partitioning.

Lab ER EA EF EΠ NR ND NU srcR tgtR srcA tgtA srcF tgtF tgtΠ srcΠ

labR labA labF labΠ

Figure 3.9: Set of nodes and edges of U-graphs, and their source, label, and target functions.

A uniform attributed graph, then, is a U-graph G combined with a USIG- algebra graph A, for some suitable uniform signature USIG, such that A is a subgraph of G.

Definition 3.40(uniform attributed graph). Let USIG be a uniform signature.

A uniform USIG-attributed graph (G, A) is a U-graph with A being a USIG- algebra graph and A ⊆ G, such that NA= NG,D∪ NG,U and EA= EF∪ EΠ.

Given two uniform attributed graphs hG, Ai and hG, Ai, a uniform at-

tributed graph morphism f : hG, Ai → hG′, A′i is a U-graph morphism, such that f ↾A is a USIG-algebra graph morphism.

Chapter 3. Uniform Attributed Graphs

By combining Def. 3.40 with Def. 3.39, one can easily verify that for a uniform attributed graph hG, Ai it holds that A is a full subgraph of G. This can be formalized as follows.

Proposition 3.41. Let USIG be an arbitrary uniform signature and (A, t) be a uniform USIG-algebra graph. Then, a pair hG, Ai is a uniform attributed graph iff there exists an embedding morphism ηG: A → G and ∄e ∈ (EG\ EA) :

t(src(e)) ∈ DUSIG ∨ t(tgt(e)) ∈ UUSIG.

In the sequel, when stating that G is a uniform SIG-attributed graph, we implicitly assume a tuple hG, Ai where A is the SIG-algebra graph included in G; likewise, a uniform attributed graph morphism f : hG, Ai → hG′, Ai will

be denoted as f : G → G′, accompanied by the statement that it is a uniform

SIG-attributed graph morphism. If the signature is not relevant or clear from

the context it will be omitted.

Proposition 3.42. If f : G → Gis a uniform attributed graph morphism, then

the diagram (1) in Fig. 3.10 is a pullback.

G G′ A A′ (1) ηG ηG′ f f ↾A

Figure 3.10: Uniform attributed graph morphism.

In order to make the embedding of the algebra graph in the uniform at- tributed graph more explicit, we introduce the notion of a graph embedding, being a pair (G, G−) of graphs such the latter is a subgraph of the former.

Definition 3.43 (graph embedding, reflection). Let G be a sub-category of Graph. A graph embedding over G is a pair (G, G) such that G∈ Obj

G

and G⊆ G ∈ Graph. If G and H are graph embeddings, then a reflection from

G to H is a graph morphism h: G → H such that for all n ∈ NG, hN(n) ∈ NH−

implies n ∈ NG−, and for all e ∈ EG, hE(e) ∈ EHimplies e ∈ EG.

A graph embedding G is said to be glued over a graph G−− ⊆ Gif for

all e ∈ (EG\ EG−) and incident nodes n ∈ {src(e), tgt(e)}, n ∈ NGimplies

3.5 Uniform Attributed Graphs

Intuitively, this means that if an embedding G is glued over a graph G−−,

nodes in G−− are only allowed to be connected to nodes outside G. In our

context, for instance, we do not want to allow product nodes to be used as attributes. That is, our embeddings will be glued over the subgraph of the algebra graph consisting of data nodes only.

Furthermore, we introduce the notion of an embedding functor for graph categories. An embedding functor then maps a graph, say G, to a subgraph of G.

Definition 3.44 (embedding functor). Let G be a sub-category of Graph.

Then a functor E: G → Graph is called an embedding functor if

• E(G) ⊆ G for all G-graphs G, and

• E(f ) = f ↾E(G) for all G-graph morphisms f : G → H.

Now, we can introduce the category REmb(G) having graph embeddings as objects and reflections (as from Def. 3.43) as arrows. Similarly, we can in- troduce REmb(E) with E: G → Graph an embedding morphism, to denote the full sub-category of REmb(G) consisting of embeddings (G, G−) glued

over E(G−). By now letting USIG be an arbitrary uniform signature and

EUSIG: AlgGraph(USIG) → dGraph be the embedding functor mapping ev-

ery USIG-algebra graph (G, t) to the discrete sub-graph consisting of the nodes {n ∈ NG| t(n) ∈ DUSIG}, our category of uniform attributed graphs with em-

bedded deterministic algebra graphs can be defined as follows:

UAttrGraph(USIG) = REmb(EUSIG) . (3.4)

Attributed Graphs versus Uniform Attributed Graphs

Starting from the category AttrGraph(SIG), we will prove its equivalence to the category UAttrGraph(USIG), given that SIG = U(USIG), in sev- eral steps. Fig. 3.11 gives an overview of the main categories we have intro- duced in this chapter so far. It includes the functors F, U, FA, and UA,

which are depicted as solid arrows. The dashed arrows denote dependencies between different categories. For example, the category Alg(SIG) depends on the category Sig since it is based on a single object from that category. The category AttrGraph(SIG) likewise depends on the category Alg(SIG); the dependency with Graph exists because every object in AttrGraph(SIG) contains an N-graph component which is an object in Graph. The cate- gory UAttrGraph(USIG) has analogous dependencies with UAlg(USIG) and

Chapter 3. Uniform Attributed Graphs

Graph, although the way the objects in UAttrGraph(USIG) are constructed from a graph and a uniform USIG-algebra differs from the way this is done for the objects in the category AttrGraph(SIG). Nevertheless, the similar- ity between both ways of constructing (uniform) attributed graphs and the equivalence of the categories Alg(SIG) and UAlg(USIG) strongly suggests the existence of a close relation between the two categories of attributed graphs. We will now prove that this relation is an equivalence as well.

Sig USig F U ∼ = Alg(SIG) Alg(USIG) FA UA ∼ = AttrGraph(SIG) UAttrGraph(USIG) Graph

Figure 3.11: Overview of the different categories.

Theorem 3.45. Let SIG be an arbitrary signature, and USIG be an arbitrary uniform signature. Then, the category AttrGraph(SIG) is equivalent to the category UAttrGraph(USIG) when USIG = F(SIG):

AttrGraph(SIG) ∼= UAttrGraph(USIG) .

The equivalence between the categories will be proven in a number of steps. First, we defined the following functor.

Definition 3.46. Let D: C → dGraph be a functor to discrete graphs. The category of D-attributed graphs AttrGraph(D) is defined by

3.5 Uniform Attributed Graphs

• objects (G, C) where G is a graph and C is an object of C, such that D(C) ⊆ G;

• arrows f : (G1, C1) → (G2, C2) such that f = (fG, fC) where fG is a graph

morphism and fC is an arrow from C, such that D(fC) = fG↾D(dom(g)),

i.e., fG and fC agree upon the discrete graph.

Different instantiations of the category C in the above definitions result in different categories of attributed graphs. Some examples of useful functors D are:

• ASIG: Alg(SIG) → dGraph for an arbitrary signature SIG = (S, OP ),

mapping every SIG-algebra to the discrete graph, say G, in which NG=

S

s∈SAs;

• AUSIG: Alg(USIG) → dGraph for an arbitrary uniform signature USIG,

mapping every USIG-algebra to the discrete graph, say G, in which NG=

S

d∈DAd;

• the functor EUSIG: AlgGraph(USIG)→dGraph introduced above, given

some uniform signature USIG.

Using the above, the standard model of attributed graphs is then given by AttrGraph(ASIG).

A next ingredient to prove Theorem 3.45 is the notion of source equivalent functors.

Definition 3.47. Two functors Di: Ci → dGraph, for i = 1, 2, are source

equivalent if there exists functors F: C1→C2and U: C2→C1which establish an

equivalence between C1 and C2 and such that, moreover, the following diagram

of functors commutes: C1 C2 dGraph F U D1 D2

Examples of source equivalent functors are ASIG, AF (SIG), and EF (SIG),

for an arbitrary signature SIG. Similarly, the functors AU (USIG), AUSIG, and

Chapter 3. Uniform Attributed Graphs

We need source equivalent functors to further close the equivalence gap be- tween the standard model and our notion of attributed graphs. The next the- orem will provide a number of steps. It states that replacing the algebra graph parameter in the standard model by a source equivalent one does not change the category.

Theorem 3.48. If Di: Ci→ dGraph, for i = 1, 2, are two source equivalent

functors, then AttrGraph(D1) and AttrGraph(D2) are equivalent categories.

This is shown by functors between AttrGraph(D1) and AttrGraph(D2)

that coincide with D1and D2 on the algebra component and with the identity

functor on the graph component.

The equivalence bridge between the two categories of attributed graph is now closed by the following result.

Theorem 3.49. AttrGraph(EUSIG) and UAttrGraph(USIG) are equivalent

categories, for an arbitrary uniform signature USIG.

Proof sketch. The intuition behind the proof is that AttrGraph(EF (SIG)) rep-

resents the category of attributed graphs, as from the standard model, over a uniform signature such that only the data nodes of the flattened algebra are included in the graph, whereas the objects in UAttrGraph(F(SIG)) repre- sent attributed graphs including the entire (deterministic) algebra graph. They thus only differ in including the remaining algebra graph elements in the graph explicitly. The full proof is included in Appendix B (Section B.8).

We now have all the ingredients to proof the equivalence between the cate- gories AttrGraph(SIG) and UAttrGraph(USIG).

Proof of Theorem 3.45. The equivalence follows from a chain of equivalences

sketched in the following diagrams. In the above diagrams, ↔ denotes equiv- alence relations between categories and → denotes a functor. The left chain contains the actual steps of the proof; the diagram on the right presents the justification for applying Theorem 3.48.

The above steps can be applied in a similar way when, in Theorem 3.45, we would have required that SIG = U(USIG), although some of the proofs would have been a bit more involved since we then have to rely on isomorphisms instead of identities.

3.5 Uniform Attributed Graphs AttrGraph(SIG) AttrGraph(ASIG) AttrGraph(AF (SIG)) AttrGraph(EF (SIG)) REmb(EF (SIG)) UAttrGraph(F(SIG)) Alg(SIG) Alg(F(SIG)) AlgGraph(F(SIG)) dGraph (Theorem 3.48) (Theorem 3.48) (Theorem 3.49) (3.4) (Theorem 3.34) (Lemma 3.28) ASIG AF(SIG) EF(SIG)