The Role of Programming Languages

Slides:



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

Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Programming Languages Structure
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
Your Interactive Guide to the Digital World Discovering Computers 2012.
The Role of Programming Languages Chapter 1: Programming Languages: Concepts and Constructs by Ravi Sethi.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
Programming With C.
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.
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 อ. รัชดาพร คณาวงษ์ วิทยาการคอมพิวเตอร์ คณะ วิทยาศาสตร์ มหาวิทยาลัยศิลปากร.
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.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
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.
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.
Computer Language
Evolution and History of Programming Languages
Invitation to Computer Science 6th Edition
Topic 2: Hardware and Software
Programming what is C++
Topic: Programming Languages and their Evolution + Intro to Scratch
Introduction to Compiler Construction
Computer Science 210 Computer Organization
Chapter 5- Assembling , Linking, and Executing Programs
Programming Languages
Operating System Interface between a user and the computer hardware
CSCI-235 Micro-Computer Applications
Computer Programming.
Lecture 1: Introduction to JAVA
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
System Programming and administration
System Programming and administration
Ch. 7 Programming Languages
Chapter 1 Reasons to study concepts of PLs Programming Domains
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
1.1 Reasons to study concepts of PLs
Computer Science 210 Computer Organization
Developing Applications
Unit# 8: Introduction to Computer Programming
Assembler, Compiler, Interpreter
Chapter 6: Programming Languages
Compiler Construction
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Programming Language Design
Chapter 1 Introduction(1.1)
CMP 131 Introduction to Computer Programming
Programming.
High Level Programming Languages
Chapter 6: Programming Languages
Low Level Programming Languages
Assembler, Compiler, Interpreter
A programming language
Principles of Programming Languages
Chapter 1 Introduction.
Reasons To Study Programming Languages
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

The Role of Programming Languages 8/5/2019 The Role of Programming Languages Chapter 1: Programming Languages: Concepts and Constructs by Ravi Sethi

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Comparisons Compilation more efficient interpreted more flexible

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

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

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