Chapter IV. Introduction

Size: px
Start display at page:

Download "Chapter IV. Introduction"

Transcription

1 54 Chapter IV ULTRAMAN ARCHITECTURE Introduction In previous chapters, we have introduced and motivated the ideas of a transformational approach to generating user interfaces. Throughout this dissertation we will discuss interfaces as views. For us, a view is an interface which is either the source or result of a transformation. In terms of granularity, we expect a view to be roughly equivalent to a window in a traditional desktop-metaphor window system. This chapter will introduce the mechanisms that this research has developed to perform these view transformations and give the reader a broad overview of the architecture of our technology. Future chapters will take up the details of the various subsystems. FIGURE 4-1 Television Character Ultraman

2 55 The system we have constructed is called Ultraman. This name was chosen for two reasons. First, Ultraman was the favorite television show of the author as a child. Second, the main character in the television show underwent a transformation from a normal person to the superhero, Ultraman. (It has been subsequently revealed that the intent of the show s creators was that the normal person conjured Ultraman, but this was never adequately revealed to the author as eight year-old. This confusion was widely shared by others.) As has been explained previously and will be explained in more detail in the future, the notion of transformation is a crucial one to our system. A picture of the television character Ultraman can be found in Figure 4-1. We will refer to the overall system of technology as Ultraman and specify its parts, such as the Ultraman Tool, when necessary to avoid confusion. FIGURE 4-2 Timeline Of Events When Using Ultraman In thinking about Ultraman s internal architecture, there are two distinct times that are important. These times are generate-time and run-time. In having these two important times, Ultraman is very similar to most other systems which generate code for use by an end-programmer in his or her application, for example a compiler. When we refer to actions the user takes or events that occur within Ultraman at generate-time, we mean the time when the end-programmer is designing the set of interface transformations. We call this generate-time because after the user has expressed his or her transformations to the Ultraman tool, the tool generates substantial amounts of code. In contrast, run-time is the time when the end-programmer s

3 56 application actually executes and the transformations occur. Clearly, run-time follows generate-time, since for an application to run using Ultraman s technology, Ultraman must generate code for use at run-time. A timeline of the events that would precede an application using Ultraman being completed is shown in Figure 4-2. The timeline in this figure is not meant to have any scale, the events are simply shown in their proper order. (The events involved with the design of an application on the left can take weeks and the time to regenerate an interface on the right only milliseconds.) In the generate-time portion of Figure 4-2 there are several decisions that are made by the programmer. The details of these decisions are in Chapter VIII; at this point what is important to understand is that the decisions being made are by the programmer and involved with how to use the Ultraman tool to achieve his or her ends and occur prior to the application being run. In the case of the right hand side of the figure, it is worth noting that this process of rebuilding the interface occurs as many times as the user makes modifications even though only one is pictured in this figure. Generate-Time Without a terrible loss of precision, generate-time can be considered to be the time when the endprogrammer is manipulating the Ultraman tool, shown in Figure 4-3. A better definition of generate-time would almost certainly include other activities on the part of the end-programmer such determining what view should be transformed and into what new view, what information will be necessary to perform the transformations, writing transformation actions (see Writing A Transformation Action on page 86), etc. These actions on the part of the programmer will be considered in more detail in Chapter VIII but from Ultraman s perspective there are two events occurring: The user is manipulating the user interface of the tool to inform Ultraman of the transformation of interest. The tool is generating code that implements the user s desired transformation. In upcoming chapters we will frequently refer to a pattern or a user-defined pattern. Such a pattern is a subtree like the one at the top of the screen dump shown in Figure 4-3. At run-time, Ultraman will search for patterns within the interface tree of some source view, as explained in A More Formal Introduction on page 12. These patterns are used to extract information from the source view. When using the Ultraman tool, these patterns are always expressed as a tree of nodes, where each node bears the label of a type of interactor.

4 57 Generated code After the end-programmer has completed his or her work defining the patterns of interest, the Ultraman tool goes to work generating code. The code generated is primarily two things: A specification for a lexical analyzer and a specification for a parser. Although Chapter V and Chapter VI will cover the approach used to do this in some detail, it is worth understanding at this point the overall direction of Ultraman s approach. In principle, our approach is to utilize off-the-shelf parsing and lexing technology to achieve the goal of finding the patterns of interactors specified by the user within a tree of interactors. Toward this end the Ultraman tool generates a particular specification of a lexer and a parser based on the set of a patterns defined by the user. These specifications are given to the ANTLR [27] tool, which generates a Java-based lexer and parser for use with the end-programmer s application. (We expect the end programmer to link his or her application with the generated parser and lexer.) Although in truth ANTLR is generating the lexer and parser that actually are used, Ultraman ultimately controls the lexer and parser produced by writing the

5 58 specification that ANTLR reads. Because of this, we frequently will refer to the Ultraman-generated lexer or parser to mean the lexer or parser generated by feeding the specification generated by Ultraman into ANTLR. FIGURE 4-3 Screen Shot Of The Ultraman Tool In Use When Ultraman generates a lexer or parser specification, there are parts of the specification that refer to user-defined code. Through the Ultraman tool, the end-programmer can express that certain actions (in the form of code) should be taken at various points in the transformation process as it occurs at run-time. Ultraman takes care to insure that these events actually occur at the proper time by crafting the specification it generates for the intended effect. For example, if a designated piece of user code should run when a particular pattern is found, Ultraman emits a parser specification which includes calls to the user code at the proper points. This implies that the specifications Ultraman generates are tied fairly closely to user code, and that at run-time user code is being invoked during or, perhaps better stated, intermingled with the execution of the generated parser and lexer.

6 59 In the chapters of this dissertation dealing with lexical analysis and parsing, we will explain in detail how the code generator of Ultraman works. However, a philosophical point is worth noting here: We believe that the simplest way to engineer a code generator is to generate code in a object-oriented fashion to some existing, library-written class supplied with the tool. To here means that we intend to generate code which is subclass of some well-known library class. In the case of Ultraman, the implication here is that the generated lexer and parser are subclasses of classes that are part of the Ultraman library. Run-Time FIGURE 4-4 Function Of The Ultraman Run-Time Figure 4-4 represents the overall function of Ultraman at run-time. Ultraman s built-in library plus the lexer and parser produced at generate-time form the curved arrow seen in the middle of this figure. This arrow converts a view, expressed as the tree on the left, into another view, expressed as the tree on the right. These trees are the programmer s view of an interface; the mechanism by which interfaces are built with code. The small insets behind each tree represent the end-user s view of the application: a display that appears on the screen. Let us consider Figure 4-4 at some point during run-time. Both interfaces, the source interface on the left and the generated interface on the right, are present on the screen and not currently changing. As soon as the end-user makes a change to the source interface, Ultraman swings into action. First, the lexical analysis

7 60 part of the system converts the left tree into a stream of input for the generated parser. Then the parser searches the tree for the patterns of interest and invokes the proper segments of the end-programmer s code as each pattern is found. Other parts of the input tree are ignored. In the end-programmer s code, he or she will be creating subtrees which will form the basis for the new generated interface on the right. The endprogrammer s code will, from his or her point of view, be adding these new subtrees to the point in the right hand subtree where they belong. Again, from the end-programmer s point of view, the old contents of these subtrees is removed before parsing begins. Once parsing is completed, Ultraman s state preservation code is invoked to attempt to preserve state in the old version of the right-hand tree. By applying some novel techniques to the programmer s output nodes, we perform a merge of the old and new trees yielding a new result for the right hand tree. It is this tree that is finally updated on the screen in response the end-user s change to the left-hand tree. At run-time significant amounts of specialized code is being run code that only makes sense for the given application. This would include the generated lexer and parser as well as any code that the Ultraman user writes that is specific to the semantics of his or her application. However, there is code that we call the library code which is part of the Ultraman system which is the same for all applications. Again, although these two types of run-time code are different in spirit, during the actual execution of the program the library code makes calls into the user code and vice versa. Library Code As we explained in Generated code on page 57, we believe on philosophical grounds in having the library of object supplied with Ultraman include base classes on which the generated code is based. This code is clearly part of the library code used by an application to do its transformation(s) and it also is the same throughout all Ultraman applications, but this code can be effectively ignored by the user. This code is simply provided to make the lexer and parser generation easier for the code generator and to allow more flexibility if changes are needed later. However, much more important to the library shipped with Ultraman is the code involved with statepreservation. The problem of state preservation is fully explored in the chapter State Preservation on page 73 and is previewed in the introductory chapter of this document. Briefly, it can be understood as the problem of preserving state between successive runs of the Ultraman transformation system. In other words, if we are transforming view A into view B repeatedly, how does any state currently encoded in B survive the next transformation? Will such state be lost? Ultraman employes a sophisticated mechanism to insure that in most cases the state will be preserved.

8 61 Ultraman s library code includes a special class designed for the purpose of dealing with the state preservation problem, the ShadowObject. One of the ShadowObject s jobs is to mimic the API of an interior node of the interactor tree. In particular, the ShadowObject is mimicing a particular object in the interactor tree which the end-programmer has designated previously (at the time that application is initialized). From the end-programmer s point of view, the ShadowObject is the interior object; it has the same API and is virtually indistinguishable from the object it is shadowing. Because operations which modify the interactor tree are being done to the ShadowObject although to the end-programmer it might as well be the actual interior node the ShadowObject has the opportunity to become aware of all changes that are being made and, in effect, keep an extra copy of part of the interactor tree. This is an extra copy because the actual interactor subtree is kept by the actual interior node. By using its knowledge of the interactor tree changes and having two copies of the tree temporarily (the extra is destroyed after each transformation) the ShadowObject has an opportunity to implement state-preservation algorithms. Technical Chapters Preview There are three primary technical chapters in this document, Chapter V, Chapter VI, and Chapter VII. These three chapters explore the issues of lexical analysis, parsing, and state preservation respectively. The lexical analysis chapter, beginning on page 61, deals with the process of converting a tree of interactors into a suitable input for a parser. This problem requires that the two-dimensional nature of a tree be converted into a linear stream of input for the parser to consume. This chapter details the particular algorithms used to produce the stream of input to the parser. Finally, this chapter concludes by considering the issue of using the Ultraman technology with a user-defined model. In this circumstance, the end-programmer must supply a lexer capable of converting his or her model into a form suitable for the parser and the lexical analysis chapter gives an explanation of this procedure and an example of how this is done. The chapter on parsing begins on page 72, and considers to primary points of focus. First, given that the run-time lexer has converted the input tree into a one-dimensional stream of tokens, how does the parser actually find the patterns of interest while ignoring the rest of the input? This problem is complicated by the fact that the user has significant power in expressing the patterns of interest, including using powerful operators such as the Kleene star. Underlying the workings of all this machinery is the grammar which drives the parser, and that grammar is generated by the Ultraman tool. This chapter explores the algorithms used to turn the user patterns expressed in the tool s graphical interface into a grammar. Finally, this chapter addresses the issue of application linkage, or how the particular application s semantics in the form of user code is called and controlled by Ultraman s parser generator.

9 62 One of the most intriguing aspects of Ultraman is its ability to preserve state across multiple runs of the system s transformation engine. The chapter which explores the techniques and algorithms used to accomplish this, both in terms of Ultraman s technology and the user s approach, starts on page 73. This chapter explores the crucial idea of value numbering which is the process of assigning labels, referred to as a number, to particular nodes in a tree. AT run-time, we utilize this technique to find like nodes in successive generations of Ultraman-generated trees. The process of performing this value numbering and related algorithms is manifested in the idea ShadowObject which was discussed above.

Chapter III AN END TO END EXAMPLE

Chapter III AN END TO END EXAMPLE 44 Chapter III AN END TO END EXAMPLE Chapter Summary All of the stages of using the Ultraman tool and run-time to create a new view from an existing view are explained in this chapter by working through

More information

SAP. Modeling Guide for PPF

SAP. Modeling Guide for PPF Modeling Guide for PPF Contents 1 Document Organization... 3 1.1 Authors... 3 1.2 Intended Group of Readers... 3 1.3 References... 3 1.4 Glossary... 4 2 Modeling Guidelines - Application Analysis... 6

More information

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS Objective PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS Explain what is meant by compiler. Explain how the compiler works. Describe various analysis of the source program. Describe the

More information

CSCE-608 Database Systems. COURSE PROJECT #2 (Due December 5, 2018)

CSCE-608 Database Systems. COURSE PROJECT #2 (Due December 5, 2018) CSCE-608 Database Systems Fall 2018 Instructor: Dr. Jianer Chen Office: HRBB 315C Phone: 845-4259 Email: chen@cse.tamu.edu Office Hours: MWF 10:00am-11:00am Grader: Sambartika Guha Email: sambartika.guha@tamu.edu

More information

Compilers. Prerequisites

Compilers. Prerequisites Compilers Prerequisites Data structures & algorithms Linked lists, dictionaries, trees, hash tables Formal languages & automata Regular expressions, finite automata, context-free grammars Machine organization

More information

balancer high-fidelity prototype dian hartono, grace jang, chris rovillos, catriona scott, brian yin

balancer high-fidelity prototype dian hartono, grace jang, chris rovillos, catriona scott, brian yin balancer high-fidelity prototype dian hartono, grace jang, chris rovillos, catriona scott, brian yin Problem and Solution Overview A healthy work-life balance is vital for both employers and employees.

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

Comp 411 Principles of Programming Languages Lecture 3 Parsing. Corky Cartwright January 11, 2019

Comp 411 Principles of Programming Languages Lecture 3 Parsing. Corky Cartwright January 11, 2019 Comp 411 Principles of Programming Languages Lecture 3 Parsing Corky Cartwright January 11, 2019 Top Down Parsing What is a context-free grammar (CFG)? A recursive definition of a set of strings; it is

More information

Compiler Design. Subject Code: 6CS63/06IS662. Part A UNIT 1. Chapter Introduction. 1.1 Language Processors

Compiler Design. Subject Code: 6CS63/06IS662. Part A UNIT 1. Chapter Introduction. 1.1 Language Processors Compiler Design Subject Code: 6CS63/06IS662 Part A UNIT 1 Chapter 1 1. Introduction 1.1 Language Processors A compiler is a program that can read a program in one language (source language) and translate

More information

CS664 Compiler Theory and Design LIU 1 of 16 ANTLR. Christopher League* 17 February Figure 1: ANTLR plugin installer

CS664 Compiler Theory and Design LIU 1 of 16 ANTLR. Christopher League* 17 February Figure 1: ANTLR plugin installer CS664 Compiler Theory and Design LIU 1 of 16 ANTLR Christopher League* 17 February 2016 ANTLR is a parser generator. There are other similar tools, such as yacc, flex, bison, etc. We ll be using ANTLR

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

The goal of the Pangaea project, as we stated it in the introduction, was to show that

The goal of the Pangaea project, as we stated it in the introduction, was to show that Chapter 5 Conclusions This chapter serves two purposes. We will summarize and critically evaluate the achievements of the Pangaea project in section 5.1. Based on this, we will then open up our perspective

More information

Semantic Analysis. Lecture 9. February 7, 2018

Semantic Analysis. Lecture 9. February 7, 2018 Semantic Analysis Lecture 9 February 7, 2018 Midterm 1 Compiler Stages 12 / 14 COOL Programming 10 / 12 Regular Languages 26 / 30 Context-free Languages 17 / 21 Parsing 20 / 23 Extra Credit 4 / 6 Average

More information

Automatic Parallelization of Sequential C Code

Automatic Parallelization of Sequential C Code Automatic Parallelization of Sequential C Code Pete Gasper Department of Mathematics and Computer Science South Dakota School of Mines and Technology peter.gasper@gold.sdsmt.edu Caleb Herbst Department

More information

Basic Structure of Denotational Definitions

Basic Structure of Denotational Definitions asic Structure of Denotational Definitions This chapter presents the format for denotational definitions. We use the abstract syntax and semantic algebra formats to define the appearance and the meaning

More information

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE David C. Hay Essential Strategies, Inc In the buzzword sweepstakes of 1997, the clear winner has to be Data Warehouse. A host of technologies and techniques

More information

CS 6353 Compiler Construction Project Assignments

CS 6353 Compiler Construction Project Assignments CS 6353 Compiler Construction Project Assignments In this project, you need to implement a compiler for a language defined in this handout. The programming language you need to use is C or C++ (and the

More information

Parser Design. Neil Mitchell. June 25, 2004

Parser Design. Neil Mitchell. June 25, 2004 Parser Design Neil Mitchell June 25, 2004 1 Introduction A parser is a tool used to split a text stream, typically in some human readable form, into a representation suitable for understanding by a computer.

More information

Programming Assignment I Due Thursday, October 9, 2008 at 11:59pm

Programming Assignment I Due Thursday, October 9, 2008 at 11:59pm Programming Assignment I Due Thursday, October 9, 2008 at 11:59pm 1 Overview Programming assignments I IV will direct you to design and build a compiler for Cool. Each assignment will cover one component

More information

CS 6353 Compiler Construction Project Assignments

CS 6353 Compiler Construction Project Assignments CS 6353 Compiler Construction Project Assignments In this project, you need to implement a compiler for a language defined in this handout. The programming language you need to use is C or C++ (and the

More information

Perfect Timing. Alejandra Pardo : Manager Andrew Emrazian : Testing Brant Nielsen : Design Eric Budd : Documentation

Perfect Timing. Alejandra Pardo : Manager Andrew Emrazian : Testing Brant Nielsen : Design Eric Budd : Documentation Perfect Timing Alejandra Pardo : Manager Andrew Emrazian : Testing Brant Nielsen : Design Eric Budd : Documentation Problem & Solution College students do their best to plan out their daily tasks, but

More information

CS 426 Fall Machine Problem 1. Machine Problem 1. CS 426 Compiler Construction Fall Semester 2017

CS 426 Fall Machine Problem 1. Machine Problem 1. CS 426 Compiler Construction Fall Semester 2017 CS 426 Fall 2017 1 Machine Problem 1 Machine Problem 1 CS 426 Compiler Construction Fall Semester 2017 Handed Out: September 6, 2017. Due: September 21, 2017, 5:00 p.m. The machine problems for this semester

More information

CS415 Compilers. Procedure Abstractions. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Procedure Abstractions. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Procedure Abstractions These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University Where are we? Well understood Engineering Source Code

More information

code pattern analysis of object-oriented programming languages

code pattern analysis of object-oriented programming languages code pattern analysis of object-oriented programming languages by Xubo Miao A thesis submitted to the School of Computing in conformity with the requirements for the degree of Master of Science Queen s

More information

LESSON 13: LANGUAGE TRANSLATION

LESSON 13: LANGUAGE TRANSLATION LESSON 13: LANGUAGE TRANSLATION Objective Interpreters and Compilers. Language Translation Phases. Interpreters and Compilers A COMPILER is a program that translates a complete source program into machine

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

CAPACITY PLANNING FOR THE DATA WAREHOUSE BY W. H. Inmon

CAPACITY PLANNING FOR THE DATA WAREHOUSE BY W. H. Inmon CAPACITY PLANNING FOR THE DATA WAREHOUSE BY W. H. Inmon The data warehouse environment - like all other computer environments - requires hardware resources. Given the volume of data and the type of processing

More information

mapping IFC versions R.W. Amor & C.W. Ge Department of Computer Science, University of Auckland, Auckland, New Zealand

mapping IFC versions R.W. Amor & C.W. Ge Department of Computer Science, University of Auckland, Auckland, New Zealand mapping IFC versions R.W. Amor & C.W. Ge Department of Computer Science, University of Auckland, Auckland, New Zealand ABSTRACT: In order to cope with the growing number of versions of IFC schema being

More information

Annotation Science From Theory to Practice and Use Introduction A bit of history

Annotation Science From Theory to Practice and Use Introduction A bit of history Annotation Science From Theory to Practice and Use Nancy Ide Department of Computer Science Vassar College Poughkeepsie, New York 12604 USA ide@cs.vassar.edu Introduction Linguistically-annotated corpora

More information

3D Input Devices for the GRAPECluster Project Independent Study Report By Andrew Bak. Sponsored by: Hans-Peter Bischof Department of Computer Science

3D Input Devices for the GRAPECluster Project Independent Study Report By Andrew Bak. Sponsored by: Hans-Peter Bischof Department of Computer Science 3D Input Devices for the GRAPECluster Project Independent Study Report By Andrew Bak Sponsored by: Hans-Peter Bischof Department of Computer Science Bak 2 Table of contents I. Introduction II. The Data

More information

Occam & C++ Translator

Occam & C++ Translator Occam & C++ Translator Student Name: Shaoguang Miao Student ID: C00131017 Supervisor: Joseph Kehoe Shaoguang Miao C00131017 Page 1 Table of Contents 1. What is the project idea comes from?... 3 2. Functionalities...

More information

Programming Assignment III

Programming Assignment III Programming Assignment III First Due Date: (Grammar) See online schedule (submission dated midnight). Second Due Date: (Complete) See online schedule (submission dated midnight). Purpose: This project

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

CS164: Programming Assignment 2 Dlex Lexer Generator and Decaf Lexer

CS164: Programming Assignment 2 Dlex Lexer Generator and Decaf Lexer CS164: Programming Assignment 2 Dlex Lexer Generator and Decaf Lexer Assigned: Thursday, September 16, 2004 Due: Tuesday, September 28, 2004, at 11:59pm September 16, 2004 1 Introduction Overview In this

More information

WHAT IS SOFTWARE ARCHITECTURE?

WHAT IS SOFTWARE ARCHITECTURE? WHAT IS SOFTWARE ARCHITECTURE? Chapter Outline What Software Architecture Is and What It Isn t Architectural Structures and Views Architectural Patterns What Makes a Good Architecture? Summary 1 What is

More information

CS202 Compiler Construction. Christian Skalka. Course prerequisites. Solid programming skills a must.

CS202 Compiler Construction. Christian Skalka.  Course prerequisites. Solid programming skills a must. CS202 Compiler Construction Christian Skalka www.cs.uvm.edu/~skalka/202 CS 202-1 Introduction 1 Course prerequisites CS101 Must be able to read assembly CS103 Understand tree operations basic grammars

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

Method Description for Semla A Software Design Method with a Focus on Semantics

Method Description for Semla A Software Design Method with a Focus on Semantics Computer Science Method Description for Semla A Software Design Method with a Focus on Semantics Semla for Java, English version May 2000 Method Description for Semla A Software Design Method with a Focus

More information

Introduction to Parsing Ambiguity and Syntax Errors

Introduction to Parsing Ambiguity and Syntax Errors Introduction to Parsing Ambiguity and Syntax rrors Outline Regular languages revisited Parser overview Context-free grammars (CFG s) Derivations Ambiguity Syntax errors Compiler Design 1 (2011) 2 Languages

More information

COL728 Minor1 Exam Compiler Design Sem II, Answer all 5 questions Max. Marks: 20

COL728 Minor1 Exam Compiler Design Sem II, Answer all 5 questions Max. Marks: 20 COL728 Minor1 Exam Compiler Design Sem II, 2016-17 Answer all 5 questions Max. Marks: 20 1. Short questions a. Show that every regular language is also a context-free language [2] We know that every regular

More information

Compilers - Chapter 2: An introduction to syntax analysis (and a complete toy compiler)

Compilers - Chapter 2: An introduction to syntax analysis (and a complete toy compiler) Compilers - Chapter 2: An introduction to syntax analysis (and a complete toy compiler) Lecturers: Paul Kelly (phjk@doc.ic.ac.uk) Office: room 304, William Penney Building Naranker Dulay (nd@doc.ic.ac.uk)

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

Object-oriented Compiler Construction

Object-oriented Compiler Construction 1 Object-oriented Compiler Construction Extended Abstract Axel-Tobias Schreiner, Bernd Kühl University of Osnabrück, Germany {axel,bekuehl}@uos.de, http://www.inf.uos.de/talks/hc2 A compiler takes a program

More information

CS131 Compilers: Programming Assignment 2 Due Tuesday, April 4, 2017 at 11:59pm

CS131 Compilers: Programming Assignment 2 Due Tuesday, April 4, 2017 at 11:59pm CS131 Compilers: Programming Assignment 2 Due Tuesday, April 4, 2017 at 11:59pm Fu Song 1 Policy on plagiarism These are individual homework. While you may discuss the ideas and algorithms or share the

More information

Distributed Consensus Protocols

Distributed Consensus Protocols Distributed Consensus Protocols ABSTRACT In this paper, I compare Paxos, the most popular and influential of distributed consensus protocols, and Raft, a fairly new protocol that is considered to be a

More information

SysML Activity Diagram Some Basic Semantics

SysML Activity Diagram Some Basic Semantics SysML Activity Diagram Some Basic Semantics theodore.kahn@engility.com 1. Does this diagram follow all SysML rules, is it semantically correct? 2. If it is correct, is it good SysML, is the modeler s intent

More information

Introduction to Parsing Ambiguity and Syntax Errors

Introduction to Parsing Ambiguity and Syntax Errors Introduction to Parsing Ambiguity and Syntax rrors Outline Regular languages revisited Parser overview Context-free grammars (CFG s) Derivations Ambiguity Syntax errors 2 Languages and Automata Formal

More information

Error Handling Syntax-Directed Translation Recursive Descent Parsing

Error Handling Syntax-Directed Translation Recursive Descent Parsing Error Handling Syntax-Directed Translation Recursive Descent Parsing Lecture 6 by Professor Vijay Ganesh) 1 Outline Recursive descent Extensions of CFG for parsing Precedence declarations Error handling

More information

Programming Languages & Translators PARSING. Baishakhi Ray. Fall These slides are motivated from Prof. Alex Aiken: Compilers (Stanford)

Programming Languages & Translators PARSING. Baishakhi Ray. Fall These slides are motivated from Prof. Alex Aiken: Compilers (Stanford) Programming Languages & Translators PARSING Baishakhi Ray Fall 2018 These slides are motivated from Prof. Alex Aiken: Compilers (Stanford) Languages and Automata Formal languages are very important in

More information

INTRODUCTION TO COMPILER AND ITS PHASES

INTRODUCTION TO COMPILER AND ITS PHASES INTRODUCTION TO COMPILER AND ITS PHASES Prajakta Pahade 1, Mahesh Dawale 2 1,2Computer science and Engineering, Prof. Ram Meghe College of Engineering and Management, Badnera, Amravati, Maharashtra, India.

More information

Design Proposal: Outline

Design Proposal: Outline Design Proposal: Outline This outline should be used as a checklist to help each member of the team make sure that every section of the document meets the requirements for a design proposal. Writing Style

More information

What do Compilers Produce?

What do Compilers Produce? What do Compilers Produce? Pure Machine Code Compilers may generate code for a particular machine, not assuming any operating system or library routines. This is pure code because it includes nothing beyond

More information

Domain-Specific. Languages. Martin Fowler. AAddison-Wesley. Sydney Tokyo. With Rebecca Parsons

Domain-Specific. Languages. Martin Fowler. AAddison-Wesley. Sydney Tokyo. With Rebecca Parsons Domain-Specific Languages Martin Fowler With Rebecca Parsons AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Sydney Tokyo Singapore

More information

Heuristic Evaluation of [Pass It On]

Heuristic Evaluation of [Pass It On] Heuristic Evaluation of [Pass It On] Evaluator #A: Janette Evaluator #B: John Evaluator #C: Pascal Evaluator #D: Eric 1. Problem Pass It On aims to transform some of the numerous negative and stressful

More information

MPLc Documentation. Tomi Karlstedt & Jari-Matti Mäkelä

MPLc Documentation. Tomi Karlstedt & Jari-Matti Mäkelä MPLc Documentation Tomi Karlstedt & Jari-Matti Mäkelä July 11, 2008 Contents 1 Introduction 1 2 Implementation 3 3 Structure 5 3.1 Class MPLc............................ 7 3.2 Class AspectJPrinter.......................

More information

CSE450 Translation of Programming Languages. Lecture 4: Syntax Analysis

CSE450 Translation of Programming Languages. Lecture 4: Syntax Analysis CSE450 Translation of Programming Languages Lecture 4: Syntax Analysis http://xkcd.com/859 Structure of a Today! Compiler Source Language Lexical Analyzer Syntax Analyzer Semantic Analyzer Int. Code Generator

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

Fundamental Concepts of Parallel Programming

Fundamental Concepts of Parallel Programming Fundamental Concepts of Parallel Programming Abstract The concepts behind programming methodologies and techniques are always under development, becoming more complex and flexible to meet changing computing

More information

Grammars and Parsing, second week

Grammars and Parsing, second week Grammars and Parsing, second week Hayo Thielecke 17-18 October 2005 This is the material from the slides in a more printer-friendly layout. Contents 1 Overview 1 2 Recursive methods from grammar rules

More information

CS103 Spring 2018 Mathematical Vocabulary

CS103 Spring 2018 Mathematical Vocabulary CS103 Spring 2018 Mathematical Vocabulary You keep using that word. I do not think it means what you think it means. - Inigo Montoya, from The Princess Bride Consider the humble while loop in most programming

More information

Object-Oriented Analysis and Design Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology-Kharagpur

Object-Oriented Analysis and Design Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology-Kharagpur Object-Oriented Analysis and Design Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology-Kharagpur Lecture 06 Object-Oriented Analysis and Design Welcome

More information

CS211 Lecture: Modeling Dynamic Behaviors of Systems; Interaction Diagrams and Statecharts Diagrams in UML

CS211 Lecture: Modeling Dynamic Behaviors of Systems; Interaction Diagrams and Statecharts Diagrams in UML CS211 Lecture: Modeling Dynamic Behaviors of Systems; Interaction Diagrams and Statecharts Diagrams in UML Objectives: 1. To introduce the notion of dynamic analysis 2. To show how to create and read Sequence

More information

COSE312: Compilers. Lecture 1 Overview of Compilers

COSE312: Compilers. Lecture 1 Overview of Compilers COSE312: Compilers Lecture 1 Overview of Compilers Hakjoo Oh 2017 Spring Hakjoo Oh COSE312 2017 Spring, Lecture 1 March 7, 2017 1 / 15 What is Compiler? Software systems that translate a program written

More information

Programming Assignment II

Programming Assignment II Programming Assignment II 1 Overview of the Programming Project Programming assignments II V will direct you to design and build a compiler for Cool. Each assignment will cover one component of the compiler:

More information

Today s Topics. Last Time Top-down parsers - predictive parsing, backtracking, recursive descent, LL parsers, relation to S/SL

Today s Topics. Last Time Top-down parsers - predictive parsing, backtracking, recursive descent, LL parsers, relation to S/SL Today s Topics Last Time Top-down parsers - predictive parsing, backtracking, recursive descent, LL parsers, relation to S/SL This Time Constructing parsers in SL Syntax error recovery and repair Parsing

More information

Formal Languages and Compilers Lecture VI: Lexical Analysis

Formal Languages and Compilers Lecture VI: Lexical Analysis Formal Languages and Compilers Lecture VI: Lexical Analysis Free University of Bozen-Bolzano Faculty of Computer Science POS Building, Room: 2.03 artale@inf.unibz.it http://www.inf.unibz.it/ artale/ Formal

More information

Important Project Dates

Important Project Dates Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2002 Handout 4 Project Overview Wednesday, September 4 This is an overview of the course project

More information

THINGS YOU NEED TO KNOW ABOUT USER DOCUMENTATION DOCUMENTATION BEST PRACTICES

THINGS YOU NEED TO KNOW ABOUT USER DOCUMENTATION DOCUMENTATION BEST PRACTICES 5 THINGS YOU NEED TO KNOW ABOUT USER DOCUMENTATION DOCUMENTATION BEST PRACTICES THIS E-BOOK IS DIVIDED INTO 5 PARTS: 1. WHY YOU NEED TO KNOW YOUR READER 2. A USER MANUAL OR A USER GUIDE WHAT S THE DIFFERENCE?

More information

Stating the obvious, people and computers do not speak the same language.

Stating the obvious, people and computers do not speak the same language. 3.4 SYSTEM SOFTWARE 3.4.3 TRANSLATION SOFTWARE INTRODUCTION Stating the obvious, people and computers do not speak the same language. People have to write programs in order to instruct a computer what

More information

Error Handling Syntax-Directed Translation Recursive Descent Parsing

Error Handling Syntax-Directed Translation Recursive Descent Parsing Announcements rror Handling Syntax-Directed ranslation Lecture 6 PA1 & WA1 Due today at midnight PA2 & WA2 Assigned today Prof. Aiken CS 143 Lecture 6 1 Prof. Aiken CS 143 Lecture 6 2 Outline xtensions

More information

Important Project Dates

Important Project Dates Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Project Overview Tuesday, Feb 2 This is an overview of the course project and

More information

Eclipse Support for Using Eli and Teaching Programming Languages

Eclipse Support for Using Eli and Teaching Programming Languages Electronic Notes in Theoretical Computer Science 141 (2005) 189 194 www.elsevier.com/locate/entcs Eclipse Support for Using Eli and Teaching Programming Languages Anthony M. Sloane 1,2 Department of Computing

More information

CSCI 2041: Advanced Language Processing

CSCI 2041: Advanced Language Processing CSCI 2041: Advanced Language Processing Chris Kauffman Last Updated: Wed Nov 28 13:25:47 CST 2018 1 Logistics Reading OSM: Ch 17 The Debugger OSM: Ch 13 Lexer and Parser Generators (optional) Practical

More information

Topics in Object-Oriented Design Patterns

Topics in Object-Oriented Design Patterns Software design Topics in Object-Oriented Design Patterns Material mainly from the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides; slides originally by Spiros Mancoridis;

More information

Visualizing Verification. Adrian A. Marsh April 2004

Visualizing Verification. Adrian A. Marsh April 2004 Visualizing Verification Adrian A. Marsh April 2004 Abstract This paper proposes extending UML modeling to system verification. Changing the utilization of the UML diagrams will increase the quality of

More information

Part 5 Program Analysis Principles and Techniques

Part 5 Program Analysis Principles and Techniques 1 Part 5 Program Analysis Principles and Techniques Front end 2 source code scanner tokens parser il errors Responsibilities: Recognize legal programs Report errors Produce il Preliminary storage map Shape

More information

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division Fall, 2005 Prof. R. Fateman CS 164 Assignment 3 and 4: Parsing for MiniJava Due: Tuesday, Oct.

More information

The Salesforce Migration Playbook

The Salesforce Migration Playbook The Salesforce Migration Playbook By Capstorm Table of Contents Salesforce Migration Overview...1 Step 1: Extract Data Into A Staging Environment...3 Step 2: Transform Data Into the Target Salesforce Schema...5

More information

CS Lecture 2. The Front End. Lecture 2 Lexical Analysis

CS Lecture 2. The Front End. Lecture 2 Lexical Analysis CS 1622 Lecture 2 Lexical Analysis CS 1622 Lecture 2 1 Lecture 2 Review of last lecture and finish up overview The first compiler phase: lexical analysis Reading: Chapter 2 in text (by 1/18) CS 1622 Lecture

More information

Compiler Construction D7011E

Compiler Construction D7011E Compiler Construction D7011E Lecture 2: Lexical analysis Viktor Leijon Slides largely by Johan Nordlander with material generously provided by Mark P. Jones. 1 Basics of Lexical Analysis: 2 Some definitions:

More information

The Procedure Abstraction Part I: Basics

The Procedure Abstraction Part I: Basics The Procedure Abstraction Part I: Basics Procedure Abstraction Begins Chapter 6 in EAC The compiler must deal with interface between compile time and run time Most of the tricky issues arise in implementing

More information

Basic features. Adding audio files and tracks

Basic features. Adding audio files and tracks Audio in Pictures to Exe Introduction In the past the conventional wisdom was that you needed a separate audio editing program to produce the soundtrack for an AV sequence. However I believe that PTE (Pictures

More information

Semantic Tableau Prover for Modal Logic

Semantic Tableau Prover for Modal Logic University of Manchester Third Year Project 2015 Semantic Tableau Prover for Modal Logic Student: Silviu Adi Pruteanu Supervisor: Dr. Renate Schmidt 1/34 Abstract This project report documents the extension

More information

Error Handling Syntax-Directed Translation Recursive Descent Parsing

Error Handling Syntax-Directed Translation Recursive Descent Parsing Announcements rror Handling Syntax-Directed ranslation Lecture 6 PA1 & WA1 Due today at midnight PA2 & WA2 Assigned today Prof. Aiken CS 14 Lecture 6 1 Prof. Aiken CS 14 Lecture 6 2 Outline xtensions of

More information

COPYRIGHTED MATERIAL. Using SQL. The Processing Cycle for SQL Statements

COPYRIGHTED MATERIAL. Using SQL. The Processing Cycle for SQL Statements Using SQL The end users of the applications you develop are almost never aware of the code used to retrieve their data for them, or insert and update changes to the data back into the database. Your application

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

CS 330 Homework Comma-Separated Expression

CS 330 Homework Comma-Separated Expression CS 330 Homework Comma-Separated Expression 1 Overview Your responsibility in this homework is to build an interpreter for text-based spreadsheets, which are essentially CSV files with formulas or expressions

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

Programming Assignment I Due Thursday, October 7, 2010 at 11:59pm

Programming Assignment I Due Thursday, October 7, 2010 at 11:59pm Programming Assignment I Due Thursday, October 7, 2010 at 11:59pm 1 Overview of the Programming Project Programming assignments I IV will direct you to design and build a compiler for Cool. Each assignment

More information

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILING

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILING PRINCIPLES OF COMPILER DESIGN 2 MARKS UNIT I INTRODUCTION TO COMPILING 1. Define compiler? A compiler is a program that reads a program written in one language (source language) and translates it into

More information

SEM / YEAR : VI / III CS2352 PRINCIPLES OF COMPLIERS DESIGN UNIT I - LEXICAL ANALYSIS PART - A

SEM / YEAR : VI / III CS2352 PRINCIPLES OF COMPLIERS DESIGN UNIT I - LEXICAL ANALYSIS PART - A SEM / YEAR : VI / III CS2352 PRINCIPLES OF COMPLIERS DESIGN UNIT I - LEXICAL ANALYSIS PART - A 1. What is a compiler? (A.U Nov/Dec 2007) A compiler is a program that reads a program written in one language

More information

FACETs. Technical Report 05/19/2010

FACETs. Technical Report 05/19/2010 F3 FACETs Technical Report 05/19/2010 PROJECT OVERVIEW... 4 BASIC REQUIREMENTS... 4 CONSTRAINTS... 5 DEVELOPMENT PROCESS... 5 PLANNED/ACTUAL SCHEDULE... 6 SYSTEM DESIGN... 6 PRODUCT AND PROCESS METRICS...

More information

Interpreters. Prof. Clarkson Fall Today s music: Step by Step by New Kids on the Block

Interpreters. Prof. Clarkson Fall Today s music: Step by Step by New Kids on the Block Interpreters Prof. Clarkson Fall 2017 Today s music: Step by Step by New Kids on the Block Review Previously in 3110: functional programming modular programming data structures Today: new unit of course:

More information

Attributes of a Good Backup System

Attributes of a Good Backup System MULTICS TECHNICAL BULLETIN MI'B-203 T0: Distribution From: D. R. Vinograd Date: 06/26/75 Subject: Attributes of a Good Backup System The purpose of this MTB is to define the attributes of a well designed

More information

Design Patterns IV. Alexei Khorev. 1 Structural Patterns. Structural Patterns. 2 Adapter Design Patterns IV. Alexei Khorev. Structural Patterns

Design Patterns IV. Alexei Khorev. 1 Structural Patterns. Structural Patterns. 2 Adapter Design Patterns IV. Alexei Khorev. Structural Patterns Structural Design Patterns, 1 1 COMP2110/2510 Software Design Software Design for SE September 17, 2008 2 3 Department of Computer Science The Australian National University 4 18.1 18.2 GoF Structural

More information

RAID SEMINAR REPORT /09/2004 Asha.P.M NO: 612 S7 ECE

RAID SEMINAR REPORT /09/2004 Asha.P.M NO: 612 S7 ECE RAID SEMINAR REPORT 2004 Submitted on: Submitted by: 24/09/2004 Asha.P.M NO: 612 S7 ECE CONTENTS 1. Introduction 1 2. The array and RAID controller concept 2 2.1. Mirroring 3 2.2. Parity 5 2.3. Error correcting

More information

Understanding Advanced Workflow

Understanding Advanced Workflow IBM Content Manager for iseries Understanding Advanced Workflow Version 5 Release 1 SC27-1138-00 IBM Content Manager for iseries Understanding Advanced Workflow Version 5 Release 1 SC27-1138-00 Note Before

More information

Compilers and computer architecture From strings to ASTs (2): context free grammars

Compilers and computer architecture From strings to ASTs (2): context free grammars 1 / 1 Compilers and computer architecture From strings to ASTs (2): context free grammars Martin Berger October 2018 Recall the function of compilers 2 / 1 3 / 1 Recall we are discussing parsing Source

More information

AADL Graphical Editor Design

AADL Graphical Editor Design AADL Graphical Editor Design Peter Feiler Software Engineering Institute phf@sei.cmu.edu Introduction An AADL specification is a set of component type and implementation declarations. They are organized

More information

Compiler Theory. (Semantic Analysis and Run-Time Environments)

Compiler Theory. (Semantic Analysis and Run-Time Environments) Compiler Theory (Semantic Analysis and Run-Time Environments) 005 Semantic Actions A compiler must do more than recognise whether a sentence belongs to the language of a grammar it must do something useful

More information