Gary MarsdenSlide 1University of Cape Town Principles of programming language design Gary Marsden Semester 2 – 2001.

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Gary MarsdenSlide 1University of Cape Town Statements & Expressions Gary Marsden Semester 2 – 2000.
Chapter 1: Preliminaries
Programming Languages WHY MORE? Wasn’t ONE ENOUGH? Introduction to CS260.
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
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.
A Quick Overview of Languages. FORTRAN Designed in 1955 First release of the compiler in 1957 Algebraic in nature Scientific (numeric not string oriented)
Programming Languages Structure
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 7: Methods.
Chapter 3 Louden1 Chapter 3 - Language Design Principles Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Organization of Programming Languages (CSE452)
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Programming Language Concepts
1 Chapter-01 Introduction to Computers and C++ Programming.
Language Evaluation Criteria
PROGRAMMING LANGUAGES The Study of Programming Languages.
CSE 425: Intro to Programming Languages and their Design A Few Key Ideas No particular language is a prerequisite for this course –However you should be.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
Programming Languages Third Edition Chapter 2 Language Design Criteria.
Gary MarsdenSlide 1University of Cape Town Functional programming in Clean Gary Marsden Semester 2 – 2000.
MT311 Java Programming and Programming Languages Li Tak Sing ( 李德成 )
Gary MarsdenSlide 1University of Cape Town Computer Architecture – Introduction Andrew Hutchinson & Gary Marsden (me) ( ) 2005.
Algorithms and Programming
CS101 Introduction to Computing Lecture Programming Languages.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Programming Languages Design Considerations (Qualities) Readability –Simplicity and Clarity –Orthogonality –Control Statements –Data Types and Structures.
ProgrammingLanguages Programming Languages The Extended Design Principles This lecture introduces a list of more specific principles that can be an aid.
Gary MarsdenSlide 1University of Cape Town A brief history of programming languages Gary Marsden Semester 2 – 2000.
Ch. 5 Ch. 51 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (more notes) Dr. Carter Tiernan.
ISBN CS 354 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Course Topics What is a programming language? What features.
The Evolution of Programming Languages Day 2 Lecturer: Xiao Jia The Evolution of PLs1.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Chapter 3 - Language Design Principles
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
Ch. 5 Ch. 51 jcmt Summer 2003Programming Languages CSE3302 Programming Languages (more notes) Summer 2003 Dr. Carter Tiernan.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
C LANGUAGE Characteristics of C · Small size
Semantic Analysis II Type Checking EECS 483 – Lecture 12 University of Michigan Wednesday, October 18, 2006.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
Programming Language Design Issues Programming Languages – Principles and Practice by Kenneth C Louden.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
MT311 Java Programming and Programming Languages Li Tak Sing ( 李德成 ) 1.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Chapter 1 Reasons to study concepts of PLs Programming Domains
CS101 Introduction to Computing Lecture 19 Programming Languages
1.1 Reasons to study concepts of PLs
Chapter 1 Preliminaries.
CS212: Object Oriented Analysis and Design
Programming Languages and Translators
CS 3304 Comparative Languages Fall 2011
Chapter 1 Introduction(1.1)
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Programming Languages, Preliminaries, History & Evolution
Reasons To Study Programming Languages
Exception Handling and Event Handling
Presentation transcript:

Gary MarsdenSlide 1University of Cape Town Principles of programming language design Gary Marsden Semester 2 – 2001

Gary MarsdenSlide 2University of Cape Town Efficiency  Efficiency is a complex term  It is tempting to think about machine efficiency, and producing a program which runs as quickly as possible  Stop and think about hardware and programmer efficiency  Also think about the ‘how’ and ‘why’ we use computers may have changed in the last 50 years

Gary MarsdenSlide 3University of Cape Town In the beginning…  … computers were slow. They ran one program at a time in batch mode  It was essential that the computer’s time was used as efficiently as possible  Programmers therefore spent a long time writing machine code programs which would run as efficiently as possible

Gary MarsdenSlide 4University of Cape Town High level languages  HLL’s recognise that programmer time needs to be used efficiently in response to a decreasing cost of computer equipment.  So HLL’s must be efficient  We understand the notion of efficient executable code, but are there other sorts of efficiency

Gary MarsdenSlide 5University of Cape Town Translation Efficency  One area of efficiency concerns how quickly the source language can be changed in to machine code  Pascal, for example, forces declaration of variables before use – resulting in a one pass compiler  There is often a trade off, meaning faster compilation results in less reliable code

Gary MarsdenSlide 6University of Cape Town Implement-ability  This is concerned with the efficiency with which a compiler can be written  Some languages are so complex that compilers take a long time (possibly never) to implement –Algol68 was never properly implemented –Ada is large and has few compilers –ML had to wait for algorithms to be created to support its (then) unique type inference scheme

Gary MarsdenSlide 7University of Cape Town Programming efficiency  How efficiently does allow a programmer to specify ideas?  Reducing unnecessary details, like explicit typing, plays a part in this  Functional languages are particularly concise, but at what cost? –maintainability –readability –execution efficiency

Gary MarsdenSlide 8University of Cape Town Generality  Generality is achieved in languages by removing special cases and several similar concepts into a single, more general, one.  Examples include –Fixed length arrays in Pascal –C allows ‘=‘ operator on all basic types, but not arrays or records  However, generality can reduce simplicity, readability and reliability (C pointers are a good example of this)

Gary MarsdenSlide 9University of Cape Town Orthogonality  Language constructs should not behave differently in different contexts  Examples include –in C functions can return any data type except arrays –all function parameters in C are passed by value, except arrays, which are passed by value  Orthogonality was the design goal of Algol68, which allows any combination of meaningful constructs

Gary MarsdenSlide 10University of Cape Town Uniformity  Uniformity is interested in things which –are similar but do not behave, or look similar –behave and look similar, but are not similar  Examples –Pascal has no “Begin..End” statements in “Repeat” loops, but does have in “While” and “If” and “For” –‘;’ used a conjunction in Pascal, but terminator in C –Case statement used for variant records in Pascal

Gary MarsdenSlide 11University of Cape Town General good design  Simplicity – “things should be as simple as possible, but not simpler” Einstein  Expressiveness – what does this mean? –while( *s++ = *t++)  Independence – The language should be separate from particular hardware (Java)  Security – Protecting programmers from themselves –type declarations – catching as much at compile time

Gary MarsdenSlide 12University of Cape Town General good design - II  Consistency with accepted design – reuse concepts  Extensibility – adding features, operator overloading  Restrictability – allowing the programmer to create useful programs without the need to learn the whole language