Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.

Slides:



Advertisements
Similar presentations
Comparison of Several Meta-modeling Tools 2 Yi Lu Computer Science Department McGill University
Advertisements

Semantics Static semantics Dynamic semantics attribute grammars
A Visual Programming Environment Based on Graph Grammars and Tidy Graph Drawing Y. Adachi, Y. Miyadera, K. Sugita K. Tsuchida and T. Yaku.
Compilers and Language Translation
UNIT-III By Mr. M. V. Nikum (B.E.I.T). Programming Language Lexical and Syntactic features of a programming Language are specified by its grammar Language:-
Session 14 (DM62) / 15 (DM63) Recursive Descendent Parsing.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Computation Model Defining practical programming languages Carlos Varela RPI.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
NaLIX: A Generic Natural Language Search Environment for XML Data Presented by: Erik Mathisen 02/12/2008.
Visual Web Information Extraction With Lixto Robert Baumgartner Sergio Flesca Georg Gottlob.
Chapter 9 Compilers and Language Translation. The Compilation Process Phase I: Lexical analysis Phase I: Lexical analysis Phase II: Parsing Phase II:
Compiler Construction
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
BİL744 Derleyici Gerçekleştirimi (Compiler Design)1.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
COP4020 Programming Languages
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Query Processing Presented by Aung S. Win.
CS-EE 481 Spring Founders Day, 2005 University of Portland School of Engineering Project Pocket Gopher Conversational Learning Agent Team Josh Jones.
Invitation to Computer Science 5th Edition
2.2 A Simple Syntax-Directed Translator Syntax-Directed Translation 2.4 Parsing 2.5 A Translator for Simple Expressions 2.6 Lexical Analysis.
Syntax & Semantic Introduction Organization of Language Description Abstract Syntax Formal Syntax The Way of Writing Grammars Formal Semantic.
A Generative and Model Driven Framework for Automated Software Product Generation Wei Zhao Advisor: Dr. Barrett Bryant Computer and Information Sciences.
An Introduction to Programming and Object-Oriented Design Using Java By Jaime Niño and Fred Hosch Slides by Darwin Baines and Robert Burton.
The Electronic Geometry Textbook Project Xiaoyu Chen LMIB - Department of Mathematics Beihang University, China.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Chapter 10: Compilers and Language Translation Invitation to Computer Science, Java Version, Third Edition.
Syntax-Directed Translation
CS 326 Programming Languages, Concepts and Implementation Instructor: Mircea Nicolescu Lecture 2.
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style COMPILER DESIGN Review Joey Paquet,
PETRA – the Personal Embedded Translation and Reading Assistant Werner Winiwarter University of Vienna InSTIL/ICALL Symposium 2004 June 17-19, 2004.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
Lesson 3 CDT301 – Compiler Theory, Spring 2011 Teacher: Linus Källberg.
Joey Paquet, Lecture 12 Review. Joey Paquet, Course Review Compiler architecture –Lexical analysis, syntactic analysis, semantic.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
TextBook Concepts of Programming Languages, Robert W. Sebesta, (10th edition), Addison-Wesley Publishing Company CSCI18 - Concepts of Programming languages.
CS 363 Comparative Programming Languages Semantics.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
May 31, May 31, 2016May 31, 2016May 31, 2016 Azusa, CA Sheldon X. Liang Ph. D. Computer Science at Azusa Pacific University Azusa Pacific University,
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
Topic #1: Introduction EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
ISBN Chapter 3 Describing Semantics.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Weaving a Debugging Aspect into Domain-Specific Language Grammars SAC ’05 PSC Track Santa Fe, New Mexico USA March 17, 2005 Hui Wu, Jeff Gray, Marjan Mernik,
Introduction to Compiling
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
LESSON 04.
Compiler Introduction 1 Kavita Patel. Outlines 2  1.1 What Do Compilers Do?  1.2 The Structure of a Compiler  1.3 Compilation Process  1.4 Phases.
Syntax Analysis - Parsing Compiler Design Lecture (01/28/98) Computer Science Rensselaer Polytechnic.
Programming Languages and Design Lecture 2 Syntax Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Chap. 7, Syntax-Directed Compilation J. H. Wang Nov. 24, 2015.
CSC 4181 Compiler Construction
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
1 From Eviss to Viola: Visual Parser Generators based on Extended Constraint Multiset Grammars Jiro Tanaka University of Tsukuba
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
1 Compiler Construction Vana Doufexi office CS dept.
CS416 Compiler Design1. 2 Course Information Instructor : Dr. Ilyas Cicekli –Office: EA504, –Phone: , – Course Web.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
Review 1.Structure of the course Lexical Analysis Syntax Analysis Grammar & Language RG & DFA Top-down LL(1) Parsing Bottom-Up LR Layered Automation Semantic.
Chapter 3 – Describing Syntax
A Simple Syntax-Directed Translator
CS416 Compiler Design lec00-outline September 19, 2018
Introduction CI612 Compiler Design CI612 Compiler Design.
IFIP16/ICEUT2000 Integrated Visualization-based Environment for Computer Science Education Kimio Sugita, Youzou Miyadera Kensei Tsuchida, Takeo Yaku I.
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Precedence Graph Grammar for Hierarchical Program Diagram
CS416 Compiler Design lec00-outline February 23, 2019
Syntax vs Semantics Backus-Naur Form Extended BNF Derivations
Chapter 10: Compilers and Language Translation
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
Presentation transcript:

Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu

Overview ● Introduction of diagram editor ● DiaGen (diagram editor generator) – Overview of DiaGen – Common architecture – Free-hand editing – Syntax-direct editing – Automatic layout mechanism ● Conclusions

Introduction What is a diagram editor? ● A graphical editor which is tailored to a specific diagram ● Can “understand” the edited diagram to some extend ● Do not allow arbitrary drawing, only restrict to visual components in a certain diagram language ● Two categories: syntax-direct editing & free-hand editing

Introduction (cont.) Syntax-direct editing: ● Each operation modifies the meaning of the diagram ● Require an internal diagram model ● These models are commonly described by a kind of graph ● Editing operations are represented by graph transformations

Introduction (cont.) Free-hand editing: ● Allow users to directly create and manipulate any diagram ● No restrictions to predefined editing operations ● Internal diagram model is not necessary ● Diagram language can be defined by a concise graph grammar ● Need a parser to check the correctness of diagrams and analyze the syntactic structure

Overview of DiaGen DiaGen is a system for easy developing of powerful diagram editors. It contains two main parts: ● A editor framework of Java classes that provide generic functionality for editing and analyzing diagrams ● A program generator that can produce Java source code for most of the functionality

Overview of DiaGen (cont.) Developing diagram editor with DiaGen: The Diagram editor and be a stand-alone program, or can be integrated into other software system.

Overview of DiaGen (cont.) The key features of Diagram editor: ● Supports free-hand editing. ● Diagrams are translated into a semantic representation ● Support syntax-direct editing ● Support automatic layout

Overview of DiaGen (cont.)

DiaGen: hypergraph model What is hypergraph: hypergraph is used to describe a diagram as a set of diagram components, and the relationships between attachment areas of "connected" components. ● A finite set of nodes ● A finite set of hyperedges, each of which carries a type and is connected to an ordered sequence of nodes.

DiaGen: hypergraph model (cont.) How to model diagrams with hypergraph: ● Each diagram component is modelled by a hyperedge ● Attachment areas are modelled by nodes which are visited by the hyperedge ● The sequence of visited nodes determines which attachment area is modelled by which node.

DiaGen: hypergraph model (cont.) Example of a hypergraph model:

Overview of DiaGen (cont.)

DiaGen: reduced hypergraph model Problem: Hypergraph is too big and contains some irrelevant info. While normally the structure and meaning of a diagram are represented in terms of larger groups of components and their relationship. Solution: reduce the hypergraph model following the reduction rules. Each rule contains (P, R) and additional conditions. P is the pattern to search, R is the result after reduce. (kind of lexical analysis)

DiaGen: reduced hypergraph model Examples: reduction rules of flowchart

DiaGen: reduced hypergraph model

Overview of DiaGen (cont.)

DiaGen: Parser To specify the hypergraph classes, DiaGen uses hypergraph grammars, which are similar to string grammars.

DiaGen: Parser (cont.) Actually, DiaGen uses context-free hypergraph grammars with "embeddings". L::= R, where R extends L by some edges and notes are embedded into the context provided by L. ● More expressive, suitable for all possible diagram languages ● Still allows for efficient parsing

DiaGen: Parser (cont.) The greatest feature of the parsing algorithm is the capability of dealing with diagram errors. When errors are detected, the parser does not just reject the reduced hypergraph model, it finds out the maximum correct sub-diagrams and feedback to users by drawing them in the same color. The results of parsing step is the derivation tree.

DiaGen: Parser (cont.)

Overview of DiaGen (cont.)

DiaGen: Attribute evaluation To translate the diagram into some data structure which is specific for the application domain, DiaGen used a common syntax-direct translation based on attribute evaluation. ● Each hyperedge that occurs in the derivation tree has a distinct number of attributes ● Grammar productions impose the rules to compute attributes values ● Evaluation mechanism will determine an evaluation order

Overview of DiaGen (cont.)

DiaGen: Syntax-direct editing ● Since DiaGen uses a internal hypergraph model, it is easy to extend to provide syntax-direct editing. ● Free-hand editing using a parser requires syntax-direct editing should not change the syntax of diagram language ● Editing operations are specified by hypergraph transformation on hypergraph model.

DiaGen: Syntax-direct editing (cont.) Example: insert a new statement into flowchart.

DiaGen: Syntax-direct editing (cont.) Editing operations are specified in terms of rules and operations. ie:

DiaGen: Syntax-direct editing (cont.) A more complicate example:

DiaGen: Syntax-direct editing (cont.) Why is it more complicated: ● The number of edges to be removed is unknown when is operation is specified ● Difficult to decide if a diagram component and its hyperedge belong to the conditional block when only considering the hypergraph model. Solution: Also considering the syntactic info in the derivation tree.

DiaGen: Syntax-direct editing (cont.)

DiaGen: Automatic Layout Since DiaGen supports syntax-direct editing, automatic layout mechanism is needed. Diagen supports two kinds of automatic layout: ● Manually program the layout module ● Constraint-based specification and computing diagram layout by a constraint solver

DiaGen: Automatic Layout (cont.) A valid diagram layout is specified by a set of constraints on the component layout attributes. (i.e. The position). We need to define layout constraints: ● In hypergraph grammar which is used in parsing step ● In the rule set which specifies the reduction step

Overview of DiaGen (cont.)

Conclusion ● A rapid-prototyping tool based on hypergraph transformation ● DiaGen supports both free-hand and syntax-direct editing ● It is powerful and general. ● Syntax-direct edting is on hypergraph model, future work will study if it is sufficient to it on the reduced model.