Что такое findslide.org?

FindSlide.org - это сайт презентаций, докладов, шаблонов в формате PowerPoint.


Для правообладателей

Обратная связь

Email: Нажмите что бы посмотреть 

Яндекс.Метрика

Презентация на тему Programming Languages: Concepts and Constructs by Ravi Sethi

Содержание

What is a Programming Language?a tool for instructing machinesa means of communicating between programmersa vehicle for expressing high-level designsa notation for algorithmsa way of expressing relationships between conceptsa tool for experimentationa means for controlling computerized devices
The Role of Programming LanguagesChapter 1: Programming Languages: Concepts and Constructs by Ravi Sethi What is a Programming Language?a tool for instructing machinesa means of communicating Language DesignersBalance… making computing convenient for programmers (a fool with a tool LevelsGross distinction between programming languagebased on readabilitybased on independencebased on purpose (specific … general) LevelsMachine level languageAssembly level languageHigh-level language (3GL)sometimes 4GL - fourth Generation Language Machine Level000000101011110010100000001010111100100000000011001110101000Can you tell what this code fragment does?Can it be executed Assembly LanguageLook at figure 1.1LD  R1,”0”LD  R2, MST  R2, Assembly LanguageLook at page 63 in your text and figure 3.1Can you Basic Concepts of a RAM machineMemory: addresses, contentsProgram: instructionsinput/output:(files)202000A10200AcA = 3 + clvalue-> addressrvalue->contents High LevelReadable familiar notationsmachine independenceavailability of program librariesconsistency check (check data types) Problems of ScaleChanges are easy to makeisolated program fragments can be understoodBUT… BugsProgramming testing can be used to show the presence of bugs, but Role of Programming LanguagesArt (science) of programming is organizing complexityMust organize in Programming ParadigmsImperative - action oriented, sequence of actionsFunctional - LISP, symbolic data Language ImplementationCompiler - source code it translated into machine code (all at Compiled CSource code in CPre-proccessorcompilerLinkerorassemblerMachine code (exe)LoaderMachinecodes.ofilesPreprocessedcode Interpreted CodeEach instruction is interpreted by machine interpreterdoes not produce object code ComparisonsCompilation more efficientinterpreted more flexible Testing your skillDo 1.4 (a,b,c) in PL bookDo 1.5For each file, include Testing your skillFor each module, include a module header:what this module accomplishes Testing your skillFor the test cases, include a test header: for each
Слайды презентации

Слайд 2 What is a Programming Language?
a tool for instructing

What is a Programming Language?a tool for instructing machinesa means of

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

Слайд 3 Language Designers
Balance
… making computing convenient for programmers (a

Language DesignersBalance… making computing convenient for programmers (a fool with a

fool with a tool is still a fool)
and making

efficient use of computing machines (... Why do I have to state this?)

Слайд 4 Levels
Gross distinction between programming language
based on readability
based on

LevelsGross distinction between programming languagebased on readabilitybased on independencebased on purpose (specific … general)

independence
based on purpose (specific … general)


Слайд 5 Levels
Machine level language
Assembly level language
High-level language (3GL)
sometimes 4GL

LevelsMachine level languageAssembly level languageHigh-level language (3GL)sometimes 4GL - fourth Generation Language

- fourth Generation Language


Слайд 6 Machine Level
00000010101111001010
00000010101111001000
00000011001110101000
Can you tell what this code fragment

Machine Level000000101011110010100000001010111100100000000011001110101000Can you tell what this code fragment does?Can it be

does?
Can it be executed on any machine?
Is it general

purpose?

Слайд 7 Assembly Language
Look at figure 1.1
LD R1,”0”
LD

Assembly LanguageLook at figure 1.1LD R1,”0”LD R2, MST R2, R1… real

R2, M
ST R2, R1
… real assembly used mnemonics


Add A(M), …. Had to do your own indexing
What does this program do?

Слайд 8 Assembly Language
Look at page 63 in your text

Assembly LanguageLook at page 63 in your text and figure 3.1Can

and figure 3.1
Can you understand what it does now?


Слайд 9 Basic Concepts of a RAM machine
Memory: addresses, contents
Program:

Basic Concepts of a RAM machineMemory: addresses, contentsProgram: instructionsinput/output:(files)202000A10200AcA = 3 + clvalue-> addressrvalue->contents

instructions
input/output:(files)

20
2000
A
10
200A
c

A = 3 + c
lvalue-> address
rvalue->contents


Слайд 10 High Level
Readable familiar notations
machine independence
availability of program libraries
consistency

High LevelReadable familiar notationsmachine independenceavailability of program librariesconsistency check (check data types)

check (check data types)


Слайд 11 Problems of Scale
Changes are easy to make
isolated program

Problems of ScaleChanges are easy to makeisolated program fragments can be

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

Слайд 12 Bugs
Programming testing can be used to show the

BugsProgramming testing can be used to show the presence of bugs,

presence of bugs, but never their absence!
Dijkstra
Programming Languages

can help
readable and understandable
organize such that parts can be understood

Слайд 13 Role of Programming Languages
Art (science) of programming is

Role of Programming LanguagesArt (science) of programming is organizing complexityMust organize

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)

Слайд 14 Programming Paradigms
Imperative - action oriented, sequence of actions
Functional

Programming ParadigmsImperative - action oriented, sequence of actionsFunctional - LISP, symbolic

- LISP, symbolic data processing
Object-Oriented
Logic - Prolog, logic reasoning
Sequential

and concurrent

Слайд 15 Language Implementation
Compiler - source code it translated into

Language ImplementationCompiler - source code it translated into machine code (all

machine code (all at once)
Interpreter - machine is brought

up to the language (one statement at a time)

Слайд 16 Compiled C

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

Compiled CSource code in CPre-proccessorcompilerLinkerorassemblerMachine code (exe)LoaderMachinecodes.ofilesPreprocessedcode

Слайд 17 Interpreted Code
Each instruction is interpreted by machine interpreter
does

Interpreted CodeEach instruction is interpreted by machine interpreterdoes not produce object code

not produce object code


Слайд 18 Comparisons
Compilation more efficient
interpreted more flexible

ComparisonsCompilation more efficientinterpreted more flexible

Слайд 19 Testing your skill
Do 1.4 (a,b,c) in PL book
Do

Testing your skillDo 1.4 (a,b,c) in PL bookDo 1.5For each file,

1.5
For each file, include a file header:
what this file

accomplishes - description
what “entities” are in this file
dependencies
structure

Слайд 20 Testing your skill
For each module, include a module

Testing your skillFor each module, include a module header:what this 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

  • Имя файла: programming-languages-concepts-and-constructs-by-ravi-sethi.pptx
  • Количество просмотров: 121
  • Количество скачиваний: 0
Следующая - Struktury organizacyjne