Principles of Programming Languages

Slides:



Advertisements
Similar presentations
Chapt.2 Machine Architecture Impact of languages –Support – faster, more secure Primitive Operations –e.g. nested subroutine calls »Subroutines implemented.
Advertisements

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.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
Overview of Programming Paradigms
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
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
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
Programming Languages and Compilers (CS 421)
1 Programming Languages Marjan Sirjani 2 1- The Study of Programming Languages The purpose of language is simply that it must convey meaning. (Confucius)
CS102 Introduction to Computer Programming
Overview. Copyright © 2006 The McGraw-Hill Companies, Inc. Chapter 1 Overview A good programming language is a conceptual universe for thinking about.
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
Computer system overview1 The Effects of Computers Pervasive in all professions How have computers affected my life? How have computers affected my life?
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
1 Programming Languages Marjan Sirjani Course web site:
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.
Programming Languages Design Considerations (Qualities) Readability –Simplicity and Clarity –Orthogonality –Control Statements –Data Types and Structures.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Introduction 1 강의 내용 및 방법  접근방법 –Lambda Calculus, Proof of Correctness 은 강의에서 제 외  원하는 학생에게만 특별히 따로 강의함  리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음 –
CS 331, Principles of Programming Languages Chapter 1.
Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Software Engineering Algorithms, Compilers, & Lifecycle.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Chapter 1. Introduction.
Programming Languages 2nd edition Tucker and Noonan
Computer Organization and Architecture Lecture 1 : Introduction
Invitation to Computer Science 6th Edition
 2001 Prentice Hall, Inc. All rights reserved.
The language focusses on ease of use
Concepts of Programming Languages
Introduction to programming languages, Algorithms & flowcharts
Concepts of Programming Languages
Why study programming languages?
Basic 1964 PC general purpose Imperative Small Easy to use.
Introduction to programming languages, Algorithms & flowcharts
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
Introduction of Programming Languages
Computer System and Programming
课程名 编译原理 Compiling Techniques
1.1 Reasons to study concepts of PLs
Developing Applications
Introduction to programming languages, Algorithms & flowcharts
Chapter 1 Introduction.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Programming Language Design
Chapter 1 Preliminary. Chapter 1 Preliminary 1.1 Reasons for Studying Concepts of Programming Languages Increased capacity to express ideas Improved.
Chapter 1 Preliminaries.
Programming Languages 2nd edition Tucker and Noonan
High Level Programming Languages
Low Level Programming Languages
and Program Development
Von Neumann Architecture
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
강의 내용 및 방법 작년 강의 결과에 대한 설명 올해 접근방법 리포트 시험
Reasons To Study Programming Languages
Presentation transcript:

Principles of Programming Languages

The Structure And Operation Of A Computer A computer is an integrated set of algorithms and data structures capable of storing and executing programs. Hardware computer Virtual computer

The von Neumann Architecture

Major Components of a Computer Data Various kinds of elementary and structured data. Primitive operations Sequence control Controlling the sequence of primitive operations execution. Data access Controlling the data supplied to each execution of an operation.

Major Components of a Computer Storage management Controlling the allocation of storage for programs and data. Main memory Main memory Register High-speed cache memory External files Operating environment Providing mechanisms for communication with an external environment containing programs and data.

Operations A set of build-in primitive operations Arithmetic operations on each built-in numeric data (+,-,*,/) Testing various properties of data items (test for zero, positive, and negative numbers) Accessing and modifying various parts of a data item Controlling input-output devices Sequence control (jumps)

Sequence Control There is an interpreter : Fetch the instruction Decode instruction Fetch designated operands Branch to designated operation Execute primitive operations 1 to n Using an address register

Software architectures 1. Mainframe era Batch processing (batches of files) Interactive processing (time sharing)  Effects on language design File I/O in batch processing Error handling in batch processing Time constraints in interactive processing

2. Personal computers Effects on language design Interactive processing Embedded system environments     Effects on language design No need for time sharing Good interactive graphics Non-standard I/O devices for embedded systems

3. Networking era (Client-server model of computing) Server: a program that provides information Client - a program that requests information  Effects on language design Interaction between the client and server programs Active web pages, Security issues, Performance

LANGUAGE DEVELOPMENT Numerically based languages Business languages Computing mathematical expressions FORTRAN, Algol, Pascal, PL/1, BASIC, C, C++wrk Numerically based languages COBOL (Common Business Oriented Language) English-like notation Business languages Tree search; Rule-based paradigm LISP (LISt Processing) PROLOG (PROgramming in LOGic) Artificial intelligence languages System languages Web programming C, C++ and Script languages: AWK, Perl, TCL/TK HTML, XML, PHP

LANGUAGE DESIGN ISSUES Languages are designed to: Languages in the earlier era were designed to run efficiently Languages in the new era are designed to be written correctly with minimum lines of code Data typing features in ML Class of C++ Package of Ada DESIGN GOALS During 1950s--1960s - Run-time considerations Programmers are cheap, machines expensive; Keep the machine busy Today - program development time considerations CPU power and memory are very cheap

Attributes of a good language Conceptual integrity Orthogonality Naturalness for the application Support for abstraction Ease of program verification Programming environment Portability of programs Cost of use Cost of execution. Cost of program translation. Cost of program creation, testing, and use. Cost of program maintenance.

Language paradigms Imperative / procedural languages Applicative / functional languages Rule-based / declarative languages Object-oriented languages

Imperative / procedural languages Statement oriented languages that change machine state (C, Pascal, FORTRAN, COBOL) Computation: a sequence of machine states (contents of memory) Syntax: S1, S2, S3, ... where S1, S2, … are statements

Applicative / functional languages Programming consists of building the function that computes the answer Computation: Function composition is major operation (ML, LISP) Syntax: P1(P2(P3(X)))

Rule-based / declarative languages Computation: Actions are specified by rules that check for the presence of certain enabling conditions. (Prolog) The order of execution is determined by the enabling conditions, not by the order of the statements. Syntax: Condition  Action

Object-oriented languages Imperative languages that merge applicative design with imperative statements (Java, C++, Smalltalk) Syntax: Set of objects (classes) containing data (imperative concepts) and methods (applicative concepts)