Programming Languages

Slides:



Advertisements
Similar presentations
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
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.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
CSI 3125, Preliminaries, page 1 Programming languages and the process of programming –Programming means more than coding. –Why study programming languages?
PLLab, NTHU Cs2403 Programming Languages Implementation Issues Cs2403 Programming Language Spring 2005 Kun-Yuan Hsieh.
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Programming Languages Structure
Computability to Practical Computing - and - How to Talk to Machines.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
6/27/2015G. Levine1 PROGRAMMING LANGUAGES Text: Programming Languages, Design and Implementation Pratt and Zelkowitz 4 th ed. Prentice-Hall.
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
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.
Programming Language Concepts
CS102 Introduction to Computer Programming
Presented by: Destry Diefenbach
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Chapter 17 Programming Tools The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander.
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
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.
CS 149: Operating Systems January 22 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CS2303 C14 Systems Programming Concepts Bob Kinicki.
CS 363 Comparative Programming Languages
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Course Overview. What are Computers? From Outside –CPU box, Monitor, Keyboard, mouse and Printers From inside –ICs, Chipsets, Hard Disks, PCB cards, Drives,
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
Computer Architecture And Organization UNIT-II Multilevel View Point Of A Machine.
CS 152: Programming Language Paradigms February 10 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
1 CSC 533: Organization of Programming Languages Spring 2010 See online syllabus at: Course goals:  understand issues in designing,
Principles of Programming Languages Asst. Prof. Dr. Ahmet Sayar Spring-2012 Kocaeli University Computer Engineering Department Introduction.
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.
CS 152: Programming Language Paradigms January 29 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
CS 152: Programming Language Paradigms January 27 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
CSC141 Introduction to Computer Programming Programming Language.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Software Engineering Algorithms, Compilers, & Lifecycle.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Why study programming languages?
PROGRAMMING LANGUAGES
Sections Basic Concepts of Programming
CSCI-235 Micro-Computer Applications
课程名 编译原理 Compiling Techniques
Programming Languages and Translators
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Programming Language Design
Von Neumann Architecture
Principles of Programming Languages
Programming Languages, Preliminaries, History & Evolution
Presentation transcript:

Programming Languages Dr. Shahriar Bijani Sep. 2014

Text Book Kenneth C. Louden & Kenneth A. Lambert, Programming Languages: Principles and Practice, 3rd Edition, 2012.

Code of Conduct Plagiarism is not acceptable! All assignments are strictly individual Unless explicitly stated otherwise

Main Slide References CS 152: Programming Language Paradigms, Dept. of Computer Science, San Jose State University, Spring 2014. COMP313A: Programming Languages, Dept. of Computer Science, The University of Waikato, 2014.

Goals of the Course Program in languages from different “cultures”. Learn new ideas and concepts. Apply the new concepts to your “native” language. C++, C#, Java, etc. Become a better programmer! Different programming cultures (paradigms). Object-oriented C++, C#, Objective C, Java, etc. Functional Lisp, Scheme, ML, Haskell, F# Logic Prolog

Goals of the Course How are programming languages designed? Can we design a language? What are the design criteria? How can we specify the language’s syntax and semantics? What about data types and control structures? How are programming languages implemented? Interpreters Compilers

Why This Course? Increased capacity to express ideas. The depth at which we can think is influenced by the expressive power of the language Improved background for choosing appropriate languages. Make better informed choices if you are familiar with other available languages, especially the particular features of those languages.

Why This Course? Increased capacity to learn new languages. Understanding of the fundamental concepts of languages and learning a new language give you better understanding of your first language. Better understanding language implementation. Understand implementation issues  Understand why languages are designed the way they are  Ability to use a language more intelligently. Increased ability to design new languages. Advance the state of the art. Better languages can crowd out poor languages.

A Historic Timeline Programming Languages: Principles and Practice, 3rd ed. Kenneth Louden & Kenneth Lambert (c) 2012 Course Technology. All rights reserved. 978-1-111-52941-3

Origins of Programming Languages A programming language is often defined as “a notation for communicating to a computer what we want it to do”. Before the mid 1940s, computer operators set switches to adjust the internal wiring of a computer to perform the requested tasks. Programming languages allowed computer users to solve problems without having to reconfigure hardware.

Plugboard Control Panel IBM 407 Accounting Machine (1949)

Programming a Plugboard “Programming” was hand-wiring plugboards. “Hmm, should I pass this parameter by value or by reference?”

Programming a Plugboard Plugboard wiring diagram It doesn’t look too complicated, does it?

Machine Language John von Neumann proposed that computers should be permanently hardwired with a small set of general-purpose operations. An operator could input a series of binary codes to organize the basic hardware operations to solve more specific problems. Operators could flip switches to enter these codes, called machine language, into memory. John von Neumann was a Hungarian and American pure and applied mathematician, physicist, inventor and polymath. He made major contributions to a number of fields, including mathematics, physics, economics, computing, and statistics.

Machine Language Machine language programming was boring and error prone.

Assembly Language Assembly language: a set of mnemonic symbols for instruction codes and memory locations. Example: LD R1,R2 Assembler: a program that translates the symbolic assembly language code to binary machine code. Loader: a program that loads the machine code into computer memory for execution. Input devices: Keypunch machine Punched card reader

IBM 1401 Autocoder Programming 80/80 List Read and print a deck of cards. JOB 80/80 CARD LISTER * ORG 333 LOCATE AFTER THE PRINT AREA START CS 332 CLEAR STORAGE 332 - 300 CS CLEAR STORAGE 299 - 200 SW 1,201 SET WORD MARKS AT 1 AND 201 READ R READ A CARD INTO READ AREA MCW 80,280 MOVE TO PRINT AREA W PRINT IT BLC DONE GO TO DONE IF LAST CARD READ B READ ELSE GO READ ANOTHER CARD DONE H DONE ALL DONE END START Main loop MCW Move characters to word mark SJSU Dept. of Computer Science Spring 2014: January 27 CS 152: Programming Language Paradigms © R. Mak

Assembly Language Mnemonic symbols were an improvement over binary machine codes but still had shortcomings. Lacks abstraction of conventional mathematical notation. Each type of computer hardware architecture has its own machine language instruction set and requires its own dialect of assembly language. Assembly languages first appeared in the 1950s and are still used today for low-level system tools or for hand-optimization.

Punched Cards Data was stored in punched cards called “IBM cards” or “Hollerith cards” Named after Herman Hollerith. 80 columns per card, one character per column. Up to 12 punched holes per column. Alphanumeric data, often grouped into fields. _

A Data Processing Job A typical “job”. Tanenbaum & Woodhull Operating Systems: Design and Implementation (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8

Punched Cards Data processing was all about punched cards. A compiler project! 3½ boxes of punched cards Each box = 2000 cards, 10 lbs.

FORTRAN FORTRAN: FORmula TRANslation language Developed by John Backus in the early 1950s. Reflected the architecture of a particular type of machine. Lacked the structured control statements and data structures of later high-level languages. Popular with scientists and engineers for its support for algebraic notation and floating-point numbers. The language has evolved and is still used today. FORTRAN IV FORTRAN 77 FORTRAN 90 FORTRAN 95 FORTRAN 2015 ...

FORTRAN DOUBLE PRECISION NUMBER, ROOT C DO 500 I = 1, 3 5 WRITE (6, 10) 10 FORMAT ('ENTER A NUMBER') READ (5,100) NUMBER 100 FORMAT (F5.1) IF (NUMBER .GE. 0.0) GO TO 175 WRITE (6, 150) 150 FORMAT ('*** THE NUMBER MUST NOT BE NEGATIVE.') GOTO 5 175 ROOT = DSQRT(NUMBER) WRITE (6,200) NUMBER, ROOT 200 FORMAT ('THE SQUARE ROOT OF ', F5.1, ' IS ', F15.10) 500 CONTINUE PAUSE STOP END

Algol Algol: Algorithmic Language released in 1960 Provided a standard notation for computer scientists to publish algorithms in journals. John Backus was a major contributor. Structured control statements Sequencing (begin-end blocks) Loops (for loop) Selection (if and if-else statements) Different numeric types Introduced the array structure Supported procedures Including recursive procedures

The Algol Family A large number of high-level languages descended from Algol, including: Pascal: language for teaching programming in the 1980s Ada: for embedded applications of U.S. Dept. of Defense (DoD) Algol control structures are present in today’s languages, including Java, C, C++, etc.