0% found this document useful (0 votes)
11 views12 pages

PPL Unit I-13-24

The document discusses various programming concepts, including sequence control mechanisms, data access, storage management, and different methods of program implementation such as compilation and interpretation. It highlights the advantages and disadvantages of each method, as well as the role of virtual machines and binding times in programming. Additionally, it outlines programming paradigms and their significance in problem-solving approaches within programming languages.

Uploaded by

charul.1204
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views12 pages

PPL Unit I-13-24

The document discusses various programming concepts, including sequence control mechanisms, data access, storage management, and different methods of program implementation such as compilation and interpretation. It highlights the advantages and disadvantages of each method, as well as the role of virtual machines and binding times in programming. Additionally, it outlines programming paradigms and their significance in problem-solving approaches within programming languages.

Uploaded by

charul.1204
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

classMAte

Date
Page

Sequence. Control
P mustt Povfcde tte 'mechanSm t r condroll f'nq
Ptow o enech'on of progiamming nshne cHon.
Th's mechgnism 1s called as Sequence Contro

aYious Prfmitive bperaions are used tor Sequendc


C.onbo. Thes Operatons trans fer 4 cotr)l tlO ro
one memon dcaton 4o anotn@
next înaactio n be e n t eol
to is dLkremînco
Y Specitel pupos re9ster Called pneTa m
oun erlPc.)

Fetch Nert ToshmucHo

Decode Lnsucti o0|

Fetch Designaled operandS

Enecwte
PimHe operabon3
Halt operaion
Ao hal operation

Stor
Y3 Steps tor Program emecan,

. Data heeess

Compuler provfdes a
controlltng mechanis m tor Supplyi
date toT neceuion o progT emrning inscHon.
Thismechonism s called dota access

5 SHora ge Manaqement
Co mpute r povi dey meehanism for controllinq e
StOrage tor pogTams 2 olake resourc
o t S * o s a 9 e
onponen j
pes Spee
There are
hrec
m a t o m e m e r
11 High
a i
3 h o se
NErternot tles
Of
cPO P
main
memo

do
h e Speed
Some44me.
S3nchsonieeel
Smol mer
i s h g h Speeo
A cache memor
main memor P CPU
fed in ben
t+ke cache memn s imn.
h data pres f o
data presens
avail able cpv

6 0perainq Envro nmept


te mechansm by uhi ch xi
Compuer prov?oles
Pmgams he fn enecwion of opp" or user
nment.
wich Constukes
pmg 'snviTO
TOperaking envi ronmept onsists
oE pedphe
Storage F tlo derfcej

Tonsators and Virhial AzchitectureS -


C
The
The process of ransjakion of a pra. bom b
e I Yoq a n g . to e e i mG chhne lanq
Petormed in -to1towin Steps
1 T pg. modules Gre Separael tsanslakol ?nta
Telocakab le matine teble lcode, called
0sCompile
2 These tsand ake o modulieS are liolced foge
herîni
Telocaloulle unit.This task Ps Comed ouwk b 1thto
oT lincage editor

3) Finally h Complete prog s load cd ino t e

memd
memt
Ys
as ann eaecutab le mahine code, Th's task
Camed out b loacder
m o dern translation tohniques uge e COm la
Fo
choiqueg tran slok on P then ntep
ha meong HSource Co de s
retakOD
ranSloded DS
ClASSMALE

Date
Page

chae cod s
ote me ol rouke Code p then the interme

ntepve kd.
3oUYCeR
PTD
Compller
Relo cakable.
mechfne Codee
|Linver|
Singte elocoab le
unit
[loade
neutabl
unit
doia nterpreer o P dala
c t e o Pasu)t)
Lang .
pmcesstng sinq tran si ad 0n.

TMetho ods of Prdgram


The three methods
ImplementahoN
of lang impemenakion o r
Comp ilalion This fe a process in_ chicb t ugb
Ievel proa are
translaleointe nac ne lang
2 Puretnterpre tat'on I his proc esS, prog are
Sotespretesline b ioe 6 +asqe pma
Source progam

/p dlatea. nterprele

Pesult
Advantages-
Moli ceton 0f UseN pmq Can be easily mode f imple-
-menkecl C enecuwio9 proceeds.
2 Tpe o 6bject tha deootes a yariable mnay thange
clynamcall
Debuagna a po p t nclu ng eors is simpihed t-
etalon

inte
u sed
for
m a l k e s
f macchi e
macl

a pg he ong.
for for
Hase r
t o t e m r e e

l Th
dent
in depen

slowe
Slower
Disadvantages - te prog9.s
.is
te png
of
moN
x e c u t l o n

The C o n S u m p t H o n
s
Memo

SSLm
aeol us
ementahion

ybrfol
fmpl taansl

pr a
In h l s system t
intesprter P ompiler a roD
Prmg.
Compilers 4 iah 1eel
Sinq
nto in ter mediale 1on9 Ybj
pred us tng OHD
Erample- per s implem implemen aTOn
A0tiall
m p l e m e n t a k f o r nSystem:
i n e m e a efo
bybrtd The
O J a v a were atl
Ps called as by le code.Thi'S bye
ava code
o n o f H e Code on
PYo vid es c i l i n Of e e r h

an Plat form,

Source prog

Lexical analyzer
Sotax ac ze

interediae d
gnerato

/pdaia- neprte}

aHybrid im plemen jaion


ResulS3 SySHmn
clASSMAte
Date
Page

Intepeter Compiler
D he SoUrCe pra:
Ics inierpreeo 1 IOe process of compi
eve hime it is to' be
ermeuke aion 4he prog.s analyzad
rtime e Source
s analyTeel. Cpp : on1son
on once theo e
y T code is generated
inteprulers do ootyppodute
obiect code 2y Th compilers pnduce
3) objec ode.
ioterepreler con_bc made
ade 3 Tecom pjles
com pjless ho be
Oabecause the do not prduce
obsect Code present on
prsept on tLe
te host machne
macn
when Porhular pang. needs
DHeTprefers iae simpler? gire w 4)to be Com pile d
pred clebuggina Ti compller i s onpie
environmeot png. 4IqU oii
amount ot memr

Co Dcept oP
POprocesSor
PreprocEssei is a proq Aha mces aes
before t e pmg ?s corp'led cepva s
PTe proC ESSos instuctfons crr
embedded h poa
Pre prDceLS oT macOS (n
SdLeons)_ar commonly jec
to Speci Hha Co de psm anoth er te is to be
ncwucled

Vual Compues
Vtuak rachine is a pjece ot Slo which sîmulale
e actual machne environmeot.
For yirtualmacine environment e Source_prg. i's
dsanslaked into an întemeciiar absiracd form wki
Ts then ioterf relively fnecuukeel
In s Cese e source pnq, 4 s t goe hroug h
hree stage such a extca analyser, Synax Gnaly

-CPHpe Checicos
44
From
obtain ed
3yntar ade
abshoet
he trans
the e ge
Then
?ntepreled
4o enecu
fo necuhe
possible
s is
Phases 4 m,
this
eature
o s tor
ppllo oYm,
to des
d Siirn
edc
Due

code on an 1s a lcind ot
abshact
virtua moch'nc T
TOo ll e 'n
'n
Javo jmmp
po rv
taan 4
tor eg a
an
1 o n t..

whteh PlaYS
machne
Hplaform independenle,
nachine 3 cu
yirual
Shu ctuac
Te
Th e gen e
gen c ral
shown in g .
Sove
p
TYPe checker
checker
TYP
LexfCas analyzes Svotoranalyzer Abshacf

p InpreBee JtomMite

gSBru ctur of virtual 1ac hine.

*BPn dinq and BPndi'ng tmes -


- Pny prog. ContaTo yarious entities Suth as Yariay
An
ouines, Control takements ? So onD

TheSe entities hae Special poperties. hese yn


ave called altbutes.

ox 9i +e prva. entit routine or tvo? has


Parameters, p e of parametess, pasa meter pass tng
methods So ao
SPeciyinq tte nafure of atibues is coillee bindh
e ime at cohfeh t chorce dor binou'ng Ou
iscolled binddng times
-
The e Ore Voriou classes of bindling yp
a e TePresen tec b+ollowinq
cASSMALC

Date

Page

classes of nding 4imes

xettlHon Tanslal fon Lang. Tmplem


Lang.cle
+me eta lon 4ime| Hme.
4ne
Dynamïc Slattc S4atc
Sthfe

binclin3) bincling) tncig binding)b


bo eots
o Subpo P
pYrgTammey
b
A arbi}ran tanSlotor
Points.
Loacler

g cla ss es binolinq +omes.

1Exec tui on tme


There are man binou ogs+hat are pestoTmeo
durinq neukion o te Pr hese tpe of
bincnc
of
are olso called cy dynamic bincun
fun Aime bi actngs
A en bl6c 0T Subpog: A enhri o
Subpma e binclinq+ave place beth actual +o
to fma
parcmeters here Ccn be bincu ng of va Tia
with_their values.
A aybjiTary Poiots during proq: fnecution A
asbitray Poio+s during povq. eecuton te variable
a ssigned w t values.

2) ransl cutoo TRme2-


Choosen B ProgTammer Io his
bfnding,decdorcuhior
obind ypes oto variable name_ Occurs. Similorly 4t
bincling bet values 9 Cdnstan ts OCeurs
Ore ch
Some
binu'ngs
bincungs

to
Ore
chosen\
chos
loC t r o n
locatjon

by
Loader v a r i a b l e o to
Chosen
31obal,
Epresentotton
oader.for eg
obiectP g
Pgto
longua3e EmplemenBaHon time-

nd binod
o4he valuet
0he yalues4,
b i o c l i n 4 , bi
bindir
of
n his pe
pseotabion in Computer: Bakme.
operations
opesations
3 SStalemne
en
of
of
b i n d i ng
Also there
SemeoHcs of operationg,

4Langa.Defindon ime
of progmminq
lang.i
stnetureg
of t
MOSt
dettneol. Hence binct'na.
te Aime te lang, 1s
cut
prrq Hat hoS been,
a stnuoture of
pex
a htime of its dedoiiion
For e " D o ' i's a e senveol
word. to PASCAL
not fn foRTRAN

Lae bindung.
EaTy PBinding
a compile_1 A bapPeos a Un S
D t happens
me.
2 T h method definitios 2 }he a e method def
ore not
mehod coll are: linlced duriog mehod Cal
bounduni) Tun Hm
t Compile time

3 s more efhtient I R s mor flexible

PD 9Tammg Paradgms
Progsamm tng Paraoligms can be deKned e s o

oP problem solving ann QppDach


to prgomm
langucge desfgn.
clAsSMAte

Date
Page

Vovious pe of pvg70mming PoTadigm are


D mperakire or procedura pmgTommin
a obiect oienecd '1
3) unctionc
prorommi n
ay logic prognamming

Tmperat'e pogTammin
The Lain
woTc impetsae means to Comm anc:
e
hs ang Ps command dsiven oY STaR
omieote lang
he
Imperah ve prD g5armming is a1so
procedural pogTa mmin9 Calleo-
Po
ang
Consists of sequence of stetementS.
Aftez
MeCCHon_dt eoch State ment e values are Sterc
in the memorN
T Ceotro
katures o thPs lang arr variables,
asstgnmeot 3tatemen s,2 iterahoos.
-Excumples oE imperchie preqTammioq are- C
Pasca1 Ada
Fortran So on

Mer'ts-
I) Simple to
inmplement*
These lona have lOuo memo i ukifbeahbo.
Demems-
) LorGe Compley poblems Can not be îm plemented wine
this cakegoj
a PaTalle p cgsomminq snetpossible in s aag
SThs lana s less 10duchwe 2 a 1Oc level
Co
mparec +o
otherproama
Page

mmnI
p r v g r a m m i n g

prgTa
objec oienteo Ps modelec a
eve
thing
n this 1ng.
Hence i s l e name prpg mming 4.
modulor prpgC mming
hau i
This
1his 1ctng
eng.
tunc+ions Qre
bound n ,On*
which eltite
in
Catheel clus
Pa7aoligm has 9 a i n e d a
This
This pgromming
becauE i i s cho
ent yeors
Populany in
rtec

dale abstra0hon, en Ga psu,


caues Such as
in hentence , polymonphf's m So on.
Examples of oop 1ang, arc-Snmallalk,CTJGv

Meits
1 + pmmyides a moodular prqre mming appore ppTba
ppvi cles ebstsoct daa / n which Some of e

1mplemeotabon details Cun be hiddeo 2 proteckel


3 Medi
ing cocdecode Por maintenaacebecaue ey
to modaleg n
+e paug
incl' nq bugs become eay

Dememts
SomeDmes col wo Td: Sbt objects
a l i ted
Con not be
easily.Hente it ts Complex toimplemen
2) Some of tte
memers ( data or 9ethoods) ot Heca
are dden,
3 n
cop ee inqs osanged in 4l form of
clas seS mo dules For H lo
jisnot desicbleteature. wey leel pp
clasSmAtc

Date
Page

Fuo c4Ton a Programming


n -
his
n
aradigm te compudadions are epresse of

form of funci
uncaonot pos,Porodigms ong.
+aea VGIues a s si0gle
D I k e vcicubles Nalues Qre nere mo tie
ac, Volues ate transformeed In1-o neo Volue
Computatons of funn ang: a r
pertormed 1aTgely
mough applytng fun
4o volues iee, (+ 10 20. hiS
*pecsfoos s Intereel os
ill be ctun 1612o, Jle caul
necl,
tor buio na
more Complex funn
cdereloped tunn arr used e revious y
Exampes of un
poa.arr LISP, Vasxel, ML
Ments
) Due to use of fuo te poa Ore
TVe Fun are
easyto Understen-
3 T s
aeusable
possible to evelop mai oteio large
Consisting of |Orge no. o uo prg.

Demet
functional pba. > less thicient 4hGn te
Theu consume arge amoun ot Hme othor Iang.
tor erecuion, }meMo
) Puretu functonol progremmina is noa a good
Dption for ommeta slw dene lopmeot
logic ProgTamming .
0+his poTooltgms
we EXp rss Aaons t
sComputakio
I + Ts qo also

emacal 1oge onl


of mah epprDach
Pegamming

ule bcgeol OTcder


specta
speciHed in no
Pules ar
pmgsammin
for declarati
ESupports Compuka.hons taj.
howHe
In is ppaeh

explainecl. l
Paaaoligms tocuses o n oedicake
T logic
boufc concept ?s a e l a t i on
'n wbich t
x m p l e oJoqic po gammingjS Paprolog

Mete
T h i s programminq Paraoligms is beliable.
2) D poq. an be quicelydexeloped usinq his ap
as it malces use of ueferlSe Stetemenisi rathe
objects.
a t is best suatable tor he probiems in uohich
knowledge ase Can be eshablishec

You might also like