Open PROMOL: An Experimental Language for Target Program Modification

Size: px
Start display at page:

Download "Open PROMOL: An Experimental Language for Target Program Modification"

Transcription

1 Open PROMOL: An Experimental Language for Target Program Modification Vytautas Štuikys, Robertas Damaševičius, Giedrius Ziberkas Software Engineering Department, Kaunas University of Technology Studentų 50, LT-3031, Kaunas, Lithuania mailto: Abstract We present a short description of the capabilities of the experimental scripting language Open PROMOL. It has been developed aiming: 1) to deliver flexible means for representing wide range modifications of a target program, and 2) to support white-box reuse for well-understood domains, such as hardware design. We describe the syntax and semantics of the basic constructs of the language. We demonstrate the applicability of the language to perform modifications by widening, narrowing and isolating functionality in VHDL. Keywords Program modification, scripting language, VHDL models, component customization, design parameterization. 1. Introduction We present an experimental scripting language Open PROMOL, the Program Modification Language. It has been developed aiming: (a) to specify modifications of the components (or their parts) given in a target language (TL); (b) to specify gluing of the TL components (or their parts) into a target system; and (c) to use it for designing generic components and building generating systems. Originally the language wasn t dedicated to a particular domain, and was designed as a TL-independent one. This means that the language itself doesn t extend the functionality of a given TL. Its intention is only to express concisely the preprogrammed modifications of the TL code in a single specification. Of course, this may be done at some extent using the given TL only, e.g. in VHDL [1]. However, by introducing an external specific language, we can enhance the abstraction level significantly and express modifications more precisely, widely and flexibly, at the same time avoiding the overgeneralization of a target program. We motivate the need of the new textual scripting language by the following reasons: 1) To support white-box reuse for well-understood domains. 2) To deliver flexible means for representing wide range modifications. 3) To support the multi-language paradigm in system designs [2]. A great variety of scripting languages exists now, each with its own intention and specific capabilities. It s not our intention to provide a detailed analysis of the domain here. Some results can be found in [3-5]. Our approach has some similarities with Bassett s frame commands [6]. 2. Main concepts implemented in the language The proposed language implements the modification and scripting concepts. According to Ousterhout [3], the main idea of scripting is that an application developer is provided with a collection of useful components, and he (she) only has to write a small amount of wiring code in order to establish connections between components. It can take various forms, depending on the nature and granularity of the components, the framework of a domain problem, and the composition model.

2 Components themselves are highly parameterized domain entities such as gates, adders, multipliers, etc., which are generalized with PROMOL functions. The purpose of these functions is to perform the necessary modifications of the TL code during the generation process in order to receive a concrete instance of the component tailored to the specific needs of the developer. The combination of modification and scripting concepts (see Fig. 1) leads to the creation of parameterized systems [7], i.e., heavily parameterized architectures adaptable in terms of power, performance and size requirements. a) b) Gluing (scripting) a piece of target program a function of the scripting Modification Scripting Generic Component Instance Fig. 1. The interpretation of modification and scripting concepts at a lower- (a) and higher-level (b) 3. Basic features of the syntax and semantics Open PROMOL is a functional language and consists of an open set of external functions. The context of their usage is a prescribed specification. All modifications in the specification are represented as a specific composition of external functions with the TL code to be modified [8, 9]. Functions are called external because they represent a higher level of programming and have parameters, whose values are defined externally. A PROMOL function has the format as 1, argument 2,, argument n ] ; here n > 0. The denotes the beginning of the function, and the square brackets [] enclose the argument list of the function. We summarize a basic set of functions, their syntax and semantics in Tables 1 and 2, respectively. Each function has a list of arguments and returns a value, which is always a string of the TL. Arguments are either a constant, a parameter implicitly declared in the interface of a specification, an expression, or a composition of external functions and TL strings. A constant may be either a numeric literal of the language or a string literal written in a TL. A string might be either a part of a statement or the entire construct of the TL program to be generated. The functional programming paradigm allows us to achieve a great deal of flexibility, since a TL string may be transformed gradually by several functions, until it reaches its final form. The nested functions enable to achieve a deep and flexible external modification of the TL code to be processed. Open PROMOL is a string-oriented language. Everything (e.g., numbers, enumerated type variables, etc.) is a string. Because a particular type is recognized from the context, there are no attributes for the explicit declaration of the type. A value of the string type may be interpreted as a decimal number, a binary number or a string of text depending upon the context of the usage.

3 No. Function name Table 1. The description of the basic set of PROMOL functions No. of arguments Argument Meaning of argument Type of argument Actions performed by the 1 function 2 1 Expression Expression, function, Parameter value substitution, string of text expression calculation 2* Precision Decimal number 3 1 Condition Logical expression If-selection 2 Then branch Function, string of text 3* Else branch Function, string of text >2 1 Selector Arithmetic expression Case-selection >2 Branches Function, string of text 4 1 Loop parameter Loop parameter name For-loop 2 Initial value Arithmetic expression 3 Final value Arithmetic expression 4 Loop body Function, string of text 5 1 Number of substrings Arithmetic expression String generation 2 Separator Function, string of text 3* Substring Function, string of text 4* Initial index Arithmetic expression 5* Step Arithmetic expression 2 1 Parameter name Parameter name Value assignment 2 Assigned value Function, string of text 2 1 Number of repetitions Arithmetic expression Repetition of text 2 Script to be repeated Function, string of text >0 >0 External module names Module name External module declaration >1 1 External module name Module name External module instantiation >2* Parameter values Expression, function, string of text Table 2. Syntax and semantics of the PROMOL functions (subset) No. Function Examples of the usage Parameter value The returned value name V n ]; n := 2 V := 2; X: bit@if[ n>1, {_vector (0 ]; n := 4 X: bit_vector (0 to 3); Y n, {B1}, {B2}, {B3} ]; n := 2 Y <= i, 0, n-1, {L(@sub[i]) } ] n := 5 L(0) L(1) L(2) L(3) L(4) Y n, { AND }, {X}, 0 ]; n := 3 Y <= X0 AND X1 AND f, {NOT} ] f := NOT <null> X n, {@sub[sym]} ] ; n := 4; sym := 0 X <= gate ] gate, {AND}, n ] n := 2 2-input AND gate instance 4. Main capabilities of the language The language and its processor EREBUS implements the following capabilities: Generalization. In many cases, we can merge similar components into a single generalized (or generic) specification through the usage of the functions. Abstraction. We introduce two separate levels of abstraction: a higher level is referred to as the component (specification) interface, where specification parameters are defined, and a lower level is called the component implementation (specification body). Parameterization. Parameterization is a simple and understandable model for combining and customizing components. They are not constrained to a particular type (as, e.g., in C++ templates [10]), but can take string values of any length and content. The language implements two parameterization models: the conditional (the assignment of a value to a parameter depends on a condition), and the hierarchical ones (through deep nesting and the usage of external modules, which can form the tree-type structures). Separation of concerns. We clearly separate the abstractions of the scripting language from a given TL, the interface of the generalized specification from its implementation, and the development of a specification from its usage. 1 Optional arguments are shown with an asterisk *.

4 Composition. A particular set of the external functions used in the specification implements an internal composition in a natural way via the concatenation of strings. The usage of external modules allows a more sophisticated composition. Generation. There are specific functions for generating strings of a particular structure. Extension. The language is an open set of external functions, which are independent. Hence, the new ones (if needed) can be introduced easily. Modification. The language performs modifications of a target program using usual abstractions of structural programming (i.e., if, for, case, etc.). Independence from a TL. Open PROMOL treats TL program as a simple text without any particular meaning, and uses lexical mechanisms independent of any TL syntax and the usage context to perform the necessary modifications. Rapid prototyping. The language processor implements this feature through generation of either a selected instance or all instances prescribed by the generalized specification. Documenting. The user-oriented questions in the interface and comments in the specification body allow expressing the explanations in the natural language. 5. Case study: VHDL code modification via widening, narrowing & isolation Sametinger [11] has described four general methods for generalizing components. We have adopted some of them for the modification of VHDL code with Open PROMOL. The first example (Fig. 2, a) implements modifications by narrowing functionality with respect to the second example (Fig. 2, b). The latter one illustrates the modification by widening functionality. The generated instances are given in Fig. 2, c & d, respectively. "Select a function" {AND,OR,XOR,NOR,NAND,XNOR} f:=and; "Enter the number of inputs" {2..16} this is the promol a text between symbols is the gate1 is the name of the specification the specification implements any gate function (except NOT) -- this is an instance of GATE_@sub[f]_@sub[num] ENTITY GATE_@sub[f]_@sub[num] IS PORT (@gen[num, {, }, {X}, 1] : IN BIT; END GATE_@sub[f]_@sub[num]; ARCHITECTURE BEH OF GATE_@sub[f]_@sub[num] IS Y }, {X}, "Select a function" {AND,OR,XOR,NOR,NAND,XNOR,NOT} f:=and; [f neq {NOT}] "Enter the number of inputs" {2..16} this specification uses the external module the specification represents modifiication widening functionality with NOT the second question appears only when the condition is neq {NOT}, {@macro[gate1, f, num] }, { -- this is an instance of GATE_@sub[f] ENTITY GATE_@sub[f] IS PORT (X1 : IN BIT; END GATE_@sub[f]; ARCHITECTURE BEH OF GATE_@sub[f] IS Y <= NOT X1; }] -- this is an instance of GATE_OR_4 ENTITY GATE_OR_4 IS PORT (X1, X2, X3, X4 : IN BIT; END GATE_OR_4; ARCHITECTURE BEH OF GATE_OR_4 IS Y <= X1 OR X2 OR X3 OR X4; a) c) -- this is an instance of GATE_NOT ENTITY GATE_NOT IS PORT (X1 : IN BIT; END GATE_NOT; ARCHITECTURE BEH OF GATE_NOT IS Y <= NOT X1; b) d) Fig. 2. The modifications by narrowing (a), widening (b), (c) & (d)- their instances, respectively

5 The third example below demonstrates a modification by isolating functionality. For simplicity, we present it without the explicit VHDL context. Suppose, we need to include in several different places of a higher level design the slightly different components (fragments), which are given in the isolated files a1, a2, a3, a4. This might be represented in the PROMOL specification as k, {@macro[a1]}, {@macro[a2]}, {@macro[a3]}, {@macro[a4]} ]; where a1, a2, a3, a4 are file names; k is a parameter for the customization of a particular context of the usage. 6. Current status of the language and future development We use the language and its processor as an experimental tool for describing modification in several domains (program specialization, generation), including VHDL. Users are postgraduate students in computer science. Over more than two years, the current version of the language processor have passed through intensive experiments by more than 150 users. The future work relates to the development of the distributed version using the web-based technology. 7. Conclusions Open PROMOL is a functional scripting language aiming to describe the wide range of textual modifications of a target program. It uses lexical mechanisms independent of any target language syntax to perform the necessary modifications via the external functions. PROMOL specification is a higher level description, which manipulates with a program as data. Although there are no restrictions on the language usage, however, it suits best for wellunderstood domains, in which a great similarity of designs and a great deal of the repeatedly used look-alike models exist. Domain of hardware design with the great variety of its design languages is just the case. External functions combined together with the abstractions of a given HDL extend the modification capabilities flexibly. The language can be used to support design reuse through parameterization. References [1] R. Zimmermann, VHDL Library of Arithmetic Units, Forum of Design Languages (FDL 98), Lausanne, September [2] A. A. Jerraya, and R. Ernst, Multi-language System Design, DATE'99, Münich, Germany, March [3] J. K. Ousterhout, Scripting: Higher Level Programming for the 21 st Century, IEEE Computer 31(3), pp , March [4] J. G. Schneider, and O. Nierstrasz, Components, Scripts and Glue. In L. Barroca, J. Hall, and P. Hall (Eds.), Software Architectures Advances and Applications, pp Springer, [5] J.-G. Schneider, Components, Scripts, and Glue: A conceptual framework for software composition, Ph.D. thesis, University of Bern, Institute of Computer Science and Applied Mathematics, October [6] P.G. Bassett, Framing Software Reuse: Lessons from the Real World. Prentice Hall, Inc., [7] T. Givargis, and F. Vahid, Parameterized System Design, Proceedings CODES 2000, pp , [8] V. Štuikys, and R. Damaševičius, Scripting Language Open PROMOL and its Processor, Informatica, Vol. 11, No. 1, pp , [9] V. Štuikys, G. Ziberkas, R. Damaševičius, and G. Majauskas, Two Approaches for Developing Generic Components in VHDL, Proceedings DATE 2001, p IEEE Computer Society Press, [10] T. L. Veldhuizen, Using C++ template meta-programs, C++ Report 7(4), pp , [11] J. Sametinger, Software Engineering with Reusable Components, Springer, 1997.

Soft IP Design Framework Using Metaprogramming Techniques

Soft IP Design Framework Using Metaprogramming Techniques Soft IP Design Framework Using Metaprogramming Techniques Vytautas Stuikys, Robertas Giedrius Ziberkas, and Giedrius Majauskas Kaunas University o/technology. Software Engineering Department Studentu 50.

More information

Applying Experiences with Declarative Codifications of Software Architectures on COD

Applying Experiences with Declarative Codifications of Software Architectures on COD Applying Experiences with Declarative Codifications of Software Architectures on COD Position Paper Roel Wuyts Stéphane Ducasse Gabriela Arévalo roel.wuyts@iam.unibe.ch ducasse@iam.unibe.ch arevalo@iam.unibe.ch

More information

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions) By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable

More information

Arrays Structured data Arrays What is an array?

Arrays Structured data Arrays What is an array? The contents of this Supporting Material document have been prepared from the Eight units of study texts for the course M150: Date, Computing and Information, produced by The Open University, UK. Copyright

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

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

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects JavaScript CAC Noida is an ISO 9001:2015 certified training center with professional experience that dates back to 2005. The vision is to provide professional education merging corporate culture globally

More information

A Small Permutation Group Engine by: Gregory Kip. COMS W4115 Programming Languages and Translators Prof. Stephen Edwards

A Small Permutation Group Engine by: Gregory Kip. COMS W4115 Programming Languages and Translators Prof. Stephen Edwards µperm A Small Permutation Group Engine by: Gregory Kip COMS W4115 Programming Languages and Translators Prof. Stephen Edwards Abstract Given the abstract character of much of modern physics and mathematics,

More information

Ulex: A Lexical Analyzer Generator for Unicon

Ulex: A Lexical Analyzer Generator for Unicon Ulex: A Lexical Analyzer Generator for Unicon Katrina Ray, Ray Pereda, and Clinton Jeffery Unicon Technical Report UTR 02a May 21, 2003 Abstract Ulex is a software tool for building language processors.

More information

The SPL Programming Language Reference Manual

The SPL Programming Language Reference Manual The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming

More information

Introduction to Verilog HDL

Introduction to Verilog HDL Introduction to Verilog HDL Ben Abdallah Abderazek National University of Electro-communications, Tokyo, Graduate School of information Systems May 2004 04/09/08 1 What you will understand after having

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Pattern-Oriented Development with Rational Rose

Pattern-Oriented Development with Rational Rose Pattern-Oriented Development with Rational Rose Professor Peter Forbrig, Department of Computer Science, University of Rostock, Germany; Dr. Ralf Laemmel, Department of Information Management and Software

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

HIERARCHICAL DESIGN. RTL Hardware Design by P. Chu. Chapter 13 1

HIERARCHICAL DESIGN. RTL Hardware Design by P. Chu. Chapter 13 1 HIERARCHICAL DESIGN Chapter 13 1 Outline 1. Introduction 2. Components 3. Generics 4. Configuration 5. Other supporting constructs Chapter 13 2 1. Introduction How to deal with 1M gates or more? Hierarchical

More information

Outline HIERARCHICAL DESIGN. 1. Introduction. Benefits of hierarchical design

Outline HIERARCHICAL DESIGN. 1. Introduction. Benefits of hierarchical design Outline HIERARCHICAL DESIGN 1. Introduction 2. Components 3. Generics 4. Configuration 5. Other supporting constructs Chapter 13 1 Chapter 13 2 1. Introduction How to deal with 1M gates or more? Hierarchical

More information

Typescript on LLVM Language Reference Manual

Typescript on LLVM Language Reference Manual Typescript on LLVM Language Reference Manual Ratheet Pandya UNI: rp2707 COMS 4115 H01 (CVN) 1. Introduction 2. Lexical Conventions 2.1 Tokens 2.2 Comments 2.3 Identifiers 2.4 Reserved Keywords 2.5 String

More information

A Short Summary of Javali

A Short Summary of Javali A Short Summary of Javali October 15, 2015 1 Introduction Javali is a simple language based on ideas found in languages like C++ or Java. Its purpose is to serve as the source language for a simple compiler

More information

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; } Ex: The difference between Compiler and Interpreter The interpreter actually carries out the computations specified in the source program. In other words, the output of a compiler is a program, whereas

More information

22) Generic Programming with Generic Components Full Genericity in BETA. Obligatory Reading. Literature

22) Generic Programming with Generic Components Full Genericity in BETA. Obligatory Reading. Literature 22) Generic Programming with Generic Components Obligatory Reading Invasive Software, Chapter 6 [BETA-DEF] The BETA language. Free book. http://www.daimi.au.dk/~beta/books/. Please, select appropriate

More information

Standard. Number of Correlations

Standard. Number of Correlations Computer Science 2016 This assessment contains 80 items, but only 80 are used at one time. Programming and Software Development Number of Correlations Standard Type Standard 2 Duty 1) CONTENT STANDARD

More information

5. VHDL - Introduction - 5. VHDL - Design flow - 5. VHDL - Entities and Architectures (1) - 5. VHDL - Entities and Architectures (2) -

5. VHDL - Introduction - 5. VHDL - Design flow - 5. VHDL - Entities and Architectures (1) - 5. VHDL - Entities and Architectures (2) - Sistemas Digitais I LESI - 2º ano Lesson 5 - VHDL Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática - Introduction - VHDL was developed, in the mid-1980s, by DoD and IEEE. VHDL stands

More information

COMS W4115. Programming Languages and Translators. ASML: White Paper

COMS W4115. Programming Languages and Translators. ASML: White Paper COMS W4115 Programming Languages and Translators ASML: White Paper 09/23/2003 Davidov, Olga olga.davidov@riag.com ASML: ARRAY SORTING AND MANIPULATION LANGUAGE Introduction ASML is designed to be a simple,

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

Language Reference Manual

Language Reference Manual TAPE: A File Handling Language Language Reference Manual Tianhua Fang (tf2377) Alexander Sato (as4628) Priscilla Wang (pyw2102) Edwin Chan (cc3919) Programming Languages and Translators COMSW 4115 Fall

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

A Small Interpreted Language

A Small Interpreted Language A Small Interpreted Language What would you need to build a small computing language based on mathematical principles? The language should be simple, Turing equivalent (i.e.: it can compute anything that

More information

6.001 Notes: Section 6.1

6.001 Notes: Section 6.1 6.001 Notes: Section 6.1 Slide 6.1.1 When we first starting talking about Scheme expressions, you may recall we said that (almost) every Scheme expression had three components, a syntax (legal ways of

More information

On the correctness of template metaprograms

On the correctness of template metaprograms Proceedings of the 7 th International Conference on Applied Informatics Eger, Hungary, January 28 31, 2007 Vol 2 pp 301 308 On the correctness of template metaprograms Ádám Sipos, István Zólyomi, Zoltán

More information

INTRODUCTION 1 AND REVIEW

INTRODUCTION 1 AND REVIEW INTRODUTION 1 AND REVIEW hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Programming: Advanced Objectives You will learn: Program structure. Program statements. Datatypes. Pointers. Arrays. Structures.

More information

structure syntax different levels of abstraction

structure syntax different levels of abstraction This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

More information

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

More information

VHDL Structural Modeling II

VHDL Structural Modeling II VHDL Structural Modeling II ECE-331, Digital Design Prof. Hintz Electrical and Computer Engineering 5/7/2001 331_13 1 Ports and Their Usage Port Modes in reads a signal out writes a signal inout reads

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Object-Oriented

More information

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; } Ex: The difference between Compiler and Interpreter The interpreter actually carries out the computations specified in the source program. In other words, the output of a compiler is a program, whereas

More information

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4. Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations

More information

About Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals

More information

Java+- Language Reference Manual

Java+- Language Reference Manual Fall 2016 COMS4115 Programming Languages & Translators Java+- Language Reference Manual Authors Ashley Daguanno (ad3079) - Manager Anna Wen (aw2802) - Tester Tin Nilar Hlaing (th2520) - Systems Architect

More information

COS 140: Foundations of Computer Science

COS 140: Foundations of Computer Science COS 140: Foundations of Computer Science Variables and Primitive Data Types Fall 2017 Introduction 3 What is a variable?......................................................... 3 Variable attributes..........................................................

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

Intermediate Code Generation

Intermediate Code Generation Intermediate Code Generation In the analysis-synthesis model of a compiler, the front end analyzes a source program and creates an intermediate representation, from which the back end generates target

More information

Tutorial on VHDL and Verilog Applications

Tutorial on VHDL and Verilog Applications Second LACCEI International Latin American and Caribbean Conference for Engineering and Technology (LACCEI 2004) Challenges and Opportunities for Engineering Education, Research and Development 2-4 June

More information

The Imperative Paradigm

The Imperative Paradigm The Imperative Paradigm Joseph Spring 7COM1023 Programming Paradigms 1 Discussion What makes a Language Imperative? Procedural Abstraction Expressions and Assignment Library Support for Data Structures

More information

Single-pass Static Semantic Check for Efficient Translation in YAPL

Single-pass Static Semantic Check for Efficient Translation in YAPL Single-pass Static Semantic Check for Efficient Translation in YAPL Zafiris Karaiskos, Panajotis Katsaros and Constantine Lazos Department of Informatics, Aristotle University Thessaloniki, 54124, Greece

More information

Extended Dataflow Model For Automated Parallel Execution Of Algorithms

Extended Dataflow Model For Automated Parallel Execution Of Algorithms Extended Dataflow Model For Automated Parallel Execution Of Algorithms Maik Schumann, Jörg Bargenda, Edgar Reetz and Gerhard Linß Department of Quality Assurance and Industrial Image Processing Ilmenau

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 1 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) WHO

More information

Behavioral Design Patterns Used in Data Structures Implementation

Behavioral Design Patterns Used in Data Structures Implementation Behavioral Design Patterns Used in Data Structures Implementation Niculescu Virginia Department of Computer Science Babeş-Bolyai University, Cluj-Napoca email address: vniculescu@cs.ubbcluj.ro November,

More information

INTRODUCTION TO VHDL. Lecture 5 & 6 Dr. Tayab Din Memon Assistant Professor Department of Electronic Engineering, MUET

INTRODUCTION TO VHDL. Lecture 5 & 6 Dr. Tayab Din Memon Assistant Professor Department of Electronic Engineering, MUET INTRODUCTION TO VHDL Lecture 5 & 6 Dr. Tayab Din Memon Assistant Professor Department of Electronic Engineering, MUET VHDL Resources Other Sources manufacturers web pages http://www.xilinx.com http://www.altera.com

More information

Programming Languages

Programming Languages Programming Languages As difficult to discuss rationally as religion or politics. Prone to extreme statements devoid of data. Examples: "It is practically impossible to teach good programming to students

More information

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Semantics via Syntax. f (4) = if define f (x) =2 x + 55. 1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)

More information

0. Overview of this standard Design entities and configurations... 5

0. Overview of this standard Design entities and configurations... 5 Contents 0. Overview of this standard... 1 0.1 Intent and scope of this standard... 1 0.2 Structure and terminology of this standard... 1 0.2.1 Syntactic description... 2 0.2.2 Semantic description...

More information

egrapher Language Reference Manual

egrapher Language Reference Manual egrapher Language Reference Manual Long Long: ll3078@columbia.edu Xinli Jia: xj2191@columbia.edu Jiefu Ying: jy2799@columbia.edu Linnan Wang: lw2645@columbia.edu Darren Chen: dsc2155@columbia.edu 1. Introduction

More information

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT Functional programming FP Foundations, Scheme (2 In Text: Chapter 15 LISP: John McCarthy 1958 MIT List Processing => Symbolic Manipulation First functional programming language Every version after the

More information

Functional Programming. Pure Functional Programming

Functional Programming. Pure Functional Programming Functional Programming Pure Functional Programming Computation is largely performed by applying functions to values. The value of an expression depends only on the values of its sub-expressions (if any).

More information

Hardware description languages

Hardware description languages Specifying digital circuits Schematics (what we ve done so far) Structural description Describe circuit as interconnected elements Build complex circuits using hierarchy Large circuits are unreadable Hardware

More information

Flight Systems are Cyber-Physical Systems

Flight Systems are Cyber-Physical Systems Flight Systems are Cyber-Physical Systems Dr. Christopher Landauer Software Systems Analysis Department The Aerospace Corporation Computer Science Division / Software Engineering Subdivision 08 November

More information

Python The way of a program. Srinidhi H Asst Professor Dept of CSE, MSRIT

Python The way of a program. Srinidhi H Asst Professor Dept of CSE, MSRIT Python The way of a program Srinidhi H Asst Professor Dept of CSE, MSRIT 1 Problem Solving Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution

More information

Tea Programming Language

Tea Programming Language Tea Programming Language Group 23 Md Nahid Istiaq Ahsan Monika Bohara Tea is a high-level scripting language used for text-formatting. It has some features from TCL, java and Scheme language although it

More information

Rationale for TR Extension to the programming language C. Decimal Floating-Point Arithmetic

Rationale for TR Extension to the programming language C. Decimal Floating-Point Arithmetic WG14 N1161 Rationale for TR 24732 Extension to the programming language C Decimal Floating-Point Arithmetic Contents 1 Introduction... 1 1.1 Background... 1 1.2 The Arithmetic Model... 3 1.3 The Encodings...

More information

white paper EPC Tag Data Specification abstract David Brock, Chris Cummins

white paper EPC Tag Data Specification abstract David Brock, Chris Cummins Published June 1, 2003. Distribution restricted to Sponsors until September 1, 2003. white paper EPC Tag Data Specification David Brock, Chris Cummins auto-id center massachusetts institute of technology,

More information

Scala : an LLVM-targeted Scala compiler

Scala : an LLVM-targeted Scala compiler Scala : an LLVM-targeted Scala compiler Da Liu, UNI: dl2997 Contents 1 Background 1 2 Introduction 1 3 Project Design 1 4 Language Prototype Features 2 4.1 Language Features........................................

More information

HDL Compiler Directives 7

HDL Compiler Directives 7 7 HDL Compiler Directives 7 Directives are a special case of regular comments and are ignored by the Verilog HDL simulator HDL Compiler directives begin, like all other Verilog comments, with the characters

More information

This book is licensed under a Creative Commons Attribution 3.0 License

This book is licensed under a Creative Commons Attribution 3.0 License 6. Syntax Learning objectives: syntax and semantics syntax diagrams and EBNF describe context-free grammars terminal and nonterminal symbols productions definition of EBNF by itself parse tree grammars

More information

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017 Overview of OOP Dr. Zhang COSC 1436 Summer, 2017 7/18/2017 Review Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in square brackets: l = [1, 2, "a"] (access by index, is mutable

More information

Visualization of Biomolecular Structures

Visualization of Biomolecular Structures T H E U N I V E R S I T Y of T E X A S H E A L T H S C I E N C E C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S Visualization of Biomolecular Structures

More information

Motivating Ontology-Driven Information Extraction

Motivating Ontology-Driven Information Extraction Motivating Ontology-Driven Information Extraction Burcu Yildiz 1 and Silvia Miksch 1, 2 1 Institute for Software Engineering and Interactive Systems, Vienna University of Technology, Vienna, Austria {yildiz,silvia}@

More information

Decaf Language Reference Manual

Decaf Language Reference Manual Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented

More information

Synthesizing Communication Middleware from Explicit Connectors in Component Based Distributed Architectures

Synthesizing Communication Middleware from Explicit Connectors in Component Based Distributed Architectures Synthesizing Communication Middleware from Explicit Connectors in Component Based Distributed Architectures Dietmar Schreiner 1,2 and Karl M. Göschka 1 1 Vienna University of Technology Institute of Information

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Verilog Design Principles

Verilog Design Principles 16 h7fex // 16-bit value, low order 4 bits unknown 8 bxx001100 // 8-bit value, most significant 2 bits unknown. 8 hzz // 8-bit value, all bits high impedance. Verilog Design Principles ECGR2181 Extra Notes

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Perl Scripting. Students Will Learn. Course Description. Duration: 4 Days. Price: $2295

Perl Scripting. Students Will Learn. Course Description. Duration: 4 Days. Price: $2295 Perl Scripting Duration: 4 Days Price: $2295 Discounts: We offer multiple discount options. Click here for more info. Delivery Options: Attend face-to-face in the classroom, remote-live or on-demand streaming.

More information

Review of the C Programming Language

Review of the C Programming Language Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

More information

Implementation of Axiomatic Language

Implementation of Axiomatic Language Implementation of Axiomatic Language Walter W. Wilson 1 1 Dept. of Computer Science & Engineering The University of Texas at Arlington Arlington, Texas 76019, USA wwwilson@acm.org Abstract This report

More information

Contents. Appendix D VHDL Summary Page 1 of 23

Contents. Appendix D VHDL Summary Page 1 of 23 Appendix D VHDL Summary Page 1 of 23 Contents Appendix D VHDL Summary...2 D.1 Basic Language Elements...2 D.1.1 Comments...2 D.1.2 Identifiers...2 D.1.3 Data Objects...2 D.1.4 Data Types...2 D.1.5 Data

More information

Object-Oriented Design (OOD) and C++

Object-Oriented Design (OOD) and C++ Chapter 2 Object-Oriented Design (OOD) and C++ At a Glance Instructor s Manual Table of Contents Chapter Overview Chapter Objectives Instructor Notes Quick Quizzes Discussion Questions Projects to Assign

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 1.2.2: VHDL-1 Liang Liu liang.liu@eit.lth.se 1 Outline VHDL Background Basic VHDL Component An example FSM Design with VHDL Simulation & TestBench 2

More information

Symbol Tables Symbol Table: In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is

More information

An overview about DroidBasic For Android

An overview about DroidBasic For Android An overview about DroidBasic For Android from February 25, 2013 Contents An overview about DroidBasic For Android...1 Object-Oriented...2 Event-Driven...2 DroidBasic Framework...2 The Integrated Development

More information

Template Language and Syntax Reference

Template Language and Syntax Reference APPENDIX B This chapter describes the language and syntax conventions used in the VPN Solutions Center template implementation. Grammar and Syntax The Extensible Markup Language (XML) template definition

More information

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis Jan 31, 2012 John Wawrzynek Spring 2012 EECS150 - Lec05-verilog_synth Page 1 Outline Quick review of essentials of state elements Finite State

More information

An Introduction to Subtyping

An Introduction to Subtyping An Introduction to Subtyping Type systems are to me the most interesting aspect of modern programming languages. Subtyping is an important notion that is helpful for describing and reasoning about type

More information

Chapter 9. Subprograms

Chapter 9. Subprograms Chapter 9 Subprograms Chapter 9 Topics Introduction Fundamentals of Subprograms Design Issues for Subprograms Local Referencing Environments Parameter-Passing Methods Parameters That Are Subprograms Calling

More information

Python Class-Lesson1 Instructor: Yao

Python Class-Lesson1 Instructor: Yao Python Class-Lesson1 Instructor: Yao What is Python? Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined

More information

A Meta-Model for Composition Techniques in Object-Oriented Software Development

A Meta-Model for Composition Techniques in Object-Oriented Software Development A Meta-Model for Composition Techniques in Object-Oriented Software Development Bedir Tekinerdogan Department of Computer Science University of Twente P.O. Box 217, 7500 AE Enschede, The Netherlands E-Mail:

More information

3D Object Scanning to Support Computer-Aided Conceptual Design

3D Object Scanning to Support Computer-Aided Conceptual Design ABSTRACT 3D Object Scanning to Support Computer-Aided Conceptual Design J.S.M. Vergeest and I. Horváth Delft University of Technology Faculty of Design, Engineering and Production Jaffalaan 9, NL-2628

More information

Review of the C Programming Language for Principles of Operating Systems

Review of the C Programming Language for Principles of Operating Systems Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

Object-Oriented Oriented Programming

Object-Oriented Oriented Programming Object-Oriented Oriented Programming Composite Pattern CSIE Department, NTUT Woei-Kae Chen Catalog of Design patterns Creational patterns Abstract Factory, Builder, Factory Method, Prototype, Singleton

More information

COS 140: Foundations of Computer Science

COS 140: Foundations of Computer Science COS 140: Foundations of Variables and Primitive Data Types Fall 2017 Copyright c 2002 2017 UMaine School of Computing and Information S 1 / 29 Homework Reading: Chapter 16 Homework: Exercises at end of

More information

Re-using Data Mining Workflows

Re-using Data Mining Workflows Re-using Data Mining Workflows Stefan Rüping, Dennis Wegener, and Philipp Bremer Fraunhofer IAIS, Schloss Birlinghoven, 53754 Sankt Augustin, Germany http://www.iais.fraunhofer.de Abstract. Setting up

More information

FIFTH GRADE Mathematics Curriculum Map Unit 1

FIFTH GRADE Mathematics Curriculum Map Unit 1 FIFTH GRADE Mathematics Curriculum Map Unit 1 VOCABULARY algorithm area model Associative Property base braces brackets Commutative Property compatible numbers decimal decimal point Distributive Property

More information

Logisimple. Language Reference Manual. October 16, Introduction 3

Logisimple. Language Reference Manual. October 16, Introduction 3 Logisimple Language Reference Manual Yuanxia Lee (yl3262): yl3262@columbia.edu Sarah Walker (scw2140): scw2140@columbia.edu Kundan Guha (kg2632): kundan.guha@columbia.edu Hannah Pierce-Hoffman (hrp2112):

More information

Verilog. Reminder: Lab #1 due tonight! Fall 2008 Lecture 3

Verilog. Reminder: Lab #1 due tonight! Fall 2008 Lecture 3 Verilog Hardware Description Languages Verilog -- structural: modules, instances -- dataflow: continuous assignment -- sequential behavior: always blocks -- pitfalls -- other useful features Reminder:

More information

Active-HDL. Getting Started

Active-HDL. Getting Started Active-HDL Getting Started Active-HDL is an integrated environment designed for development of VHDL designs. The core of the system is a VHDL simulator. Along with debugging and design entry tools, it

More information

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects, Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects, Classes, Class Diagrams Values and Attributes Operations

More information

CS304 Object Oriented Programming Final Term

CS304 Object Oriented Programming Final Term 1. Which of the following is the way to extract common behaviour and attributes from the given classes and make a separate class of those common behaviours and attributes? Generalization (pg 29) Sub-typing

More information

SCRATCH MODULE 3: NUMBER CONVERSIONS

SCRATCH MODULE 3: NUMBER CONVERSIONS SCRATCH MODULE 3: NUMBER CONVERSIONS INTRODUCTION The purpose of this module is to experiment with user interactions, error checking input, and number conversion algorithms in Scratch. We will be exploring

More information

The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured

The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured Introduction p. xxix The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured Language p. 6 C Is a Programmer's Language

More information

Data Structures (list, dictionary, tuples, sets, strings)

Data Structures (list, dictionary, tuples, sets, strings) Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in brackets: l = [1, 2, "a"] (access by index, is mutable sequence) Tuples are enclosed in parentheses: t = (1, 2, "a") (access

More information