Upload
dbildh
View
104
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Distributed Hierarchical Hyper-TGraphs (DHHTGraphs) offer distribution of graphs over networks, refinement of graph elements by nested graphs, refinement of complete graphs by visibility levels and some
Citation preview
Distributed Hierarchical Hyper-TGraphs :
Modeling beyond plain graphs
Daniel Bildhauer, Jürgen EbertInstitute for Software Technology
University of Koblenz-Landau, [email protected]
jgralab.uni-koblenz.de
jgralab.uni-koblenz.de
Overview
• Motivation
• DHHTGraphs
• Details
• Implementation
• Conclusion
2
➡ Why?
➡ What?
➡ How?
➡ Does it work?
➡ Current state and what comes next?
jgralab.uni-koblenz.de
Why?
jgralab.uni-koblenz.de
4
jgralab.uni-koblenz.de
5
Simple graph representation
• Symbols are represented by nodes
• Lines connecting symbols are represented by edges
• But: Some symbols are relation-like and some lines belong together
jgralab.uni-koblenz.de
Issues of graph representation
• Models contain ad modeling profits from:
• N-ary relationships
• Abstraction and refinement
• Distribution
• Graphs are a suitable representation of models
• Above concepts are not supported by plain graphs
• Workarounds & existing solutions not sufficient6
jgralab.uni-koblenz.de
Workarounds & existing solutions
• Workarounds cause extra effort to handle graphs
• Relation-like vertices simulate n-ary relations
• Marking of elements simulates abstraction levels
• Existing extended graph concepts are not sufficient
• Many variants of hyperedges, hierarchy and distribution, but no integrated solution
• Graph model to restricted or to complex
• Not fully implemented/no convenient API
7
jgralab.uni-koblenz.de
What?
jgralab.uni-koblenz.de
Demands to a modern graph framework
• Seamless integration of distribution, hierarchy and hyperedges with established graph concepts
• Precise and well-defined graph formalism
• Ability to specify domain-specific aspects & constraints by graph schemas
• Efficient implementation to handle large graphs
• Seamless integration in modern software by API
9
jgralab.uni-koblenz.de
Proposal: DHHTGraphs• Distribution of graphs over networks
• Hierarchical structuring and refinement
• Refinement of elements by nested graphs
• Refinement of graphs by visibility layers
• Hyperedges with labeled directed ends
• Typing and attribution of vertices and edges
• Ordering of incidences at vertices and edges
• Compatibel to existing concepts as far as possible10
jgralab.uni-koblenz.de
How?
jgralab.uni-koblenz.de
Hypergraphs• Typing, attribution and
ordering of vertices and edges
• Connection by labeled, directed & ordered incidences traversable in both directions
• Equality and duality of vertices and edges
• Vertices represent entities, edges their relationships
v1: BusinessProcessname=“pay order“
v2: Featurename=“payment
method“
v3: TransformationRule
e1: FeatureTraceability Link
id=4711
i1: realizedProcess i3: realizedFeature
v4: Activityname=“pay order“
i2: usedRule i4: target
[1] [1]
[1] [1]
{1}{2}
{3}{4}
12
jgralab.uni-koblenz.de
Metamodeling Hypergraphs• Modeling language grUML
(graph UML)
• Vertex- and Edge classes define types and attributes
• Incidence classes define labeled connections
• Specialization of vertex-, edge-, and incidence classes
• Multiplicities and incidence inheritance for vertex- and edge classes
TransformationRule
name: String
ModelElement
name: String
ModelElementFeature
ModelElementBusinessProcess
Activity
TraceabilityLinkid: int
FeatureTraceabilityLink realizedFeature
subsets sourcerealizedProcesssubsets source
usedRule
source
target
0..*
0..1 0..*
0..*
0..*
0..*
0..*
0..*
0..*
0..*
13
#vertices per edge
#edges per vertex
jgralab.uni-koblenz.de
Hierarchical graphs
• Element refinement by tree-like nesting of graphs in elements
• Connections across boundaries
• Border of nested graphs are of same kind as nested elements
• Graph refinement by visibility layers for elements
• Refinements are DHHTGraphs on their own v5: Activity
name=“enter credit card details“
e2:FeatureTraceability
Link
e1:FeatureTraceability
Link
i8: target i9: target
v4: Activityname=“pay order“
v6: TransformationRule
i5: usedRule i7: usedRule
14
jgralab.uni-koblenz.de
Metamodeling hierarchy• Compositions define possible
nesting relationships
• Tree-like on instance level
• Stereotyped compositions define edge nesting
• Compositions also define edge classes (compatibility to classical graph technology)
• Allowed visibility indicated by constraints (kappa)
TraceabilityLinkid: int
ActivityNode
Activity Branch
partOf
0..1
0..*
<<nested>>
ModelElementconstraints{kappa=0..4}
target
15
jgralab.uni-koblenz.de
Distributed graphs• Partitioning and distribution
across several stations
• Treatment of local and global graphs in the same way
• Compatibility to hierarchy
• Distributed graphs are full DHHTGraphs with support of distribution and hierarchy
• No domain specific features, thus no metamodeling
v1: BusinessProcessname=“pay order“
v2: Featurename=“payment
method“
v3: TransformationRule
e1: FeatureTraceability Link
id=4711
realizedProcess realizedFeature
v4: Activityname=“pay order“
usedRule target
16
jgralab.uni-koblenz.de
Does it work?
jgralab.uni-koblenz.de
Implementation
• Extension of Java library JGraLab for plain TGraphs
• Typing, attribution... realized by native Java constructs
• Extended symmetric incidence lists as datastructure
• Distribution by Java Remote Method Invocation, efficient access by element-ids identify machine
• In-memory storage
• 1GB: 106 vertices, 106 edges, 5x106 incidences (creation 7s)
• Breadth first search on that graph in 2,5s on 2,3GHz 18
jgralab.uni-koblenz.de
API
• Object-oriented access to all DHHTGraph properties
• Equal treatment of complete graphs and all subgraphs
• Seamless integration in applications by generated schema-specific API (interface+implementation)
public interface TraceabilityLink extends Edge {
public int get_id();
public void set_id(int _id);
public TraceabilityLink getNextTraceabilityLink();
public TraceabilityLink_source getFirst_source();
public TraceabilityLink_rule getFirst_rule();}
public interface FeatureTraceabilityLink extends TraceabilityLink {
public FeatureTraceabilityLink getNextFeatureTraceabilityLink();
public FeatureTraceabilityLink_process getFirst_process(); public FeatureTraceabilityLink_activity getFirst_activity();}
ModelElementFeature
ModelElementBusinessProcess
FeatureTraceabilityLink
featuresubsets source
processsubsets source 0..*
0..*
0..*
0..*
TraceabilityLinkid: int
19
via KM3-like DSL tg
jgralab.uni-koblenz.de
Current state & what comes next?
jgralab.uni-koblenz.de
Main design decisions
• Vertices and edges are dual
• Vertices represent entities, edges their relations
• Distribution and hierarchy are compatible
• Subgraphs are DHHTGraphs on their own
• Nested vertices and edges have only vertices or edges on their border, respectively
• Seamless from definition to implementation21
jgralab.uni-koblenz.de
The future: Querying DHHTGraphs
• Based on existing TGraph query language GReQL
22
from process:V{Process}with process (-->{FeatureTraceabilityLink_process} <--{TraceabiliyLink_rule})+ & {TransformationRule @ thisVertex.name=“MyRule“}report process -->{FeatureTraceabilityLink} end
jgralab.uni-koblenz.de
Conclusion• Seamless realization of
• Hyperedges with labeled ends
• Nesting of graphs in elements
• Abstraction levels by visibility layers
• Distribution
• Based on formal mathematical definition
• Metamodeling of domain-specific aspects
• Efficient implementation & convenient APIs
• Available soon at jgralab.uni-koblenz.de under GPL23
jgralab.uni-koblenz.de
Thanks for your attention!
Any questions?