Interpreter for ZOOM-I Andrew Deren Initial Presentation - SE690 5/30/03

Slides:



Advertisements
Similar presentations
ICE1341 Programming Languages Spring 2005 Lecture #6 Lecture #6 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Advertisements

1 Mooly Sagiv and Greta Yorsh School of Computer Science Tel-Aviv University Modern Compiler Design.
Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Final Lecture of the Semester Spring 2010 Marco.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Compiler Construction by Muhammad Bilal Zafar (AP)
ISBN Chapter 3 Describing Syntax and Semantics.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
The Java Programming Language
Programming Languages Structure
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Ch.1 Spring 2010 Marco Valtorta
BİL744 Derleyici Gerçekleştirimi (Compiler Design)1.
Describing Syntax and Semantics
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to Java Programming Language Junji Zhi University of Toronto 1.
9-Aug-15 Vocabulary. Programming Vocabulary Watch closely, you might even want to take some notes. There’s a short quiz at the end of this presentation!
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
OOP Languages: Java vs C++
Language Evaluation Criteria
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
Java Language and SW Dev’t
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
Programming Languages: History & Traditional Concepts CSC 2001.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
Advanced Programming Collage of Information Technology University of Palestine, Gaza Prepared by: Mahmoud Rafeek Alfarra Lecture 2: Major Concepts of Programming.
1 Computer Systems -- Introduction  Chapter 1 focuses on:  the structure of a Java application  basic program elements  preparing and executing a program.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
Compiler course 1. Introduction. Outline Scope of the course Disciplines involved in it Abstract view for a compiler Front-end and back-end tasks Modules.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Sheet 1 DocEng’03, Grenoble, November 2003 Model Driven Architecture based XML Processing Ivan Kurtev, Klaas van den Berg University of Twente, the Netherlands.
Compiler design Lecture 1: Compiler Overview Sulaimany University 2 Oct
ISBN Chapter 3 Describing Semantics.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
. n COMPILERS n n AND n n INTERPRETERS. -Compilers nA compiler is a program thatt reads a program written in one language - the source language- and translates.
Compiler Construction (CS-636)
1 CS308 Compiler Theory. 2 Course Information Instructor : –Prof. Minyi Guo –Yao Shen Course.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
 Fall Chart 2  Translators and Compilers  Textbook o Programming Language Processors in Java, Authors: David A. Watts & Deryck F. Brown, 2000,
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
1 February 23, February 23, 2016February 23, 2016February 23, 2016 Azusa, CA Sheldon X. Liang Ph. D. Computer Science at Azusa Pacific University.
ENEE150 – 0102 ANDREW GOFFIN Abstract Data Types.
CS416 Compiler Design1. 2 Course Information Instructor : Dr. Ilyas Cicekli –Office: EA504, –Phone: , – Course Web.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
7. Symbol Table Chih-Hung Wang Compilers References 1. C. N. Fischer and R. J. LeBlanc. Crafting a Compiler with C. Pearson Education Inc., D.
Comparison of ZOOM with other Formal Methodologies Hsiu-Chien Jing SE690 Initial Presentation School of CTI, DePaul University Supervised by Dr. Jia October,
COMP 3002: Compiler Construction Pat Morin School of Computer Science.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Lecture 9 Symbol Table and Attributed Grammars
Compiler principles Compiler Jakub Yaghob.
Collision Theory and Logic
Advanced Computer Systems
Compiler Design (40-414) Main Text Book:
SYSTEM SOFTWARE & COMPILER DESIGN
Collision Theory and Logic
Chapter No. : 1 Introduction to Java.
C# and the .NET Framework
课程名 编译原理 Compiling Techniques
CS416 Compiler Design lec00-outline September 19, 2018
Course supervisor: Lubna Siddiqui
CS416 Compiler Design lec00-outline February 23, 2019
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
Subtype Substitution Principle
Presentation transcript:

Interpreter for ZOOM-I Andrew Deren Initial Presentation - SE690 5/30/03

What is ZOOM? ZOOM is a set of tools and notation specifications used for development of large scale Object-Oriented systems. ZOOM stands for Z-based Object Oriented Modeling The ZOOM Project is supervised by Dr. Jia

Part of Zoom There are 3 parts of ZOOM: ZOOM-D – design notation  Formal notation to specify design models: object design models and user interface design. ZOOM-S – specification notation  Formal notation to describe the use cases with formally specified preconditions and postconditions. ZOOM-I – implementation language  Can be any object-oriented language: Java, C++, etc  Currently work is done on extending Java.  Language will be extended with zoom specific features, but parts of the software system can be developed in target language.

What is Interpreter? An interpreter is a program that accepts any program (the source program) expressed in a particular language (the source language), and runs that source program immediately. The interpreter does not translate the source program into object code prior to execution.

Why Write Interpreter? Easier to test programs, no need to recompile. Can test fragments of code. Changes to design of ZOOM language are easier to test in interpreter. Some features of ZOOM might be hard to translate to java code directly. Interpreters are much easier to implement than compilers.

Programming Language Lifecycle Model Can be implemented as Interpreter to test language features

Features different from Java Enumerations Const Type definitions Generics Language support for Sets/Lists/Relations Foreach statement

Enumerations enum States { AL, CA, IL, NY, MA}; Better type-safety than int or String. Can only use valid values and is enforced by compiler at compile time.

Const & Type definitions const int PI = Nicer syntax for: static final int PI = typedef SmallInt = typedef CourseSet = {Course}

Generics class Hashtable Provides type safety for collections and other types No longer casts needed to cast back to object

Sets/Lists Build in support for list and set construction list = [1.. 10] // list with 10 elements 1 to 10 list = [1, 2, 3, 4] list = [int x: x > 0 & x < x * 2] Similar syntax for set creation, but uses { instead of [ Build in operators for list and set operations: Union, intersection, cardinality, membership tests, etc. boolean inList = x in list;

Foreach New addition to the language foreach (Type x in Expression) Expression must result in typesafe iterator.

Interpreter Features Integrated into zoom IDE Syntax highlight and other nice editor features Run zoom code directly from IDE with statement step through, variable evaluation, etc.

Interpreter Architecture 1. Program text is fetched to ZOOM Parser which builds AST nodes. 2. AST nodes are transformed into language elements (Statements, Expressions, etc) 3. Type checker checks type validity of the program. 4. Interpreter walks AST evaluating statements and expressions.

Interpreter Architecture Operates on AST elements (expressions, statements, etc) Interpreter runtime system holds all data in objects derived from Val Each Val type knows how to interact with other Val types and supports all operators that can be performed by that type Val ValIntValSetValListValString... int x = 3;// creates ValInt int y = 4;// created ValInt int z = x + y;// calls x.operator_plus(y)

Status Currently interpreter can be used in command line mode, or as swing application. Most operators, expressions and statements are functional for primitive types, sets and lists, but no object- oriented features yet.

References David A. Watt & Deryck F. Brown. Programming Language Processors in Java. Prentice Hall, Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley,1988. Ravi Sethi. Programming Languages, Concepts & Constructs. Addison-Wesley, 1996 Randy M. Kaplan. Constructing Language Processors for Little Languages. John Wiley & Sons, Inc., 1994

Questions?