The Challenge of Cross - Language Interoperability

Slides:



Advertisements
Similar presentations
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
Advertisements

Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
COM vs. CORBA.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
Programming Languages and Paradigms Object-Oriented Programming.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Introduction to .Net Framework
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
1 2. Program Construction in Java Programming Fundamentals.
4.2.1 Programming Models Technology drivers – Node count, scale of parallelism within the node – Heterogeneity – Complex memory hierarchies – Failure rates.
GPU Architecture and Programming
Lecture 1 Introduction. Instructor Name: Seokwoo Song Office: business 524 Phone: Office Hours: M W 4:30 – 5:30 PM or by appointment
C++ Memory Overview 4 major memory segments Key differences from Java
We will talking about story of JAVA language. By Kristsada Songpartom.
Real Time Programming Language. Intro A programming language represents the nexus of design and structure. But misuse of the programming language can.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Thread basics. A computer process Every time a program is executed a process is created It is managed via a data structure that keeps all things memory.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
CISC. What is it?  CISC - Complex Instruction Set Computer  CISC is a design philosophy that:  1) uses microcode instruction sets  2) uses larger.
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.
Group Members Hamza Zahid (131391) Fahad Nadeem khan Abdual Hannan AIR UNIVERSITY MULTAN CAMPUS.
The Post Windows Operating System
The Object-Oriented Thought Process Chapter 03
Topic 2: Hardware and Software
Chapter 1: Software design
What Do Computers Do? A computer system is
DDC 2223 SYSTEM SOFTWARE DDC2223 SYSTEM SOFTWARE.
Top 8 Best Programming Languages To Learn
Jim Fawcett CSE775 – Distributed Objects Spring 2017
Visit for more Learning Resources
ITM352 PHP and Dynamic Web Pages: Server Side Processing 1.
Chapter 1 Introduction.
Learning to Program D is for Digital.
CSCI-235 Micro-Computer Applications
Mobile App Development
CSC 221: Computer Programming I Fall 2005
Design Patterns Damian Gordon.
CS101 Introduction to Computing Lecture 19 Programming Languages
Chapter 1 Introduction.
JAVA Introduction ការណែនាំពី Java
Multi-Processing in High Performance Computer Architecture:
Introduction CSE 1310 – Introduction to Computers and Programming
Multi-Processing in High Performance Computer Architecture:
Computer Programming.
Virtualization Techniques
Compiler Back End Panel
CIS16 Application Development – Programming with Visual Basic
Programming Languages
Fundamentals of Programming
Compiler Back End Panel
Parallel Analytic Systems
Parameter Passing Actual vs formal parameters
Creating Computer Programs
(Computer fundamental Lab)
Java Programming Introduction
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Tonga Institute of Higher Education IT 141: Information Systems
CSC 253 Lecture 2.
Tonga Institute of Higher Education IT 141: Information Systems
Groovy.
Chap 1. Getting Started Objectives
Creating Computer Programs
C++/Java/COM Interoperability
Presentation transcript:

The Challenge of Cross - Language Interoperability

Overview The Problem Challenges The path forward Questions

The Problem software becoming more complex and hardware less homogeneous Low-level languages: programmers no longer have a single language they can use for all probable targets High-level languages: typically trade generality for the ability to represent a subset of algorithms efficiently domain-specific languages are growing more prevalent hardware less homogeneous = different instruction sets and capabilities come with different pieces of hardware; can’t use same methods on all No low-level language has semantics that are close to a massively multithreaded GPU, for example Programmers wanting to get the last bit of performance out of the available hardware no longer have a single language they can use for all probable targets. A domain-specific language (DSL) is a computer language specialized to a particular application domain e.g. creating games, web (HTML) etc

The Problem Non-trivial applications can no longer be expected to be written in a single language => interfacing between languages is going to become increasingly important High-level languages typically call code written in lower-level languages as part of their standard libraries (for example, GUI rendering) becoming more important for compiler writers

Challenges Object model differences Memory Models single inheritance vs. multiple inheritance: Java | C++ Memory Models automatic vs. manual deallocation Exception interoperability Mutability functional languages vs. object-oriented languages objects were described as “simple computers that communicate via message passing.” This definition leaves a lot of leeway for different languages to fill in the details: Example: Should there be zero (for example, Go), one (for example, Java, JavaScript, Objective-C), or many (for example, C++) superclasses or prototypes for an object? what happens if you want, for example, to expose a C++ object into Java? Solution: You could perhaps follow the .NET or Kaffe approach, and support direct interoperability with only a subset of C++ (Managed C++ or C++/CLI) that supports single inheritance only for classes that will be exposed on the Java side of the barrier. Still have cognitive barrier: If you want to use a C++ framework directly, such as LLVM from Pragmatic Smalltalk or .NET, then you will need to write single inheritance classes that encapsulate the multiple-inheritance classes the library uses for most of its core types. ---------------------------------------------------- deterministic destruction: follows some rules, one situation always produces the same outcome; non-deterministic destruction: random order of destruction For example, C++ and Objective-C both have similar notions of an exception, but what should a C++ catch lock that expects to catch a void* do when it encounters an Objective-C object pointer? Even if you do catch the object pointer from C++, that does not mean you can do anything with it. By the time it is caught, you have lost all of the type information and have no way of determining if it is an Objective-C object. Mutable object can be modified after it is created This, combined with the deep copying problem, makes interfacing functional and object-oriented languages a difficult problem. A deep copy copies all fields, and makes copies of dynamically allocated memory pointed to by the fields

The path forward These problems can potentially be solved by compiler developers More interesting alternative: providing richer feature sets for high-level languages in hardware starting with the compiler output for newer languages, rethink CPU design Perhaps more interesting is the question of how many of these can be sunk down into the hardware. The industry has spent the past 30 years building CPUs optimized for running languages such as C, because people who needed fast code used C (because people who designed processors optimized them for C, because...). Maybe the time has come to start exploring better built-in support for common operations in other languages.

Questions?