CISC 860 September 14, Milestones in the History of PLs

Similar documents
Introduction. A. Bellaachia Page: 1

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

Concepts of Programming Languages

Programming Languages, Summary CSC419; Odelia Schwartz

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

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

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

Chapter 1. Preliminaries

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

Principles of Programming Languages. Lecture Outline

Programming Languages 2nd edition Tucker and Noonan"

COSC 2P90 Programming Languages & Object-Orientation

Chapter 1. Preliminaries

INSTITUTE OF AERONAUTICAL ENGINEERING

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

Continuations provide a novel way to suspend and reexecute

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

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

Functional Programming. Big Picture. Design of Programming Languages

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

CS321 Languages and Compiler Design I. Winter 2012 Lecture 1

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

COMPILER DESIGN LECTURE NOTES

Chapter 3. Describing Syntax and Semantics

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


CS 242. Fundamentals. Reading: See last slide

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

CS 415 Midterm Exam Spring 2002

Chapter 1 Preliminaries

Programming Languages Third Edition. Chapter 7 Basic Semantics

CSC 533: Organization of Programming Languages. Spring 2005

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

10/30/18. Dynamic Semantics DYNAMIC SEMANTICS. Operational Semantics. An Example. Operational Semantics Definition Process

Com S 541. Programming Languages I

2. Evolution of the Major Programming languages

Concepts in Programming Languages

1 A question of semantics

Chapter 3:: Names, Scopes, and Bindings (cont.)

CST-402(T): Language Processors

Chapter 3 (part 3) Describing Syntax and Semantics

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

Chapter 3. Describing Syntax and Semantics

Chapter 3. Describing Syntax and Semantics ISBN

Chapter 5. Names, Bindings, and Scopes

Imperative Programming

Chapter 3. Semantics. Topics. Introduction. Introduction. Introduction. Introduction

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

CSE 307: Principles of Programming Languages

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

CS 314 Principles of Programming Languages

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

Chapter 3:: Names, Scopes, and Bindings (cont.)

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

St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

Chapter 5 Names, Binding, Type Checking and Scopes

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

G Programming Languages - Fall 2012

Programming Languages and Program Development

Programmiersprachen (Programming Languages)

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

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

A Small Interpreted Language

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

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

CS323 Lecture - Specifying Syntax and Semantics Last revised 1/16/09

Programming Languages Third Edition

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

Chapter 11 :: Functional Languages

CS 415 Midterm Exam Spring SOLUTION

Functional Languages. Hwansoo Han

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

Introduction to Scientific Computing Languages

NOTE: Answer ANY FOUR of the following 6 sections:

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements

CS558 Programming Languages

Informatica 3 Syntax and Semantics

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

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

Chapter 3. Syntax - the form or structure of the expressions, statements, and program units

Programming Language Pragmatics

Design & Implementation Overview

10/26/17. Attribute Evaluation Order. Attribute Grammar for CE LL(1) CFG. Attribute Grammar for Constant Expressions based on LL(1) CFG

Introduction to Scientific Computing Languages

Programming Paradigms

Lecture 1: Course Introduction

LECTURE 16. Functional Programming

UNIT 3

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

Principles of Programming Languages [PLP-2015] Detailed Syllabus

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.

This book is licensed under a Creative Commons Attribution 3.0 License

Section 4: ALGOL. Evolution of Software Languages

Chapter 6 Control Flow. June 9, 2015

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

SOFTWARE ARCHITECTURE 6. LISP

Lecture 1: Course Introduction

Recursive Functions of Symbolic Expressions and Their Computation by Machine Part I

Transcription:

CISC 860 September 14, 2009 Milestones in the History of PLs P. Wegner, 1976 3 Phases of Language Development 1950-60 Discovery & Description Basic concepts discovered PLs regarded as tools only 1961-69 Elaboration & Analysis Models and theories of PLs Formal Languages Semantics Basic Implementation Techniques 1970-80 Technology and Engineering Shift to practical management Modularization of code Complexity Barrier Simplicity and Constraints 30 Milestones Most Important: Fortran Algol 60 Cobol Lisp M1. EDVAC Report (von Neumann 1944) First description of Stored Program Computers First (1-address) machine language Load x Add y Store z = first programming language

M2. The Preparation of Programs for a Digital Computer (Wilkes, Wheeler, Gill - 1951) First book on software Discusses subrouting linkage, develops subroutines Shows initial orders A program loading system with decimal -> binary, relative addresses. = First primitive assembler (use of computer to translate user-specified instructions to machine code) M3. Development of Assemblers (1950-60) Assembler originally meant a program which assembled several subroutines into a program Later, narrowed to mean a program which translates from symbolic machine language into hardware machine code Early assemblers SOAP (IBM 650) SAP (Symbolic Assembly Program, IBM 704) Most compiler programs of the time! During 60s, assembler writing went from art -> science. Now considered simple M4. Macro Assemblers (1955-65) Macros: Language extension mechanism allowing introduction of new language forms!! e.g.! Macro Incr x!!!! load $x!!!! add one!!! Incr A!!!! store $x!!! mend Originally allowed only expansion into lists of instructions Later, extended to allow generation of arbitrary strings and new syntax!! e.g.! Macro x = y + z!!!! load $y!!!! add $z!!! A = B + one!!!! store $x!!! mend Used to implement sophisticated preprocessors - transciterators from statement forms to verbose assembly language First Approach to HLL

M5. Fortran (1954-58) (Formula Translation) Most important milestone At time, much skepticism about efficiency of HLL Fortran -> Existence proof for feasibility and viability of HLL Concepts introduced: Variables, Expressions, Statements Boolean Conditions Arrays Branching Control Systems Iterations Separate Compilation Data Sharing (Persistence) Formatted I/O Techniques Introduced: Stack Model of Expression Evaluation (Postfix as an example) M6. Algol 60 (1957-60) (Algorithmic Language) Most important conceptual milestone Introduced formal method of Language Definition (Algol Report) First time language itself was an object of study Concepts Introduced: Block Structure Explicit Type Declaration for Variables Scope rules for local variables Dynamic vs. Static lifetimes for variables Nesting of If-Then-Else and Statements Call by value, call by name Recursive subroutines Dynamic arrays Carefully designed around! a runtime model based on a single stack Semantically simple using right model, semantically complex using wrong (e.g. Fortran) one Widespread view that algol inherently inefficient Hindered acceptance Techniques introduced: Syntax notation (BNF) Explicit semantics for syntax forms Explicit run time model Stack implementation of scopes Nested block structure quickly accepted into PL folklore Inhibited PL designers of the 60s since block structure too restrictive for information hiding (modules).

M7. Cobol (1959-61) Result of several different projects for business processing languages Concepts Introduced: Record data structures File description and manipulation Natural language style programming Natural language style -> More readable to novices, but not more writeable; not easier to debug Little/No help in programming Main contribution Data processing facilities (records) remain almost identical to this day Most widely used PL ever Data description is hardest part of data processing First formally standardized language Behind state-of-the-art in procedures, way ahead in data M8. PL/I (1964-69) Synthesis of Fortran, Algol 60, Cobol Fortran - Expressions and Statements Algol - Blocks and Types Cobol - Data Descriptions (records, files) Aim: Once and for all general-purpose standard PL Concepts Introduced: Exception Handlers Pointers, Dynamic Data Structures Multitasking (Concurrency) Static vs. Automatic vs. Controlled Storage Lessons Learned: Greater richness and Power -> Greater Complexity, in both definition and use Larger Language -> Less readability and maintainability Was a reaction to simplicity in the 70s.

M9. Algol 68 (1968) Systematic generation of Algol 60 Small number of orthogonal concepts Power derived from cross product Concepts Introduced: Powerful, Simple Compositional Type System Carefully designed type coercion system (intuitive) Parallel programming (opposed to threads, processes) Pointers, Recursive Structures e.g. Composite Modes (Type System)!! [ ]m!! struct(m1, m2)!! proc(m1)m2!! ref m!! union(m1,m2)!! combined recursively, e.g.!!! struct([ ]refm, proc(ref ref m) [ ] n) Orthogonality and simplicity -> Power High quality language definition but own notation and terminology unreadable to mortals (theory notation was used) Not generally accepted because: Hard to read definition Lack of good implementation Land of good user manuals In the end, too general and flexible for wide acceptance M10. Simula 67 (1965-67) Significant break from Algol/Fortran thinking New Concepts: Classes Subclasses (inherited) Co-routines Class data type has own procedures and data, which survive scope of class variable Birth of O-O programming, but still no information hiding, so lack of modularity. M11. IPL V (1954-58) List processing language First AI language Assembly level lists - both programs and data represent using lists New techniques: List processing language Pioneered storage management (list garbage collection) Influenced free lists! First language defined using an abstract machine (software computer model) Interpretive Implementation

M12. Lisp (1959-60) HLL of IPL V Like Algol 68, build power and richness from very few, simple concepts e.g. Original Lisp!! cons[x;y]!! construct list!! car[x]!!! first of list!! cdr[x]!!! all but first!! atom[x]!! true if x atom!! eq[x;y]!! true if x, y atoms =!! [p1->a1;p2->a2;p3->a3;...]! compound if..elsif!! lambda[x;f]!! bind x in f to args!! label[x;f]!! bind x in f to recursive calls Concepts introduced: Elegant if..elsif..elsif..else..fi Functions in arguments Techniques introduced: Defined using VM interpreter (ʻapplyʼ function) -> Led to theory of operational semantics Simple enough to support mathematical model (McCarthy) and proofs of correctness years before others M13. Snobol 4 (1962-67) Developed to support linguistic transformations for language understanding (AI) New Concepts: Programmer-defined data types e.g. Lisp Definition: data(ʻcons(car,cdr)ʼ)!! new TYPE cons, COMPONENTS car, cdr x = cons (ʻaʼ, ʻnilʼ)!! construct VALUE of TYPE cons car(x)!!!! selects first COMPONENT! y = cons(ʻbʼ, cons(ʻaʼ, ʻnilʼ)) car(cdr(y))!! =ʼaʼ Dynamic typing Pattern Matching Backtracing Cuts Pattern data type: A pattern is an ordered (possibly infinite) set of strings (and string attributes) Snobol has powerful pattern construction operators, pattern values functions,... Advanced both theory and practice of strings and string patterns

M14. Language Theory (1948-62) Communication model (Shannon 194x) generator -> communication medium -> recognizer led to generative grammars (e.g. BNF) and systematic recognizers (e.g. FA, PDA) Generators -> grammars recognizers -> automata Chomsky Hierarchy relates grammars to automata This work led to practical compiler techniques and heavily influences language design (good?) Automata Theory M15. Compiler Technology and Theory (1960-1970) By 1960, 3-phase model established Lexical analysis Parsing Code Generation In 60s, much work, both theoretical and practical, on mechanization of lexical analysis and parsing Development of practical classes of CFGs - SP, LL(k), LR(k), LALR Mechanization of C.G. more difficult - not until late 70s, 80s. Cost of building compilers VASTLY decreased during 60s Opened doors for P.C. development M16. Compiler-Compilers Given spec of language L, generate compiler Led to interesting work on compiler-oriented semantics, attribute grammars, etc.. New language specification techniques M17. Models of Implementation Interpreters (1965-71) In the early 60s, compiler models of implementation were emphasized Semantics of P.L. were understood with respect to the compiler (machine) Late 60s, it was realized that interpretive models (abstract machines) capture semantics more simply and directly (thanks to LISP experience) Fortran and Algol now easily understood using a simple operational run-time model Some such models were realized in hardware e.g. Burroughs B5500 Algol machine Modern stack architectures language directed machine design (Wortman 1969) ONE stack. NO registers. Algol was a stack-based language. M18. Language Definition Research (1960-70) Interpretive model Precise language definition tools based on abstract machines e.g. Algol 68 report in VDL (Vienna Definition Language) interpretive model in English Practical approach, BUT PL/I definition was 400 pages, Algol 60 was 50 pages

over-complexity compared to, say, LISP (2 pages) M19. Early Program Correctness (1963-69) First attempts at separation of specification (what to do) from program (how to do it) McCarthy, Naur, Dijkstra, Floyd, Hoare Development of the Axiomatic Approach e.g. {P} Q {S} {pre-condition} statement {post-condition} Hoare & Wirth developed axiomatic formal definition for Pascal More mathematically precise than interpretive models -> Led to later work on program synthesis, provable languages (Alphard, Euclid) M20. Testing Theory, Symbolic Execution Symbolic execution - Tracing of execution paths with symbolic values of variables, etc.. Build execution tree, where leaves represent completed executions Problems: infinite paths, generalization of input Testing theory - Selection of test cases Equivalence classes - path testing NO GOTOS Influenced move to No Goto M21. Verification, Program Synthesis Verification involves using axioms of form {Q} S {P} for statements and statement composition rules Must prove {true} Program {P} if program is to establish post-condition P Synthesis: given post-condition P, derive a program which satisfies {true} Program {P} Need only verify synthesized programs, not all possible ones Work on PLs for synthesis, e.g. PL/C-V M22. Semantic Models Denotational semantics (Scott) Semantic Model M = (E, D, ϕ) E - syntactic domain (programs of syntax) D - semantic domain (denotations of meaning) ϕ - semantic mapping function (E -> D) In theory, D can support Compiler Models!!! " D = ML Interpretive Models!!! D = Computations Mathematical Models!!! D = Algebraic functions the current definition of Denotational semantics Very powerful, general concept Important tool for language specification and understanding

Lasting influence on PL design M23. Abstraction Theory Abstraction = characterization of an entity by a (sufficient; depends on what youʼre interested in) subset of its attributes Such a subset determines an equivalence class which contains the original entity as an element Entities in the class are called realizations, refinements, or implementations of the abstraction If the attribute subset captures all of the essential attributes of an entity, we have a specification of the entity e.g. In programming, the input-output relation can be used as a specification!! e.g.! fcn sqrt(x) : z!!!! pre x >= 0!!!! post z * z = x If implementation specifies how to do it in terms of lower level abstractions stepwise refinement In PLs -> separation of interfaces, data abstraction M24. Pascal (1970) Designed as a reaction to the generality and complexity of Algol 68, PL/I Concerned with simplicity Conceptual level - simple axioms User level - readable, highly structured Implementation level - efficient, portable Consistent language designed by one person with one point of view Simple implementation led to widespread acceptance Conceptual simplicity Completely formal definition from start Wide use in verification research A strong argument for simplicity in language design which contrasted with Algol 68, PL/I,... Original Macintosh OS was written in a variant of Pascal. Now, Object Pascal = Delphi

M25. APL (early 60s) Time sharing began in 1960 Algebra for describing machines Early interactive languages Quiktran (1961-63) Joss (1963-64) BASIC (1965-66) APL designed by K.E. Iverson in early 60s as a machine description language Implemented as an interactive language (1967) Became enormously popular and successful with physicists and engineers as a sophisticated desk calculator Ingenious rich set of extensions of scalar operators to vectors and matrices - replaces most uses of loops in other languages e.g.!! A = [1 2 3; 1 2 4]!! B = [2 1-1; 2-3 3]!! A + B = [3 5 2; 3-1 7]!! A > B = [0 1 1; 0 1 1]!! A B = [2 2 3; 2 2 4]!! A x A > B = [0 2 3; 0 2 4]!!! NOTE: APL has right-left operator execution. No sense of order of!!! operations. Control structures built up using same ingenious operators e.g. (remember, right-to-left language)!! -> 15!!!! (goto Statement 15)!! -> 0!!!! (return)!! -> 2 x i 0!= I <- I - 1!! (if I := I-1 < 0 then return; else goto 2)!! -> c[i]!!!! (case statement: goto line c[i]) Iverson makes arguments against structured control and block structure APL was one of the most widely used interactive systems ever, and all subsequent systems have learned from it Popularity largely due to high quality interpretation Used more by scientists than programmers

M26. Structured Programming Philosophical thinking Removed GOTOs Dijkstra ~ 1969 Programming considered as a human activity 1965 - style important Goto considered harmful 1968 - began debate A discipline of programming 1976 Structured Programming Pascal specifically designed to be programmed structurally In narrowest sense, concerns development of programs from assignments, selections (if then else) and repetitions (while) These have easy axiomatizations and are provably sufficient for any computable function In the general sense, concerns better organization of program development progress to achieve Simplicity Understandability Easier to understand/read = better program Verifiability Easier to prove = better program Maintainability Easier to modify and update = better program Distinction between Programming in the small and in the large Structured programming affected language usage -> GOTOs not allowed! New languages lack GOTOs Large/Small distinction spurred thinking about new features for the large part as Dijkstra was focusing here on the small Led to modularity (classes) M27. Structured Model Building Specs of programming languages can themselves be viewed as complex programs Abstraction and stepwise refinement apply just as well to PL definitions as to the programs themselves Language design can be structured by first making high level decisions about overall structure of semantics then filling in lower levels by stepwise refinement. Most advanced system of structured model building for PLs is Rosseletʼs ADL Axiomatic Denotation Language (ADL) is used as a specification language for PLs Pascal and PL/I variant Speckle were examined in ADL for Rosseletʼs PhD Denotational aspects used for higher components of PL(combinational) Axioms for lower components (statements, etc..)

M28. Life Cycle Concept Splits SW life cycle into three distinct stages Concept formulation and requirements spec Software development Operation and Maintenance Stages can be further refined Empirical studies showed development less important than believed e.g. 16-year life cycle:!!! 6 person years - concept and requirements!!! 2 person years - SW development!!! 8 person years - operation and maintenance!!!! -> SW dev only 1/8 of total life cycle effort! 60s and 70s languages designed for rapid, cost-effective development Life cycle understanding led to emphasis on: Simplicity - e.g. one way rule If you make a good language design, there should only exist one way to express that idea. Perl intrinsically crummy for readability as anything can be implemented in an infinite number of ways. Early error detection Redundancy Can lead to higher quality through stating intention, the statement itself, and another interpretation. Much verification. Design features,...

M29. Modularity Subroutines known as early as 1951 Shared data known in Fortran Algol 60 in some ways a step backward - nested structure discouraged independent module development Simula Class is a flexible, general extension to Algol to fix this Information Hiding (Parnas 1972) Internal attributes hidden, external visible outside Independent development and verification possible e.g. CLU (1-4 is spec for stack)!! 1. stack <- push(x, stack)!! 2. stack <- push(z, stack)!! 3. stack <- pop(stack)!! 4. y <- top(stack)!!!! prove y = x!!!! A1. top(push(x, stack)) = x!! A2. pop(push(x, stack)) = stack!!! Axioms specify the internal spec of the stack model. This is all that!!! is needed to prove the stack. In essence, the axioms are the!!! interface to the class. All modern languages provide some kind of modules with information hiding M30. Data-oriented Languages Shift from program-centered to data-centered view considered fundamental Until late 70s/early 80s, programming still modeled after original numerical computing problems (algorithms) Shift to data-centered grew from applications such as data processing, where algorithms simple, but data highly structured Early work on COBOL and dialects such as IDS, IMS, etc.. - early database languages In late 70s, 80s, blooming of work on true data-centered thinking led to databases and database languages (SQL et al.) Database support now a critical issue for all new languages (e.g. Java) - lasting impact