Why study programming languages?

Slides:



Advertisements
Similar presentations
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Advertisements

Chapter 1: Preliminaries
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
ISBN Chapter 1 Preliminaries. Copyright © 2007 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
CS 354 Overview. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Course Topics What is a programming language? What features do programming.
Programming Languages Structure
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
ISBN Chapter 1 Preliminaries. Copyright © 2007 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Programming Language Concepts
Chapter 1 Preliminaries.
Chapter 1 Preliminaries. Copyright © 2012 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of Programming Languages.
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
CS 355 – Programming Languages
CS 363 Comparative Programming Languages
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
ICS 313 Fundamentals of Programming Languages Instructor: Abdul Wahid Wali Lecturer, CSSE, UoH
ISBN CS 354 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Course Topics What is a programming language? What features.
ISBN Chapter 1 Preliminaries. Copyright © 2015 Pearson. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of Programming.
ISBN Chapter 1 Preliminaries. Copyright © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
ISBN Chapter 1 Preliminaries. 1-2 Chapter 1 Preliminaries 1.1 Reasons for Studying Concepts of Programming Languages 1.2 Programming Domains.
The College of Saint Rose CIS 433 – Programming Languages David Goldschmidt, Ph.D. from Concepts of Programming Languages, 9th edition by Robert W. Sebesta,
ISBN Chapter 1 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Programming Language History and Evolution
The language focusses on ease of use
Concepts of Programming Languages
Chapter 1 Preliminaries.
Concepts of Programming Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
PROGRAMMING LANGUAGES
1.1 Reasons to study concepts of PLs
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Programming Language History and Evolution
Evolution of programming languages
Chapter 1 Preliminaries.
Chapter 1 Introduction.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminary. Chapter 1 Preliminary 1.1 Reasons for Studying Concepts of Programming Languages Increased capacity to express ideas Improved.
Lecture 2 Concepts of Programming Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Principles of Programming Languages
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.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Programming Languages, Preliminaries, History & Evolution
Reasons To Study Programming Languages
Chapter 1 Preliminaries.
Lecture 2 Concepts of Programming Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Presentation transcript:

Why study programming languages? Increased capacity to express ideas Constructs we can express can be constrained by the language we know Improved background for choosing appropriate language Should choose language appropriate for task not just the one that we know Increased ability to learn new languages Learning new languages and learning language fundamentals enables us to learn other languages more easily Better understanding of the significance of implementation Aids in finding bugs Enables us to write more efficient code Better use of languages that are already known looking at the concept of languages (threads, exceptions, polymorphism) encourages uses of those things in languages already known (Java) Overall advancement of computing Educated people will encourage use of good languages Section 1.1

Computer Applications & Languages Scientific Number crunching, weather forecasting, codebreaking, plane/missile trajectories Language requirements: Real numbers Large amount of calculations (hence efficient) Arrays, matrices Selection, Counting loops Languages: Assembly, Fortran, Algol and descendants of Algol (Pascal, Modula, Ada, PL/I) Section 1.2

Computer Applications & Languages Scientific Applications Language requirements: reals, efficiency, arrays, loops Languages: Fortran, assembly, Algol Business Financial transactions Language requirements: Report production Exact (but low) precision (e.g., money) Character data Languages: COBOL, RPG Section 1.2

Computer Applications & Languages Scientific Applications: reals, efficiency, arrays, loops Fortran, assembly, Algol Business Applications: reports, decimal precision, characters COBOL, RPG Artificial Intelligence Deductive systems, reasoning, machine learning Language requirements: Symbolic computation (“names” not numbers) Lists of data (not arrays) Recursion Languages: LISP, Scheme, Prolog Section 1.2

Computer Applications & Languages Scientific Applications: reals, efficiency, arrays, loops Fortran, assembly, Algol Business Applications: reports, decimal precision, characters COBOL, RPG AI Applications: Symbolic computation, Lists of data, Recursion LISP, Scheme, Prolog Systems Programming Operating systems, compilers, debuggers, etc. Language requirements: FAST execution External device interfaces Languages: C, Assembly Section 1.2

Computer Applications & Languages Scientific Applications: reals, efficiency, arrays, loops Fortran, assembly, Algol Business Applications: reports, decimal precision, characters COBOL, RPG AI Applications: Symbolic computation, Lists of data, Recursion LISP, Scheme, Prolog Systems Programming: fast, external devices C, Assembly Web Software Language requirements: dynamic web content, database access Languages: XHTML, JavaScript, PHP, Ruby, Java Section 1.2

Language Influences Architecture Programming Methodologies von Neumann Memory CPU ALU Programming Methodologies Unstructured Procedure-oriented (top-down, functions, …) Data-oriented (ADT, OO) Section 1.4

Language Categories (most important ones) Imperative Functional Logic Object oriented (extension of imperative) Section 1.5

Imperative Programming Languages Central features are variables and assignment statements Design based on the von Neumann architecture Variables model memory cells Assignment statement models the “piping operation” – operands piped from memory to CPU; result piped from CPU to memory Section 1.5

Functional Programming Languages Main features are functions and function calls (recursion instead of iteration) Design is based upon mathematical functions Section 1.5

Logic programming languages Also called rule-based languages and declarative languages Programmer gives rules that specify what a solution looks like and not how desired solution is achieved Section 1.5

Object Oriented Programming Languages Provides a feature for building objects Provides a method for specifying inheritance Provides polymorphism Same name for different functions (method overriding) Dynamic binding of function call to function body Section 1.5

Implementation methods Compilation Interpretation Hybrid Section 1.7

Compilation Compiler translates program into machine language that is executed on the computer Execution is fast Section 1.7

Compilation source machine code Lexical analyzer Linker Syntax executable Semantic analyzer/ Intermediate code generation Optimizer Code generator machine code Section 1.7

Interpreter Pure interpretation means there is no translation of the source program Program called an interpreter is executed by the computer Interpreter fetches/decodes/executes source program Slower and requires more space than the compilation process Section 1.7

Hybrid Source program is translated into an intermediate code that is then interpreted Examples Java is translated into byte code that can be interpreted Perl is compiled before execution in order to detect compilation errors (unlike shell languages) Section 1.7