Programming Languages Structure

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.
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.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
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.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
CS 363 Comparative Programming Languages
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
Programming Languages Summer
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.
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.
Concepts of Programming Languages
Chapter 1 Preliminaries.
Concepts of Programming Languages
Why study programming languages?
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
PROGRAMMING LANGUAGES
Chapter 1 Reasons to study concepts of PLs Programming Domains
课程名 编译原理 Compiling Techniques
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.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Principles of Programming Languages
Chapter 1 Preliminaries.
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
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:

Programming Languages Structure Introduction

Text/References Robert W. Sebesta, “Concepts of Programming Languages”, Fourth Edition Addison-Wesley (1999). T.W. Pratt and M.V. Zelkowitz, “Programming Languages – Design and Implementation” Fourth Edition, Prentice-Hall (2001). Ravi Sethi, “Programming Languages - Concepts and Constructs” Second Edition, Addison-Wesley (1996).

Course Assessment Mid-term Exam 30% Project 30% Final exam 40%

Why study Programming Language Concepts? Increased capacity to express ideas Improved background for choosing appropriate languages Increased ability to learn new languages Better understanding of the implementation of concepts Increased ability to design new languages

Program - Definitions A program is a description of a set of actions that we want a computer to carry out. A program is a model of some process in the real or mathematical world. A program is a sequence of instructions for a machine to perform a specific task. A notational system for describing computation in machine-readable and human-readable form

Programming Domains Scientific: Heavily based on numerical algorithms (Fortran, C) Business Applications: Storage, retrieval, and formatting of data, reporting. (COBOL) Artificial Intelligence: Symbolic computing, List directed processing (LISP, Prolog) Systems Programming: Fast, Low level features (C) Internet: Web based programming (Perl, Java) Simulation: Process modeling (MATLAB, GPSS)

Programming Paradigms: 1. Imperative Statement oriented languages Every statement changes the machine state Computation is expressed by a sequence of actions. Heavily based on von Neumann architecture Provides variables, assignments, and iterative repetitions. Examples: Fortran, C

Programming Paradigms: 2. Declarative Problem specification using relations or functions. Functional programming (applying functions to given parameters). Logic programming (deductive reasoning, rule based) Examples: LISP, ML, Haskell, Prolog

Programming Paradigms: 3. Concurrent Parallel execution of processes. Multi-tasking or multi-threading primitives. Inter process communication and synchronization. Helps in speeding up the execution of parallel algorithms Examples: Concurrent C, Java, Fortran-90

Programming Paradigms: 4. Object Oriented Based on the concept of data abstraction. Uses encapsulation (data hiding) Supports inheritance (software reuse) Suitable for programming in the large. Examples: C++, Java, Smalltalk, Eiffel

Programming Paradigms: 5. Scripting Contains a set of commands (scripts) to be executed. Works in conjunction with a larger application, or are interpreted. Examples: Perl, Javascript.

Language Evaluation Criteria Readability Writability Reliability Cost

Readability Simplicity (Small number of basic components, less amount of feature multiplicity, restricted operator overloading). Limited Orthogonality (Ways by which primitive constructs can be combined). Control Structures (Structured programming) Data types and structures (Arrays, records..) Syntax design (Closeness to intended purpose)

Writability Simplicity/Orthogonality Support for abstraction (process abstraction and data abstraction) Expressivity (convenient ways of specifying computation)

Reliability Type checking (Compile-time checking of types of variables) Exception handling (Ability to intercept errors, take corrective measures and continue). Restricted aliasing (Multiple names associated with the same memory cell).

Cost Cost of training Cost of compiling (Compilation time) Cost of execution (Optimization) Cost of language implementation (Compiler, hardware etc). Cost of maintenance (Repairs, changes and extensions)

Implementation Methods 1. Compilation Source Program Machine Language Fetch-Execute Machine Source programs are translated to machine language

Implementation Methods 1. Compilation Source Program Lexical Analyzer Lexical units Syntax Analyzer Parse trees Intermediate Code Generator Symbol Table Optimization Intermediate code Code Generator Machine code

Implementation Methods 2. Pure Interpretation Source Program Fetch-Execute Interpreter Virtual Machine Machine Source programs are directly interpreted by another program without any translation.

Implementation Methods 3. Hybrid Implementation Compilation followed by interpretation. Perl (Compiled to detect errors before interpretation) Java (Compiled to platform independent byte codes, and interpreted by the JVM)

Programming Environments Collection of tools used in the development of software. Consists of a file system, a text editor, a linker, a compiler, a debugger, and development tools. Helps increase productivity and quality. Examples: Borland C++, Visual C++, Visual J++