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

Similar documents
Programming Languages, Summary CSC419; Odelia Schwartz

Concepts of Programming Languages

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

Principles of Programming Languages. Lecture Outline

Continuations provide a novel way to suspend and reexecute

Introduction. A. Bellaachia Page: 1

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

Programmiersprachen (Programming Languages)

LECTURE 1. Overview and History

Chapter 1 Preliminaries

Chapter 1. Preliminaries

CS 415 Midterm Exam Spring 2002

Chapter 1. Preliminaries

NOTE: Answer ANY FOUR of the following 6 sections:

Informatica 3 Syntax and Semantics

Introduction to Scientific Computing Languages

Introduction to Scientific Computing Languages

Programming Languages 2nd edition Tucker and Noonan"

CS 415 Midterm Exam Spring SOLUTION

COSC 2P90 Programming Languages & Object-Orientation

G Programming Languages - Fall 2012

References and pointers

CS 314 Principles of Programming Languages

Programming Languages Third Edition. Chapter 7 Basic Semantics

Informal Semantics of Data. semantic specification names (identifiers) attributes binding declarations scope rules visibility

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

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

Design & Implementation Overview

Com S 541. Programming Languages I

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

CSC 533: Organization of Programming Languages. Spring 2005

CSCI 3136 Principles of Programming Languages

CS101 Introduction to Programming Languages and Compilers

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

names names identifiers variables subroutines constants

Comp 333: Concepts of Programming Languages Fall 2016

Briefly describe the purpose of the lexical and syntax analysis phases in a compiler.

UNIT 3

Programming Languages FILS Andrei Vasilateanu

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

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

Part (04) Introduction to Programming

CS 3360 Design and Implementation of Programming Languages. Exam 1

Logic Programming II & Revision

CSE 307: Principles of Programming Languages

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

Lecture 1: Course Introduction

Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

Chapter 5. Names, Bindings, and Scopes

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

MIDTERM EXAM (Solutions)

Functional Programming. Big Picture. Design of Programming Languages

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

Organization of Programming Languages CS3200/5200N. Lecture 11

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

Seminar in Programming Languages

G Programming Languages - Fall 2012

Lecture 1: Course Introduction

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008.

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

CS 242. Fundamentals. Reading: See last slide

Computer Software: Introduction

Compiler Construction

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

INSTITUTE OF AERONAUTICAL ENGINEERING

A Tour of Language Implementation

1 Lexical Considerations

CS 330 Lecture 18. Symbol table. C scope rules. Declarations. Chapter 5 Louden Outline

CMPT 379 Compilers. Anoop Sarkar.

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

CS 113: Introduction to

Compilers. Prerequisites

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End

LECTURE 18. Control Flow

Names, Bindings, Scopes

Semester Review CSC 301

Compiler Construction

Imperative Programming

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

The role of semantic analysis in a compiler

INFS 214: Introduction to Computing

Evolution of Fortran. Presented by: Tauqeer Ahmad. Seminar on Languages for Scientific Computing

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far

Control in Sequential Languages

COP 3402 Systems Software. Lecture 4: Compilers. Interpreters

CSE 307: Principles of Programming Languages

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

Concepts of Programming Languages

CST-402(T): Language Processors

From High Level to Machine Code. Compilation Overview. Computer Programs

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

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing

MIDTERM EXAMINATION - CS130 - Spring 2005

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

Programs are: CMPSCI 105/119/120: Programming, Flowchar<ng, and Running Program Flowcharts

Transcription:

PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY Dr. John Georgas, Northern Arizona University Copyright John Georgas All Rights Reserved Outline Current Programming languages Compiled and interpreted implementations Key characteristics History of languages and evolution Programming Languages Enable constructing representations of a computational process; well-defined algorithms processing information Ultimately mapping to machine instructions Many-to-one programs to computational process Syntax and associated semantics Fundamentally just like human languages and form of expression Non-functional properties become critical Style vs. substance Preferences often driven by stylistic or ease of use characteristics rather than fundamental features n i.e. syntactic sugar and library availability 1

Language families Declarative Functional (LISP) Logic (Prolog) Imperative (Fortran, C, Java) Currently dominant paradigm Language Implementations Layered architectures Mappings from highlevel to low-level instructions Compiler-based implementations Mapping High-level syntax to machine code n Plus linking of external resources Advantages: (Usually) faster execution due to optimizations n Both algorithmic and machinespecific Disadvantages: Compiled code coupled to specific hardware architecture Long iterative cycle Requires complete program 2

Interpreter-based implementations Mapping High-level syntax executed by interpreter Interpreter wraps around machine and maps to machine code Advantages: Higher accessibility n Ease of experimentation Portable from machine to machine n As long as an interpreter exists for each Dynamic code generation Disadvantages: (Usually) slower due to interpreter layer Hybrid implementations Mapping High-level syntax to interpreter instructions (intermediate representation) n Or purely interpreted Interpreter still wraps around machine and maps intermediate representation to machine code Advantages: Improved performance (over fully interpreted options) n Enabling compiler-type optimizations Higher accessibility Intermediate representation portable from machine to machine Disadvantages: Longer iterative cycle than fully interpreted options (Usually) still slower due to interpreter layer Some Essential Characteristics Binding Association between entity and attribute n Type bindings: static/dynamic, implicit/explicit n Storage bindings: static, stack, heap Scope Lexical region over which a variable is defined n Static (lexical) scope, dynamic scoping Type equivalence Name/structure Abstraction Support for defining new composite elements 3

Brief History of Languages Machine code Low-level invocations of core machine instructions Assembly language Addition of mnemonics and labels 11 000 011 add ax, bx mov a, ax (IBM Mathematical Formula Translating System) FORTRAN (~1955) Move toward more natural expressiveness n Addition of subprograms and more robust expressions of branching and control flow Static memory allocation and strict naming conventions X = 0 15 X = X + 1 IF (X.LT. 10) GOTO 15 42 CONTINUE (Algorithmic Language) ALGOL (~1958) Influential features: blocked variable scoping, dynamic memory, compound/nested structures n Effort also led to important formal contributions (e.g. BNF) IF (.NOT.(condition)) GOTO 100 statementt1 statementtn GOTO 200 100 statementf1 statementfn 200 CONTINUE if condition then statementt1; statementtn; else statementf1; statementfn; 4

(List Processing Language) LISP (~1959) Functional programming focused on AI applications; essentially recursive n Dynamic memory allocation and deallocation (cond ((= x 0) 0) ((= x 1) 1) (else (+ (fib (- x 1)) (fib (- x 2))))) (Common Business-Oriented Language) COBOL (~1959) Customized for business applications; effort toward English-like syntax 01 Num1 PIC 9 01 Num2 PIC 9 01 Result PIC 99 DISPLAY "Enter First Number ACCEPT Num1 DISPLAY "Enter Second Number ACCEPT Num2 IF TRUE THEN ADD Num1, Num2 GIVING Result END-IF DISPLAY "Result is = ", Result : " WITH NO ADVANCING : " WITH NO ADVANCING (Simulation Language) SIMULA (~1964) Introduction of object-oriented principles class Storer(x); integer x; integer procedure getx; getx := x; Storer; ref(storer) s; s :- new Storer(1); s.getx; 5

C (~1972) Developed as part of UNIX OS Close to the metal n With great power comes great responsibility Early feature sampling: No robust types/structures, pointers and pointer arithmetic, manual memory management C with Classes and C++, Java (Programming in Logic) Prolog (~1972) Declarative programming focusing on inferences based on facts and rules parent(x, Y) :- father(x, Y). father(adam, Cain). :- parent(x, Cain). 6