Continuations provide a novel way to suspend and reexecute

Similar documents
Introduction. A. Bellaachia Page: 1

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Comp 333: Concepts of Programming Languages Fall 2016

Final-Term Papers Solved MCQS with Reference

LECTURE 18. Control Flow

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

LECTURE 1. Overview and History

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

Imperative Programming Languages (IPL)

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

CS558 Programming Languages

Chapter 7:: Data Types. Mid-Term Test. Mid-Term Test (cont.) Administrative Notes

Programming Language Concepts 1982, 1987, Outline. Period

22c:111 Programming Language Concepts. Fall Types I

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

C# Adds Useful Features

Introduction to Scientific Computing Languages

Com S 541. Programming Languages I

Introduction to Scientific Computing Languages

Programming Languages, Summary CSC419; Odelia Schwartz

Programmiersprachen (Programming Languages)

Chapter 7. - FORTRAN I control statements were based directly on IBM 704 hardware

Chapter 2. 5 * B => A V 6 7 (subscripts) S 1.n 1.n (data types)

2. Evolution of the Major Programming languages

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Properties of an identifier (and the object it represents) may be set at

St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

CS101 Introduction to Programming Languages and Compilers

G Programming Languages - Fall 2012

Lecture 1: Course Introduction

G Programming Languages Spring 2010 Lecture 6. Robert Grimm, New York University

Functional Programming. Big Picture. Design of Programming Languages

COSC 2P90 Programming Languages & Object-Orientation

Test 1 Summer 2014 Multiple Choice. Write your answer to the LEFT of each problem. 5 points each 1. Preprocessor macros are associated with: A. C B.

COS 140: Foundations of Computer Science

CSCI312 Principles of Programming Languages!

CSE 307: Principles of Programming Languages

Design Issues. Subroutines and Control Abstraction. Subroutines and Control Abstraction. CSC 4101: Programming Languages 1. Textbook, Chapter 8

Chapter 1. Preliminaries

Lecture 1: Course Introduction

Introduction to Programming Using Java (98-388)

HANDLING NONLOCAL REFERENCES

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

Concepts in Programming Languages

Programming Languages 2nd edition Tucker and Noonan"

Which of the following is not true of FORTRAN?

G Programming Languages - Fall 2012

CS 415 Midterm Exam Spring 2002

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

Topic IV. Block-structured procedural languages Algol and Pascal. References:

Principles of Programming Languages. Lecture Outline

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Logic Programming II & Revision

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

Equivalent Notations. Higher-Order Functions. (define (f x y) ( body )) = (define f (lambda (x y) ) ) Anonymous Functions.

COS 140: Foundations of Computer Science

Concepts of Programming Languages

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages

Introduction to OCaml

INSTITUTE OF AERONAUTICAL ENGINEERING

Topic IV. Parameters. Chapter 5 of Programming languages: Concepts & constructs by R. Sethi (2ND EDITION). Addison-Wesley, 1996.

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

Grade Weights. Language Design and Overview of COOL. CS143 Lecture 2. Programming Language Economics 101. Lecture Outline

Topic 7: Algebraic Data Types

Imperative Programming

TYPES, VALUES AND DECLARATIONS

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

Programming in Visual Basic with Microsoft Visual Studio 2010

CS 3360 Design and Implementation of Programming Languages. Exam 1

10. Abstract Data Types

Subprograms. Bilkent University. CS315 Programming Languages Pinar Duygulu

CIS24 Project #3. Student Name: Chun Chung Cheung Course Section: SA Date: 4/28/2003 Professor: Kopec. Subject: Functional Programming Language (ML)

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

C++ (Non for C Programmer) (BT307) 40 Hours

Informatica 3 Syntax and Semantics

CSCI-GA Scripting Languages

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan

Chapter 11 Introduction to Programming in C

R13 SET Discuss how producer-consumer problem and Dining philosopher s problem are solved using concurrency in ADA.

Discover how to get up and running with the Java Development Environment and with the Eclipse IDE to create Java programs.

MIDTERM EXAMINATION - CS130 - Spring 2005

Chapter 8 ( ) Control Abstraction. Subprograms Issues related to subprograms How is control transferred to & from the subprogram?

Chapter 1. Preliminaries

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

Managing Change and Complexity

NOTE: Answer ANY FOUR of the following 6 sections:

Fundamentals of Programming Languages

CMPUT Language Paradigms. Programming Paradigms. Dr. B. Price & Dr. R. Greiner. 7th September Real languages draw upon multiple paradigms

Data Types. (with Examples In Haskell) COMP 524: Programming Languages Srinivas Krishnan March 22, 2011

low and not larger than high. 18 points

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

CS 314 Principles of Programming Languages

Evolution of the Major Programming Languages

Early computers (1940s) cost millions of dollars and were programmed in machine language. less error-prone method needed

Control Structures. Outline. In Text: Chapter 8. Control structures Selection. Iteration. Gotos Guarded statements. One-way Two-way Multi-way

Transcription:

Continuations provide a novel way to suspend and reexecute computations. 2. ML ( Meta Language ) Strong, compile-time type checking. Types are determined by inference rather than declaration. Naturally polymorphic (one function declaration can be used with many different types). Pattern-directed programming (you define patterns that are automatically matched during a call). 12

Typed exceptions are provided. Abstract data types, with constructors, are included. 3. Prolog (Programming in Logic) Programs are Facts and Rules. Programmers are concerned with definition, not execution. Execution order is automatically determined. 13

4. Pizza Extends a popular Objectoriented language, Java, to include Parametric polymorphism (similar to C++ s templates). First-class functional objects. Algebraic data types, including patterns. 5. C# Microsoft s answer to Java. In most ways it is very similar to Java, with some C++ concepts reintroduced and some useful additions. 14

Events and delegates are included to handle asynchronous actions (like keyboard or mouse actions). Properties allow user-defined read and write actions for fields. Indexers allow objects other than arrays to be indexed. Collection classes may be directly enumerated: foreach (int i in array)... Structs and classes co-exist and may be inter-converted (boxed and unboxed). Enumerations, operator overloading and rectangular arrays are provided. Reference, out and variable-length parameter lists are allowed. 15

6. Java 1.5 (Tiger Java, Java 5.0) Extends current definition of Java to include: Parametric polymorphism (collection types may be parameterized). Enhanced loop iterators. Automatic boxing and unboxing of wrapper classes. Typesafe enumerations. Static imports (out.println rather than System.out.println). Variable argument methods. Formatted output using printf: out.printf("ans = %3d",a+b); 16

7. Python A simple, efficient scripting language that quickly builds new programs out of existing applications and libraries. It cleanly includes objects. It scales nicely into larger applications. 17

Evolution of Programming Languages In the beginning,... programs were written in absolute machine code a sequence of bits that encode machine instructions. Example: 34020005 0000000c 3c011001 ac220000 This form of programming is Very detailed Very tedious Very error-prone Very machine specific 18

Symbolic Assemblers Allow use of symbols for operation codes and labels. Example: li syscall sw $v0,5 $v0,a Far more readable, but still very detailed, tedious and machinespecific. Types are machine types. Control structures are conditional branches. Subprograms are blocks of code called via a subroutine branch instruction. All labels are global. 19

Fortran (Formula Translator) Example: do 10 i=1,100 10 a(i)=0 Developed in the mid-50s. A major step forward: Programming became more problem oriented and less machine oriented. Notions of control structures (ifs and do loops) were introduced. Subprograms, calls, and parameters were made available. Notions of machine independence were introduced. Has evolved into many new variants, including Fortran 77, Fortran 90 and HPF (High Performance Fortran). 20

Cobol (Common Business Oriented Language) Example: multiply i by 3 giving j. move j to k. write line1 after advancing 1 lines. Developed in the early 60s. The first widely-standardized programming language. Once dominant in the business world; still important. Wordy in structure; designed for non-scientific users. Raised the issue of who should program and how important readability and maintainability are. 21

Algol 60 (Algorithmic Language) Example: real procedure cheb(x,n); value x,n; real x; integer n; cheb := if n = 0 then 1 else if n = 1 then x else 2 x cheb(x,n-1)-cheb(x,n-2); Developed about 1960. A direct precursor of Pascal, C, C++ and Java. Introduced many ideas now in wide use: Blocks with local declarations and scopes. Nested declarations and control structures. 22

Parameter passing Automatic recursion. But, I/O wasn t standardized. IBM promoted Fortran and PL/I. 23

Lisp (List Processing Language) Example: ((lambda (x) (* x x)) 10) Developed in the early 60s. A radical departure from earlier programming languages. Programs and data are represented in a uniform list format. Types are a property of data values, not variables or parameters. A program can build and run new functions as it executes. Data values were not fixed in size. 24

Memory management was automatic. A formal semantics was developed to define precisely what a program means. 25

Simula 67 (Simulation Algol) Example: Class Rectangle (Width, Height); Real Width, Height; Boolean Procedure IsSquare; IsSquare := Width=Height; End of Rectangle; Developed about 1967. Introduced the notion of a class (for simulation purposes). Included objects, a garbage collector, and notions of extending a class. C++ was originally C with classes (as Simula was Algol with classes). 26

C and C++ C was developed in the early 70 s; C++ in the mid-80s. These languages have a concise, expressive syntax; they generate high quality code sufficient for performancecritical applications. C, along with Unix, proved the viability of platformindependent languages and applications. C and C++ allow programmers a great deal of freedom in bending and breaking rules. Raises the issue of whether one language can span both novice and expert programmers. 27

Interesting issue if most statements and expressions are meaningful, can errors be readily detected? if (a=b) a=0; else a = 1; 28

Java Developed in the late 90s. Cleaner object-oriented language than C++. Introduced notions of dynamic loading of class definitions across the Web. Much stronger emphasis on secure execution and detection of run-time errors. Extended notions of platform independence to system independence. 29