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

Slides:



Advertisements
Similar presentations
Chapter 1: Preliminaries
Advertisements

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.
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.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
Programming Language Concepts
Chapter 1 Preliminaries. Copyright © 2012 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of Programming Languages.
CS 355 – Programming Languages
Programming Languages Introduction. Overview Motivation Why study programming languages? Some key concepts.
CS 363 Comparative Programming Languages
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
Chapter 1 Preliminaries CS Concepts of Programming Languages.
Programming Languages Summer
1 Programming Languages Introduction. 2 Overview Motivation Why study programming languages? Some key concepts.
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
Programming Languages Design Considerations (Qualities) Readability –Simplicity and Clarity –Orthogonality –Control Statements –Data Types and Structures.
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 © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point.
Programming Languages Introduction. Overview Motivation Why study programming languages? Some key concepts.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
Concepts of Programming Languages
Chapter 1 Preliminaries.
Concepts of Programming Languages
CSCI 3370: Principles of Programming Languages Introduction
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
PROGRAMMING LANGUAGES
Chapter 1 Reasons to study concepts of PLs Programming Domains
1.1 Reasons to study concepts of PLs
Chapter 1 Preliminaries.
Programming Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
CS 3304 Comparative Languages Fall 2011
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.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
CS 3304 Comparative Languages Fall 2011
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Programming Languages
Von Neumann Architecture
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.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Presentation transcript:

Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria –What influences PL design? –Tradeoffs faced by programming languages –Implementation methods –Programming environments

Copyright © 1998 by Addison Wesley Longman, Inc. 2 Why study Programming Language Concepts? Increased capacity to express programming concepts Improved background for choosing appropriate languages Increased ability to learn new languages Understanding the significance of implementation Increased ability to design new languages Overall advancement of computing

Copyright © 1998 by Addison Wesley Longman, Inc. 3 Programming Domains Scientific applications Business applications Artificial intelligence Systems programming Scripting languages Special purpose languages

Copyright © 1998 by Addison Wesley Longman, Inc. 4 Language Evaluation Criteria Readability Writability Reliability Cost Etc…

Copyright © 1998 by Addison Wesley Longman, Inc. 5 Evaluation Criteria: Readability How is it for one to read and understand programs written in the PL? Arguably the most important criterion! Factors effecting readability include: –Overall simplicity »Too many features is bad Orthogonality »Makes the language easy to learn and read »Meaning is context independent –Control statements –Data type and structures –Syntax considerations

Copyright © 1998 by Addison Wesley Longman, Inc. 6 Evaluation Criteria: Writability How easy is it to write programs in the language? Factors effecting writability: –Simplicity and orthogonality –Support for abstraction –Expressivity –Fit for the domain and problem

Copyright © 1998 by Addison Wesley Longman, Inc. 7 Evaluation Criteria: Reliability Factors: - Type checking - Exception handling - Aliasing - Readability and writability

Copyright © 1998 by Addison Wesley Longman, Inc. 8 Evaluation Criteria: Cost Categories: –Programmer training –Software creation –Compilation –Execution –Compiler cost –Poor reliability –Maintenance

Copyright © 1998 by Addison Wesley Longman, Inc. 9 Evaluation Criteria: others Portability Generality Well-definedness Etc…

Copyright © 1998 by Addison Wesley Longman, Inc. 10 Language Design Influences Computer architecture -We use imperative languages, at least in part, because we use von Neumann machines -John von Neuman is generally considered to be the inventor of the "stored program" digital computer - the class to which most of today's computers belong. -CPU+memory which contains both program and data -Focus on moving data and program instructions between registers in CPU to memory locations

Copyright © 1998 by Addison Wesley Longman, Inc. 11 Language Design Influences: Programming methodologies 1950s and early 1960s: Simple applications; worry about machine efficiency Late 60s: People efficiency became important; readability, better control structures. maintainability Late 70s: Data abstraction Middle 80s: Object-oriented programming 95-today: distributed programs, the Web

Copyright © 1998 by Addison Wesley Longman, Inc. 12 Language Categories The big four: Imperative or procedural (e.g. Fortran, C) Functional (e.g. Lisp, ML) Rule-based (e.g. Prolog) Object-oriented (e.g. Smalltalk, Java) Others: Scripting (e.g. Perl, Tcl/Tk) Constraint (e.g. Eclipse)

Copyright © 1998 by Addison Wesley Longman, Inc. 13 Language Design Trade-offs Reliability versus cost of execution Ada, unlike C, checks all array indices to ensure proper range. Writability versus readability (2 = 0 +.= T o.| T) / T <- iN is an APL one liner that produces a list of the prime numbers from 1 to N inclusive. Flexibility versus safety C, unlike Java, allows one to do arithmetic on pointers.

Copyright © 1998 by Addison Wesley Longman, Inc. 14 Implementation methods Direct execution by hardware –e.g., machine language Compilation to another language –e.g., C Interpretation –Direct execution by software –e.g., csh, Lisp (traditionally) Hybrid –Compilation to another language (aka bytecode) which is then interpreted –e.g., Java, Perl

Copyright © 1998 by Addison Wesley Longman, Inc. 15 Implementation issues Complexity of compiler/interpreter Speed of translation Speed of execution Portability of translated code Compactness of translated code Debugging ease compileinterpret hybrid

Copyright © 1998 by Addison Wesley Longman, Inc. 16 Programming Environments The collection of tools used in software development, often including an integrated editor, debugger, compiler, collaboration tool, etc. Examples: –UNIX -- Operating system with tool collection –EMACS – a highly programmable text editor –Borland C++ -- A PC environment for C and C++ –Smalltalk -- A language processor/environment –Microsoft Visual C++ -- A large, complex visual environment –Your favorite Java environment: Jbuilder, J++, …