Write your own JVM compiler

Size: px
Start display at page:

Download "Write your own JVM compiler"

Transcription

1 Write your own JVM compiler OSCON Java 2011 Ian Hi, I m Ian. I m here to show that there s never been a better time than now to write your own compiler.

2 the three paths Abstraction compilers Time Why would someone want to do this? That depends on the direction you re coming from.

3 Abstraction xor eax, eax compilers e - Time If, like me, you came from a hardware background, compilers are the next logical step up the ladder of abstraction from programming.

4 Abstraction logic λx.x grammars xor eax, eax compilers e - Time If you come from a computer science background, compilers and parsers are practical tools to get things done (such as reading crufty ad hoc data formats at work).

5 Abstraction logic λx.x grammars xor eax, eax compilers e - Time If you re following the self-made path, compilers are one of many computer science topics you may come to naturally on your travels.

6 where we re headed By the end of this talk, we ll have seen the basics of how to use JRuby to create a compiler for a fictional programming language.

7 Thnad a fictional programming language Since all the good letters for programming languages are taken (C, D, K, R, etc.), let s use a fictional letter. Thnad, a letter that comes to us from Dr. Seuss, will do nicely.

8 function factorial(n) { if(eq(n, 1)) { 1 } else { times(n, factorial(minus(n, 1))) } } print(factorial(4)) Here s a simple Thnad program. As you can see, it has only integers, functions, and conditionals. No variables, type definitions, or anything else. But this bare minimum will keep us plenty busy for the next half hour.

9 hand-waving before we see the code Before we jump into the code, let s look at the general view of where we re headed.

10 We need to take a piece of program text like minus(n, 1) and break it down into something like a sentence s parts of speech: this is a function call, this is a parameter, and so on. The code in the middle is how we might represent this breakdown in Ruby, but really we should be thinking about it graphically, like the tree at the bottom. minus(n, 1) { :funcall => { :name => 'minus' }, { :args => [ { :arg => { :name => 'n' } }, { :arg => { :number => '1' } } } ] } :funcall :name :args minus :arg :arg :name :number n 1

11 The representation on the previous slide used plain arrays, strings, and so on. It will be helpful to transform these into custom Ruby objects that know how to emit JVM bytecode. Here s the kind of thing we ll be aiming for. Notice that the tree looks really similar to the one we just saw the only differences are the names in the nodes. minus(n, 1) Funcall.new 'minus', Usage.new('n'), minus n 1

12 1. parse 2. transform 3. emit Each stage of our compiler will transform one of our program representations original program text, generic Ruby objects, custom Ruby objects, JVM bytecode into the next.

13 1. parse First, let s look at parsing the original program text into generic Ruby objects.

14 describe Thnad::Parser do before = Thnad::Parser.new end it 'reads a number' do expected = { :number => '42' expected end end Here s a unit test written with minitest, a unit testing framework that ships with Ruby 1.9 (and therefore JRuby). We want the text 42 to be parsed into the Ruby hash shown here.

15 tool #1: Parslet How are we going to parse our programming language into that internal representation? By using Parslet, a parsing tool written in Ruby. For the curious, Parslet is a PEG (Parsing Expression Grammar) parser.

16 require 'parslet' module Thnad class Parser < Parslet::Parser # gotta see it all rule(:space) { match('\s').repeat(1) } rule(:space?) { space.maybe } # numeric values rule(:number) { match('[0-9]').repeat(1).as(:number) >> space? } end end Here s a set of Parslet rules that will get our unit test to pass. Notice that the rules read a little bit like a mathematical notation: a number is a sequence of one or more digits, possibly followed by trailing whitespace.

17 2. transform The next step is to transform the Ruby arrays and hashes into more sophisticated objects that will (eventually) be able to generate bytecode.

18 input = { :number => '42' } expected = expected Here s a unit test for that behavior. We start with the result of the previous step (a Ruby hash) and expect a custom Number object.

19 tool #2: Parslet (again) How are we going to transform the data? We ll use Parslet again.

20 module Thnad class Transform < Parslet::Transform rule(:number => simple(:value)) { Number.new(value.to_i) } end end This rule takes any simple Ruby hash with a :number key and transforms it into a Number object.

21 require 'parslet' module Thnad class Number < Struct.new(:value) # more to come... end end Of course, we ll need to define the Number class. Once we ve done so, the unit tests will pass.

22 Finally, we need to emit JVM bytecode. 3. emit

23 bytecode ldc 42 Here s the bytecode we want to generate when our compiler encounters a Number object with 42 as the value. It just pushes the value right onto the stack.

24 describe 'Emit' do before = = Hash.new end it 'emits a number' do input = Thnad::Number.new input.eval end end And here s the unit test that specifies this behavior. We re using mock objects to say in effect, Imagine a Ruby object that can generate bytecode; our compiler should call it like this.

25 require 'parslet' module Thnad class Number < Struct.new(:value) def eval(context, builder) builder.ldc value end end end Our Number class will now need an eval method that takes a context (useful for carrying around information such as parameter names) and a bytecode builder (which we ll get to on the next slide).

26 tool #3: BiteScript A moment ago, we saw that we ll need a Ruby object that knows how to emit JVM bytecode. The BiteScript library for JRuby will give us just such an object.

27 iload 0 ldc 1 invokestatic example, 'minus', int, int, int ireturn This, for example, is a chunk of BiteScript that writes a Java.class file containing a function call in this case, the equivalent of the minus(n, 1) Thnad code we saw earlier.

28 $ javap -c example Compiled from "example.bs" public class example extends java.lang.object{ public static int dosomething(int); Code: 0: iload_0 1: iconst_1 2: invokestatic #11; //Method minus:(ii)i 5: ireturn If you run that through the BiteScript compiler and then use the standard Java tools to view the resulting bytecode, you can see it s essentially the same program.

29 enough hand-waving let s see the code! Armed with this background information, we can now jump into the code.

30 a copy of our home game At this point in the talk, I fired up TextMate and navigated through the project, choosing the direction based on whim and audience questions. You can follow along at home by looking at the various commits made to this project on GitHub.

31 more on BiteScript redev-2010-jvm-bytecode-for-dummies There are two resources I found helpful during this project. The first was Charles Nutter s primer on Java bytecode, which was the only JVM reference material necessary to write this compiler.

32 see also Marc-André Cournoyer The second helpful resource was Marc-André Cournoyer s e-book How to Create Your Own Freaking Awesome Programming Language. It s geared more toward interpreters than compilers, but was a great way to check my progress after I d completed the major stages of this project.

33 hopes My hope for us as a group today is that, after our time together, you feel it might be worth giving one of these tools a shot either for a fun side project, or to solve some protocol parsing need you may encounter one day in your work.

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program

More information

02 B The Java Virtual Machine

02 B The Java Virtual Machine 02 B The Java Virtual Machine CS1102S: Data Structures and Algorithms Martin Henz January 22, 2010 Generated on Friday 22 nd January, 2010, 09:46 CS1102S: Data Structures and Algorithms 02 B The Java Virtual

More information

Chapter 7D The Java Virtual Machine

Chapter 7D The Java Virtual Machine This sub chapter discusses another architecture, that of the JVM (Java Virtual Machine). In general, a VM (Virtual Machine) is a hypothetical machine (implemented in either hardware or software) that directly

More information

Programming Languages

Programming Languages Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately

More information

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper Parsing Technology and its role in Legacy Modernization A Metaware White Paper 1 INTRODUCTION In the two last decades there has been an explosion of interest in software tools that can automate key tasks

More information

CSC 8505 Handout : JVM & Jasmin

CSC 8505 Handout : JVM & Jasmin CSC 8505 Handout : JVM & Jasmin Note: This handout provides you with the basic information about JVM. Although we tried to be accurate about the description, there may be errors. Feel free to check your

More information

Inside the Java Virtual Machine

Inside the Java Virtual Machine CS1Bh Practical 2 Inside the Java Virtual Machine This is an individual practical exercise which requires you to submit some files electronically. A system which measures software similarity will be used

More information

C Compiler Targeting the Java Virtual Machine

C Compiler Targeting the Java Virtual Machine C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the

More information

C# and Other Languages

C# and Other Languages C# and Other Languages Rob Miles Department of Computer Science Why do we have lots of Programming Languages? Different developer audiences Different application areas/target platforms Graphics, AI, List

More information

Decision Making under Uncertainty

Decision Making under Uncertainty 6.825 Techniques in Artificial Intelligence Decision Making under Uncertainty How to make one decision in the face of uncertainty Lecture 19 1 In the next two lectures, we ll look at the question of how

More information

Introduction to Java

Introduction to Java Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high

More information

Language Arts Core, First Grade, Standard 8 Writing-Students write daily to communicate effectively for a variety of purposes and audiences.

Language Arts Core, First Grade, Standard 8 Writing-Students write daily to communicate effectively for a variety of purposes and audiences. Genre Unit Reading and Writing Fables by Amy Kinney Language Arts Core, First Grade, Standard 7 Comprehension-Students understand, interpret, and analyze narrative and informational grade level text. Objective

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

Java Virtual Machine Locks

Java Virtual Machine Locks Java Virtual Machine Locks SS 2008 Synchronized Gerald SCHARITZER (e0127228) 2008-05-27 Synchronized 1 / 13 Table of Contents 1 Scope...3 1.1 Constraints...3 1.2 In Scope...3 1.3 Out of Scope...3 2 Logical

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code Introduction Application Security Tom Chothia Computer Security, Lecture 16 Compiled code is really just data which can be edit and inspected. By examining low level code protections can be removed and

More information

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used

More information

CHAPTER 18 Programming Your App to Make Decisions: Conditional Blocks

CHAPTER 18 Programming Your App to Make Decisions: Conditional Blocks CHAPTER 18 Programming Your App to Make Decisions: Conditional Blocks Figure 18-1. Computers, even small ones like the phone in your pocket, are good at performing millions of operations in a single second.

More information

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters Interpreters and virtual machines Michel Schinz 2007 03 23 Interpreters Interpreters Why interpreters? An interpreter is a program that executes another program, represented as some kind of data-structure.

More information

PROG0101 Fundamentals of Programming PROG0101 FUNDAMENTALS OF PROGRAMMING. Chapter 3 Algorithms

PROG0101 Fundamentals of Programming PROG0101 FUNDAMENTALS OF PROGRAMMING. Chapter 3 Algorithms PROG0101 FUNDAMENTALS OF PROGRAMMING Chapter 3 1 Introduction to A sequence of instructions. A procedure or formula for solving a problem. It was created mathematician, Mohammed ibn-musa al-khwarizmi.

More information

Computational Mathematics with Python

Computational Mathematics with Python Boolean Arrays Classes Computational Mathematics with Python Basics Olivier Verdier and Claus Führer 2009-03-24 Olivier Verdier and Claus Führer Computational Mathematics with Python 2009-03-24 1 / 40

More information

Semester Review. CSC 301, Fall 2015

Semester Review. CSC 301, Fall 2015 Semester Review CSC 301, Fall 2015 Programming Language Classes There are many different programming language classes, but four classes or paradigms stand out:! Imperative Languages! assignment and iteration!

More information

Rakudo Perl 6 on the JVM. Jonathan Worthington

Rakudo Perl 6 on the JVM. Jonathan Worthington Rakudo Perl 6 on the JVM Jonathan Worthington About Rakudo Most complete and most actively developed Perl 6 implementation Compiler + built-ins 66 monthly releases to date 10-20 code contributors per release

More information

The Java Virtual Machine (JVM) Pat Morin COMP 3002

The Java Virtual Machine (JVM) Pat Morin COMP 3002 The Java Virtual Machine (JVM) Pat Morin COMP 3002 Outline Topic 1 Topic 2 Subtopic 2.1 Subtopic 2.2 Topic 3 2 What is the JVM? The JVM is a specification of a computing machine Instruction set Primitive

More information

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture

More information

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. [email protected] Oct 2003 Presented to Gordon College CS 311

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. buford@alum.mit.edu Oct 2003 Presented to Gordon College CS 311 The Java Virtual Machine and Mobile Devices John Buford, Ph.D. [email protected] Oct 2003 Presented to Gordon College CS 311 Objectives Review virtual machine concept Introduce stack machine architecture

More information

03 - Lexical Analysis

03 - Lexical Analysis 03 - Lexical Analysis First, let s see a simplified overview of the compilation process: source code file (sequence of char) Step 2: parsing (syntax analysis) arse Tree Step 1: scanning (lexical analysis)

More information

Factorizations: Searching for Factor Strings

Factorizations: Searching for Factor Strings " 1 Factorizations: Searching for Factor Strings Some numbers can be written as the product of several different pairs of factors. For example, can be written as 1, 0,, 0, and. It is also possible to write

More information

Computational Mathematics with Python

Computational Mathematics with Python Computational Mathematics with Python Basics Claus Führer, Jan Erik Solem, Olivier Verdier Spring 2010 Claus Führer, Jan Erik Solem, Olivier Verdier Computational Mathematics with Python Spring 2010 1

More information

Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1

Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1 Recursion Slides by Christopher M Bourke Instructor: Berthe Y Choueiry Fall 007 Computer Science & Engineering 35 Introduction to Discrete Mathematics Sections 71-7 of Rosen cse35@cseunledu Recursive Algorithms

More information

Computational Mathematics with Python

Computational Mathematics with Python Numerical Analysis, Lund University, 2011 1 Computational Mathematics with Python Chapter 1: Basics Numerical Analysis, Lund University Claus Führer, Jan Erik Solem, Olivier Verdier, Tony Stillfjord Spring

More information

VIDEO TRANSCRIPT: Content Marketing Analyzing Your Efforts 1. Content Marketing - Analyzing Your Efforts:

VIDEO TRANSCRIPT: Content Marketing Analyzing Your Efforts 1. Content Marketing - Analyzing Your Efforts: VIDEO TRANSCRIPT: Content Marketing Analyzing Your Efforts 1 Content Marketing - Analyzing Your Efforts: This is a transcript of a presentation originally given live at the Growth Powered by Risdall Fall

More information

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014 CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages Nicki Dell Spring 2014 What is a Programming Language? A set of symbols and associated tools that translate (if necessary) collections

More information

CSCI 3136 Principles of Programming Languages

CSCI 3136 Principles of Programming Languages CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University Winter 2013 CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University

More information

Compiler Construction

Compiler Construction Compiler Construction Lecture 1 - An Overview 2003 Robert M. Siegfried All rights reserved A few basic definitions Translate - v, a.to turn into one s own language or another. b. to transform or turn from

More information

Common Data Structures

Common Data Structures Data Structures 1 Common Data Structures Arrays (single and multiple dimensional) Linked Lists Stacks Queues Trees Graphs You should already be familiar with arrays, so they will not be discussed. Trees

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

Chapter 4: Computer Codes

Chapter 4: Computer Codes Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data

More information

Ep #19: Thought Management

Ep #19: Thought Management Full Episode Transcript With Your Host Brooke Castillo Welcome to The Life Coach School podcast, where it s all about real clients, real problems and real coaching. And now your host, Master Coach Instructor,

More information

BBC Learning English Talk about English Business Language To Go Part 12 - Business socialising

BBC Learning English Talk about English Business Language To Go Part 12 - Business socialising BBC Learning English Business Language To Go Part 12 - Business socialising This programme was first broadcast in 2001. This is not an accurate word-for-word transcript of the programme. In this programme

More information

Easy Casino Profits. Congratulations!!

Easy Casino Profits. Congratulations!! Easy Casino Profits The Easy Way To Beat The Online Casinos Everytime! www.easycasinoprofits.com Disclaimer The authors of this ebook do not promote illegal, underage gambling or gambling to those living

More information

Compiler Construction

Compiler Construction Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation

More information

Summarizing and Paraphrasing

Summarizing and Paraphrasing CHAPTER 4 Summarizing and Paraphrasing Summarizing and paraphrasing are skills that require students to reprocess information and express it in their own words. These skills enhance student comprehension

More information

Enjoying EPUB ebooks on Your Nook

Enjoying EPUB ebooks on Your Nook Enjoying EPUB ebooks on Your Nook From the New Hampshire Downloadable Books Consortium Outline: 1. Download & Install Adobe Digital Editions. 2. Register for an Adobe account or use your existing account

More information

Apache Thrift and Ruby

Apache Thrift and Ruby Apache Thrift and Ruby By Randy Abernethy In this article, excerpted from The Programmer s Guide to Apache Thrift, we will install Apache Thrift support for Ruby and build a simple Ruby RPC client and

More information

Habanero Extreme Scale Software Research Project

Habanero Extreme Scale Software Research Project Habanero Extreme Scale Software Research Project Comp215: Java Method Dispatch Zoran Budimlić (Rice University) Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead

More information

How to. Create Personas For Your B2B Content Marketing Strategy

How to. Create Personas For Your B2B Content Marketing Strategy How to Create Personas For Your B2B Content Marketing Strategy Introduction Content marketers are never short on things to do. Whether it s determining the best time to promote to your social media accounts,

More information

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code 1 Introduction The purpose of this assignment is to write an interpreter for a small subset of the Lisp programming language. The interpreter should be able to perform simple arithmetic and comparisons

More information

A Step By Step Guide On How To Attract Your Dream Life Now

A Step By Step Guide On How To Attract Your Dream Life Now A Step By Step Guide On How To Attract Your Dream Life Now This guide is about doing things in a step by step fashion every day to get the results you truly desire. There are some techniques and methods

More information

Python, C++ and SWIG

Python, C++ and SWIG Robin Dunn Software Craftsman O Reilly Open Source Convention July 21 25, 2008 Slides available at http://wxpython.org/oscon2008/ Python & C++ Comparisons Each is a general purpose programming language,

More information

Theories of Personality Psyc 314-001, Fall 2014

Theories of Personality Psyc 314-001, Fall 2014 Theories of Personality Psyc 314-001, Fall 2014 Dr. Mary E. McKemy (pronounced Mc-KAY-me) Kinard 123 (down the hall from the Psychology Office) 323-2643 (Office) and 328-9978 (Home -- please call before

More information

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS Embedded Systems White Paper GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS September 2009 ABSTRACT Android is an open source platform built by Google that includes an operating system,

More information

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing

More information

No problem, Alicia. Everything smells wonderful; I m sure your in-laws visit will go just fine.

No problem, Alicia. Everything smells wonderful; I m sure your in-laws visit will go just fine. Elements of Univ Comp and Comm Scene Title: Study Session at s Transition: General Description: is finishing cooking while hosting a study session with our Student, and.

More information

Focus on Essay Writing

Focus on Essay Writing Focus on Essay Writing Essay writing is a process and a product. You need to focus on the process in order to achieve a high quality product. What is an essay? The word essay originally meant to test or

More information

The Marketer s Guide To Building Multi-Channel Campaigns

The Marketer s Guide To Building Multi-Channel Campaigns The Marketer s Guide To Building Multi-Channel Campaigns Introduction Marketing is always changing. Currently there s a shift in the way we talk to customers and potential customers. Specifically, where

More information

CVE-2012-1535 Adobe Flash Player Integer Overflow Vulnerability Analysis

CVE-2012-1535 Adobe Flash Player Integer Overflow Vulnerability Analysis Your texte here. CVE-2012-1535 Adobe Flash Player Integer Overflow Vulnerability Analysis October 11 th, 2012 Brian MARIANI & Frédéric BOURLA A FEW WORDS ABOUT FLASH PLAYER Your Adobe texte Flash here

More information

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16 Advanced compiler construction Michel Schinz 2007 03 16 General course information Teacher & assistant Course goals Teacher: Michel Schinz [email protected] Assistant: Iulian Dragos INR 321, 368 64

More information

Programming in Access VBA

Programming in Access VBA PART I Programming in Access VBA In this part, you will learn all about how Visual Basic for Applications (VBA) works for Access 2010. A number of new VBA features have been incorporated into the 2010

More information

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq Introduction to Programming using Java wertyuiopasdfghjklzxcvbnmqwertyui

More information

Compiler I: Syntax Analysis Human Thought

Compiler I: Syntax Analysis Human Thought Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly

More information

The 5 P s in Problem Solving *prob lem: a source of perplexity, distress, or vexation. *solve: to find a solution, explanation, or answer for

The 5 P s in Problem Solving *prob lem: a source of perplexity, distress, or vexation. *solve: to find a solution, explanation, or answer for The 5 P s in Problem Solving 1 How do other people solve problems? The 5 P s in Problem Solving *prob lem: a source of perplexity, distress, or vexation *solve: to find a solution, explanation, or answer

More information

Jonathan Worthington Scarborough Linux User Group

Jonathan Worthington Scarborough Linux User Group Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.

More information

Limitations of Data Encapsulation and Abstract Data Types

Limitations of Data Encapsulation and Abstract Data Types Limitations of Data Encapsulation and Abstract Data Types Paul L. Bergstein University of Massachusetts Dartmouth [email protected] Abstract One of the key benefits provided by object-oriented programming

More information

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1 The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose

More information

Member Functions of the istream Class

Member Functions of the istream Class Member Functions of the istream Class The extraction operator is of limited use because it always uses whitespace to delimit its reads of the input stream. It cannot be used to read those whitespace characters,

More information

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A

More information

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08 CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 20: Stack Frames 7 March 08 CS 412/413 Spring 2008 Introduction to Compilers 1 Where We Are Source code if (b == 0) a = b; Low-level IR code

More information

TeachingEnglish Lesson plans. Kim s blog

TeachingEnglish Lesson plans. Kim s blog Worksheets - Socialising (3): Social networking TeachingEnglish Lesson plans Previous post Posted Friday, 25 th November by Kim Kim s blog Next post What I learned about social networking I used to think

More information

Chapter 2. Making Shapes

Chapter 2. Making Shapes Chapter 2. Making Shapes Let's play turtle! You can use your Pencil Turtle, you can use yourself, or you can use some of your friends. In fact, why not try all three? Rabbit Trail 4. Body Geometry Can

More information

Gradus ad Parnassum: Writing the Master s Thesis Michigan State University, College of Music September 2007. Carol A. Hess

Gradus ad Parnassum: Writing the Master s Thesis Michigan State University, College of Music September 2007. Carol A. Hess Gradus ad Parnassum: Writing the Master s Thesis Michigan State University, College of Music September 2007 Carol A. Hess The following is an incremental plan like the steps to Parnassus that should help

More information

Instrumenting Java bytecode

Instrumenting Java bytecode Instrumenting Java bytecode Seminar work for the Compilers-course, spring 2005 Jari Aarniala Department of Computer Science University of Helsinki, Finland [email protected] ABSTRACT Bytecode

More information

SALES EMAIL TEMPLATES. for prospecting, scheduling meetings, following up, networking, and asking for referrals.

SALES EMAIL TEMPLATES. for prospecting, scheduling meetings, following up, networking, and asking for referrals. 36 SALES EMAIL TEMPLATES for prospecting, scheduling meetings, following up, networking, and asking for referrals. INTRODUCTION: A LOST OPPORTUNITY Here was the scenario: We make a valuable connection

More information

BPMN Business Process Modeling Notation

BPMN Business Process Modeling Notation BPMN (BPMN) is a graphical notation that describes the logic of steps in a business process. This notation has been especially designed to coordinate the sequence of processes and messages that flow between

More information

Bright Idea Marketing Phone: 352-578-1552 Email: [email protected]. SEO Guide White Paper

Bright Idea Marketing Phone: 352-578-1552 Email: jsmith@brightideamarketing.com. SEO Guide White Paper Bright Idea Marketing Phone: 352-578-1552 Email: [email protected] SEO Guide White Paper 15 Introduction Search engine Optimization (SEO) is the process of optimizing your website for a better

More information

So you want to create an Email a Friend action

So you want to create an Email a Friend action So you want to create an Email a Friend action This help file will take you through all the steps on how to create a simple and effective email a friend action. It doesn t cover the advanced features;

More information

Rake Task Management Essentials

Rake Task Management Essentials Rake Task Management Essentials Andrey Koleshko Chapter No. 8 "Testing Rake Tasks" In this package, you will find: A Biography of the author of the book A preview chapter from the book, Chapter NO.8 "Testing

More information

McGraw-Hill The McGraw-Hill Companies, Inc., 20 1. 01 0

McGraw-Hill The McGraw-Hill Companies, Inc., 20 1. 01 0 1.1 McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Objectives: To describe the evolution of programming languages from machine language to high-level languages. To understand how a program in a high-level

More information

Course: Programming II - Abstract Data Types. The ADT Stack. A stack. The ADT Stack and Recursion Slide Number 1

Course: Programming II - Abstract Data Types. The ADT Stack. A stack. The ADT Stack and Recursion Slide Number 1 Definition Course: Programming II - Abstract Data Types The ADT Stack The ADT Stack is a linear sequence of an arbitrary number of items, together with access procedures. The access procedures permit insertions

More information

After you complete the survey, compare what you saw on the survey to the actual questions listed below:

After you complete the survey, compare what you saw on the survey to the actual questions listed below: Creating a Basic Survey Using Qualtrics Clayton State University has purchased a campus license to Qualtrics. Both faculty and students can use Qualtrics to create surveys that contain many different types

More information

Lecture 9. Semantic Analysis Scoping and Symbol Table

Lecture 9. Semantic Analysis Scoping and Symbol Table Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax

More information

Briki: a Flexible Java Compiler

Briki: a Flexible Java Compiler Briki: a Flexible Java Compiler Michał Cierniak Wei Li Technical Report 621 Department of Computer Science University of Rochester Rochester, NY 14627 cierniak,wei @cs.rochester.edu May 1996 Abstract We

More information

HOTPATH VM. An Effective JIT Compiler for Resource-constrained Devices

HOTPATH VM. An Effective JIT Compiler for Resource-constrained Devices HOTPATH VM An Effective JIT Compiler for Resource-constrained Devices based on the paper by Andreas Gal, Christian W. Probst and Michael Franz, VEE 06 INTRODUCTION INTRODUCTION Most important factor: speed

More information

Managing Variability in Software Architectures 1 Felix Bachmann*

Managing Variability in Software Architectures 1 Felix Bachmann* Managing Variability in Software Architectures Felix Bachmann* Carnegie Bosch Institute Carnegie Mellon University Pittsburgh, Pa 523, USA [email protected] Len Bass Software Engineering Institute Carnegie

More information

Coaching Packages VIP Days PR Bursts & More

Coaching Packages VIP Days PR Bursts & More Coaching Packages VIP Days PR Bursts & More Personalized Coaching - One-on-One Calls Why do you need a coach? Mainly you need one who can not only support you and guide you in your daily business decisions,

More information

Intermediate Code. Intermediate Code Generation

Intermediate Code. Intermediate Code Generation Intermediate Code CS 5300 - SJAllan Intermediate Code 1 Intermediate Code Generation The front end of a compiler translates a source program into an intermediate representation Details of the back end

More information

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages Introduction Compiler esign CSE 504 1 Overview 2 3 Phases of Translation ast modifled: Mon Jan 28 2013 at 17:19:57 EST Version: 1.5 23:45:54 2013/01/28 Compiled at 11:48 on 2015/01/28 Compiler esign Introduction

More information

Session 7 Fractions and Decimals

Session 7 Fractions and Decimals Key Terms in This Session Session 7 Fractions and Decimals Previously Introduced prime number rational numbers New in This Session period repeating decimal terminating decimal Introduction In this session,

More information

View Your Photos. What you ll need: A folder of digital photos Jasc Paint Shop Photo Album 5

View Your Photos. What you ll need: A folder of digital photos Jasc Paint Shop Photo Album 5 View Your Photos With Photo Album you can choose the way you view photos, easily switching back and forth between four useful options: Favorite Folders, Calendar, Keywords, or All Folders. You can even

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 7 Scanner Parser Project Wednesday, September 7 DUE: Wednesday, September 21 This

More information

csci 210: Data Structures Recursion

csci 210: Data Structures Recursion csci 210: Data Structures Recursion Summary Topics recursion overview simple examples Sierpinski gasket Hanoi towers Blob check READING: GT textbook chapter 3.5 Recursion In general, a method of defining

More information

16. Recursion. COMP 110 Prasun Dewan 1. Developing a Recursive Solution

16. Recursion. COMP 110 Prasun Dewan 1. Developing a Recursive Solution 16. Recursion COMP 110 Prasun Dewan 1 Loops are one mechanism for making a program execute a statement a variable number of times. Recursion offers an alternative mechanism, considered by many to be more

More information

BBC Learning English Talk about English Business Language To Go Part 2 - Induction

BBC Learning English Talk about English Business Language To Go Part 2 - Induction BBC Learning English Business Language To Go Part 2 - Induction This programme was first broadcast in 2001. This is not a word for word transcript of the programme Forget about struggling with dictionaries

More information

Enterprise Recipes with Ruby and Rails

Enterprise Recipes with Ruby and Rails Extracted from: Enterprise Recipes with Ruby and Rails This PDF file contains pages extracted from Enterprise Recipes with Ruby and Rails, published by the Pragmatic Bookshelf. For more information or

More information

Flowcharting, pseudocoding, and process design

Flowcharting, pseudocoding, and process design Systems Analysis Pseudocoding & Flowcharting 1 Flowcharting, pseudocoding, and process design The purpose of flowcharts is to represent graphically the logical decisions and progression of steps in the

More information

2 Mathematics Curriculum

2 Mathematics Curriculum New York State Common Core 2 Mathematics Curriculum GRADE GRADE 2 MODULE 3 Topic G: Use Place Value Understanding to Find 1, 10, and 100 More or Less than a Number 2.NBT.2, 2.NBT.8, 2.OA.1 Focus Standard:

More information

Introduction to Automata Theory. Reading: Chapter 1

Introduction to Automata Theory. Reading: Chapter 1 Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a

More information

How to Outsource Without Being a Ninnyhammer

How to Outsource Without Being a Ninnyhammer How to Outsource Without Being a Ninnyhammer 5 mistakes people make when outsourcing for profit By Jason Fladlien 2 Introduction The way everyone does outsourcing is patently wrong, and this report is

More information

Grade 6 Math Circles. Binary and Beyond

Grade 6 Math Circles. Binary and Beyond Faculty of Mathematics Waterloo, Ontario N2L 3G1 The Decimal System Grade 6 Math Circles October 15/16, 2013 Binary and Beyond The cool reality is that we learn to count in only one of many possible number

More information