COS341 Project 3 (2017): Executable Code for SPL

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

In Review JAVA C++ GUIs - Windows Webopedia.com.
1 CIS 461 Compiler Design and Construction Fall 2014 Instructor: Hugh McGuire slides derived from Tevfik Bultan, Keith Cooper, and Linda Torczon Lecture-Module.
8. Code Generation. Generate executable code for a target machine that is a faithful representation of the semantics of the source code Depends not only.
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Operational Semantics.
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
1 CHAPTER 4 LANGUAGE/SOFTWARE Hardware Hardware is the machine itself and its various individual equipment. It includes all mechanical, electronic.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Programming Languages Lecture 12. What is Programming?  The process of telling the computer what to do  Also known as coding.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
Chapter 1 Computer Systems. Why study Computer Architecture? Examples Web Browsing - how does the browser access pages from a server? How can we create.
ORDER OF CONTENT AND INSTRUCTIONS A program in its simplest form usually contains three kinds of activity:  INPUT : The program asks the user for some.
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Lecture 2 Programming life cycle. computer piano analogy Piano + player - computer hardware Musical score/notes - software or program Composer - programmer.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Compilers and Interpreters
ITP 109 Week 2 Trina Gregory Introduction to Java.
Programming Languages
Algorithms in Programming Computer Science Principles LO
UNIX U.Y: 1435/1436 H Operating System Concept. What is an Operating System?  The operating system (OS) is the program which starts up when you turn.
Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Computer Language
DDC 2223 SYSTEM SOFTWARE DDC2223 SYSTEM SOFTWARE.
Why don’t programmers have to program in machine code?
Component 1.6.
A Level Computing – a2 Component 2 1A, 1B, 1C, 1D, 1E.
Chapter 1 Introduction.
Component 1.6.
Introduction to programming
Operating System Interface between a user and the computer hardware
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
PROGRAMMING LANGUAGES
Programming Language Hierarchy, Phases of a Java Program
Chapter 1 Reasons to study concepts of PLs Programming Domains
Computer System and Programming
Introduction to Computers and Java
Chapter 1 Introduction.
Java programming lecture one
Chapter 4 Computer Software.
TRANSLATORS AND IDEs Key Revision Points.
Translators & Facilities of Languages
Assembler, Compiler, Interpreter
Computer Science I CSC 135.
Mobile Development Workshop
Lesson Objectives Aims Key Words Compiler, interpreter, assembler
COMPUTER SOFT WARE Software is a set of electronic instructions that tells the computer how to do certain tasks. A set of instructions is often called.
CMP 131 Introduction to Computer Programming
Programming Languages
Assembler, Compiler, Interpreter
MARIE: An Introduction to a Simple Computer
A programming language
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Chapter 6 Programming the basic computer
TARGET CODE GENERATION
Reasons To Study Programming Languages
WJEC GCSE Computer Science
Presentation transcript:

COS341 Project 3 (2017): Executable Code for SPL (Part 3a)   bye NEW Project Partner ! will be allocated to you during the lecture (soon)

Project 3: Overview Part 3a: Intermediate Code Preparation Part 3b: Intermediate Code Generation Part 3c: Intermediate Code Optimisation (now) (later) (later)

von-Neumann Code A von-Neumann language is simple kind of computer language which offers symbolic addresses together with GOTO commands to those symbolic addresses. This kind of language can be “understood” by all computers which have the von-Neumann/Zuse hardware architecture Due to Dijkstra’s famous letter, “GOTO Statement considered harmful ”, our modern programming languages (e.g.: JAVA) are NO von-Neumann languages any more. But, as we are still using the von-Neumann/Zuse hardware architecture, our compiler must be able to translate modern code into von-Neumann code! (Footnote: J.v.Neumann and K.Zuse both invented this hardware architecture independently from each other.)

von-Neumann Code (sketch) ... GOTO B B: ... GOTO A

BASIC The old programming language BASIC (Beginner’s All-purpose Symbolic Instruction Code) is a von-Neumann language (with symbolic address labels and GOTO). BASIC is an interpreted language (see textbook chapter #4: interpreters) with which the (novice) programmer can see immediately (on the screen) “what is going on”: Therefore it is still of high “educational value” for students, though hardly anybody uses BASIC in software development practice any longer. For this reason we use BASIC as the target language into which we will translate programs from our Students’ Programming Language (SPL). If we have programmed our SPL compiler well, then we should be able to see  how an SPL program “is actually running” in the BASIC environment: This has high Educational Value 

Your TASKS for Sub-Project 3a (This time: no coding  ) Self-study, with your new project partner, the ancient programming language BASIC in its original von-Neumann form (without all the later modern extensions) It is extremely simple  Download (from anywhere on the Internet) a suitable BASIC interpreter, and install it on your computer. Read the famous letter by E.Dijkstra: “GOTO Statement considered Harmful ”