Programming Languages (CS )

Size: px
Start display at page:

Download "Programming Languages (CS )"

Transcription

1 Programming Languages (CS ) Dr. Sara Porat IBM Haifa Research Lab Spring 2011 Based on slides by Prof. Yossi Gil, Prof. Ron Pinter and Dr. Tal Cohen

2 Administration Course material Most material is provided in class and tutorials Lectures are mostly based on Watt s book Programming Language Concepts and Paradigms, by David A. Watt. Prentice Hall, Chapters 1-8,10,13-14 A list of other text books appear on the course web site Prerequisites and co-requisites are strictly enforced Running announcements will be sent through the course mailing list; please subscribe from the course s webpage Course staff Dr. Sara Porat Mr. Yuval Shimron (head TA) Requests and questions: shimron@cs.technion.ac.il porat@il.ibm.com

3 Assignments: Assignments and Grading Every 1-2 weeks Total weight is up to 20% (not optional) Teams of 2 (strict!) - matching services provided by teaching assistants Final exam: Date(s) set by the authorities Weight is 80% or more Final Grade: If exam > 50 then 0.8*exam + 0.2*assignments Else 1.0*exam

4 Few words on myself Background in programming languages

5 What are you going to study in this course? Explain the concepts underlying programming languages, and how languages use these concepts in different ways Examples will be given through a wide range of languages There are over 2,000 different languages; but there are basically few paradigms Theoretical part will give you a new way of seeing things Systematic approach for studying new languages Study (mostly during the tutorials) few (more) languages PASCAL (well designed imperative language) Java (leading OO language) ML (neat functional language) Prolog (elegant logic programming) Will prove useful for other courses: OOP Declarative Programming Compilation Software Engineering Semantics of Programming Languages

6 What are the goals of this course? Understand the design space of programming languages Conflicts and trade-offs between language constructs Implementation costs Develop a better understanding of the languages that you use by comparing them with other languages The study of programming languages is, in part, the study of conceptual frameworks for problem solving and software development

7 At the end of the course you ll know What distinguishes different programming languages from one another A variety of mechanisms in familiar and less familiar programming languages Programming in the functional language ML and in the logic language Prolog Some basic concepts in Pascal, Java and others Two main skills: How to learn a new language easily How to use languages correctly and productively There is nothing worse than writing JavaScript code like a C programmer

8 What kind of a beast is JavaScript? Imperative, With prototypes (object-based, but not object-oriented), Functions are first-class entities, Has lambda functions, With closures, Is weakly typed, Has dynamic typing, Has dynamic scoping, By the end of these course, most of these terms will be covered in depth. and a must-know for any modern website developer!

9 Possible approaches Define and compare paradigms of programming languages Present formal approaches to syntax and semantics Present ways of implementing and analyzing programs in various programming languages Show the concepts that must be dealt with by any programming language, and the possible variety in treatment

10 1 Introduction Course Topics *) 2 Values 3 Storage 4 Bindings 5 Abstractio n 6 Encapsulation 7 Type Systems 8 Sequencers 9 Concurrency 10 Imparative Paradigm 12 Object Paradigm 13 Functional Paradigm 11 Concurrent Paradigm 14 Logic Paradigm C Pascal ML Prolog *) according to Watt's book chapters

11 Who Needs Programming Languages? Computers' native tongue is machine language Programmers need higher level languages, because: They can't write machine language correctly They can't read machine language fluently They can't express their ideas in machine language efficiently Life is too short to program in machine language. A formal language is not only a man-machine interface but also a person-to-person language! Conclusion: Programming languages are a compromise between the needs of humans and the needs of machines

12 What is a Programming Language? A linguistic tool with formal syntax and semantics The syntax is concerned with the form of programs The semantics is concerned with the meaning Programming languages cannot be compared with natural languages in terms of their range, expressiveness or subtlety The natural linguist is restricted to analyzing existing languages Programming languages are consciously designed, and can be implemented on computers The syntax influences how programs are written, read and parsed The semantics determines how programs are composed, understood and interpreted

13 Compile Time vs. Run Time A programmer would like to find errors at compile time But some errors may not surface until run-time Methods that detect program errors at compile time are usually conservative Static analysis of source code Compile-time optimization Legacy modernization Impact analysis

14 Aren t All Languages Pretty Much the Same? The move from C to C++ isn t insurmountable Moving from C++ to Java is trivial And if you know Java, you pretty much know C#, too Even if the syntax isn t C-style used (e.g., Eiffel), it can t be that difficult, right? Why make such a fuss about it?

15 SQL: What s the Difference? SELECT first_name, last_name, age FROM user WHERE first_name = David ORDER BY age vs. SELECT first_name, last_name, age FROM user WHERE age > 18 AND age < 65 ORDER BY age Think about implementing these queries in C++. Would the code look just the same in both cases? The difference between the Declarative paradigm and the Imperative paradigm

16 What is a Paradigm? par a digm (Merriam-Webster Collegiate Dictionary) a philosophical and theoretical framework of a scientific school or discipline within which theories, laws, and generalizations and the experiments performed in support of them are formulated Thomas Kuhn ( ) A set of universally recognized scientific achievements that for a time provide a model for a community practitioners. Programming Paradigm (wikipedia) A programming paradigm is a fundamental style of computer programming. Paradigms differ in the concepts and abstractions used to represent the elements of a program (such as objects, functions, variables, constraints, etc.) and the steps that compose a computation (assignment, evaluation, data flows, etc.) Paradigms enrich the way we think about solving problems A family of languages with similar basic constructs and mental model of execution

17 Programming Language Paradigms Imperative Pascal C Logic Procedural bash C++ Object-Oriented Java Eiffel Prolog Datalog SQL Declarative CLOS Functional ML Lisp (CLOS: Common Lisp Object System)

18 Requirements from a Programming Language Universal: every problem (that can be solved at all by a computer) must have a solution that can be programmed in the language Express recursive functions Exception: domain-specific languages No recursion in standard SQL Natural: application domain specific The programming language should be reasonably natural for solving problems within its intended application area It s not reasonable to solve a GUI problem in FORTRAN or a compiler in Cobol Implementable: Neither mathematical notation Nor natural language Efficient Open to debate

19 Desiderata for a Programming Language Expressiveness Turing-completeness But also a practical kind of expressiveness: how easy is it to program simple concepts? Efficiency Open to debate: What is acceptably efficient? Recursion in functional languages is expressive but sometimes inefficient Strongly influenced by currently available computer architectures Also, efficiency in development and testing

20 Wirth's law is a computing adage made popular by Niklaus Wirth in 1995: Software is getting slower more rapidly than hardware becomes faster

21 Desiderata for Programming Languages (cont d) Simplicity - as few basic concepts as possible Sometimes a trade-off with convenience (C has for, who needs while and do-while?) Uniformity and consistency of concepts Why does for in Pascal require a single statement (including begin.. end construct) while repeat allows any number of statements? Abstraction - language should allow to factor out recurring patterns Clarity to humans The distinction = vs. == in C is a bit confusing Information hiding (encapsulation) and modularity Safety - possibility to detect errors at compile time

22 Less is More Two program fragments to find the n th Fibonacci number in Algol 68 x,y := 1; to n do (if x<y then x else y) := x+y; x := max(x,y); x,y := 1; to n do begin x,y := y,x; x := x+y end;

23 What Characterizes a Programming Language 1. Concepts How it handles values How it checks types How it stores values How it manipulates values How it manages control How it attaches names to values How it allows generalization => values, types and expressions => typing systems => storage => commands => sequencers => binding => abstraction

24 What Characterizes a Programming Language (cont d) 2. Paradigms Imperative programming: Fortran, Cobol, Algol, PL/I, C, Pascal, Ada, C++, Icon, Modula-2, Modula-3, Oberon, Basic Concurrent programming: Ada, Occam, Par-C. Object-oriented programming: Small-talk, Self, C++, Objective-C, Object Pascal, Beta, CLOS, Eiffel Functional programming: Lisp, Scheme, Miranda, ML Logic programming: Prolog, Prolog-dialects, Turbo-Prolog, Icon

25 The Imperative Paradigm Fortran, Algol, C, Pascal, Ada The program has a state reflected by storage and location It comprises commands (assignments, sequencers, etc.) that update the state of the program They can be grouped into procedures and functions There are also expressions and other functional features Models real-world processes, hence still dominant Lends itself to efficient processing (optimizing compilers etc.)

26 The Functional Paradigm Lisp, Scheme, ML, Haskell Everything is a function that takes arguments and returns results Don t really need assignment operation or sequencers Use recursive activation of functions instead of iteration Moreover, the functions are just another kind of value that can be computed (created), passed as a parameter, etc. Elegant, extensible, few basic concepts Used for list manipulation Requires a truly different perception Using an imperative programming style in ML is even worse than a word-for-word translation among natural languages

27 The Logic Programming Paradigm Prolog, constraint languages, database query languages Declaring some facts about objects and their relationships Defining some rules about objects and their relationships Predicates as the basis of execution: Asking questions about objects and their relationships A computation is implicit it shows what follows from the given facts and rules Emphasizes what is needed, rather than how to compute it Used for expert systems Will see the basics of Prolog later in the course

28 The Object-Oriented Paradigm C++, Smalltalk, Eiffel, Java The world has objects that contain both fields with values and operations (called methods) that manipulate the values Objects communicate by sending messages that ask the object to perform some method on its data Types of objects are declared using classes that can inherit the fields and methods of other classes Polymorphic calls: the ability to call a variety of functions using exactly the same interface Has become the primary paradigm because it seems to treat large systems better than other approaches Treated mainly in the follow-up course Object-Oriented Programming (236703) Will do a little bit of Java in the recitations

29 Program Development Requires a lot of administration 1. Use of some text editor or an Interactive Development Environment (IDE) to prepare the files that constitute the program 2. Some acquaintance with the underlying Operating System to manage the files 3. Handling compiler errors 4. Running the program

30 Preparing a program from GNU/Linux OS % rm -f hello.c; cat << EOF > hello.c /* ** hello.c: My first C program; it prints ** "Hello, World!", and dies. */ #include <stdio.h> int main(int argc, char *argv[], char *envp[]) { printf("hello, World!\n"); return 0; } EOF

31 Editing a file using gvim gtksourceview library in GNU/Linux to support editing of programs in more than 70 programming languages

32 Basic Syntax Elements The Language Tokens Literals Comments Keywords Identifiers Operation symbols (+, = ) Punctuation symbols

33 #include <stdio.h> int main(int argc, char *argv[], char *envp[]) { printf( Hello, World!\n ); return 0; } One comment (lines 1-4) Three keywords Two identifiers Two literals Eight symbols Hello World in C

34 Hello World in Pascal {hello.p: My very first Pascal program. It does not do too much --- it prints the string Hello, World! (followed by a new line), and then terminates.} program HelloWorld(output); begin WriteLn( Hello World! ) end. One comment Three kewords Three identifiers (two of them, marked in blue are pre-defined) One literal Four symbols

35 IDENTIFICATION DIVISION. PROGRAM-ID. HELLO-WORLD. * Hello, World! in COBOL ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. RM-COBOL. OBJECT-COMPUTER. RM-COBOL. DATA DIVISION. FILE SECTION. PROCEDURE DIVISION. MAIN-LOGIC SECTION. BEGIN. DISPLAY LINE 1 POSITION 1 ERASE EOS. DISPLAY Hello world! LINE 15 POSITION 10. STOP RUN. MAIN-LOGIC-EXIT. EXIT. Notice the heavy use of the character - in the identifiers Hello World in Cobol

36 #!/usr/bin/gawk -f # # Hello, World! in AWK # BEGIN { print( Hello, World! ) exit } Hello World in AWK Notice the keyword print to call an I/O routine

37 Types of Identifiers print AWK WriteLn printf C HelloWorld

38 // Hello world in Go package main import fmt func main() { fmt.printf( Hello World\n ) } Hello World in Go Printf is a library identifier

39 Hello World in Ada -- Hello World in Ada with Text_IO; procedure Hello_World is begin Text_IO.Put_Line( Hello World! ); end Hello_World; Put_Line is an identifier defined in the library Text_IO The library is imported through the keyword with

40 Hello World in Java // Hello.java: my first Java program. It prints // the string Hello World on the standard output // stream, and terminates. class HelloWorld { static public void main(string args[]) { System.out.println( Hello World! ); } } The library is imported automatically (by the compiler)

41 Symbols for Denoting Blocks The {} family of languages Java, C++, C#, AWK, GO, No delimiters, see Occam program (next foil) begin end (e.g., Pascal) Attaching a reference to the starting point e.g., end Hello_World in Ada if fi, case esac (Algol 68)

42 Hello World in Occam -- Hello world in Occam #INCLUDE hostio.inc #USE hostio.lib PROC hello.world (CHAN OF SP fs, ts) SEQ so.write.string.nl(fs, ts, Hello World! ) SEQ i = 1 FOR 10 SEQ so.write.int(fs, ts, i, 0) so.write.nl(fs, ts)

43 note Hello World in Eiffel class HELLO create run feature run do print ( Hello World!%N ) end end HELLO Hello World in Eiffel Notice the use of the keyword note to indicate a one-line comment

44 Extended Backus-Naur Form (EBNF) A meta-notation for describing the grammar of a language Terminals = actual legal strings, written as is, or inside Non-terminals = concepts of the language, written construct or construct or construct Rules = expanding a non-terminal to a series of NTs and Ts One non-terminal is designated as the start of any derivation A sequence of terminals not derivable from start symbol by rules of the grammar is illegal is choice among several possibilities [ ] encloses optional constructs { } encloses zero or more repetitions Example: if-stmt = if expression then statement [ else statement ]

45 Example of EBNF expression = term { add-op term } term = factor { mult-op factor } factor = variable-name number add-op = + - mult-op = / Is a + 2/ b - c7 a legal expression? Yes, because there is a sequence of rule applications from expression that yields this string (these can be drawn as a syntax tree )

46 Observations on Syntax If there are several possible syntax trees for the same sequence of terminal symbols, the sequence is syntactically ambiguous, and that often leads to semantic ambiguity (several possible ways to understand the meaning) Good programming language design avoids ambiguity There are some syntactic rules that cannot be expressed just using EBNF (which gives context-free grammars) Every variable used is previously declared The number of arguments in a procedure call equals the number of arguments in the declaration of the procedure Much more on grammars and identifying legal programs you will learn in the courses Automata and Formal Languages and Compilation

47 Development Environments and The Program Starting Point The program code refers to the code written by the programmers (user code) and a set of imported (standard) libraries Defining which files constitute a program and the starting point Autarchic approach Metaphysic approach Holistic approach

48 Autarchic approach One of the keywords denotes the starting point The keyword program in Pascal The keyword BEGIN in AWK A program in Pascal and AWK contains one single file No standard libraries

49 Metaphysic Approach The program starts from a function with a specific name The name is not a keyword The starting point is not part of the language definition Most implementations of C use the name main to denote the starting function The implementation of C for Windows uses the name WinMain The compiler denotes which files constitute the program

50 /* Hello world in C for MS-Windows */ #include <windows.h> C for MS-Windows int PASCAL WinMain(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR CmdLine, int Show) { MessageBox( GetActiveWindow(), Hello World!, Hello Windows World, MB_OK); return 0; }

51 Not part of the grammar Holistic Approach Yet, the language defines how to identify the files that constitute the program and what is the starting point These definitions are independent on the development environments (platforms) Eiffel (through the Cluster file), Java

52 Language Processors Systems/applications that process programs (code): Compiler Interpreter Syntax directed editor Program checker Program verifier Studied in other courses: Compilation Program verification Software engineering

53 Relations to Other Fields in Computer Science Databases and Information Retrieval: Query languages - languages for manipulating databases Human-Computer Interaction: Programming Languages are designed to be written and read by humans Operating Systems: Input-Output support. Storage management. Shells are in fact Programming Languages. Computer Architecture: Programming Language design is influenced by architecture and vice versa. Instructions sets are Programming Languages. Hardware design languages.

54 Closely Related Topics Automata and Formal Languages, Computability: Provide the foundation for much of the underlying theory. Compilation: The technology of processing programming languages. Software engineering: The process of building software systems.

55 Language Inception and Evolution Initial definition by a single person: Lisp (McCarthy), APL (Iverson), Pascal (Wirth), REXX (Cowlishaw), C++ (Stroustrup), Java (Gosling) small team: C (Kernighan and Ritchie), ML (Milner et al.), Prolog (Clocksin and Mellish), Icon (Griswold and Griswold) committee: FORTRAN, Algol, PL/1, Ada Some survived, many more perished usability compilation feasibility dependence on platform politics and sociology Most successful languages were taken over by standards committees (ANSI, IEEE, ISO, )

56 1950 Language Genealogy (till 1990) 1960 Algol-60 Fortran Cobol Lisp 1970 Simula Smalltalk Pascal Algol-68 PL/I C Prolog ML 1980 Ada Miranda 1990 OO lang. C++ Imperative and Concurrent lang. Haskell Functional lang.

57 Historical Background Until early 1950s: no real programming languages, but rather a mixture of assembly languages and other aids for machine code programming Early 1950s: the Laning and Zierler System (MIT): a simple algebraic language, a library of useful functions. 1954: Definition of FORTRAN (FORmula TRANslator). Originally for numerical computing. Symbolic expressions, subprograms with parameters, arrays, for loops, if statements, no blocks, weak control structures 1957: first working compiler

58 Early 1960s: COBOL: Data processing. Means for data description. Algol 60: Blocks, modern control structures One of the most influential imperative languages Gave rise to the Algol-like languages for two decades (Pascal, PL/1, C, Algol 68; Simula, Ada) Lisp (list processing language): symbolic expressions (rather than numerical), computation by list manipulation, garbage collection; the first functional language Mid 1960s: Historical Background (cont d) Foundation for S-expressions: defined recursively as either single data objects called "atoms" or lists of S-expressions (= 4 (+ 2 2)) PL/1: an attempt to combine concepts from numerical computation languages (FORTRAN, Algol 60) and data processing languages (Cobol). Simula: object oriented, abstract data types

59 : Several OO languages: Smalltalk, C++, Eiffel Logic Programming: Prolog Functional Programming: ML, Miranda, Haskell Ada: Another attempt, more successful than PL/I, for a general purpose language, including concurrency. Specific usages: SNOBOL, Icon, Awk, REXX, Perl: String manipulation and scripting SQL: Query language for relational databases Mathematica, Matlab, Python: Mathematical applications... Historical Background

60 1990-present: Historical Background Object oriented + WWW: Java, C# Scripting + [OO] + WWW: Perl, Python, PHP, Ruby Client-Side scripting: JavaScript Reuse and design patterns become useful and popular Flexibility in choice of language and moving among languages We shall NOT refer to: Rule languages HyperText Markup Language (HTML) Extensible Markup Language (XML)

61 Program Execution Model A language design must be specific about how all basic operations are done Predict program running time Examples of execution models: Fortran: Flat register machine No stacks, no recursion Memory arranged as linear array Algol family: Stack of activation records Heap storage: an area of memory used for dynamic memory allocation Smalltalk: Objects, communicating by messages

Programming Languages (CS )

Programming Languages (CS ) Programming Languages (CS 234319) Prof. Ron Pinter Dept. of CS, Technion Spring 2007 Why Not Study Programming Languages? The expressive power of all programming languages and computational devices is

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

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

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

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

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

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

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

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

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

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

Comp 333: Concepts of Programming Languages Fall 2016

Comp 333: Concepts of Programming Languages Fall 2016 Comp 333: Concepts of Programming Languages Fall 2016 Instructor: Professor Schwartz History Syntax and Semantics Compilers Language Constructs Names, Binding, Scoping, Data Types Expressions, Control

More information

CSCI 3136 Principles of Programming Languages

CSCI 3136 Principles of Programming Languages CSCI 3136 Principles of Programming Languages Summer 2013 Faculty of Computer Science Dalhousie University 1 / 100 CSCI 3136 Principles of Programming Languages Summer 2013 Aminul Islam Faculty of Computer

More information

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

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented Course Goal CMSC 330: Organization of Programming Languages Introduction Learn how programming languages work Broaden your language horizons! Different programming languages! Different language features

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

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

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

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN What languages do you know? CSC 326H1F, Programming Languages The usual suspects: C, C++, Java fine languages nearly the same Perhaps you've also learned some others? assembler Basic, Visual Basic, Turing,

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

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

Programming Language Concepts 1982, 1987, Outline. Period

Programming Language Concepts 1982, 1987, Outline. Period Programming Language Concepts 1982, 1987, 1997 Mehdi Jazayeri Distributed Systems Group Technische Universität Wien mjazayeri@alum.mit.edu http://www.infosys.tuwien.ac.at Outline Computer science environment

More information

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

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing What Is Computer Science? The Scientific Study of Computation CMPSCI 630: Programming Languages Introduction Spring 2009 (with thanks to Robert Harper) Expressing or Describing Automating Understanding

More information

Introduction to Computer Science I

Introduction to Computer Science I Introduction to Computer Science I CSE 1020 www.cse.yorku.ca/course/1020 Programming Contests in September and October Everyone is welcome to participate in these contests. The students who will represent

More information

Programming Languages 1. Introduction. Oscar Nierstrasz

Programming Languages 1. Introduction. Oscar Nierstrasz Programming Languages 1. Introduction Oscar Nierstrasz Roadmap > Course Schedule > Programming Paradigms > A Quick Tour of Programming Language History Programming Languages Lecturer: Assistants: WWW:

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

Seminar in Programming Languages

Seminar in Programming Languages Seminar in Programming Languages Shuly Wintner Fall 2010-11 Course web site: http://cs.haifa.ac.il/~shuly/teaching/10/plseminar/ Course Goals Programming Language Concepts A language is a conceptual universe

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

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

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

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

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

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

Thanks! Review. Course Goals. General Themes in this Course. There are many programming languages. Teaching Assistants. John Mitchell.

Thanks! Review. Course Goals. General Themes in this Course. There are many programming languages. Teaching Assistants. John Mitchell. 1 CS 242 Thanks! Review John Mitchell Final Exam Wednesday Dec 8 8:30 11:30 AM Gates B01, B03 Teaching Assistants Mike Cammarano TJ Giuli Hendra Tjahayadi Graders Andrew Adams Kenny Lau Vishal Patel and

More information

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified Course Goal CMSC 330: Organization of Programming Languages Introduction Instructors: Mike Hicks, Chau-Wen Tseng TAs: Srividya Ramaswamy, Eylul Dogruel, Khoa Doan Learn how programming languages work!

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

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

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University CS383 PROGRAMMING LANGUAGES Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University KENNY Q. ZHU Research Interests: Programming Languages Probabilistic Programming Data Processing Concurrency

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

Logic Programming II & Revision

Logic Programming II & Revision Logic Programming II & Revision Gerardo Schneider Department of Informatics University of Oslo 1 Some corrections (1) hsiblings(x,y) :- child(x,parent), child(y,parent), X \== Y, child(x,parent1), child(y,parent2),

More information

Compiler Construction

Compiler Construction Compiler Construction WWW: http://www.cs.uu.nl/wiki/cco Contact: J.Hage@uu.nl Edition 2016/2017 Course overview 2 What is compiler construction about? Programs are usually written in a high-level programming

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

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

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction Lecture 13: Object orientation Object oriented programming Introduction, types of OO languages Key concepts: Encapsulation, Inheritance, Dynamic binding & polymorphism Other design issues Smalltalk OO

More information

CS A331 Programming Language Concepts

CS A331 Programming Language Concepts CS A331 Programming Language Concepts Lecture 4 Programming Language Semantics and Code Generation February 3, 2014 Sam Siewert PLP Companion Materials CD-ROM is On-Line: http://booksite.elsevier.com/9780123745149/?isbn=978

More information

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

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona 1/37 CSc 372 Comparative Programming Languages 2 : Functional Programming Department of Computer Science University of Arizona collberg@gmail.com Copyright c 2013 Christian Collberg 2/37 Programming Paradigms

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

CSc 520. Course Outline (Subject to change) Course Outline (Subject to change)... Principles of Programming Languages. Christian Collberg

CSc 520. Course Outline (Subject to change) Course Outline (Subject to change)... Principles of Programming Languages. Christian Collberg Slide 0 2 Course Outline (Subject to change) This course will define, analyze and evaluate important concepts found in current programming languages. Its goals are to build an ability to evaluate and compare

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

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo Principles in Programming: Orientation & Lecture 1 1 Course Objectives Introduce various subjects in computer science through puzzles and problems Most problems came from ICPC 2 Textbook Programming Challenges

More information

MIDTERM EXAMINATION - CS130 - Spring 2005

MIDTERM EXAMINATION - CS130 - Spring 2005 MIDTERM EAMINATION - CS130 - Spring 2005 Your full name: Your UCSD ID number: This exam is closed book and closed notes Total number of points in this exam: 231 + 25 extra credit This exam counts for 25%

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

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

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

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers Administrivia Introduction to Programming Languages and Compilers CS164 11:00-12:00 MWF 306 Soda Notes by G. Necula, with additions by P. Hilfinger Course home page: http://www-inst.eecs.berkeley.edu/~cs164

More information

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

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda Introduction to Programming Languages and Compilers CS164 11:00-12:00 MWF 306 Soda Notes by G. Necula, with additions by P. Hilfinger Prof. Hilfinger CS 164 Lecture 1 1 Administrivia Course home page:

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

LECTURE 18. Control Flow

LECTURE 18. Control Flow LECTURE 18 Control Flow CONTROL FLOW Sequencing: the execution of statements and evaluation of expressions is usually in the order in which they appear in a program text. Selection (or alternation): a

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

Chapter 2. Chapter 2

Chapter 2. Chapter 2 1. Plankalkül 1945(program calculus) pp. - 41 - Never implemented but based on Z4 - Advanced data structures(scalar type and for loop) - integer, floating point, arrays, records - Mathematical expression,

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

What is programming? Elements of Programming Languages. From machine code to programming languages. What is a programming language?

What is programming? Elements of Programming Languages. From machine code to programming languages. What is a programming language? What is programming? Elements of Programming Languages Lecture 0: Introduction and Course Outline James Cheney University of Edinburgh September 18, 2017 Computers are deterministic machines, controlled

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

1DL321: Kompilatorteknik I (Compiler Design 1) Introduction to Programming Language Design and to Compilation

1DL321: Kompilatorteknik I (Compiler Design 1) Introduction to Programming Language Design and to Compilation 1DL321: Kompilatorteknik I (Compiler Design 1) Introduction to Programming Language Design and to Compilation Administrivia Lecturer: Kostis Sagonas (kostis@it.uu.se) Course home page: http://www.it.uu.se/edu/course/homepage/komp/h18

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

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

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

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

Weeks 6&7: Procedures and Parameter Passing

Weeks 6&7: Procedures and Parameter Passing CS320 Principles of Programming Languages Weeks 6&7: Procedures and Parameter Passing Jingke Li Portland State University Fall 2017 PSU CS320 Fall 17 Weeks 6&7: Procedures and Parameter Passing 1 / 45

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

CSc 372 Comparative Programming Languages

CSc 372 Comparative Programming Languages CSc 372 Comparative Programming Languages The University of Arizona Fall Semester, 2006 CSc 372, Fall 2006 Introduction Slide 1 CSc 372, Fall 2006 Introduction Slide 2 Introduction Instructor Teaching

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

Why are there so many programming languages?

Why are there so many programming languages? Chapter 1 :: Introduction Programming Language Pragmatics, Fourth Edition Michael L. Scott Copyright 2016 Elsevier 1 Chapter01_ Introduction_4e - Tue November 21, 2017 Introduction Why are there so many

More information

CS101 Introduction to Programming Languages and Compilers

CS101 Introduction to Programming Languages and Compilers CS101 Introduction to Programming Languages and Compilers In this handout we ll examine different types of programming languages and take a brief look at compilers. We ll only hit the major highlights

More information

Programming Languages (CSCI 4430/6430) History, Syntax, Semantics, Essentials, Paradigms

Programming Languages (CSCI 4430/6430) History, Syntax, Semantics, Essentials, Paradigms Programming Languages (CSCI 4430/6430) History, Syntax, Semantics, Essentials, Paradigms Carlos Varela Rennselaer Polytechnic Institute August 30, 2016 C. Varela 1 The first programmer ever Ada Augusta,

More information

1DL321: Kompilatorteknik I (Compiler Design 1)

1DL321: Kompilatorteknik I (Compiler Design 1) Administrivia 1DL321: Kompilatorteknik I (Compiler Design 1) Introduction to Programming Language Design and to Compilation Lecturer: Kostis Sagonas (kostis@it.uu.se) Course home page: http://www.it.uu.se/edu/course/homepage/komp/ht16

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

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

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

CMPT 379 Compilers. Anoop Sarkar.

CMPT 379 Compilers. Anoop Sarkar. CMPT 379 Compilers Anoop Sarkar http://www.cs.sfu.ca/~anoop! Program Compiler Machine Code Input Runtime Output 2012-11- 01 2 main(){char *c="main(){char *c=%c%s%c;printf(c,34,c,34);}";printf(c,34,c,34);}!

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

Low-Level Languages. Computer Programs and Programming Languages

Low-Level Languages. Computer Programs and Programming Languages Computer Programs and Programming Languages What is a computer program? Set of instructions that directs computer to perform tasks Programming used to write instructions 1 Computer Programs and Programming

More information

Preliminaries. 1. Preliminaries 1.1 Administration. 1.2 Motivation 1.3 Hello, World!

Preliminaries. 1. Preliminaries 1.1 Administration. 1.2 Motivation 1.3 Hello, World! Section 1 Preliminaries 1. Preliminaries 1.1 Administration 1.2 Motivation 1.3 Hello, World! 1.1. Administration Where are we? 1. Preliminaries 1.1. Administration 1. Preliminaries 1.1 Administration 1.2

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Type Systems, Names and Binding CMSC 330 - Spring 2013 1 Topics Covered Thus Far! Programming languages Ruby OCaml! Syntax specification Regular expressions

More information

CS 113: Introduction to

CS 113: Introduction to CS 113: Introduction to Course information MWF 12:20-1:10pm 1/21-2/15, 306 Hollister Hall Add/drop deadline: 1/28 C Instructor: David Crandall See website for office hours and contact information Prerequisites

More information

Compilers. Prerequisites

Compilers. Prerequisites Compilers Prerequisites Data structures & algorithms Linked lists, dictionaries, trees, hash tables Formal languages & automata Regular expressions, finite automata, context-free grammars Machine organization

More information

What is a programming language?

What is a programming language? Overview Introduction Motivation Why study programming languages? Some key concepts What is a programming language? What is a programming language?...there is no agreement on what a programming language

More information

CSCI.4430/6969 Programming Languages Lecture Notes

CSCI.4430/6969 Programming Languages Lecture Notes CSCI.4430/6969 Programming Languages Lecture Notes August 28, 2006 1 Brief History of Programming Languages Ada Augusta, the Countess of Lovelace, the daughter of the poet Lord Byron, is attributed as

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

Compiler Construction D7011E

Compiler Construction D7011E Compiler Construction D7011E Lecture 2: Lexical analysis Viktor Leijon Slides largely by Johan Nordlander with material generously provided by Mark P. Jones. 1 Basics of Lexical Analysis: 2 Some definitions:

More information

COMP 201: Principles of Programming

COMP 201: Principles of Programming COMP 201: Principles of Programming 1 Learning Outcomes To understand what computing entails and what the different branches of computing are. To understand the basic design of a computer and how it represents

More information

CS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013

CS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013 CS252 Advanced Programming Language Principles Prof. Tom Austin San José State University Fall 2013 What are some programming languages? Why are there so many? Different domains Mobile devices (Objective

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

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

CS 330 Lecture 18. Symbol table. C scope rules. Declarations. Chapter 5 Louden Outline CS 0 Lecture 8 Chapter 5 Louden Outline The symbol table Static scoping vs dynamic scoping Symbol table Dictionary associates names to attributes In general: hash tables, tree and lists (assignment ) can

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

LECTURE 1. Overview and History

LECTURE 1. Overview and History LECTURE 1 Overview and History COURSE OBJECTIVE Our ultimate objective in this course is to provide you with the knowledge and skills necessary to create a new programming language (at least theoretically).

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

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

Evolution of PL s. EECS 476, Prog. Lang. Design/ page 1

Evolution of PL s. EECS 476, Prog. Lang. Design/ page 1 Evolution of PL s I. Ways of Organizing the evolution of PL s A. Types of PL s [Sebesta p. 37] 1. Procedural (Imperative) [F&G, p. 39] 2. Functional (applicative) [F&G, p. 41] 3. Logical (declarative)

More information

SE352b: Roadmap. SE352b Software Engineering Design Tools. W3: Programming Paradigms

SE352b: Roadmap. SE352b Software Engineering Design Tools. W3: Programming Paradigms SE352b Software Engineering Design Tools W3: Programming Paradigms Feb. 3, 2005 SE352b, ECE,UWO, Hamada Ghenniwa SE352b: Roadmap CASE Tools: Introduction System Programming Tools Programming Paradigms

More information

Lecture 6 Introduction to Objects and Classes

Lecture 6 Introduction to Objects and Classes Lecture 6 Introduction to Objects and Classes Outline Basic concepts Recap Computer programs Programming languages Programming paradigms Object oriented paradigm-objects and classes in Java Constructors

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

Closures. Mooly Sagiv. Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming

Closures. Mooly Sagiv. Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming Closures Mooly Sagiv Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming Summary 1. Predictive Parsing 2. Large Step Operational Semantics (Natural) 3. Small Step Operational Semantics

More information

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo Principles in Programming: Orientation & Lecture 1 1 Course Objectives Introduce various subjects in computer science through puzzles and problems Most problems came from ICPC 2 Introduction Instructor:

More information