Programming Language Translation

Slides:



Advertisements
Similar presentations
CSE 105 Structured Programming Language (C)
Advertisements

Introduction to C Programming
Lecture 12 – ADTs and Stacks.  Modularity  Divide the program into smaller parts  Advantages  Keeps the complexity managable  Isolates errors (parts.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Introduction to C Programming CE Lecture 1 Introduction to C.
©2004 Brooks/Cole Chapter 1: Getting Started Sections Covered: 1.1Introduction to Programming 1.2Constructing a Java Program 1.3The print() and println()
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Session 1 CS-240 Data Structures Binghamton University Dick Steflik.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
Introduction to a Programming Environment
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Guide To UNIX Using Linux Third Edition
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Dynamic Allocation and Linked Lists. Dynamic memory allocation in C C uses the functions malloc() and free() to implement dynamic allocation. malloc is.
Language Issues Misunderstimated? Sublimable? Hopefuller? "I know how hard it is for you to put food on your family.” "I know the human being and fish.
1 Chapter-01 Introduction to Computers and C++ Programming.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Standard Grade Computing System Software & Operating Systems.
The TASKADE Programming Language by TEAM 9 Andrey Dimitrov - Project manager Christopher Riedered - Language Guru Avner May - System Architect Joyce Kim.
1 Programming Languages Tevfik Koşar Lecture - II January 19 th, 2006.
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your.
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Lecture 3 Classes, Structs, Enums Passing by reference and value Arrays.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Working With Objects Tonga Institute of Higher Education.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 3.
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
Programming Language Translation Jamie McAtamney.
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
Compilers and Interpreters
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Kapi’olani Community College Art 258 Interface Programming II In-class Presentation Week 1A.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Evolution and History of Programming Languages
Lecture 9 Symbol Table and Attributed Grammars
CIS 068 JAVA vs. C++ Main Differences CIS 068.
Advanced Computer Systems
CSE691 Software Models and Analysis.
Variables in Java A variable holds either
Operating System Structures
Coupling and Cohesion Rajni Bhalla.
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Types for Programs and Proofs
Problem Identification
CSCI-235 Micro-Computer Applications
Key Ideas from day 1 slides
Java Programming Language
C Language By Sra Sontisirikit
Object-Orientated Programming
Programming Language Translation
Govt. Polytechnic,Dhangar
On the Criteria To Be Used in Decomposing Systems into Modules D. L
The Programming Process
From C to C++: Summary of weeks 1 - 4
The C Language: Intro.
Chapter 2. Problem Solving and Software Engineering
ENERGY 211 / CME 211 Lecture 8 October 8, 2008.
1.3.7 High- and low-level languages and their translators
Zorah Fung University of Washington, Winter 2016
The beginning of media computation Followed by a demo
IS 135 Business Programming
Presentation transcript:

Programming Language Translation Jamie McAtamney

Introduction Purpose: to write a fully functional translator C to Java Hasn’t been done before Java some advantages over C: Easier to write Java (idiot-proof)‏ More portable Scope: as wide as possible Currently have all the “basics” Need to do struct translation, pointers, graphics

Background Similar research Jazillian pay-per-program translation company Terekhov & Verhoef’s paper on translation difficulties Lili Qiu's paper on procedural vs. object-oriented languages

Methodology Approach Everything is modular Have modules for different translations Have “translate()” methods to coordinate everything Have separate programs to handle appearance of code Aspects of C closest to Java translated first Saved memory manipulation for last

Methodology Translation algorithm Formatting Tokenization Remove programming idiosyncrasies Tokenization Keywords and punctuation Keyword search-replace Ex: char* → String Context-sensitive search Ex: printf(“\n”); → System.out.println();

Methodology Finished Timeline In Progress Coming “Soon” Coming Maybe Primitive types Arrays Method headers Input/output Preprocessor directives Two-pass translator Timeline In Progress Package methods Coming “Soon” Structs → Classes Pointers Graphics Coming Maybe Computer-to-computer communication

Methodology Testing & Analysis Testing old C programs Have a few “fake” programs to test particular modules Script to do testing Added another translator to traverse Java program a second time

Methodology Problems: Can't move “backwards” for writing to Java file Solved with two-pass translator Some C methods “overloaded” in Java Ex: PrintStream append() and print()‏

Progress Results Thus Far Program is error-free All implemented areas fully translated Translator outputs compilable and runnable program

Progress Analysis Where to go from here Ahead of schedule Didn't expect to get to structs and pointers before end of 3rd quarter Didn't expect output of compilable and runnable program until 3rd quarter Graphics will be much easier than I originally thought Where to go from here Will try Java to C if I finish by beginning of 4th quarter