Parsing of UML Package Diagrams 2 UML

Size: px
Start display at page:

Download "Parsing of UML Package Diagrams 2 UML"

Transcription

1 Parsing of UM Package Diagrams akaaki Goto, adaaki Kirishima, etsuro Nishino, akeo Yaku and Kensei suchida Graduate chool of Informatics and Engineering, he University of Etro-Communications, Chofu, okyo, Japan College of Cornerstone Education, Oberlin University, Machida, okyo, Japan Department of Information cience, Nihon University, etagaya, okyo, Japan Faculty of Information cience and rts, oyo University, Kawagoe, aitama, Japan {gototakaaki, bstract Program diagrams are used when we develop software. Unified Modeling anguage (UM) is also used in software development. Package diagram is one of a diagram used in UM. Package diagram plays an important role to design or analyze structures of systems. o far we posed a graph grammar for package diagram in order to formalize manipulation of package diagram. In this paper, we pose a parsing method of posed a graph grammar for package diagram. keywords: diagram 1 Introduction graph grammar, parsing, UM, package he Unified Modeling anguage (UM) for modeling in software development was posed relatively recently, and in 2005 it was standardized as the IO/IEC standard. UM has already been used in the analysis, design and implementation of many systems. It makes use of various types of diagrams, such as class and sequence diagrams, for designing processes in system development, from upstream processes to downstream processes. utomation of the processing of these graphical representations using computers first requires definition of a syntax for program diagrams. ome tools for drawing UM diagrams have been posed in recent years. However, developers encounter difficulties when trying to draw UM diagrams using the UM tool because diagram layouts must be manually adjusted. Of course, some tools can automatically lay out diagrams, although sometimes these functions produce unexpected layouts. nalysis of the syntax of two-dimensional objects such as program diagrams also requires a description of the relationships between each of the elements. Graph grammars are one possible means for effective implementation of these methods. hey provide a formal method that enables rigorous definition of mechanisms for generating and analyzing graphs. ozenberg [] and others have conducted research on graph grammars. Other workers have focused on UM [5] and graph grammars and graph transformations with respect to UM [2, 4, 6]. However, these studies did not deal with syntax formalization for visual representation, and graph grammars for package diagram remain to be posed. We have previously provided a graph grammar for a UM package diagram to pose the theoretical fundamentals of UM [8]. In the present paper, we pose a parsing method for the posed graph grammar suitable for a package diagram. 2 UM UM is a notation for modeling object-oriented system development using diagrams. It can be divided into structural diagrams and behavioral diagrams. tructural diagrams are used to describe the structure of what is being modeled and includes class, object, and package diagrams. Behavioral diagrams are used to describe the behavior of what is being modeled and include use-case, activity, and state-machine diagrams. tructure diagrams include 1) class diagrams, which describe the static relationships between classes, and 2) package diagrams, which group classes and describe relationships between packages and package nesting relationships. In this paper, we target package diagrams. package indicates a namespace for its member. Package diagrams can describe dependencies among other packages. Package diagrams can describe dependencies among / copyright IC, C 2015 March 9-11, 2015, Honolulu, Hawaii, U

2 other packages. hey can also illustrate membership using membership notation [1]. Figure 1 depicts an example of a package diagram with members described in [1]. he middle representation shows a package with some of the members within the borders. he right representation shows a package diagram using alternative membership notation. In this paper, we target membership notation for our graph grammar and syntax-directed editor. Package1 Here, Σ P D = {,,,,, M,, sp,, rip, mip,, mic, ric } is a finite set of node labels, P D = {, sp,, rip, mip,, mic, ric } is a finite set of terminal node labels, Γ P D = { }, Ω P D = { }, P P D = { P 1,..., P 1 } is a finite set of production rules, and P D = { }, is the initial non-terminal. In Definition 1,, sp,, rip, mip,, mic, and ric, stand for root of package, single package, left package, right package, middle package, left class, middle class, and right class, respectively. he GGPD generates package hierarchy diagrams. It is a context-free grammar, and has 1 production rules. P P D has three types of production, as shown in Figure. Package2 Package Class1 Class2 Class Figure 2: n example of a package diagram Figure 2 shows an example of a package diagram using alternative membership notation. Boxes with rectangles at the upper left corners indicate the presence of a package. Boxes with three compartments represent classes, with each compartment representing its class name, its attributes, and its methods from top to bottom, respectively. plus sign in a circle is used to represent the components the package contains. Package 1 contains Package 2 and Package, and Package contains Class 2 and Class. 2 (a) ype (b) ype 2 0 Graph Grammar for UM Package Diagrams [8] (c) ype 0 In this section, we describe our Graph Grammar for Package Diagrams (GGPD), for UM package diagram membership notation. UM package diagrams using membership notation can be described as treestructured. We refer to our previous research on graph grammar for tree structures []..1 Grammar Overview Definition 1. he Graph Grammar for Package Diagrams (GGPD), for UM package diagrams, is a sixtuple GGP D = (Σ P D, P D, Γ P D, Ω P D, P P D, P D ). Figure : n example of a GGPD production rule In Figure, nodes with capitalized labels indicate nonterminal nodes, and nodes with uncapitalized labels indicate terminal nodes. ype 1 and ype 2 productions generate tree structures in a longitudinal and a transverse direction, respectively. ype productions substitute a nonterminal node for a terminal node. In Figure (a), the production rule can be applied to a node labeled, which is a non-terminal node, to generate a terminal node with the label, representing a

3 Figure 1: n Example of a package diagram with members [1] package, and a non-terminal node labeled. Our grammar generates directed graphs. However, the obtained graphs are drawn without arrows by assuming that the direction of each edge is from the top down. 4 Parsing In this section, we describe a parsing method for GGPD. he input of this method is a package hierarchy diagram. We can obtain a derivation tree by the parsing. Here we show the flow of parsing: (1) et the root node of the input diagram as the current node..2 Example of Derivation Figure 4 shows an example of a GGPD derivation. In this example, G 0 is a graph with a node labeled. he node ID is 1 (to the lower right of the node). he production rule P 1 is then applied to a nonterminal node labeled with the node ID 1, which is the initial nonterminal node. hat is, a mother node with label and node ID 1 is removed, and then a daughter graph is embedded in the P 1. In this case, the daughter graph is the node with the label. his produces the nonterminal node labeled with a node ID 2, to which the P production rule is applied. In other words, a graph G 1, consisting of a node with the node ID 2, is obtained. fter application of the production P, the terminal node labeled and a non-terminal node labeled are generated. We apply production rules to obtain a graph that corresponds to the UM package diagrams. We can obtain a derivation tree from the derivation sequence of production. Figure 5 shows the derivation tree corresponding to Figure 4. In Figure 5, the labels show the names of the production rules. nother example of a package diagram resulting from application of the production rules is shown in Figure 6. (2) If the current node is a node with node label, go to. Otherwise, shift the current node to the right-most node of the input diagram, and then set the right-most node as a handle. () he parser searches for a production rule in which the right-hand side is isomorphic to the handle. If the parser finds a production, then the parser reduces the handle to the left-hand side of the production. hen go to 2. (4) If the parser cannot find productions in step, the parser sets the right-most node and its immediate left node as a handle, and then searches for a production rule. If the parser finds a production, then the parser reduces the handle to the left-hand side of the production. hen go to 2. (5) If the parser cannot find productions in step 4, the parser sets the right-most node and its parent as a handle, and then searches for a production. If the parser find a production, then the parser reduces the handle to the left-hand side of the production. hen go to 2. (6) If the parser can not find productions in step 5, the parser outputs an error. () he parser finishes parsing, and outputs a derivation tree.

4 G0: P1 P 1 G1: 1, P1' P1 P8 P6 P12 G2: 2 2, P' P Figure 5: derivation tree corresponding to the tree in Figure 4 + rip sc ric 4, P6' P6 G: Figure 6: n example of package diagram resulting from derivation 5 6 5, P8' P8 G4: 6 6, P12' rip P12 G5: rip 8 Figure 4: n example of a GGPD derivation Next we show an example of parsing. Figure shows an example of parsing of a package diagram. In the Figure, G 6 is the input of this example. he root node of the input is the initial location of this parser. First of all, the parser shifts the current node to the right-most node 11 with ric label. Here,node 11 is the handle; the parser then searches for a production. In this case, the parser is able to find Production 14, so the parser then reduces node11 with the found production rule. s a result, we obtain G after the reduction. Node 12 is generated by the reduction. In the same way, we can obtain G 1 after a reduction. One node has the node label. he parser then succeeds in parsing for the input diagram G 6. 5 Conclusion In this paper, we posed a parsing method for our posed a graph grammar for a package diagram of UM. In the future, we will implement this parsing method, and realize formalisms of other UM diagrams. Our method can be used for generating diagrams with aesthetic drawings but is also useful for understanding source code.

5 G6: mic ric , P14' P14 ric {14,15}, P6' P6 G: G11: mic , P1' P1 G8: M mic G11: 16, P' 16 1 P M 1 12 P11 {12,1}, P11' M 1, P1' P1 G9: G12: 18 14, P10' P10 G10: Figure : n example of parsing of a package diagram

6 cknowledgment his work was partially supported by JP KK- ENHI Grant Number eferences [1] Object Management Group. Omg unified modeling language (omg uml), infrastructure, v Infrastructure/PDF/, 200. [2] Frank Hermann, Hartmut Ehrig, and Gabriele aentzer. yped ttributed Graph Grammar with Inheritance for the bstract yntax of UM Class and equence Diagrams. Etron. Notes heor. Comput. ci., 211: , pril []. Kirishima,. Goto,. Yaku, and K. suchida. n attribute graph grammar enabling narrower drawings of trees. In Computer and Information cience (ICI), 2010 IEEE/CI 9th International Conference on, pages 41 46, [4] Kong, Jun and Zhang, Kang and Dong, Jing and Xu, Dianxiang. pecifying behavioral semantics of UM diagrams through graph transformations. J. yst. oftw., 82:292 06, [5] eszek Kotulski and Dariusz Dymek. On the Modeling iming Behavior of the ystem with UM(V). In Computational cience ICC 2008, volume 5101 of ecture Notes in Computer cience, pages 86 95, [6] Dorina Petriu and Hui hen. pplying the UM Performance Profile: Graph Grammar-Based Derivation of QN Models from UM pecifications. In Computer Performance Evaluation: Modelling echniques and ools, volume 224 of ecture Notes in Computer cience, pages , [] Grzegorz ozenberg. Handbook of Graph Grammar and Computing by Graph ransformation Volume 1. World cientific Publishing, 199. [8] akaaki Goto and adaaki Kirishima and etsuro Nishino and akeo Yaku and Kensei suchida. Generation of UM package diagrams based on an attribute graph grammar. Journal of Computational cience, 5(4): , 2014.

An Attribute Graph Grammar for UML Package Diagrams and its Applications

An Attribute Graph Grammar for UML Package Diagrams and its Applications An Attribute Graph Grammar for UM Package Diagrams and its Applications akaaki Goto 1, etsuro Nishino 2, and Kensei suchida 1 Center for Industrial and Governmental elations, he University of Etro-Communications,

More information

Automatic Generation of Diagram Explanation based on an Attribute Graph Grammar

Automatic Generation of Diagram Explanation based on an Attribute Graph Grammar Automatic Generation of Diagram Explanation based on an Attribute Graph Grammar akaaki Goto, etsuro Nishino, and Kensei suchida Graduate School of Informatics and Engineering, he University of Electro-Communications,

More information

OO Techniques & UML Class Diagrams

OO Techniques & UML Class Diagrams OO Techniques & UML Class Diagrams SE3A04 Tutorial Jason Jaskolka Department of Computing and Software Faculty of Engineering McMaster University Hamilton, Ontario, Canada jaskolj@mcmaster.ca October 17,

More information

Activity Diagram Written Date : September 02, 2016

Activity Diagram Written Date : September 02, 2016 Written Date : September 02, 2016 s describe how activities are coordinated to provide a service which can be at different levels of abstraction. Typically, an event needs to be achieved by some operation,

More information

LANGUAGE PROCESSORS. Presented By: Prof. S.J. Soni, SPCE Visnagar.

LANGUAGE PROCESSORS. Presented By: Prof. S.J. Soni, SPCE Visnagar. LANGUAGE PROCESSORS Presented By: Prof. S.J. Soni, SPCE Visnagar. Introduction Language Processing activities arise due to the differences between the manner in which a software designer describes the

More information

Translation of graph-based knowledge representation in multi-agent system

Translation of graph-based knowledge representation in multi-agent system Procedia Computer Science Volume 29, 2014, Pages 1048 1056 ICCS 2014. 14th International Conference on Computational Science Translation of graph-based knowledge representation in multi-agent system Leszek

More information

Downloaded from Page 1. LR Parsing

Downloaded from  Page 1. LR Parsing Downloaded from http://himadri.cmsdu.org Page 1 LR Parsing We first understand Context Free Grammars. Consider the input string: x+2*y When scanned by a scanner, it produces the following stream of tokens:

More information

Proceedings of the Workshop on the Layout of (Software) Engineering Diagrams (LED 2007)

Proceedings of the Workshop on the Layout of (Software) Engineering Diagrams (LED 2007) Electronic Communications of the EASST Volume 7 (2007) Proceedings of the Workshop on the Layout of (Software) Engineering Diagrams (LED 2007) Logichart: A Prolog Program Diagram and its Layout Yoshihiro

More information

Defining syntax using CFGs

Defining syntax using CFGs Defining syntax using CFGs Roadmap Last time Defined context-free grammar This time CFGs for specifying a language s syntax Language membership List grammars Resolving ambiguity CFG Review G = (N,Σ,P,S)

More information

Lecture 14 Sections Mon, Mar 2, 2009

Lecture 14 Sections Mon, Mar 2, 2009 Lecture 14 Sections 5.1-5.4 Hampden-Sydney College Mon, Mar 2, 2009 Outline 1 2 3 4 5 Parse A parse tree shows the grammatical structure of a statement. It includes all of the grammar symbols (terminals

More information

ECE 468/573 Midterm 1 September 30, 2015

ECE 468/573 Midterm 1 September 30, 2015 ECE 468/573 Midterm 1 September 30, 2015 Name: Purdue email: Please sign the following: I affirm that the answers given on this test are mine and mine alone. I did not receive help from any person or material

More information

Bottom Up Parsing. Shift and Reduce. Sentential Form. Handle. Parse Tree. Bottom Up Parsing 9/26/2012. Also known as Shift-Reduce parsing

Bottom Up Parsing. Shift and Reduce. Sentential Form. Handle. Parse Tree. Bottom Up Parsing 9/26/2012. Also known as Shift-Reduce parsing Also known as Shift-Reduce parsing More powerful than top down Don t need left factored grammars Can handle left recursion Attempt to construct parse tree from an input string eginning at leaves and working

More information

CS 4120 Introduction to Compilers

CS 4120 Introduction to Compilers CS 4120 Introduction to Compilers Andrew Myers Cornell University Lecture 6: Bottom-Up Parsing 9/9/09 Bottom-up parsing A more powerful parsing technology LR grammars -- more expressive than LL can handle

More information

Building Compilers with Phoenix

Building Compilers with Phoenix Building Compilers with Phoenix Syntax-Directed Translation Structure of a Compiler Character Stream Intermediate Representation Lexical Analyzer Machine-Independent Optimizer token stream Intermediate

More information

An Approach of Software Architectural Styles Detection Using Graph Grammar

An Approach of Software Architectural Styles Detection Using Graph Grammar An Approach of Software Architectural Styles Detection Using Graph Grammar Songpon Thongkum and Wiwat Vatanawood Abstract One of the challenging problems in software design is to evaluate the risks using

More information

Using Graph Rewriting to Specify Software Architectural Transformations

Using Graph Rewriting to Specify Software Architectural Transformations Using Graph Rewriting to pecify oftware Architectural ransformations Hoda Fahmy Richard C. Holt Dep t. of Computer cience Dep t. of Computer cience University of oronto University of Waterloo fahmyh@cs.toronto.edu

More information

A component-centric UML based approach for modeling the architecture of web applications.

A component-centric UML based approach for modeling the architecture of web applications. International Journal of Recent Research and Review, Vol. V, March 2013 ISSN 2277 8322 A component-centric UML based approach for modeling the architecture of web applications. Mukesh Kataria 1 1 Affiliated

More information

Intro to Bottom-up Parsing. Lecture 9

Intro to Bottom-up Parsing. Lecture 9 Intro to Bottom-up Parsing Lecture 9 Bottom-Up Parsing Bottom-up parsing is more general than topdown parsing And just as efficient Builds on ideas in top-down parsing Bottom-up is the preferred method

More information

How do LL(1) Parsers Build Syntax Trees?

How do LL(1) Parsers Build Syntax Trees? How do LL(1) Parsers Build Syntax Trees? So far our LL(1) parser has acted like a recognizer. It verifies that input token are syntactically correct, but it produces no output. Building complete (concrete)

More information

2.2 Syntax Definition

2.2 Syntax Definition 42 CHAPTER 2. A SIMPLE SYNTAX-DIRECTED TRANSLATOR sequence of "three-address" instructions; a more complete example appears in Fig. 2.2. This form of intermediate code takes its name from instructions

More information

Towards Generating Domain-Specific Model Editors with Complex Editing Commands

Towards Generating Domain-Specific Model Editors with Complex Editing Commands Towards Generating Domain-Specific Model Editors with Complex Editing Commands Gabriele Taentzer Technical University of Berlin Germany gabi@cs.tu-berlin.de May 10, 2006 Abstract Domain specific modeling

More information

CS606- compiler instruction Solved MCQS From Midterm Papers

CS606- compiler instruction Solved MCQS From Midterm Papers CS606- compiler instruction Solved MCQS From Midterm Papers March 06,2014 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 Final Term MCQ s and Quizzes CS606- compiler instruction If X is a

More information

AGG: A Graph Transformation Environment for Modeling and Validation of Software

AGG: A Graph Transformation Environment for Modeling and Validation of Software AGG: A Graph Transformation Environment for Modeling and Validation of Software Gabriele Taentzer Technische Universität Berlin, Germany gabi@cs.tu-berlin.de Abstract. AGG is a general development environment

More information

Parsing Techniques. AST Review. AST Data Structures. Implicit AST Construction. AST Construction CS412/CS413. Introduction to Compilers Tim Teitelbaum

Parsing Techniques. AST Review. AST Data Structures. Implicit AST Construction. AST Construction CS412/CS413. Introduction to Compilers Tim Teitelbaum Parsing Techniques C41/C413 Introduction to Compilers Tim Teitelbaum Lecture 11: yntax-irected efinitions February 16, 005 LL parsing Computes a Leftmost derivation Builds the derivation top-down LL parsing

More information

Internet Application Developer

Internet Application Developer Internet Application Developer SUN-Java Programmer Certification Building a Web Presence with XHTML & XML 5 days or 12 evenings $2,199 CBIT 081 J A V A P R O G R A M M E R Fundamentals of Java and Object

More information

Introducing the UML Eng. Mohammed T. Abo Alroos

Introducing the UML Eng. Mohammed T. Abo Alroos Introducing the UML Eng. Mohammed T. Abo Alroos Islamic University of Gaza Introduction to the UML: The UML stands for Unified Modeling Language. It was released in 1997 as a method to diagram software

More information

Review main idea syntax-directed evaluation and translation. Recall syntax-directed interpretation in recursive descent parsers

Review main idea syntax-directed evaluation and translation. Recall syntax-directed interpretation in recursive descent parsers Plan for Today Review main idea syntax-directed evaluation and translation Recall syntax-directed interpretation in recursive descent parsers Syntax-directed evaluation and translation in shift-reduce

More information

Picture Maze Generation by Repeated Contour Connection and Graph Structure of Maze

Picture Maze Generation by Repeated Contour Connection and Graph Structure of Maze Computer Science and Engineering 2013, 3(3): 76-83 DOI: 10.5923/j.computer.20130303.04 Picture Maze Generation by Repeated Contour Connection and Graph Structure of Maze Tomio Kurokawa Department of Information

More information

Abstract Syntax Trees Synthetic and Inherited Attributes

Abstract Syntax Trees Synthetic and Inherited Attributes Abstract Syntax Trees Synthetic and Inherited Attributes Lecture 22 Sections 5.1-5.2 Robb T. Koether Hampden-Sydney College Mon, Mar 16, 2015 Robb T. Koether (Hampden-Sydney College)Abstract Syntax TreesSynthetic

More information

Definition of Visual Language Editors Using Declarative Languages

Definition of Visual Language Editors Using Declarative Languages Definition of Visual Language Editors Using Declarative Languages Torbjörn Lundkvist TUCS Turku Centre for Computer Science SoSE Graduate School on Software Systems and Engineering Department of Information

More information

An Automatic Tool for Checking Consistency between Data Flow Diagrams (DFDs)

An Automatic Tool for Checking Consistency between Data Flow Diagrams (DFDs) An Automatic Tool for Checking Consistency between Data Flow Diagrams (DFDs) Rosziati Ibrahim, Siow Yen Yen Abstract System development life cycle (SDLC) is a process uses during the development of any

More information

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou COMP-421 Compiler Design Presented by Dr Ioanna Dionysiou Administrative! Any questions about the syllabus?! Course Material available at www.cs.unic.ac.cy/ioanna! Next time reading assignment [ALSU07]

More information

Theoretical Part. Chapter one:- - What are the Phases of compiler? Answer:

Theoretical Part. Chapter one:- - What are the Phases of compiler? Answer: Theoretical Part Chapter one:- - What are the Phases of compiler? Six phases Scanner Parser Semantic Analyzer Source code optimizer Code generator Target Code Optimizer Three auxiliary components Literal

More information

A Simple Syntax-Directed Translator

A Simple Syntax-Directed Translator Chapter 2 A Simple Syntax-Directed Translator 1-1 Introduction The analysis phase of a compiler breaks up a source program into constituent pieces and produces an internal representation for it, called

More information

Announcements. Written Assignment 1 out, due Friday, July 6th at 5PM.

Announcements. Written Assignment 1 out, due Friday, July 6th at 5PM. Syntax Analysis Announcements Written Assignment 1 out, due Friday, July 6th at 5PM. xplore the theoretical aspects of scanning. See the limits of maximal-munch scanning. Class mailing list: There is an

More information

CHAPTER 5 CO:-Sketch component diagram using basic notations 5.1 Component Diagram (4M) Sample Component Diagram 5.2 Deployment Diagram (8M)

CHAPTER 5 CO:-Sketch component diagram using basic notations 5.1 Component Diagram (4M) Sample Component Diagram 5.2 Deployment Diagram (8M) CHAPTER 5 CO:-Sketch component diagram using basic notations 5.1 Component Diagram (4M) Sample Component Diagram 5.2 Deployment Diagram (8M) Sample Deployment diagram Component diagrams are different in

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML Ingegneria del Software Corso di Laurea in Informatica per il Management Introduction to UML Davide Rossi Dipartimento di Informatica Università di Bologna Modeling A model is an (abstract) representation

More information

Meltem Özturan

Meltem Özturan Meltem Özturan www.mis.boun.edu.tr/ozturan/samd 1 2 Modeling System Requirements Object Oriented Approach to Requirements OOA considers an IS as a set of objects that work together to carry out the function.

More information

CSCI 565 Compiler Design and Implementation Spring 2014

CSCI 565 Compiler Design and Implementation Spring 2014 CSCI 565 Compiler Design and Implementation Spring 2014 Instructor: Description: Prerequisites: Dr. Pedro C. Diniz, e-mail pedro@isi.edu Lectures: Thursday, 8.00 10.50 AM, RTH 217, phone: (213) 740 4518

More information

A programming language requires two major definitions A simple one pass compiler

A programming language requires two major definitions A simple one pass compiler A programming language requires two major definitions A simple one pass compiler [Syntax: what the language looks like A context-free grammar written in BNF (Backus-Naur Form) usually suffices. [Semantics:

More information

A Design Rationale Representation for Model-Based Designs in Software Engineering

A Design Rationale Representation for Model-Based Designs in Software Engineering A Design Rationale Representation for Model-Based Designs in Software Engineering Adriana Pereira de Medeiros, Daniel Schwabe, and Bruno Feijó Dept. of Informatics, PUC-Rio, Rua Marquês de São Vicente

More information

Examples of attributes: values of evaluated subtrees, type information, source file coordinates,

Examples of attributes: values of evaluated subtrees, type information, source file coordinates, 1 2 3 Attributes can be added to the grammar symbols, and program fragments can be added as semantic actions to the grammar, to form a syntax-directed translation scheme. Some attributes may be set by

More information

8/22/2003. Proposal for VPI model PSL assertion extensions

8/22/2003. Proposal for VPI model PSL assertion extensions 8/22/2003 Proposal for VPI model PSL assertion extensions Cadence Design Systems, Inc. 8/22/2003 This proposal has been prepared by Cadence Design Systems, Inc. for consideration by the IEEE 1364 working

More information

Review of CFGs and Parsing II Bottom-up Parsers. Lecture 5. Review slides 1

Review of CFGs and Parsing II Bottom-up Parsers. Lecture 5. Review slides 1 Review of CFGs and Parsing II Bottom-up Parsers Lecture 5 1 Outline Parser Overview op-down Parsers (Covered largely through labs) Bottom-up Parsers 2 he Functionality of the Parser Input: sequence of

More information

Rule-Based Programming with Diaplan

Rule-Based Programming with Diaplan Electronic Notes in heoretical Computer Science 27 (2005) 5 26 www.elsevier.comlocateentcs Rule-Based Programming with iaplan Frank rewes Institutionen för datavetenskap Umeå universitet S-9087 Umeå, Sweden

More information

Security Issues Formalization

Security Issues Formalization Security Issues Formalization V. T. Dimitrov University of Sofia, Faculty of Mathematics and Informatics, 5 James Bourchier Blvd, 1164, Sofia, Bulgaria E-mail: cht@fmi.uni-sofia.bg Software bugs are primary

More information

Object Use- Cases Clustering using PFT

Object Use- Cases Clustering using PFT 2011 International Conference on Information and Intelligent Computing IPCSIT vol.18 (2011) (2011) IACSIT Press, Singapore Object Use- Cases Clustering using PFT Sunil Kumar 1, Rajesh Kumar Bhatia 2 and

More information

CS164: Midterm I. Fall 2003

CS164: Midterm I. Fall 2003 CS164: Midterm I Fall 2003 Please read all instructions (including these) carefully. Write your name, login, and circle the time of your section. Read each question carefully and think about what s being

More information

Mobile-Friendly Web Browsing. Dr. Jun Kong Department of Computer Science North Dakota State University

Mobile-Friendly Web Browsing. Dr. Jun Kong Department of Computer Science North Dakota State University Mobile-Friendly Web Browsing Dr. Jun Kong Department of Computer Science North Dakota State University 1 Motivation Not user friendly to browse regular Web pages on mobile devices Keeping two versions

More information

Attribute Grammars. Attribute Grammars

Attribute Grammars. Attribute Grammars Attribute Grammars Definitions: synthesized, inherited, dependence graph Example: syntax-directed translation S-attributed grammars -attributed grammars Bottom Up euation of inherited attributes Top Down

More information

Automatic Generation of Graph Models for Model Checking

Automatic Generation of Graph Models for Model Checking Automatic Generation of Graph Models for Model Checking E.J. Smulders University of Twente edwin.smulders@gmail.com ABSTRACT There exist many methods to prove the correctness of applications and verify

More information

Midterm Solutions COMS W4115 Programming Languages and Translators Wednesday, March 25, :10-5:25pm, 309 Havemeyer

Midterm Solutions COMS W4115 Programming Languages and Translators Wednesday, March 25, :10-5:25pm, 309 Havemeyer Department of Computer cience Columbia University Midterm olutions COM W4115 Programming Languages and Translators Wednesday, March 25, 2009 4:10-5:25pm, 309 Havemeyer Closed book, no aids. ach question

More information

A Generic Visual Language Technique for DSVL Model Refactoring to Patterns

A Generic Visual Language Technique for DSVL Model Refactoring to Patterns ECEASST A Generic Visual Language Technique for DSVL Model Refactoring to Patterns Karen Li 1, John Hosking 1, and John Grundy 2 1 {k.li, j.hosking}@auckland.ac.nz Departments of Computer Science, University

More information

Some Basic Definitions. Some Basic Definitions. Some Basic Definitions. Language Processing Systems. Syntax Analysis (Parsing) Prof.

Some Basic Definitions. Some Basic Definitions. Some Basic Definitions. Language Processing Systems. Syntax Analysis (Parsing) Prof. Language Processing Systems Prof. Mohamed Hamada Software ngineering Lab. he University of Aizu Japan Syntax Analysis (Parsing) Some Basic Definitions Some Basic Definitions syntax: the way in which words

More information

LALR stands for look ahead left right. It is a technique for deciding when reductions have to be made in shift/reduce parsing. Often, it can make the

LALR stands for look ahead left right. It is a technique for deciding when reductions have to be made in shift/reduce parsing. Often, it can make the LALR parsing 1 LALR stands for look ahead left right. It is a technique for deciding when reductions have to be made in shift/reduce parsing. Often, it can make the decisions without using a look ahead.

More information

Formalizing Software Refactoring in the Distributed Environment by aednlc Graph Grammar

Formalizing Software Refactoring in the Distributed Environment by aednlc Graph Grammar Formalizing Software Refactoring in the Distributed Environment by aednlc Graph Grammar Leszek Kotulski, Adrian Nowak Institute of Computer Science, Jagiellonian University Nawojki 11, 30-072 Kraków, Poland

More information

Unified Modeling Language (UML) Class Diagram

Unified Modeling Language (UML) Class Diagram 1 / 10 Unified Modeling Language (UML) Class Diagram Miaoqing Huang University of Arkansas Spring 2010 2 / 10 Outline 1 2 3 / 10 Class Diagram Class diagrams show the static structure of the classes that

More information

CMSC 330: Organization of Programming Languages. Context Free Grammars

CMSC 330: Organization of Programming Languages. Context Free Grammars CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler

More information

UML big picture. Perdita Stevens. School of Informatics University of Edinburgh

UML big picture. Perdita Stevens. School of Informatics University of Edinburgh UML big picture Perdita Stevens School of Informatics University of Edinburgh Plan Whence UML? Parts of UML How it all fits together UML as a language Consistency: what does it mean, do we need it? Defining

More information

Bottom-Up Parsing LR Parsing

Bottom-Up Parsing LR Parsing Bottom-Up Parsing LR Parsing Maryam Siahbani 2/19/2016 1 What we need for LR parsing LR0) states: Describe all possible states in which parser can be Parsing table ransition between LR0) states Actions

More information

UNIT IV INTERMEDIATE CODE GENERATION

UNIT IV INTERMEDIATE CODE GENERATION UNIT IV INTERMEDIATE CODE GENERATION 2 Marks 1. Draw syntax tree for the expression a=b*-c+b*-c 2. Explain postfix notation. It is the linearized representation of syntax tree.it is a list of nodes of

More information

Syntax Analysis Part I

Syntax Analysis Part I Syntax Analysis Part I Chapter 4: Context-Free Grammars Slides adapted from : Robert van Engelen, Florida State University Position of a Parser in the Compiler Model Source Program Lexical Analyzer Token,

More information

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram UML Fundamental NetFusion Tech. Co., Ltd. Jack Lee 2008/4/7 1 Use-case diagram Class diagram Sequence diagram OutLine Communication diagram State machine Activity diagram 2 1 What is UML? Unified Modeling

More information

Theory and Compiling COMP360

Theory and Compiling COMP360 Theory and Compiling COMP360 It has been said that man is a rational animal. All my life I have been searching for evidence which could support this. Bertrand Russell Reading Read sections 2.1 3.2 in the

More information

Syntax Analysis. Chapter 4

Syntax Analysis. Chapter 4 Syntax Analysis Chapter 4 Check (Important) http://www.engineersgarage.com/contributio n/difference-between-compiler-andinterpreter Introduction covers the major parsing methods that are typically used

More information

LL(1) predictive parsing

LL(1) predictive parsing LL(1) predictive parsing Informatics 2A: Lecture 11 John Longley School of Informatics University of Edinburgh jrl@staffmail.ed.ac.uk 13 October, 2011 1 / 12 1 LL(1) grammars and parse tables 2 3 2 / 12

More information

Defining syntax using CFGs

Defining syntax using CFGs Defining syntax using CFGs Roadmap Last 8me Defined context-free grammar This 8me CFGs for syntax design Language membership List grammars Resolving ambiguity CFG Review G = (N,Σ,P,S) means derives derives

More information

Lecture 8: Context Free Grammars

Lecture 8: Context Free Grammars Lecture 8: Context Free s Dr Kieran T. Herley Department of Computer Science University College Cork 2017-2018 KH (12/10/17) Lecture 8: Context Free s 2017-2018 1 / 1 Specifying Non-Regular Languages Recall

More information

Structure of a compiler. More detailed overview of compiler front end. Today we ll take a quick look at typical parts of a compiler.

Structure of a compiler. More detailed overview of compiler front end. Today we ll take a quick look at typical parts of a compiler. More detailed overview of compiler front end Structure of a compiler Today we ll take a quick look at typical parts of a compiler. This is to give a feeling for the overall structure. source program lexical

More information

Providing Interactive Site Ma ps for Web Navigation

Providing Interactive Site Ma ps for Web Navigation Providing Interactive Site Ma ps for Web Navigation Wei Lai Department of Mathematics and Computing University of Southern Queensland Toowoomba, QLD 4350, Australia Jiro Tanaka Institute of Information

More information

Structural and Syntactic Pattern Recognition

Structural and Syntactic Pattern Recognition Structural and Syntactic Pattern Recognition Selim Aksoy Department of Computer Engineering Bilkent University saksoy@cs.bilkent.edu.tr CS 551, Fall 2017 CS 551, Fall 2017 c 2017, Selim Aksoy (Bilkent

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design i About the Tutorial A compiler translates the codes written in one language to some other language without changing the meaning of the program. It is also expected that a compiler should make the target

More information

Section A. A grammar that produces more than one parse tree for some sentences is said to be ambiguous.

Section A. A grammar that produces more than one parse tree for some sentences is said to be ambiguous. Section A 1. What do you meant by parser and its types? A parser for grammar G is a program that takes as input a string w and produces as output either a parse tree for w, if w is a sentence of G, or

More information

Transition from EBNF to Xtext

Transition from EBNF to Xtext Transition from EBNF to Xtext Jianan Yue State Key Laboratory for Novel Software Technology, Nanjing University Department of Computer Science & Technology, Nanjing University 210023 Nanjing, China b111220168@smail.nju.edu.cn

More information

Learning System FRIMAN

Learning System FRIMAN Learning System FRIMAN Jozef Kostolny and Monika Vaclavkova Department of Informatics, University of Zilina Zilina, Slovak Republic (Jozef.Kostolny, Monika.Vaclavkova)@fri.uniza.sk Abstract. Education

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 11 Ana Bove April 26th 2018 Recap: Regular Languages Decision properties of RL: Is it empty? Does it contain this word? Contains

More information

shift-reduce parsing

shift-reduce parsing Parsing #2 Bottom-up Parsing Rightmost derivations; use of rules from right to left Uses a stack to push symbols the concatenation of the stack symbols with the rest of the input forms a valid bottom-up

More information

SYED AMMAL ENGINEERING COLLEGE (An ISO 9001:2008 Certified Institution) Dr. E.M. Abdullah Campus, Ramanathapuram

SYED AMMAL ENGINEERING COLLEGE (An ISO 9001:2008 Certified Institution) Dr. E.M. Abdullah Campus, Ramanathapuram CS6660 COMPILER DESIGN Question Bank UNIT I-INTRODUCTION TO COMPILERS 1. Define compiler. 2. Differentiate compiler and interpreter. 3. What is a language processing system? 4. List four software tools

More information

Software Engineering Lab Manual

Software Engineering Lab Manual Kingdom of Saudi Arabia Ministry Education Prince Sattam Bin Abdulaziz University College of Computer Engineering and Sciences Department of Computer Science Software Engineering Lab Manual 1 Background:-

More information

Plan for Today. Regular Expressions: repetition and choice. Syntax and Semantics. Context Free Grammars

Plan for Today. Regular Expressions: repetition and choice. Syntax and Semantics. Context Free Grammars Plan for Today Context Free s models for specifying programming languages syntax semantics example grammars derivations Parse trees yntax-directed translation Used syntax-directed translation to interpret

More information

Architecture of Compilers, Interpreters. CMSC 330: Organization of Programming Languages. Front End Scanner and Parser. Implementing the Front End

Architecture of Compilers, Interpreters. CMSC 330: Organization of Programming Languages. Front End Scanner and Parser. Implementing the Front End Architecture of Compilers, Interpreters : Organization of Programming Languages ource Analyzer Optimizer Code Generator Context Free Grammars Intermediate Representation Front End Back End Compiler / Interpreter

More information

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University Metamodeling Janos ISIS, Vanderbilt University janos.sztipanovits@vanderbilt.edusztipanovits@vanderbilt edu Content Overview of Metamodeling Abstract Syntax Metamodeling Concepts Metamodeling languages

More information

XSLT based method for automatic generation of a graphical representation of a decision diagram represented using XML

XSLT based method for automatic generation of a graphical representation of a decision diagram represented using XML XLT based method for automatic generation of a graphical representation of a decision diagram represented using XML tanković tanislav, Jaakko Astola Institute of ignal Processing Tampere University of

More information

An Analysis of Approaches to XML Schema Inference

An Analysis of Approaches to XML Schema Inference An Analysis of Approaches to XML Schema Inference Irena Mlynkova irena.mlynkova@mff.cuni.cz Charles University Faculty of Mathematics and Physics Department of Software Engineering Prague, Czech Republic

More information

LL(k) Parsing. Predictive Parsers. LL(k) Parser Structure. Sample Parse Table. LL(1) Parsing Algorithm. Push RHS in Reverse Order 10/17/2012

LL(k) Parsing. Predictive Parsers. LL(k) Parser Structure. Sample Parse Table. LL(1) Parsing Algorithm. Push RHS in Reverse Order 10/17/2012 Predictive Parsers LL(k) Parsing Can we avoid backtracking? es, if for a given input symbol and given nonterminal, we can choose the alternative appropriately. his is possible if the first terminal of

More information

Contents. Chapter 1 SPECIFYING SYNTAX 1

Contents. Chapter 1 SPECIFYING SYNTAX 1 Contents Chapter 1 SPECIFYING SYNTAX 1 1.1 GRAMMARS AND BNF 2 Context-Free Grammars 4 Context-Sensitive Grammars 8 Exercises 8 1.2 THE PROGRAMMING LANGUAGE WREN 10 Ambiguity 12 Context Constraints in Wren

More information

SE Assignment III. 1. List and explain primitive symbols used for constructing DFDs. Illustrate the use of these symbols with the help of an example.

SE Assignment III. 1. List and explain primitive symbols used for constructing DFDs. Illustrate the use of these symbols with the help of an example. SE Assignment III 1. List and explain primitive symbols used for constructing DFDs. Illustrate the use of these symbols with the help of an example. There are essentially 5 different types of symbols used

More information

Visual Layout of Graph-Like Models

Visual Layout of Graph-Like Models Visual Layout of Graph-Like Models Tarek Sharbak MhdTarek.Sharbak@uantwerpen.be Abstract The modeling of complex software systems has been growing significantly in the last years, and it is proving to

More information

CSCE 531 Spring 2009 Final Exam

CSCE 531 Spring 2009 Final Exam CSCE 531 Spring 2009 Final Exam Do all problems. Write your solutions on the paper provided. This test is open book, open notes, but no electronic devices. For your own sake, please read all problems before

More information

Wednesday, September 9, 15. Parsers

Wednesday, September 9, 15. Parsers Parsers What is a parser A parser has two jobs: 1) Determine whether a string (program) is valid (think: grammatically correct) 2) Determine the structure of a program (think: diagramming a sentence) Agenda

More information

Parsers. What is a parser. Languages. Agenda. Terminology. Languages. A parser has two jobs:

Parsers. What is a parser. Languages. Agenda. Terminology. Languages. A parser has two jobs: What is a parser Parsers A parser has two jobs: 1) Determine whether a string (program) is valid (think: grammatically correct) 2) Determine the structure of a program (think: diagramming a sentence) Agenda

More information

Reducing Points In a Handwritten Curve (Improvement in a Note-taking Tool)

Reducing Points In a Handwritten Curve (Improvement in a Note-taking Tool) Reducing Points In a Handwritten Curve (Improvement in a Note-taking Tool) Kaoru Oka oka@oz.ces.kyutech.ac.jp Faculty of Computer Science and Systems Engineering Kyushu Institute of Technology Japan Ryoji

More information

Introduction to Parsing. Lecture 5

Introduction to Parsing. Lecture 5 Introduction to Parsing Lecture 5 1 Outline Regular languages revisited Parser overview Context-free grammars (CFG s) Derivations Ambiguity 2 Languages and Automata Formal languages are very important

More information

Bottom-Up Parsing. Lecture 11-12

Bottom-Up Parsing. Lecture 11-12 Bottom-Up Parsing Lecture 11-12 (From slides by G. Necula & R. Bodik) 2/20/08 Prof. Hilfinger CS164 Lecture 11 1 Administrivia Test I during class on 10 March. 2/20/08 Prof. Hilfinger CS164 Lecture 11

More information

Chapter 2: Entity-Relationship Model

Chapter 2: Entity-Relationship Model Chapter 2: Entity-Relationship Model! Entity Sets! Relationship Sets! Design Issues! Mapping Constraints! Keys! E-R Diagram! Extended E-R Features! Design of an E-R Database Schema! Reduction of an E-R

More information

Summary: Semantic Analysis

Summary: Semantic Analysis Summary: Semantic Analysis 1 Basic Concepts When SA is performed: Semantic Analysis may be performed: In a two-pass compiler: after syntactic analysis is finished, the semantic analyser if called with

More information

Representing 2D Transformations as Matrices

Representing 2D Transformations as Matrices Representing 2D Transformations as Matrices John E. Howland Department of Computer Science Trinity University One Trinity Place San Antonio, Texas 78212-7200 Voice: (210) 999-7364 Fax: (210) 999-7477 E-mail:

More information

Overview of Verilog Part 1

Overview of Verilog Part 1 University of Wisconsin - Madison ECE/Comp ci 352 Digital ystems Fundamentals Charles R. Kime ection 2 Fall 2001 Chapters 3 and 4 Verilog Part 1 Minor Updates on 11/9/01 are shown in red. Charles Kime

More information

Test I Solutions MASSACHUSETTS INSTITUTE OF TECHNOLOGY Spring Department of Electrical Engineering and Computer Science

Test I Solutions MASSACHUSETTS INSTITUTE OF TECHNOLOGY Spring Department of Electrical Engineering and Computer Science Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.035 Spring 2013 Test I Solutions Mean 83 Median 87 Std. dev 13.8203 14 12 10 8 6 4 2 0 0 10 20 30 40 50

More information

An XML Viewer for Tabular Forms for use with Mechanical Documentation

An XML Viewer for Tabular Forms for use with Mechanical Documentation An XML Viewer for Tabular Forms for use with Mechanical Documentation Osamu Inoue and Kensei Tsuchida Dept. Information & Computer Sciences Toyo University 2100, Kujirai, Kawagoe Saitama, 350-8585, Japan

More information