The Role of Programming Languages Chapter 1: Programming Languages: Concepts and Constructs by Ravi Sethi.

Slides:



Advertisements
Similar presentations
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Advertisements

Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Compiler Construction by Muhammad Bilal Zafar (AP)
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
The Analytical Engine Module 6 Program Translation.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Programming Languages Structure
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
PRE-PROGRAMMING PHASE
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Programming 1 1. Introduction to object oriented programming and problem-solving.
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
Computer system overview1 The Effects of Computers Pervasive in all professions How have computers affected my life? How have computers affected my life?
Programming With C.
Chapter 6 Programming Languages. © 2005 Pearson Addison-Wesley. All rights reserved 6-2 Chapter 6: Programming Languages 6.1 Historical Perspective 6.2.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
Chapter 6 Programming Languages © 2007 Pearson Addison-Wesley. All rights reserved.
CSC425 - Introduction To Computer Programming 1. 2 Generation Of Programming Languages A set of rules that telling a computer what to do. There are over.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Programming Language อ. รัชดาพร คณาวงษ์ วิทยาการคอมพิวเตอร์ คณะ วิทยาศาสตร์ มหาวิทยาลัยศิลปากร.
PROGRAMMING LANGUAGES
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
COMPILER CONSTRUCTION WEEK-1 THE ROLE OF PROGRAMMING LANGUAGE.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Programming Languages
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Lecture-8 Introduction to computer languages.
Programming Language Design Issues Programming Languages – Principles and Practice by Kenneth C Louden.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
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.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
CSC141 Introduction to Computer Programming Programming Language.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Software Engineering Algorithms, Compilers, & Lifecycle.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
INTRODUCTION TO COMPUTER PROGRAMMING ITC-314. Computer Programming  Computer Programming means creating a sequence of instructions to enable a computer.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Programming what is C++
Operating System Interface between a user and the computer hardware
System Programming and administration
System Programming and administration
Developing Applications
Unit# 8: Introduction to Computer Programming
Assembler, Compiler, Interpreter
Chapter 1 Introduction(1.1)
CMP 131 Introduction to Computer Programming
High Level Programming Languages
Chapter 6: Programming Languages
Assembler, Compiler, Interpreter
Principles of Programming Languages
The Role of Programming Languages
Presentation transcript:

The Role of Programming Languages Chapter 1: Programming Languages: Concepts and Constructs by Ravi Sethi

What is a Programming Language? n a tool for instructing machines n a means of communicating between programmers n a vehicle for expressing high-level designs n a notation for algorithms n a way of expressing relationships between concepts n a tool for experimentation n a means for controlling computerized devices

Language Designers n Balance n … making computing convenient for programmers (a fool with a tool is still a fool) n and making efficient use of computing machines (... Why do I have to state this?)

Levels n Gross distinction between programming language n based on readability n based on independence n based on purpose (specific … general)

Levels n Machine level language n Assembly level language n High-level language (3GL) n sometimes 4GL - fourth Generation Language

Machine Level n n n n Can you tell what this code fragment does? n Can it be executed on any machine? n Is it general purpose?

Assembly Language n Look at figure 1.1 n LD R1,”0” n LD R2, M n ST R2, R1 n … real assembly used mnemonics n Add A(M), …. Had to do your own indexing n What does this program do?

Assembly Language n Look at page 63 in your text and figure 3.1 n Can you understand what it does now?

Basic Concepts of a RAM machine n Memory: addresses, contents n Program: instructions n input/output:(files) A10 200A c A = 3 + c lvalue-> address rvalue->contents

High Level n Readable familiar notations n machine independence n availability of program libraries n consistency check (check data types)

Problems of Scale n Changes are easy to make n isolated program fragments can be understood n BUT… one small bug can lead to disaster n read the NOT story about Mariner rockets n Notice how the chairman does not understand that a “small” problem can lead to devastating result and why it was not caught

Bugs n Programming testing can be used to show the presence of bugs, but never their absence! n Dijkstra n Programming Languages can help n readable and understandable n organize such that parts can be understood

Role of Programming Languages n Art (science) of programming is organizing complexity n Must organize in such a way that our limited powers are sufficient to guarantee that the computation will establish the desired effect n (Dijkstra - structured programming, sometimes referred to as goto-less programming)

Programming Paradigms n Imperative - action oriented, sequence of actions n Functional - LISP, symbolic data processing n Object-Oriented n Logic - Prolog, logic reasoning n Sequential and concurrent

Language Implementation n Compiler - source code it translated into machine code (all at once) n Interpreter - machine is brought up to the language (one statement at a time)

Compiled C Source code in C Pre- procces sor compiler Linker or assembler Machine code (exe) Loader Machine codes.o files Pre processed code

Interpreted Code n Each instruction is interpreted by machine interpreter n does not produce object code

Comparisons n Compilation more efficient n interpreted more flexible

Testing your skill n Do 1.4 (a,b,c) in PL book n Do 1.5 n For each file, include a file header: u what this file accomplishes - description u what “entities” are in this file u dependencies u structure

Testing your skill n For each module, include a module header: u what this module accomplishes - description u dependencies ( parameters(in, out, inout), global data (accessed or modified), called by (fanin), calls (fanout) ) u restrictions u programmer u date created u modifications

Testing your skill n For the test cases, include a test header: u for each input, put the expected output, date executed, name of tester and passed/failed