Introduction to Graph Grammars Fulvio D’Antonio LEKS, IASI-CNR Rome, 14-10-03.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Relations Relations on a Set. Properties of Relations.
ARTIST2 - MOTIVES Trento - Italy, February 19-23, 2007 Model Transformation and UML Reiko Heckel University of Leicester, UK Foundations of Model Transformation.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Introduction to Graph “theory”
Event structures Mauro Piccolo. Interleaving Models Trace Languages:  computation described through a non-deterministic choice between all sequential.
Theory Of Automata By Dr. MM Alam
1 What are Bit Strings? The View from Process Nick Rossiter Northumbria University.
Implementing Petri Net Transformations Tony Modica Implementing Petri Net Transformations using Graph Transformation Tools Enrico Biermann,
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Introduction to Computability Theory
Model checking dynamic states in GROOVE Arend Rensink Formal Methods and Tools University of Twente.
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by.
Morphisms of State Machines Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 7 Updated and adapted.
30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces1 Graph Transformation for Model Transformation Arend Rensink University of Twente.
Synchronization Algebras with Mobility for Graph Transformations joint work with Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese.
1 GT-VC 2005, San Francisco, August 22, 2005 Ugo Montanari Università di Pisa Ivan Lanese Università di Pisa Hoare vs. Milner: Comparing Synchronizations.
Foundations of Model Transformations A “lambda calculus” for MDD ? Reiko Heckel University of Leicester, UK.
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
Topics Automata Theory Grammars and Languages Complexities
Behaviour-Preserving Model Transformation Arend Rensink, University of Twente IPA Spring Days, 18 April 2012.
Chapter 4 Context-Free Languages Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Introduction Syntax: form of a sentence (is it valid) Semantics: meaning of a sentence Valid: the frog writes neatly Invalid: swims quickly mathematics.
APPLICATIONS OF CONTEXT FREE GRAMMARS BY, BRAMARA MANJEERA THOGARCHETI.
Tree-adjoining grammar (TAG) is a grammar formalism defined by Aravind Joshi and introduced in Tree-adjoining grammars are somewhat similar to context-free.
What is linguistics  It is the science of language.  Linguistics is the systematic study of language.  The field of linguistics is concerned with the.
DATA-DRIVEN UNDERSTANDING AND REFINEMENT OF SCHEMA MAPPINGS Data Integration and Service Computing ITCS 6010.
INM175 Topic 7 1 Module INM175 Discrete Mathematics Topic 7 Set Theoretic Models.
1 Graph-Based State Spaces Arend Rensink, University of Twente CamPaM 2012 April 2012Graph-Based State Spaces.
Copyright © Curt Hill Languages and Grammars This is not English Class. But there is a resemblance.
By, Venkateswara Reddy. Tallapu Reddy. 1.Introduction. 2.What is X-Machine Testing..?? 3.Methods of X-Machine Testing. 4.Variants of X- Machine. 5.Stream.
CS 321 Programming Languages and Compilers Lectures 16 & 17 Introduction to Formal Languages Regular Languages Lexical Analysis.
Language: Set of Strings
Complexity and Computability Theory I Lecture #2 Rina Zviel-Girshin Leah Epstein Winter
Morphisms of State Machines Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 8 Updated and adapted.
Mathematical Preliminaries
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
C Sc 132 Computing Theory Professor Meiliu Lu Computer Science Department.
Page 1 Renzo Angles and Claudio Gutierrez University of Chile ACM Computing Surveys, 2008 Survey of Graph Database Models.
1 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
Akram Salah ISSR Basic Concepts Languages Grammar Automata (Automaton)
Lecture #2 Advanced Theory of Computation. Languages & Grammar Before discussing languages & grammar let us deal with some related issues. Alphabet: is.
Theory of Computation Automata Theory Dr. Ayman Srour.
Rewriting Nested Graphs, through Term Graphs Roberto Bruni, Andrea Corradini, Fabio Gadducci Alberto Lluch Lafuente and Ugo Montanari Dipartimento di Informatica,
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
Introduction to Relations
Learn about relations and their basic properties
Introduction to the Theory of Computation
Lexical analysis Finite Automata
L-systems L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms.
State Digrams in UML: A Formal Senmatics using Graph Transformations
CSE 105 theory of computation
Finite Automata a b A simplest computational model
Graph-Based Operational Semantics
Formal Language Theory
CS201: Data Structures and Discrete Mathematics I
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz
Graph transformation in a Nutshell
4b Lexical analysis Finite Automata
Presented by Denis Dubé Feb 28, 2005
4b Lexical analysis Finite Automata
Introduction to Graph Transformation
Visual Programming Languages ICS 539 Icon System Visual Languages & Visual Programming, Chapter 1, Editor Chang, 1990 ICS Department KFUPM Sept. 1,
Presentation transcript:

Introduction to Graph Grammars Fulvio D’Antonio LEKS, IASI-CNR Rome,

Summary Basic concepts Double pushout approach Single pushout approach Tools References

Graph grammars Algebraic approaches were developed at the Technical University of Berlin The main idea was that of extending concatenation of strings to a “gluing” of graphs The action of gluing two graphs is a construction, in the category of graphs and graph morphisms, called pushout Graph grammars has been invented (in early seventies) in order to generalize (Chomsky) string grammars.

Graph grammars: definition A graph grammar is a pair: GG = (G 0,P) G 0 is called the starting graph and P is a set of production rules L(GG) is the set of graphs that can be derived starting with G 0 and applying the rules in P

A graph…

Definition A pair (V,E) of finite sets : E  V  V E is a set of ordered pairs of vertexes. Graphically we represent an edge (v 1,v 2 ) with an arrow starting in v 1 and ending in v 2

Another graph … This is a multigraph

Another definition A pair (V,E) where V is a finite set, E is a finite multiset with elements in V  V E.g. V=  v 1,v 2,…., v n  E =  (v 1,v 2 ),….,(v 1,v 2 ),… 

Yet another graph … This is a labelled multigraph: elements without a label are considered labelled with the null symbol  a b A A

Yet another definition A pair (V,E) where: V is a finite set of pairs and E is a finite set of triples. Too complicated!

A more elegant definition (algebraic style) A graph is a tuple (V,E,s,t,l V,l E ): V and E are two finite sets (V  E=  ) s,t : E  V are two mappings indicating the source and the target of an edge l V : V  V e l E : E  E are two mappings from from V and E in two finite sets of labels

Example A A B B E Notes: The edges are directed Two vertexes with the same label Multiple edges (even with the same label!) between two vertexes

Example 2:Pacman graph (PG)

Graph morphism: informally speaking Given two graphs G and G’ we want to know if G’ “contains” G. We can try to draw a correspondence between every vertex (edge) of G and a vertex (edge) of G’ This correspondence is a graph morphism (if it respects some properties!)

Example: G is contained in G’ A A B B E G’ G A A B This is a correct graph morphism

Example 2 A A B B E G’ G A B This is not a correct graph morphism 2

Example 3 A A B B E G’ G 1,3 2,4 This is a correct non-injective graph morphism E E

Graph morphism a graph morphism  is a pair (  1,  2 ),  1 :V  V’,  2 : E  E’ such as: 1)labels are preserved i.e. l V (v i ) = l V’ (  1 (v i )) etc. 2)incidence is preserved i.e.  1 (s(e i )) = s’(  2 (e i ))) etc. Given G =(V,E,s,t,l V,l E ) and G’=(V’,E’,s’,t’,l V’,l E’ )

What is a pushout? (Very very informal) “Gluing” of two objects along a common substructure

Summary Basic concepts Double pushout approach Single pushout approach Tools References

Graph grammars: Double pushout approach The format of a production rule is: p : L l  K  r R L,K,R are graphs and l,r are two (total) morphisms matching K, respectively,in L and R

Example movePacman : L K R

Derivation Given: a graph G,a production p:L l  K  r R and a graph morphism  :L  G 1)The context graph is obtained “deleting” from G all elements images of elements in L but not of elements in K (pushout complement) 2)The final graph is obtained “adding” to context graph all elements which don’t have a pre-image in K(pushout)

Example movePacman : The graph G The match L K R

The context graph The match

The final graph H The match G  ,p H G  * ,p G n (reflexive symmetric and transitive closure)

Other rules in Pacman game MoveGhost: Kill :

Summary Basic concepts Double pushout approach Single pushout approach Tools References

Single pushout approach The format of a production rule is: p : L  r R r is a partial graph morphism A single derivation step is modelled by a single-pushout diagram

Example LR r is a partial morphism r

Difference between the two approaches Double-pushout approach requires two further conditions for a step derivation (dangling and identification condition) Single-pushout doesn’t requires such conditions Single pushout rules can model more situations than double pushout rules

Summary Basic concepts Double pushout approach Single pushout approach Tools References

Progres PROGRES is an integrated environment for a very high level programming language which has a formally defined semantics based on "PROgrammed Graph REwriting Systems" Agg AGG is a rule based visual language supporting single pushout approach to graph transformation. It aims at the specification and prototypical implementation of applications with complex graph-structured data.

Fujaba Atom 3 Grace and Graceland Other tools

Standards GXL (Graph Exchange Language) GTXL (Graph Transformation Exchange Language)

References People: G.Rozenberg,A.Schurr, R.Heckel, G.Taentzer, P.Bottoni, F.Parisi-Presicce, A.Corradini, H.Ehrig, H.G.Kreowsky. Theory: G. Rozenberg, editor. Handbook of Graph Grammars and Computing by Graph Transformation, Volume 1-3: Foundations. World Scientific, Corradini, A., Montanari, U., Rossi, F., Ehrig, H., Heckel, R., Löwe, M. Algebraic Approaches to Graph Transformation Part I: Basic Concepts and Double Pushout Approach Corradini, A. Concurrent Graph and Term Graph Rewriting Proc. CONCUR'96, LNCS Tools: Progres homepage: aachen.de/research/projects/progres/main.html Agg homepage: Graceland homepage: Fujaba homepage: Atom 3 : Standard: GXL: