Reasons to study concepts of PL

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
PLLab, NTHU Cs2403 Programming Languages Implementation Issues Cs2403 Programming Language Spring 2005 Kun-Yuan Hsieh.
CS 354 Overview. Addison-Wesley –2 Course Topics What is a programming language? What features do programming languages have? How are these features.
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.
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.
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.
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
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 Chapter 1 Preliminaries. Corrected and improved by Assoc. Prof. Zeki Bayram, EMU, North Cyprus. Original Copyright © 2007 Addison-Wesley.
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 Structure of Programming Languages Prof. Dr. Mostafa Abdel Aziem Mostafa Senior Lecturer
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
CSCE 343 – Programming Language Concepts Welcome!.
ISBN Chapter 1 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Chapter 1 Preliminaries.
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.
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.
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:

Reasons to study concepts of PL 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

Programming Domains Scientific applications Business applications Artificial intelligence Systems programming Scripting languages Special purpose languages

Language Evaluation Criteria 1. 2. Writability - Factors: - 3. Reliability Readability Writability Reliability Cost others

Readability The most important criteria Factors: Overall simplicity Too many features is bad Multiplicity of features is bad Orthogonality Control statements Data type and structures Syntax considerations

Orthogonality Makes the language easy to learn and read Meaning is context independent Small number of constructs for generating many structures. int, float, double, arrays and pointers ==> ? Few exceptions to rules: e.g. why can function return a struct, but not an array? Why are all parameters pass-by-value, except arrays?

Writability Simplicity and orthogonality Support for abstraction No duplication Avoid too much complexity; so many constructs, most users don’t know what to use Support for abstraction Subprograms, structures Expressivity for vs. while, ++ vs. + 1

Reliability Program should perform to specs under all conditions Type checking of parameters, out-of-range errors Exception handling Aliasing Generally bad, but can be useful for pass-by-reference Readability and writability Contorting the language to achieve an end can lead to errors.

Cost Programmer training Software creation Compilation speed Execution speed Compiler cost (Java vs. Pascal) Poor reliability Maintenance

Other Evaluation Criteria Portability Generality Well-definedness

Influences on language design Computer architecture We use imperative languages, at least in part, because we use von Neumann machines Programming methodologies 1950s and early 1960s: Simple applications; worry about machine efficiency Late 1960s: People efficiency became important; readability, better control structures Late 1970s: Data abstraction Middle 1980s: Object-oriented programming Early 1990s: Code re-use and libraries

Language Categories Imperative Functional Logic Language Design Trade-offs 1. Implementation Methods Imperative Functional Logic Object-oriented (closely related to imperative) Mark-up languages (html) don’t describe computations, so don’t count

Language Design Tradeoffs Reliability versus cost of execution Writability versus readability E.g: APL Flexibility versus safety E.g: PASCAL allows pointers and integers to be treated identically. Good for pointer calculations, but dangerous.

Implementation Methods Compilation Interpretation Hybrid

Compiled languages Translate high-level program to machine code Slow translation Fast execution

Pure interpretation No translation Slow execution Becoming rare Though, see Python and Java!

Hybrid implementation systems Small translation cost Medium execution speed

Programming Environments The collection of tools used in software development UNIX An old operating system and tool collection Borland C++ A PC environment for C and C++ Smalltalk & Lisp A language processor/environment Microsoft Visual C++ A large, complex visual environment

Chapter 1 2.