Graph Implementation Composite Default Screen Vertex Representation

Total Page:16

File Type:pdf, Size:1020Kb

Graph Implementation Composite Default Screen Vertex Representation cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Graphs: The Basics Composite Default screen Implementation [Edge]target vertex ▲ Representing graphs in computers is not as Representation simple asthe more abstract math and picture representations. How to store in computer memory? Input formats How to inputvertex and edge info? © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 1 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Graph Implementation Composite Default screen Vertex Representation Vertex Set 2 choices to implement (program) vertex set as a list: linked or indexed. N A vertex may be b a 0 a implemented as record or object a 1 b to store some d b property fields 2 c such as a label. c … c 3 d d … Quiz What’s the difference … betweenaa set and list? Hint: at least 2. © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 2 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Graph Implementation Composite Default screen Edge Representation Incident edges 2 choices to implement edges:aa linked list or matrix (next). adjacency list vertex list b N a b c d a d b a d Each vertex stores incident c … a edge info in its own linked list. a ? Exercise Write a formal (math) … specification. Compare to adjacency list. © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 3 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Edge Representation Composite Default screen Adjacency Matrix 0 1 1 acdb b 0 0 a W 1 1 1 a d 1 b 1 W W 1 c … … c 1 W W W vertex list d 1 1 W W a b c d b a d … c a d a b … Exercise Write the adjacency matrix. (Label clock- wise, answer last slide.) © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 4 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Edge Representation Composite Default screen Rationale Dense/sparse graphs Quiz 5 What’s the maximum number of edges possi- ble in this graph? Draw the missing. 1 3 2 4 Exercise f Write an adjacency b list for each graph. Exercise Which one would be a d e g Compare the adjacency list considered sparse? and the adjacency matrix of each shown graph in terms of efficency of: a) storage, c h and b) add/remove edge ops. © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 5 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Graph Implementation Composite Default screen Outline Ata minimum, a vertex object contains 2 fields: a Vertex objects label, and an adjacency list reference (=pointer). Lin“aanguage demo ssignment” page adjacent/target node Adjacency lists a b c d b a d Study linked list demo c a d a b Basic graph object Array ofvertex objects , each reference a linked list of target nodes © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 6 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled First Graph Object Composite Default screen vertex list this.label .adjacent ← null b 0 a adjacency lists a d 1 b b c d a c … 2 c d a 3 d a Quiz b What does the self var … this refer to in each case? this.verts [] © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 7 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile:Implementation Disabled Framework Composite Default screen Development environment Javascript, Firefox + Dev Tools Coding conventions Object and source organization Code caller (html) page Link “modules”, generate output © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 8 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Implementation Framework Composite Default screen Walkthrough © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 9 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Programming Checkpoint Composite Default screen Checkpoint 1 expectations First graph object,starter code in “assignment” page Fill in code where indicated Checkupload guide carefully Weekly workload 2–– 3 hrs/credit, 15 16 credit semester © 2020 Dr. Muhammad Al-Hashimi 3-4 KAU CPCS-324 10 cs324fig2.cdr Wednesday, September 9, 2020 9:43:17 AM Color profile: Disabled Graph Implementation Composite Default screen Outline Vertex objects Language demo in “assignment” page adjacent/target node Ata minimum, an adjacent/ target node Adjacency lists storesaoftarget vertex a b c d an incident edge, and b a d a reference to next node Study linked list demo c a in a linked list. d a b Basic graph object Array ofvertex objects , each reference a linked list of target nodes © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 11 cs324fig2.cdr Wednesday, September 9, 2020 9:43:18 AM Color profile: Disabled Graph Implementation Composite Default screen Edge Implementation & Figure 3.10 g h A naive implementation a e Targetvertices can be c f listed in any order, a d b separator maybe comma or similar. j i 0 a c d e 2 3 4 1 b e f 4 5 2 c a d f ? 3 d a c 4 e a b f 5 f b c e 6 g h i Exercise 7 h g i Discuss at least 2 ? disadvantages of the 8 i h j naive input format. 9 j g i Disadvantages © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 12 cs324fig2.cdr Wednesday, September 9, 2020 9:43:18 AM Color profile: Disabled Graph Implementation Composite Default screen Input Formats XML-based formats GraphML, GXL <>graph id="G " edgedefault="undirected " </>node id="n " </>node id="n1 " </>edge id="e1 " source=" n " target=" n1 " </graph > v Makkah v1 Jeddah v2 Madinah Plain-text/key-value formats v3 Taif v4 Yanbu N # TGF,LEDA , GML, JSON v v1 79.83 v1 v 79.75 v1 v3 13. v2 v1 38.65 © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 13 cs324fig2.cdr Wednesday, September 9, 2020 9:43:19 AM Color profile: Disabled Edge Implementation Composite Default screen Better Edge List Input Edge list specification Re-implement input interface Need edge type specification Some add-edge interface to hide insert detail © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 14 cs324fig2.cdr Wednesday, September 9, 2020 9:43:19 AM Color profile: Disabled First Edge Implementation Composite Default screen adjacency lists this.adjacent ←? 1 b 3 0 a 1 b 2 c 3 d a d 1 b a d c … 2 c a 2 … target nodes this.verts[] A minimum target node contains array Simple node index of adjacent vertex. Review linked list package Ñ It’s more important to learn how to use the package at this Note object interfaces stage. Call examples © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 15 cs324fig2.cdr Wednesday, September 9, 2020 9:43:19 AM Color profile: Disabled Programming Checkpoint Composite Default screen Checkpoint 2 Clean up needed parts of your code from previous Checkpoint expectations starter file and paste it into the new one. First edge implementation, starter 2 Usenew code starter Fill under outline comments Review upload guide Answers 1 234 1 2 Demo some basic Git moves 4 3 © 2020 Dr. Muhammad Al-Hashimi KAU CPCS-324 16.
Recommended publications
  • Practical Parallel Hypergraph Algorithms
    Practical Parallel Hypergraph Algorithms Julian Shun [email protected] MIT CSAIL Abstract v While there has been signicant work on parallel graph pro- 0 cessing, there has been very surprisingly little work on high- e0 performance hypergraph processing. This paper presents v0 v1 v1 a collection of ecient parallel algorithms for hypergraph processing, including algorithms for betweenness central- e1 ity, maximal independent set, k-core decomposition, hyper- v2 trees, hyperpaths, connected components, PageRank, and v2 v3 e single-source shortest paths. For these problems, we either 2 provide new parallel algorithms or more ecient implemen- v3 tations than prior work. Furthermore, our algorithms are theoretically-ecient in terms of work and depth. To imple- (a) Hypergraph (b) Bipartite representation ment our algorithms, we extend the Ligra graph processing Figure 1. An example hypergraph representing the groups framework to support hypergraphs, and our implementa- , , , , , , and , , and its bipartite repre- { 0 1 2} { 1 2 3} { 0 3} tions benet from graph optimizations including switching sentation. between sparse and dense traversals based on the frontier size, edge-aware parallelization, using buckets to prioritize processing of vertices, and compression. Our experiments represented as hyperedges, can contain an arbitrary number on a 72-core machine and show that our algorithms obtain of vertices. Hyperedges correspond to group relationships excellent parallel speedups, and are signicantly faster than among vertices (e.g., a community in a social network). An algorithms in existing hypergraph processing frameworks. example of a hypergraph is shown in Figure 1a. CCS Concepts • Computing methodologies → Paral- Hypergraphs have been shown to enable richer analy- lel algorithms; Shared memory algorithms.
    [Show full text]
  • Fcastone - FCA file Format Conversion and Interoperability Software
    FcaStone - FCA file format conversion and interoperability software Uta Priss Napier University, School of Computing, [email protected] www.upriss.org.uk Abstract. This paper presents FcaStone - a software for FCA file format con- version and interoperability. The paper both describes the features of FcaStone and discusses FCA interoperability issues (such as the specific difficulties en- countered when connecting FCA tools to other tools). The paper ends with a call to the FCA community to develop some sort of standard FCA Interchange For- mat, which could be used for data exchange between stand-alone applications and across the web. 1 Introduction FcaStone1 (named in analogy to ”Rosetta Stone”) is a command-line utility that con- verts between the file formats of commonly-used FCA2 tools (such as ToscanaJ, Con- Exp, Galicia, Colibri3) and between FCA formats and other graph and vector graph- ics formats. The main purpose of FcaStone is to improve the interoperability between FCA, graph editing and vector graphics software. Because it is a command-line tool, FcaStone can easily be incorporated into server-side web applications, which generate concept lattices on demand. FcaStone is open source software and available for down- load from Sourceforge. FcaStone is written in an interpreted language (Perl) and thus platform-independent. Installation on Linux and Apple OS X consists of copying the file to a suitable location. Installation on Windows has also been tested and is also fairly easy. The need for interoperability software was highlighted in discussions among ICCS participants in recent years. Several ICCS authors expressed disappointment with the lack of progress in conceptual structures (CS) research with respect to applications and software (Chein & Genest (2000); Keeler & Pfeiffer (2006)) and with respect to current web developments (Rudolph et al., 2007).
    [Show full text]
  • Practical Parallel Hypergraph Algorithms
    Practical Parallel Hypergraph Algorithms Julian Shun [email protected] MIT CSAIL Abstract v0 While there has been significant work on parallel graph pro- e0 cessing, there has been very surprisingly little work on high- v0 v1 v1 performance hypergraph processing. This paper presents a e collection of efficient parallel algorithms for hypergraph pro- 1 v2 cessing, including algorithms for computing hypertrees, hy- v v 2 3 e perpaths, betweenness centrality, maximal independent sets, 2 v k-core decomposition, connected components, PageRank, 3 and single-source shortest paths. For these problems, we ei- (a) Hypergraph (b) Bipartite representation ther provide new parallel algorithms or more efficient imple- mentations than prior work. Furthermore, our algorithms are Figure 1. An example hypergraph representing the groups theoretically-efficient in terms of work and depth. To imple- fv0;v1;v2g, fv1;v2;v3g, and fv0;v3g, and its bipartite repre- ment our algorithms, we extend the Ligra graph processing sentation. framework to support hypergraphs, and our implementations benefit from graph optimizations including switching between improved compared to using a graph representation. Unfor- sparse and dense traversals based on the frontier size, edge- tunately, there is been little research on parallel hypergraph aware parallelization, using buckets to prioritize processing processing. of vertices, and compression. Our experiments on a 72-core The main contribution of this paper is a suite of efficient machine and show that our algorithms obtain excellent paral- parallel hypergraph algorithms, including algorithms for hy- lel speedups, and are significantly faster than algorithms in pertrees, hyperpaths, betweenness centrality, maximal inde- existing hypergraph processing frameworks.
    [Show full text]
  • Adjacency Matrix
    CSE 373 Graphs 3: Implementation reading: Weiss Ch. 9 slides created by Marty Stepp http://www.cs.washington.edu/373/ © University of Washington, all rights reserved. 1 Implementing a graph • If we wanted to program an actual data structure to represent a graph, what information would we need to store? for each vertex? for each edge? 1 2 3 • What kinds of questions would we want to be able to answer quickly: 4 5 6 about a vertex? about edges / neighbors? 7 about paths? about what edges exist in the graph? • We'll explore three common graph implementation strategies: edge list , adjacency list , adjacency matrix 2 Edge list • edge list : An unordered list of all edges in the graph. an array, array list, or linked list • advantages : 1 2 3 easy to loop/iterate over all edges 4 5 6 • disadvantages : hard to quickly tell if an edge 7 exists from vertex A to B hard to quickly find the degree of a vertex (how many edges touch it) 0 1 2 3 4 56 7 8 (1, 2) (1, 4) (1, 7) (2, 3) 2, 5) (3, 6)(4, 7) (5, 6) (6, 7) 3 Graph operations • Using an edge list, how would you find: all neighbors of a given vertex? the degree of a given vertex? whether there is an edge from A to B? 1 2 3 whether there are any loops (self-edges)? • What is the Big-Oh of each operation? 4 5 6 7 0 1 2 3 4 56 7 8 (1, 2) (1, 4) (1, 7) (2, 3) 2, 5) (3, 6)(4, 7) (5, 6) (6, 7) 4 Adjacency matrix • adjacency matrix : An N × N matrix where: the non-diagonal entry a[i,j] is the number of edges joining vertex i and vertex j (or the weight of the edge joining vertex i and vertex j).
    [Show full text]
  • Introduction to Graphs
    Multidimensional Arrays & Graphs CMSC 420: Lecture 3 Mini-Review • Abstract Data Types: • Implementations: • List • Linked Lists • Stack • Circularly linked lists • Queue • Doubly linked lists • Deque • XOR Doubly linked lists • Dictionary • Ring buffers • Set • Double stacks • Bit vectors Techniques: Sentinels, Zig-zag scan, link inversion, bit twiddling, self- organizing lists, constant-time initialization Constant-Time Initialization • Design problem: - Suppose you have a long array, most values are 0. - Want constant time access and update - Have as much space as you need. • Create a big array: - a = new int[LARGE_N]; - Too slow: for(i=0; i < LARGE_N; i++) a[i] = 0 • Want to somehow implicitly initialize all values to 0 in constant time... Constant-Time Initialization means unchanged 1 2 6 12 13 Data[] = • Access(i): if (0≤ When[i] < count and Where[When[i]] == i) return Where[] = 6 13 12 Count = 3 Count holds # of elements changed Where holds indices of the changed elements. When[] = 1 3 2 When maps from index i to the time step when item i was first changed. Access(i): if 0 ≤ When[i] < Count and Where[When[i]] == i: return Data[i] else: return DEFAULT Multidimensional Arrays • Often it’s more natural to index data items by keys that have several dimensions. E.g.: • (longitude, latitude) • (row, column) of a matrix • (x,y,z) point in 3d space • Aside: why is a plane “2-dimensional”? Row-major vs. Column-major order • 2-dimensional arrays can be mapped to linear memory in two ways: 1 2 3 4 5 1 2 3 4 5 1 1 2 3 4 5 1 1 5 9 13 17 2 6 7 8 9 10 2 2 6 10 14 18 3 11 12 13 14 15 3 3 7 11 15 19 4 16 17 18 19 20 4 4 8 12 16 20 Row-major order Column-major order Addr(i,j) = Base + 5(i-1) + (j-1) Addr(i,j) = Base + (i-1) + 4(j-1) Row-major vs.
    [Show full text]
  • The Hitchhiker's Guide to Graph Exchange Formats
    The Hitchhiker’s Guide to Graph Exchange Formats Prof. Matthew Roughan [email protected] http://www.maths.adelaide.edu.au/matthew.roughan/ Work with Jono Tuke UoA June 4, 2015 M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 1 / 31 Graphs Graph: G(N; E) I N = set of nodes (vertices) I E = set of edges (links) Often we have additional information, e.g., I link distance I node type I graph name M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 2 / 31 Why? To represent data where “connections” are 1st class objects in their own right I storing the data in the right format improves access, processing, ... I it’s natural, elegant, efficient, ... Many, many datasets M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 3 / 31 ISPs: Internode: layer 3 http: //www.internode.on.net/pdf/network/internode-domestic-ip-network.pdf M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 4 / 31 ISPs: Level 3 (NA) http://www.fiberco.org/images/Level3-Metro-Fiber-Map4.jpg M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 5 / 31 Telegraph submarine cables http://en.wikipedia.org/wiki/File:1901_Eastern_Telegraph_cables.png M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 6 / 31 Electricity grid M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 7 / 31 Bus network (Adelaide CBD) M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 8 / 31 French Rail http://www.alleuroperail.com/europe-map-railways.htm M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 9 / 31 Protocol relationships M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 10 / 31 Food web M.Roughan (UoA) Hitch Hikers
    [Show full text]
  • 9 the Graph Data Model
    CHAPTER 9 ✦ ✦ ✦ ✦ The Graph Data Model A graph is, in a sense, nothing more than a binary relation. However, it has a powerful visualization as a set of points (called nodes) connected by lines (called edges) or by arrows (called arcs). In this regard, the graph is a generalization of the tree data model that we studied in Chapter 5. Like trees, graphs come in several forms: directed/undirected, and labeled/unlabeled. Also like trees, graphs are useful in a wide spectrum of problems such as com- puting distances, finding circularities in relationships, and determining connectiv- ities. We have already seen graphs used to represent the structure of programs in Chapter 2. Graphs were used in Chapter 7 to represent binary relations and to illustrate certain properties of relations, like commutativity. We shall see graphs used to represent automata in Chapter 10 and to represent electronic circuits in Chapter 13. Several other important applications of graphs are discussed in this chapter. ✦ ✦ ✦ ✦ 9.1 What This Chapter Is About The main topics of this chapter are ✦ The definitions concerning directed and undirected graphs (Sections 9.2 and 9.10). ✦ The two principal data structures for representing graphs: adjacency lists and adjacency matrices (Section 9.3). ✦ An algorithm and data structure for finding the connected components of an undirected graph (Section 9.4). ✦ A technique for finding minimal spanning trees (Section 9.5). ✦ A useful technique for exploring graphs, called “depth-first search” (Section 9.6). 451 452 THE GRAPH DATA MODEL ✦ Applications of depth-first search to test whether a directed graph has a cycle, to find a topological order for acyclic graphs, and to determine whether there is a path from one node to another (Section 9.7).
    [Show full text]
  • A DSL for Defining Instance Templates for the ASMIG System
    A DSL for defining instance templates for the ASMIG system Andrii Kovalov Dissertation 2014 Erasmus Mundus MSc in Dependable Software Systems Department of Computer Science National University of Ireland, Maynooth Co. Kildare, Ireland A dissertation submitted in partial fulfilment of the requirements for the Erasmus Mundus MSc Dependable Software Systems Head of Department : Dr Adam Winstanley Supervisor : Dr James Power Date: June 2014 Abstract The area of our work is test data generation via automatic instantiation of software models. Model instantiation or model finding is a process of find- ing instances of software models. For example, if a model is represented as a UML class diagram, the instances of this model are UML object diagrams. Model instantiation has several applications: finding solutions to problems expressed as models, model testing and test data generation. There are sys- tems that automatically generate model instances, one of them is ASMIG (A Small Metamodel Instance Generator). This system is focused on a `problem solving' use case. The motivation of our work is to adapt ASMIG system for use as a test data generator and make the instance generation process more transparent for the user. In order to achieve this we provided a way for the user to interact with ASMIG internal data structure, the instance template graph via a specially designed graph definition domain-specific language. As a result, the user is able to configure the instance template in order to get plausible instances, which can be then used as test data. Although model finding is only suitable for obtaining test inputs, but not the expected test outputs, it can be applied effectively for smoke testing of systems that process complex hierarchic data structures such as programming language parsers.
    [Show full text]
  • List Representation: Adjacency List – N Rows of the Adjacency Matrix Are
    List Representation: Adjacency List { n rows of the adjacency matrix are repre- sented as n linked lists { Declare an Array of size n e.g. A[1:::n] of Lists { A[i] is a pointer to the edges in E(G) starting at vertex i. Undirected graph: data in each list cell is a number indicating the adjacent vertex Weighted graph: data in each list cell is a pair (vertex, weight) 1 a b c e a [b,2] [c,6] [e,4] b a b [a,2] c a e d c [a,6] [e,3] [d,1] d c d [c,1] e a c e [a,4] [c,3] Properties: { the degree of any node is the number of elements in the list { O(e) to check for adjacency for e edges. { O(n + e) space for graph with n vertices and e edges. 2 Search and Traversal Techniques Trees and Graphs are models on which algo- rithmic solutions for many problems are con- structed. Traversal: All nodes of a tree/graph are exam- ined/evaluated, e.g. | Evaluate an expression | Locate all the neighbours of a vertex V in a graph Search: only a subset of vertices(nodes) are examined, e.g. | Find the first token of a certain value in an Abstract Syntax Tree. 3 Types of Traversals Binary Tree traversals: | Inorder, Postorder, Preorder General Tree traversals: | With many children at each node Graph Traversals: | With Trees as a special case of a graph 4 Binary Tree Traversal Recall a Binary tree | is a tree structure in which there can be at most two children for each parent | A single node is the root | The nodes without children are leaves | A parent can have a left child (subtree) and a right child (subtree) A node may be a record of information | A node is visited when it is considered in the traversal | Visiting a node may involve computation with one or more of the data fields at the node.
    [Show full text]
  • Package 'Igraph'
    Package ‘igraph’ February 28, 2013 Version 0.6.5-1 Date 2013-02-27 Title Network analysis and visualization Author See AUTHORS file. Maintainer Gabor Csardi <[email protected]> Description Routines for simple graphs and network analysis. igraph can handle large graphs very well and provides functions for generating random and regular graphs, graph visualization,centrality indices and much more. Depends stats Imports Matrix Suggests igraphdata, stats4, rgl, tcltk, graph, Matrix, ape, XML,jpeg, png License GPL (>= 2) URL http://igraph.sourceforge.net SystemRequirements gmp, libxml2 NeedsCompilation yes Repository CRAN Date/Publication 2013-02-28 07:57:40 R topics documented: igraph-package . .5 aging.prefatt.game . .8 alpha.centrality . 10 arpack . 11 articulation.points . 15 as.directed . 16 1 2 R topics documented: as.igraph . 18 assortativity . 19 attributes . 21 autocurve.edges . 23 barabasi.game . 24 betweenness . 26 biconnected.components . 28 bipartite.mapping . 29 bipartite.projection . 31 bonpow . 32 canonical.permutation . 34 centralization . 36 cliques . 39 closeness . 40 clusters . 42 cocitation . 43 cohesive.blocks . 44 Combining attributes . 48 communities . 51 community.to.membership . 55 compare.communities . 56 components . 57 constraint . 58 contract.vertices . 59 conversion . 60 conversion between igraph and graphNEL graphs . 62 convex.hull . 63 decompose.graph . 64 degree . 65 degree.sequence.game . 66 dendPlot . 67 dendPlot.communities . 68 dendPlot.igraphHRG . 70 diameter . 72 dominator.tree . 73 Drawing graphs . 74 dyad.census . 80 eccentricity . 81 edge.betweenness.community . 82 edge.connectivity . 84 erdos.renyi.game . 86 evcent . 87 fastgreedy.community . 89 forest.fire.game . 90 get.adjlist . 92 get.edge.ids . 93 get.incidence . 94 get.stochastic .
    [Show full text]
  • An Exchange Format for Graph Transformation Systems
    Electronic Notes in Theoretical Computer Science 127 (2005) 51–63 www.elsevier.com/locate/entcs A New Version of GTXL : An Exchange Format for Graph Transformation Systems Leen Lambers Institut f¨ur Softwaretechnik und Theoretische Informatik Technische Universit¨at Berlin Germany Abstract GTXL (Graph Transformation Exchange Language) is designed to support and stimulate develop- ers to provide their graph transformation-based tools with an exchange functionality regarding the integration with other tools. For this exchange XML was chosen as underlying technology. The exchange of graphs is facilitated by the exchange format GXL which is also XML-based. GTXL uses GXL to describe the graph parts of a graph transformation system. A first version of GTXL arose from the format discussion within the EU Working Group APPLIGRAPH. Trying to restim- ulate the discussion on a common exchange format for graph transformation systems, this paper presents a new version of GTXL. Three important changes have been made. At first, an integrated presentation of rules is introduced, secondly the expression of more general conditions is supported and finally the storage of the underlying semantics of a graph transformation system by means of special attributes is proposed. Keywords: exchange format, graph transformation system, graph transformation-based tools, XML 1 Introduction Graph transformation systems (GTSs) comprise graphs and rules changing these graphs. Comparing them with term rewrite systems, terms correspond to graphs and term rewrite rules to graph rewrite rules. Since graphs are widely used to model various data structures in computer science, graph trans- formation systems can be used to define various modifications of these data 1 Email: [email protected] 1571-0661/$ – see front matter © 2005 Elsevier B.V.
    [Show full text]
  • An XML-Based Description of Structured Networks
    Massimo Ancona, Walter Cazzola, Sara Drago, and Francesco Guido. An XML-Based Description of Structured Networks. In Proceedings of Interna- tional Conference Communications 2004, pages 401–406, Bucharest, Romania, June 2004. IEEE Press. An XML-Based Description of Structured Networks Massimo Ancona£ Walter Cazzola† Sara Drago£ Francesco Guido‡ £ DISI University of Genova, e-mail: fancona,[email protected] † DICo University of Milano, e-mail: [email protected] ‡ Marconi Selenia Communication, e-mail: [email protected] Abstract In this paper we present an XML-based formalism to describe hierarchically organized communication networks. After a short overview of existing graph description languages, we discuss the advantages and disadvantages of their application in network optimization. We conclude by extending one of these formalisms with features supporting the description of the relationship between the optimized logical layout of a network and its physical counterpart. Elements for describing traffic parameters are also given. 1 Introduction The problem of network design and optimization has a strategical importance especially for military networks. In this case, design for fault tolerance and security plays a role more and more crucial than the equivalent importance required for commercial and research networks. The reengineering of a large communication network is a complex problem, which consists of different aspects that can be strongly affected by the way of describing data. The plainest way to describe a communication network is to model the relationship among sites and links by means of a weighted undirected graph, but unless some more assumptions are taken, this approach can raise several problems. A first issue is encountered when an analysis and a visualization of the network has to be realized: practical networks include hundreds or often thousands of nodes and links, so that even a simple description and documentation of the network structure is hard to maintain and update.
    [Show full text]