CISC 860 September 14, Milestones in the History of PLs

Size: px
Start display at page:

Download "CISC 860 September 14, Milestones in the History of PLs"

Transcription

1 CISC 860 September 14, 2009 Milestones in the History of PLs P. Wegner, Phases of Language Development Discovery & Description Basic concepts discovered PLs regarded as tools only Elaboration & Analysis Models and theories of PLs Formal Languages Semantics Basic Implementation Techniques 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

2 M2. The Preparation of Programs for a Digital Computer (Wilkes, Wheeler, Gill ) 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 ( ) 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 ( ) 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

3 M5. Fortran ( ) (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 ( ) (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).

4 M7. Cobol ( ) 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 ( ) 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.

5 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 ( ) 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 ( ) 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

6 M12. Lisp ( ) 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 ( ) 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

7 M14. Language Theory ( ) 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 ( ) 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 ( ) 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 ( ) 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

8 over-complexity compared to, say, LISP (2 pages) M19. Early Program Correctness ( ) 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

9 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

10 M25. APL (early 60s) Time sharing began in 1960 Algebra for describing machines Early interactive languages Quiktran ( ) Joss ( ) BASIC ( ) 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

11 M26. Structured Programming Philosophical thinking Removed GOTOs Dijkstra ~ 1969 Programming considered as a human activity style important Goto considered harmful 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..)

12 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,...

13 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

Introduction. A. Bellaachia Page: 1

Introduction. A. Bellaachia Page: 1 Introduction 1. Objectives... 2 2. Why are there so many programming languages?... 2 3. What makes a language successful?... 2 4. Programming Domains... 3 5. Language and Computer Architecture... 4 6.

More information

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

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008. Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008. Outline. Language Definition, Translation. History of Programming Languages. Language Definition. There are several different ways one

More information

Concepts of Programming Languages

Concepts of Programming Languages Concepts of Programming Languages Lecture 1 - Introduction Patrick Donnelly Montana State University Spring 2014 Patrick Donnelly (Montana State University) Concepts of Programming Languages Spring 2014

More information

Programming Languages, Summary CSC419; Odelia Schwartz

Programming Languages, Summary CSC419; Odelia Schwartz Programming Languages, Summary CSC419; Odelia Schwartz Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design

More information

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

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science) Lecture 09 Ada to Software Engineering Mr. Mubashir Ali Lecturer (Dept. of dr.mubashirali1@gmail.com 1 Summary of Previous Lecture 1. ALGOL 68 2. COBOL 60 3. PL/1 4. BASIC 5. Early Dynamic Languages 6.

More information

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

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design General Concepts Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design 1 Abstractions in Programming Languages Abstractions hide details that

More information

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

Informal Semantics of Data. semantic specification names (identifiers) attributes binding declarations scope rules visibility Informal Semantics of Data semantic specification names (identifiers) attributes binding declarations scope rules visibility 1 Ways to Specify Semantics Standards Documents (Language Definition) Language

More information

Chapter 1. Preliminaries

Chapter 1. Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

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

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given MUHAMMAD FAISAL MIT 4 th Semester Al-Barq Campus (VGJW01) Gujranwala faisalgrw123@gmail.com MEGA File Solved MCQ s For Final TERM EXAMS CS508- Modern Programming Languages Question No: 1 ( Marks: 1 ) -

More information

Principles of Programming Languages. Lecture Outline

Principles of Programming Languages. Lecture Outline Principles of Programming Languages CS 492 Lecture 1 Based on Notes by William Albritton 1 Lecture Outline Reasons for studying concepts of programming languages Programming domains Language evaluation

More information

Programming Languages 2nd edition Tucker and Noonan"

Programming Languages 2nd edition Tucker and Noonan Programming Languages 2nd edition Tucker and Noonan" " Chapter 1" Overview" " A good programming language is a conceptual universe for thinking about programming. " " " " " " " " " " " " "A. Perlis" "

More information

COSC 2P90 Programming Languages & Object-Orientation

COSC 2P90 Programming Languages & Object-Orientation COSC 2P90 Programming Languages & Object-Orientation Hi! 1 Textbooks Main Text Comparative Programming Languages 3rd ed.; Wilson, LB & Clark, RG; Addison-Wesley (2001); ISBN 0-201-71012-9 Supplemental

More information

Chapter 1. Preliminaries

Chapter 1. Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 INFORMATION TECHNOLOGY TUTORIAL QUESTION BANK Name : PRINCIPLES OF PROGRAMMING LANGUAGES Code : A40511 Class : II B. Tech

More information

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

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan April 18,2017 V-U For Updated Files Visit Our Site : Www.VirtualUstaad.blogspot.com Updated. MidTerm Papers Solved

More information

Continuations provide a novel way to suspend and reexecute

Continuations provide a novel way to suspend and reexecute 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

More information

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

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered

More information

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS Objective PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS Explain what is meant by compiler. Explain how the compiler works. Describe various analysis of the source program. Describe the

More information

Functional Programming. Big Picture. Design of Programming Languages

Functional Programming. Big Picture. Design of Programming Languages Functional Programming Big Picture What we ve learned so far: Imperative Programming Languages Variables, binding, scoping, reference environment, etc What s next: Functional Programming Languages Semantics

More information

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

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES CS-3304 Introduction In Text: Chapter 1 & 2 COURSE DESCRIPTION 2 What will you learn? Survey of programming paradigms, including representative languages Language definition and description methods Overview

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 1

CS321 Languages and Compiler Design I. Winter 2012 Lecture 1 CS321 Languages and Compiler Design I Winter 2012 Lecture 1 1 COURSE GOALS Improve understanding of languages and machines. Learn practicalities of translation. Learn anatomy of programming languages.

More information

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

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Topic I Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapter 1 of Programming languages: Design and implementation (3RD EDITION)

More information

COMPILER DESIGN LECTURE NOTES

COMPILER DESIGN LECTURE NOTES COMPILER DESIGN LECTURE NOTES UNIT -1 1.1 OVERVIEW OF LANGUAGE PROCESSING SYSTEM 1.2 Preprocessor A preprocessor produce input to compilers. They may perform the following functions. 1. Macro processing:

More information

Chapter 3. Describing Syntax and Semantics

Chapter 3. Describing Syntax and Semantics Chapter 3 Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings of Programs:

More information

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

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions) By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable

More information

UNIT -1 1.1 OVERVIEW OF LANGUAGE PROCESSING SYSTEM 1.2 Preprocessor A preprocessor produce input to compilers. They may perform the following functions. 1. Macro processing: A preprocessor may allow a

More information

CS 242. Fundamentals. Reading: See last slide

CS 242. Fundamentals. Reading: See last slide CS 242 Fundamentals Reading: See last slide Syntax and Semantics of Programs Syntax The symbols used to write a program Semantics The actions that occur when a program is executed Programming language

More information

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

R13 SET Discuss how producer-consumer problem and Dining philosopher s problem are solved using concurrency in ADA. R13 SET - 1 III B. Tech I Semester Regular Examinations, November - 2015 1 a) What constitutes a programming environment? [3M] b) What mixed-mode assignments are allowed in C and Java? [4M] c) What is

More information

CS 415 Midterm Exam Spring 2002

CS 415 Midterm Exam Spring 2002 CS 415 Midterm Exam Spring 2002 Name KEY Email Address Student ID # Pledge: This exam is closed note, closed book. Good Luck! Score Fortran Algol 60 Compilation Names, Bindings, Scope Functional Programming

More information

Chapter 1 Preliminaries

Chapter 1 Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

Programming Languages Third Edition. Chapter 7 Basic Semantics

Programming Languages Third Edition. Chapter 7 Basic Semantics Programming Languages Third Edition Chapter 7 Basic Semantics Objectives Understand attributes, binding, and semantic functions Understand declarations, blocks, and scope Learn how to construct a symbol

More information

CSC 533: Organization of Programming Languages. Spring 2005

CSC 533: Organization of Programming Languages. Spring 2005 CSC 533: Organization of Programming Languages Spring 2005 Language features and issues variables & bindings data types primitive complex/structured expressions & assignments control structures subprograms

More information

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

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful? Chapter 1 :: Introduction Introduction Programming Language Pragmatics Michael L. Scott Why are there so many programming languages? evolution -- we've learned better ways of doing things over time socio-economic

More information

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

10/30/18. Dynamic Semantics DYNAMIC SEMANTICS. Operational Semantics. An Example. Operational Semantics Definition Process Dynamic Semantics DYNAMIC SEMANTICS Describe the meaning of expressions, statements, and program units No single widely acceptable notation or formalism for describing semantics Two common approaches:

More information

Com S 541. Programming Languages I

Com S 541. Programming Languages I Programming Languages I Lecturer: TA: Markus Lumpe Department of Computer Science 113 Atanasoff Hall http://www.cs.iastate.edu/~lumpe/coms541.html TR 12:40-2, W 5 Pramod Bhanu Rama Rao Office hours: TR

More information

2. Evolution of the Major Programming languages

2. Evolution of the Major Programming languages 2. Evolution of the Major Programming languages Genealogy of Common Programming Lang. 2.1 Plankalkül - 1945 Never implemented Advanced data structures floating point, arrays, records Invariants Notation:

More information

Concepts in Programming Languages

Concepts in Programming Languages Concepts in Programming Languages Marcelo Fiore Computer Laboratory University of Cambridge 2012 2013 (Easter Term) 1 Practicalities Course web page: with lecture

More information

1 A question of semantics

1 A question of semantics PART I BACKGROUND 1 A question of semantics The goal of this chapter is to give the reader a glimpse of the applications and problem areas that have motivated and to this day continue to inspire research

More information

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

Chapter 3:: Names, Scopes, and Bindings (cont.) Chapter 3:: Names, Scopes, and Bindings (cont.) Programming Language Pragmatics Michael L. Scott Review What is a regular expression? What is a context-free grammar? What is BNF? What is a derivation?

More information

CST-402(T): Language Processors

CST-402(T): Language Processors CST-402(T): Language Processors Course Outcomes: On successful completion of the course, students will be able to: 1. Exhibit role of various phases of compilation, with understanding of types of grammars

More information

Chapter 3 (part 3) Describing Syntax and Semantics

Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings

More information

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

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current 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

More information

Chapter 3. Describing Syntax and Semantics

Chapter 3. Describing Syntax and Semantics Chapter 3 Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings of Programs:

More information

Chapter 3. Describing Syntax and Semantics ISBN

Chapter 3. Describing Syntax and Semantics ISBN Chapter 3 Describing Syntax and Semantics ISBN 0-321-49362-1 Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the

More information

Chapter 5. Names, Bindings, and Scopes

Chapter 5. Names, Bindings, and Scopes Chapter 5 Names, Bindings, and Scopes Chapter 5 Topics Introduction Names Variables The Concept of Binding Scope Scope and Lifetime Referencing Environments Named Constants 1-2 Introduction Imperative

More information

Imperative Programming

Imperative Programming Naming, scoping, binding, etc. Instructor: Dr. B. Cheng Fall 2004 1 Imperative Programming The central feature of imperative languages are variables Variables are abstractions for memory cells in a Von

More information

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

Chapter 3. Semantics. Topics. Introduction. Introduction. Introduction. Introduction Topics Chapter 3 Semantics Introduction Static Semantics Attribute Grammars Dynamic Semantics Operational Semantics Axiomatic Semantics Denotational Semantics 2 Introduction Introduction Language implementors

More information

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

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106 CS 565: Programming Languages Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106 Administrivia Who am I? Course web page http://www.cs.purdue.edu/homes/peugster/cs565spring08/ Office hours By appointment Main

More information

CSE 307: Principles of Programming Languages

CSE 307: Principles of Programming Languages 1 / 57 CSE 307: Principles of Programming Languages Course Review R. Sekar Course Topics Introduction and History Syntax Values and types Names, Scopes and Bindings Variables and Constants Expressions

More information

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

Chapter 2. 5 * B => A V 6 7 (subscripts) S 1.n 1.n (data types) 1. Plankalkül - 1945 - Never implemented - Advanced data structures - floating point, arrays, records - Invariants - Notation: A(7) := 5 * B(6) 5 * B => A V 6 7 (subscripts) S 1.n 1.n (data types) 2. Pseudocodes

More information

CS 314 Principles of Programming Languages

CS 314 Principles of Programming Languages CS 314 Principles of Programming Languages Lecture 15: Review and Functional Programming Zheng (Eddy) Zhang Rutgers University March 19, 2018 Class Information Midterm exam forum open in Sakai. HW4 and

More information

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

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008. Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008. Outline. Abstractions for telling a computer how to do things. Computational Paradigms. Language Definition, Translation.

More information

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

Chapter 3:: Names, Scopes, and Bindings (cont.) Chapter 3:: Names, Scopes, and Bindings (cont.) Programming Language Pragmatics Michael L. Scott Review What is a regular expression? What is a context-free grammar? What is BNF? What is a derivation?

More information

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

Early computers (1940s) cost millions of dollars and were programmed in machine language. less error-prone method needed Chapter 1 :: Programming Language Pragmatics Michael L. Scott Early computers (1940s) cost millions of dollars and were programmed in machine language machine s time more valuable than programmer s machine

More information

St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad-00 014 Subject: PPL Class : CSE III 1 P a g e DEPARTMENT COMPUTER SCIENCE AND ENGINEERING S No QUESTION Blooms Course taxonomy level Outcomes UNIT-I

More information

Chapter 5 Names, Binding, Type Checking and Scopes

Chapter 5 Names, Binding, Type Checking and Scopes Chapter 5 Names, Binding, Type Checking and Scopes Names - We discuss all user-defined names here - Design issues for names: -Maximum length? - Are connector characters allowed? - Are names case sensitive?

More information

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

Topic IV. Parameters. Chapter 5 of Programming languages: Concepts & constructs by R. Sethi (2ND EDITION). Addison-Wesley, 1996. References: Topic IV Block-structured procedural languages Algol and Pascal Chapters 5 and 7, of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapter 5 of Programming languages: Concepts

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Lecture 3 Thomas Wies New York University Review Last week Names and Bindings Lifetimes and Allocation Garbage Collection Scope Outline Control Flow Sequencing

More information

Programming Languages and Program Development

Programming Languages and Program Development Programming Languages and Program Development 1 Programming Languages and How They Work Programming o Process used to create software programs Programmers o People who use programming languages to create

More information

Programmiersprachen (Programming Languages)

Programmiersprachen (Programming Languages) 2016-05-13 Preface Programmiersprachen (Programming Languages) coordinates: lecturer: web: usable for: requirements: No. 185.208, VU, 3 ECTS Franz Puntigam http://www.complang.tuwien.ac.at/franz/ps.html

More information

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

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages Chapter 2 Preview Evolution of the Major Programming Languages The Beginnings of Data Abstraction: SIMULA 67 Orthogonal Design: ALGOL 68 Some Early Descendants of the ALGOLs Programming Based on Logic:

More information

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

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher COP4020 ming Languages Compilers and Interpreters Robert van Engelen & Chris Lacher Overview Common compiler and interpreter configurations Virtual machines Integrated development environments Compiler

More information

A Small Interpreted Language

A Small Interpreted Language A Small Interpreted Language What would you need to build a small computing language based on mathematical principles? The language should be simple, Turing equivalent (i.e.: it can compute anything that

More information

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

Topic IV. Block-structured procedural languages Algol and Pascal. References: References: Topic IV Block-structured procedural languages Algol and Pascal Chapters 5 and 7, of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapters 10( 2) and 11( 1) of Programming

More information

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

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful? Organization of Programming Languages (CSE452) Instructor: Dr. B. Cheng Fall 2004 1 Why are there so many programming languages? Evolution -- we've learned better ways of doing things over time Socio-economic

More information

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

CS323 Lecture - Specifying Syntax and Semantics Last revised 1/16/09 CS323 Lecture - Specifying Syntax and Semantics Last revised 1/16/09 Objectives: 1. To review previously-studied methods for formal specification of programming language syntax, and introduce additional

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

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

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1 Table of Contents About the Authors... iii Introduction... xvii Chapter 1: System Software... 1 1.1 Concept of System Software... 2 Types of Software Programs... 2 Software Programs and the Computing Machine...

More information

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

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG) SKILL AREA 304: Review Programming Language Concept Computer Programming (YPG) 304.1 Demonstrate an Understanding of Basic of Programming Language 304.1.1 Explain the purpose of computer program 304.1.2

More information

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen COP4020 Programming Languages Functional Programming Prof. Robert van Engelen Overview What is functional programming? Historical origins of functional programming Functional programming today Concepts

More information

Chapter 11 :: Functional Languages

Chapter 11 :: Functional Languages Chapter 11 :: Functional Languages Programming Language Pragmatics Michael L. Scott Copyright 2016 Elsevier 1 Chapter11_Functional_Languages_4e - Tue November 21, 2017 Historical Origins The imperative

More information

CS 415 Midterm Exam Spring SOLUTION

CS 415 Midterm Exam Spring SOLUTION CS 415 Midterm Exam Spring 2005 - SOLUTION Name Email Address Student ID # Pledge: This exam is closed note, closed book. Questions will be graded on quality of answer. Please supply the best answer you

More information

Functional Languages. Hwansoo Han

Functional Languages. Hwansoo Han Functional Languages Hwansoo Han Historical Origins Imperative and functional models Alan Turing, Alonzo Church, Stephen Kleene, Emil Post, etc. ~1930s Different formalizations of the notion of an algorithm

More information

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

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages Chapter 2 Evolution of the Major Programming Languages ISBN 0-321-33025-0 2.2 Minimal Hardware Programming: Pseudocodes What was wrong with using machine code? Poor readability Poor modifiability Expression

More information

Introduction to Scientific Computing Languages

Introduction to Scientific Computing Languages 1 / 17 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Languages for Scientific Computing 2 / 17 What is a programming language? Languages for Scientific

More information

NOTE: Answer ANY FOUR of the following 6 sections:

NOTE: Answer ANY FOUR of the following 6 sections: A-PDF MERGER DEMO Philadelphia University Lecturer: Dr. Nadia Y. Yousif Coordinator: Dr. Nadia Y. Yousif Internal Examiner: Dr. Raad Fadhel Examination Paper... Programming Languages Paradigms (750321)

More information

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

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements Programming Languages Third Edition Chapter 9 Control I Expressions and Statements Objectives Understand expressions Understand conditional statements and guards Understand loops and variation on WHILE

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Values and Types We divide the universe of values according to types A type is a set of values and

More information

Informatica 3 Syntax and Semantics

Informatica 3 Syntax and Semantics Informatica 3 Syntax and Semantics Marcello Restelli 9/15/07 Laurea in Ingegneria Informatica Politecnico di Milano Introduction Introduction to the concepts of syntax and semantics Binding Variables Routines

More information

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

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING JAN BARTONÍČEK This paper's goal is to briefly explain the basic theory behind programming languages and their history

More information

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

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction Introduction (Cont.) Introduction to CSE 1325 Object Oriented Programming (Using Java) Sharma Chakravarthy Information Technology Laboratory (IT Lab) Computer Science and Engineering Department The University

More information

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

Chapter 3. Syntax - the form or structure of the expressions, statements, and program units Syntax - the form or structure of the expressions, statements, and program units Semantics - the meaning of the expressions, statements, and program units Who must use language definitions? 1. Other language

More information

Programming Language Pragmatics

Programming Language Pragmatics Chapter 10 :: Functional Languages Programming Language Pragmatics Michael L. Scott Historical Origins The imperative and functional models grew out of work undertaken Alan Turing, Alonzo Church, Stephen

More information

Design & Implementation Overview

Design & Implementation Overview P Fall 2017 Outline P 1 2 3 4 5 6 7 P P Ontological commitments P Imperative l Architecture: Memory cells variables Data movement (memory memory, CPU memory) assignment Sequential machine instruction execution

More information

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

10/26/17. Attribute Evaluation Order. Attribute Grammar for CE LL(1) CFG. Attribute Grammar for Constant Expressions based on LL(1) CFG Attribute Evaluation Order Determining attribute 2 expected_type evaluation order actual_type actual_type for any attribute grammar is a 5 complex problem, 1 [1] [2] requiring

More information

Introduction to Scientific Computing Languages

Introduction to Scientific Computing Languages 1 / 1 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Languages for Scientific Computing 2 / 1 What is a programming language? Languages for Scientific

More information

Programming Paradigms

Programming Paradigms Programming Paradigms Programming languages A Programming language is a notational system for describing tasks/computations in a machine and human readable form. Most computer languages are designed to

More information

Lecture 1: Course Introduction

Lecture 1: Course Introduction Lecture 1: Course Introduction CS164: Programming Languages and Compilers P. N. Hilfinger, 787 Soda Fall 2013 Acknowledgement. Portions taken from CS164 notes by G. Necula. Last modified: Thu Aug 29 16:03:34

More information

LECTURE 16. Functional Programming

LECTURE 16. Functional Programming LECTURE 16 Functional Programming WHAT IS FUNCTIONAL PROGRAMMING? Functional programming defines the outputs of a program as a mathematical function of the inputs. Functional programming is a declarative

More information

UNIT 3

UNIT 3 UNIT 3 Presentation Outline Sequence control with expressions Conditional Statements, Loops Exception Handling Subprogram definition and activation Simple and Recursive Subprogram Subprogram Environment

More information

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

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors

More information

Principles of Programming Languages [PLP-2015] Detailed Syllabus

Principles of Programming Languages [PLP-2015] Detailed Syllabus Principles of Programming Languages [PLP-2015] Detailed Syllabus This document lists the topics presented along the course. The PDF slides published on the course web page (http://www.di.unipi.it/~andrea/didattica/plp-15/)

More information

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.

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. CSE 3302 Test 1 1. Preprocessor macros are associated with: A. C B. Java C. JavaScript D. Pascal 2. (define x (lambda (y z) (+ y z))) is an example of: A. Applying an anonymous function B. Defining a function

More information

This book is licensed under a Creative Commons Attribution 3.0 License

This book is licensed under a Creative Commons Attribution 3.0 License 6. Syntax Learning objectives: syntax and semantics syntax diagrams and EBNF describe context-free grammars terminal and nonterminal symbols productions definition of EBNF by itself parse tree grammars

More information

Section 4: ALGOL. Evolution of Software Languages

Section 4: ALGOL. Evolution of Software Languages Section 4: ALGOL Evolution of Software Languages Theo D'Hondt Bachelor of Computer Science Faculty of Sciences and Bio-Engineering Sciences Vrije Universiteit Brussel Academic Year 2015-2016 Evolution

More information

Chapter 6 Control Flow. June 9, 2015

Chapter 6 Control Flow. June 9, 2015 Chapter 6 Control Flow June 9, 2015 Expression evaluation It s common in programming languages to use the idea of an expression, which might be a simple object function invocation over some number of arguments

More information

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

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

More information

SOFTWARE ARCHITECTURE 6. LISP

SOFTWARE ARCHITECTURE 6. LISP 1 SOFTWARE ARCHITECTURE 6. LISP Tatsuya Hagino hagino@sfc.keio.ac.jp slides URL https://vu5.sfc.keio.ac.jp/sa/ 2 Compiler vs Interpreter Compiler Translate programs into machine languages Compilers are

More information

Lecture 1: Course Introduction

Lecture 1: Course Introduction Lecture 1: Course Introduction CS164: Programming Languages and Compilers P. N. Hilfinger, 787 Soda Spring 2015 Acknowledgement. Portions taken from CS164 notes by G. Necula. Last modified: Wed Jan 21

More information

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

Recursive Functions of Symbolic Expressions and Their Computation by Machine Part I Recursive Functions of Symbolic Expressions and Their Computation by Machine Part I by John McCarthy Ik-Soon Kim Winter School 2005 Feb 18, 2005 Overview Interesting paper with By John Mitchell Interesting

More information