Universität Koblenz-Landau Institut für Softwaretechnik GUPRO WOSEF 2000Limerick, 6.6.2000 (1) Components of Interchange Formats (Metaschemas and Typed.

Slides:



Advertisements
Similar presentations
Simplifications of Context-Free Grammars
Advertisements

1 eXtensible Markup Language. XML is based on SGML: Standard Generalized Markup Language HTML and XML are both based on SGML 2 SGML HTMLXML.
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
1 Vorlesung Informatik 2 Algorithmen und Datenstrukturen (Parallel Algorithms) Robin Pomplun.
Universität Koblenz-Landau Institut für Softwaretechnik Re-Group CASCON 2000Toronto, Graph Exchange Language An overview Ric Holt Andreas Winter.
Universität Koblenz-Landau Institut für Softwaretechnik Re-Group Interoperability of Reengineering Tools Dagstuhl, Jan 20-25, 2001 Graph Exchange Language.
Universität Koblenz-Landau Institut für Softwaretechnik Re-Group WCRE 2000Brisbn, Nov 25, 2000 Graph Exchange Language Representing Graph Schemas (a working.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
Myra Shields Training Manager Introduction to OvidSP.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Introduction to HTML, XHTML, and CSS
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
1 Discreteness and the Welfare Cost of Labour Supply Tax Distortions Keshab Bhattarai University of Hull and John Whalley Universities of Warwick and Western.
© Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn 2.5 Graph Grammars.
22-Sep-06 CS6795 Semantic Web Techniques 0 Extensible Markup Language.
Programming Language Concepts
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Week 2 The Object-Oriented Approach to Requirements
Turing Machines.
PP Test Review Sections 6-1 to 6-6
ABC Technology Project
EU market situation for eggs and poultry Management Committee 20 October 2011.
Semantic Analysis and Symbol Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
XML and Databases Exercise Session 3 (courtesy of Ghislain Fourny/ETH)
2 |SharePoint Saturday New York City
VOORBLAD.
1 public class Newton { public static double sqrt(double c) { double epsilon = 1E-15; if (c < 0) return Double.NaN; double t = c; while (Math.abs(t - c/t)
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Universität Kaiserslautern Institut für Technologie und Arbeit / Institute of Technology and Work 1 Q16) Willingness to participate in a follow-up case.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
1 of 31 Images from Africa. 2 of 31 My little Haitian friend Antoine (1985)
1 of 32 Images from Africa. 2 of 32 My little Haitian friend Antoine (1985)
25 seconds left…...
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Chapter 10: The Traditional Approach to Design
Analyzing Genes and Genomes
Systems Analysis and Design in a Changing World, Fifth Edition
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Chapter 11 Component-Level Design
Essential Cell Biology
Energy Generation in Mitochondria and Chlorplasts
Steffen Staab 1WeST Web Science & Technologies University of Koblenz ▪ Landau, Germany Structured Data on the Web Introduction to.
Universität Koblenz-Landau Institut für Softwaretechnik Re-Group Graph Drawing Vienna, September 26, 2001 Graph Exchange Language Andreas Winter joint.
Presenter : g9102 黃培智 Outline  Motivation and Background  GXL Overview  Exchange Graphs  Exchange Graph Schemas  Conclusion.
Connecting Architecture Reconstruction Frameworks Ivan Bowman, Michael Godfrey, Ric Holt Software Architecture Group University of Waterloo CoSET ‘99 May.
Presentation transcript:

Universität Koblenz-Landau Institut für Softwaretechnik GUPRO WOSEF 2000Limerick, (1) Components of Interchange Formats (Metaschemas and Typed Graphs) Andreas Winter presented by

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (2) Included Papers M. van den Brand, H. de Jong, P. Olivier: A Common Exchange Format for Reengineering Tools based on ATerms M. W. Godfrey: Practical Data Exchange for Reverse Reengineering Frameworks: Some Requirements, Some Experiences, Some Headaches J. Ebert, B. Kullbach, A. Winter: GraX - Graph Exchange Format

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (3) Contents Components of Interchange Formats – Structure – Format – Data Access – Transformation – Metaschema Approaches to Interchange Formats – ATerms (efficient Annotated TERMS) – TAXForm (TA eXchange FORMAT) – GraX / GXL (Graph eXchange Language) Conclusion

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (4) Structure Problem –various structures are used in current tools Abstract Syntax Trees: ATerms,... Graphs: Datrix-TA, TA, TGraphs, PROGRES, RSF,... Relations: relational Databases, RPA,... Requirements –exchange of data requires a common superset, enclosing these structures Proposed Solutions –terms –directed, typed, attributed graphs

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (5) Format Problem –Programming Languages single language systems (Cobol, C, C++,...) multi language systems –Level of Abstraction AST level architectural level Requirements –adaptable and extensible interchange format Proposed Solutions –exchange of schema data and –exchange of instance data

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (6) Data Access Problem –large amount of data –import from/export to various tools Requirements –efficient and standardized access to interchanged data Proposed Solutions –application programming interface –set of standardized, predefined tools

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (7) Transformation Problem –different tasks require different representations –seamless data exchange between different representations Requirements –efficient transformation between different representations Proposed Solutions –set of (reference) schemata and definition of transformation between them

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (8) Metaschema Problem –mechanism to describe schema information for different applications –foundation to define schema transformations Requirements –common mechanism for describing schemata Proposed Solutions –metaschema (UML class diagram)

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (9) Efficient Annotated Terms (ATerms) M. G. J. van den Brand, H. A. de Jong, P. Klint, P. Olivier, et al. Approach –exchange format for tree-like data structures like parse trees, abstract syntax trees, generated code, formatted source text –comprehensive procedural interface for manipulation in C and Java

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (10) ATerm Grammar (SDF) ATerm -> ATerms ATerm "," Aterms -> ATerms "[" "]" -> ATermList "[" ATerms "]" -> ATermList AInt -> AFun Literal -> AFun ATermList -> ATerm AFun -> ATerm AFun "(" ATerms ")" -> ATerm "{" ATerms "}" -> Annotation ATermList Annotation -> ATerm AFun Annotation -> ATerm AFun "(" ATerms ")" Annotation -> ATerm ATerms - Structure Software systems are represented by annotated Terms ATerm Grammar (EBNF) ATerm::= AFun ["(" ATerms ")"] [Annotation] | "[" [ATerms] "]" [Annotation] ATerms ::= ATerm ("," ATerm)* AFun::= AInt | Literal Annotation ::= "{" ATerms "}" ATerm Examples constants : abc numerals : 42 literals : "asdf" lists : [], [1, "abc" 2], [1, 2, [3, 4]] functions : f("a"), g(1,[]) annotations : f("a") {"remark"}

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (11) ATerms - Format Instance Level –focuses (only) on tree like structures –Notation terms over variables, constants and a given set of function symbols Schema Level –schemata implicitly represented defined by an appropriate set of functions e.g. for representing abstract syntax trees (AsFix) further schema information can be represented by annotations with ATerms

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (12) ATerms - Example (1) AsFix (ASF+SDF Fixed Format) –parse tree format for ASF/SDF SDF (Syntax Definition Formalism) ASF (Algebraic Specification Formalism) –each term represents a parse tree including syntax rules original layout comments –AsFix representation is self-contained term includes all grammar information needed for interpretation

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (13) ATerms - Example (2) AsFiX Functions – prod(T) : production rule – appl(T 1,T 2 ) : applying production rule T 1 to arguments T 2 – l(T) : literal T – sort(T) : sort T – w(T) : white space T – attr(T) : single attribute – attrs(T) : lost of attributes – no-attrs : empty list of attributes

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (14) ATerms - Example (3) Grammar (SDF) true -> Bool false -> Bool Bool or Bool -> Bool {left} true or false false Bool true Boolor Bool AsFix Term appl( prod([sort("Bool"),l("or"),sort("Bool")],sort("Bool"), attrs([attr("left")])), [appl(prod([l("true")],sort("Bool"),no-attrs) [l("true")]), w(" "), l("or"), w(" "), [appl(prod([l("false")],sort("Bool"),no-attrs) [l("false")])])

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (15) ATerms - Data Access ATerms API –Making and Matching ATerms (4) make new ATerms match ATerms compare ATerms –Reading and Writing ATerms (6) write/read ATerms to/from text files write/read ATerms to/from binary files write/read ATerms to/from strings –Annotating ATerms (3) set/get/remove annotations

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (16) TA Exchange Format (TAXForm) I. T. Bowman, M. W. Godfrey, R. C. Holt, et al. Approach –exchange format for graph-like structures based on TA (Tuple Attribute Language) –efficient transformation between different graph-like structures

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (17) main.c function P { q(); T 1 v; x = v++; } function Q { T 2 w; z = w; } test.c Proc File : string Var Line : int Ref Call Line : int schema TAXForm - Structure Software systems are represented by directed, attributed, typed graphs File = "main.c" PProc Line = 127 vVar Line = 27 wVar File = "test.c" QProc Line =42 Line =316 Line =225 Ref Call Ref typed graph

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (18) TAXForm - Level of Abstraction AST LevelArchitectural Level top level subsystems of LINUX kernel Datrix AST for C++ statement local_var = global_var * param

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (19) TAXForm - Format Instance Level –focuses on arbitrary graph-like structures on AST level on architectural level –notation: fact tuples and fact attributes Schema Level –schemata explicitly represented –notation: schema tuples and schema attributes

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (20) TAXForm - Example (1) FACT TUPLE $INSTANCE P Proc $INSTANCE Q Proc $INSTANCE v Var $INSTANCE w Var Call P Q Ref P v Ref Q w FACT ATTRIBUTE P {File = "main.c"} Q {File = "test.c"} v {Line = 127} w {Line = 27} (Call P Q){Line = 42} (Ref P v){Line = 225} (Ref q w){Line = 316} File = "main.c" PProc Line = 127 vVar Line = 27 wVar File = "test.c" QProc Line =42 Line =316 Line =225 Ref Call Ref instance level

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (21) TAXForm - Example (2) SCHEMA TUPLE Call Proc Proc Ref Proc Var SCHEME ATTRIBUTE Proc {File} Var {Line} (Call) {Line} (Ref) {Line} Proc File : string Var Line : int Ref Call Line : int schema level

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (22) TAXForm Utopia: –Transformation between schemata TAXForm - Transformation (1) lots of different schemas were defined for various purposes (e.g. on architectural level) Universal High-Level Procedural PL/IC Object-Oriented C++Java Dali CRigi CPBS C

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (23) TAXForm offers a fixed set of schema transformations e.g. TAXForm - Transformation (2) Work to do: –very general schema transformation mechanism Source File uses file Data Type defines ProcedureData defines uses type uses data defines uses procedure uses type Module depends-on Subsystem contains $ENTITY $RELATION universal schema high-level schema procedural language schema

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (24) Graph Exchange Language (GXL) J. Ebert, R. C. Holt, B. Kullbach, A. Schürr, A. Winter Approach –XML exchange format for graph-like structures based on TA and TGraphs –metamodel for defining schemata joint graph exchange format GraX, TA, PROGRES, RSF, RPA

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (25) GXL - Structure Software systems are represented by ordered, directed, attributed, typed graphs AST Level

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (26) GXL - Structure Software systems are represented by ordered, directed, attributed, typed graphs architectural Level

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (27) GXL - Foundation Instance Level –focuses on arbitrary graph-like structures on AST level on architectural level –notation: XML document Schema Level –schemata explicitly represented –notation: XML document

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (28) GXL - Document Type Definition Exchange of instance and schema data by attributed graphs XML based markup language for representing attributed graphs GXL DTD (simplified) <!ATTLIST gxl schema CDATA #REQUIRED identifiededges (true|false) #REQUIRED > <!ATTLIST node id ID #REQUIRED type CDATA #IMPLIED edgeorder IDREFS #IMPLIED > <!ATTLIST edge id ID #IMPLIED type CDATA #IMPLIED begin IDREF #REQUIRED end IDREF #REQUIRED > <!ATTLIST attr name CDATA #REQUIRED value CDATA #IMPLIED >

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (29) GXL Example (1) instance level File = "main.c" PProc Line = 127 vVar Line = 27 wVar File = "test.c" QProc Line = 42 Line =316 Line = 225 Ref Call Ref

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (30) GXL - Example (2) Proc File : string Var Line : int Ref Call Line : int schema level begin = "v3" end = "v1"> <edge id = "e2" type = "goesTo" begin = "v3" end = "v2">...

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (31) GXL - Metaschema (1)

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (32) GXL - Metaschema (2) with attribute structure

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (33) GXL - Data Access GXL Tools –parsers parse GXL instance and schema data –filters transfer GXL documents into TA, TGraphs, PROGRES, RSF, RPA,... transfer TA, TGraphs, PROGRES, RSF, RPA,... into GXL documents –checkers check if instance matches ist schema –helpers recover schema information

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (34) Comparison

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (35) Conclusion Agreement –exchange of schema and instance data –by directed, attributed, typed graphs –with a XML-language –based on a common Metamodel Extensions –consideration of hierarchical graphs, hypergraphs, and graph transformation rules Work to do –definition of a suitable API –definition of a set of tools –definition of powerful schema transformation

© Institut für Softwaretechnik Universität Koblenz-Landau Limerick, (36) GXL Report: –R. C. Holt, A. Schürr, A. Winter: GXL: Toward a Standard Exchange Format, Fachberichte Informatik, Uni Koblenz URL: (coming soon) – you are all invited to participate in the further development of GXL