
svayanchalit-aadharit programming

svayanchalit-aadharit programming haah eka programming pratiman aahe jyamadhye program kinwa tyacha kahee bhag maryadit-sthitee machine (eff. ess. emm.) kinwa itar konatyahi (anekada adhik klisht) aupcharik automatonche model mhanoon manla jaato (svayanchalit siddhant pahaa). kadhikadhi sambhavya avasthancha sambhavya anant sanch sadar keela jaato aanee asha sanchamadhye keval ganana navhe tarr eka klisht rachana asoo shakate.
maryadit-sthitee yantra-aadharit programming samanyatah samaan asate, parantu, aupcharikpane sangayache tarr, serve sambhavya prakarancha samavesh karat nahee, kaaran eff. ess. emm. mhanje maryadit-sthitee machine, aanee svayanchalit-aadharit programming heey kathor arthane eff. ess. emm. chaa vapar karane aavashyak nahee.
autometa-aadharit programingsathi khaleel gunadharm heey pramukh nirdeshak aaheth
svayanchalit-aadharit sanketachi sampoorn amalbajavani hii svayanchalit payyanchey eka "chakr" aahe.
svayanchalit-aadharit programingchi kalpana vaparnyache aanakhi eka kaaran mhanje yaa tantratil programarchi programbaddal vichar karanyachi shaili hii turing machines, markov algoridam ityadincha vapar karoon ganiteey kaame sodavanyasathi vaparlya jaanarya vichar karnyachya shailishi khoop samaan aahe.
udaharanadakhal.
kaam.
manak input ola-darr-olitoon majkoor vachanyache aanee pratyek olicha pahila shabd manak outputwar lihinyache kaam vicharat ghya. pratham aapan serve agraganya whitespace varn, kahee asalyas, vagalato. mug aapan pahilya shabdachi serve akshare chhapato. shevati naveen ola varn yeiparyant aapan serve magchi akshare vagalato. jevha jevha pravahachya suruvatila naveen ola varnancha kram aadhalat nahee, tevha aapan fakt pahili chhapato aanee urvarit vagalato; anyatha, aapan serve vagalato. pudhe aapan pudhil olivar prakriya punha suru karato. filechya shevatchi sthitee bhedasavat asatana (tappyachi parva naan karata), aamhi thambato.
paramparik karyakram.
vareel karya karnara see madheel paramparik karyakram yasarkha disu shakatoh
int mukhya (shoonya) {
 int see;
 qaraa. {
 qaraa. {
 c = getcher ();
 } tarr (ishaspesa (see));
 tarr (!ishaspesa (see) aanee & see!= eof) {
 puchar (qa);
 c = getcher ();
 
 tarr (see!= '\n' & & c!= eof) {
 c = getcher ();
 
 jarr (c = = '\n') {
 puchar (qa);
 ) tarr (see!= eof);
 0 parat qaraa;
udaharanarth, yaa inputvar vareel program sankalit karane aanee chalvaneh
$ clang karyakram.c & & (printuff "\t\v\f\r\n\n\t\v\f\r phoo baar baaz\n\n\t\v\f\r cukes corge" . ./aaa.baher)
utpanah
phoo
qx
svayanchalit-aadharit karyakram.
prakriyatmak.
maryadit avasthechya yantranchya sandarbhat vichar karoon tech kaam sodavale jaau shakate. lakshat ghya qee olichya parcing teen tappe asatatah agraganya pandhya jaagechi akshare vagalane, pahilya shabdachi akshare chhapane aanee mageel akshare vagalane. yaa svayanchalit sthitila cocksey _ 1, cocksey _ 2 aanee cocksey _ 3 mhanuya. programchi svayanchalit-aadharit aavrutti ashee disu shakateh
enam sthitee (aadhi, aat, nantar);
int mukhya (shoonya) {
 int see;
 enam sthitee s = aadhi;
 tarr (c = getcher ())!= eof) {
 badal (oo) {
 aadhiche prakaranah
 jarr (!ishaspesa (qa) {
 puchar (qa);
 ess = aat;
 
 break;
 cases aatunah
 jarr (c = = '\n') {
 puchar (qa);
 ess = aadhi;
 anyatha jarr (ishaspesa (see)) {
 ess = nantar;
 ) anyatha {
 puchar (qa);
 
 break;
 prakarnanantarah
 jarr (c = = '\n') {
 puchar (qa);
 ess = aadhi;
 
 break;
 0 parat qaraa;
karyakram aata lamb disat asala taree, tyacha kiman eka mahattvapoorn fayda aaheh fakt eka vachan (mhanje, cockoge _ 4 karyavar coll qaraa) soochana aahe. yashivay, paramparik aavruttimadhye asalelya charaivaji fakt eka loop aahe. cockoge _ 5 loopcha mukhya bhag haah 'automaton step' aahe aanee loop swatach automaton stepche 'cycle' aahe. haah karyakram sthitee aakrutimadhye darshavilelya maryadit-sthitee yantrache kaam amalat aanato.
yaa karyakramacha sarvat mahattvacha gunadharm mhanje svayanchalit payari code vibhag spashtapane sthanik aahe. svayanchalit charanasathi spasht karya cocksey _ 6 saha, karyakram haah gunadharm adhik changlya prakare darshavitoho
enam sthitee (aadhi, aat, nantar);
shoonya payari (enam sthitee * const ess, int const see) {
 badal (* s) {
 aadhiche prakaranah
 jarr (!ishaspesa (qa) {
 puchar (qa);
 *ess = aat;
 
 break;
 cases aatunah
 jarr (c = = '\n') {
 puchar (qa);
 *ess = aadhi;
 anyatha jarr (ishaspesa (see)) {
 *ess = nantar;
 ) anyatha {
 puchar (qa);
 
 break;
 prakarnanantarah
 jarr (c = = '\n') {
 puchar (qa);
 *ess = aadhi;
 
 break;
int mukhya (shoonya) {
 int see;
 enam sthitee s = aadhi;
 tarr (c = getcher ())!= eof) {
 payari (& s, c);
 0 parat qaraa;
karyakram aata svayanchalit-aadharit kodache moolbhut gunadharm spashtapane darshavitoho
maryadit svayanchalit yantrala sthitee-sankraman taktyadvare paribhashit kele jaau shakate, jyachya pankti vartaman avasthansathi, stambh inputsathi aanee peshi pudhil avastha aanee krutee karnyasathi asatat.
sarvasadharanpane sangayache tarr, svayanchalit-aadharit karyakram naisargikaritya haah drushtikon vaparu shakato. sthitee-sankraman taktyasathi spasht dvimiteey rachnesah, karyakram haah drushtikon vapartoho
enam sthitee (aadhi, aat, nantar);
shoonya mudran (int const see) {
 puchar (qa);
rachana shakha {
 enam sthitee sthir pudhil sthitee;
 shoonya (* krutee) (int);
sanrachana shakha sthir sankraman [3] [3] = {
 //neuline whitespace itar input/steet
 ,// aadhi
 ,// aatoon
 //nantar
shoonya payari (enam sthitee * const ess, int const see) {
 int const roow = (* s = = aadhi)? 0: (* s = = aat)? 1: 2;
 int const stambh = (c = = '\n')? 0: ishaspesa (see)? 1: 2;
 struct shakha sthirank * sthirank b = & sankramane [pankti] [stambh];
 *s = b-> pudhil sthitee;
 buub-> krutee (qa);
int mukhya (shoonya) {
 int see;
 enam sthitee s = aadhi;
 tarr (c = getcher ())!= eof) {
 payari (& s, c);
 0 parat qaraa;
object oriented.
jarr amalbajavanichi bhasha object-oriented programingla samarthan dett asel, tarr svayanchalit yantrala objectmadhye samavisht karane heey programche eka sope refactoring aahe, asha prakare tyache amalbajavaniche tapasheel lapavane. object-oriented shailicha vapar karoon see + + madheel program assa disu shakatoh
enam sthitee (aadhi, aat, nantar);
rachana shakha {
 enam sthitee sthir pudhil sthitee;
 shoonya (* krutee) (int);
varg steet machine {
 sarvajanikah
 steet machine ();
 shoonya feedture (int);
 sanrakshitah
 sthir shoonya nope (int);
 sthir shoonya mudran (int);
 khajgih
 enam sthitee (_ state);
 sthir sanrachana shakha sthir sankraman [3] [3];
shoonya statemsheenh feedchar (int const see) {
 int const roow = (_ steet = = aadhi)? 0: (_ state = = aat)? 1: 2;
 int const stambh = (c = = '\n')? 0: ishaspesa (see)? 1: 2;
 struct shakha sthirank * sthirank b = & _ sankramane [pankti] [stambh];
 _ sthitee = b-> pudhil _ sthitee;
 buub-> krutee (qa);
shoonya steet machineh print (int const see) {
 puchar (qa);
struct branch const steet machineh sankraman [3] [3] = {
 //neuline whitespace itar input/steet
 ,// aadhi
 ,// aatoon
 //nantar
int maine () {
 int see;
 steet machine emm;
 tarr (c = getcher ())!= eof) {
 emm.feedture (qa);
 0 parat qaraa;
"nond."-lekhachya vishayashi thet sambandhit nasalele badal qamee karnyasathi, seechya manak granthalayatil input/output cocksey _ 4 aanee cocksey _ 9 karye vaparali jaat aahet.
aabhasi karya collmule mothya sashart vidhanancha kinwa table lookupcha avalamb naan karata, ekhadya vastusathi, sthitee rachana namuna haah tyachya antargat sthitinusar dhavnyachya velee tyache vartan badalanyacha eka marg aahe. mothya sashart vidhanancha vapar karoon kodapeksha tyacha mukhya fayda mhanje rajya-vishisht code heey eka akhand khandat sthanbaddh karnyaivaji vegvegalya vastunmadhye vitarit kele jaate, jyamule dekhbhalakshamta sudharate. rajya-sankraman saranya vaparoon kodachya tulanet tyache mukhya fayade mhanje aabhasi karya coll heey table shodhapeksha adhik karyaksham asatat, teey rajya-sankraman nikash saranibaddha swarupapeksha adhik spasht asatat aanee rajya sankramanansah kriya jodane sope asate. tathapi, yamule eka naveen samasya udbhavateh varganchi sankhya itar paddhatinpeksha code qamee sankshipt karate. rajya rachana namuna vaparoon karyakram yasarkha disu shakatoh
varg steet machine;
varg rajya {
 sarvajanikah
 aabhasi shoonya feedture (statemshin *, int) const = 0;
varg aadhih sarvajanik rajya {
 sarvajanikah
 sthir sthitee sthir * twarit ();
 aabhasi shoonya feedchar (statemshin *, int) const override;
 sanrakshitah
 aadhi () = purvanirdharit;
 khajgih
 sthir sthitee sthir * * udaharan;
varg aatilah sarvajanik rajya {
 sarvajanikah
 sthir sthitee sthir * twarit ();
 aabhasi shoonya feedchar (statemshin *, int) const override;
 sanrakshitah
 aat () = purvanirdharit;
 khajgih
 sthir sthitee sthir * * udaharan;
nantarcha vargah sarvajanik rajya {
 sarvajanikah
 sthir sthitee sthir * twarit ();
 aabhasi shoonya feedchar (statemshin *, int) const override;
 sanrakshitah
 nantar () = purvanirdharit;
 khajgih
 sthir sthitee sthir * * udaharan;
varg steet machine {
 sarvajanikah
 steet machine ();
 shoonya feedture (int);
 sanrakshitah
 shoonya setstate (sthitee sthirank *);
 khajgih
 sthitee sthir * _ sthitee;
 aadhi mitra varg;
 aat mitra varg;
 mitra varganantar;
aadhi sthirank * asey sangah: twarit () {
 jarr (!_udaharan) {
 udaharan = aadhiche naveen;
 udaharan parat qaraa (_ in);
aadhi shoonyah feedchar (statemshin * const emm, int const see) const {
 jarr (!ishaspesa (qa) {
 puchar (qa);
 m-> seet steet (aatilah: Instantiate ());
aadhi sthirank * asey sangah: _ drushtant = nalaptra;
aat sthirank * sthitih twarit () {
 jarr (!_udaharan) {
 udaharan = aat naveen;
 udaharan parat qaraa (_ in);
aat shoonyah feedchar (statemshin * const emm, int const see) const {
 jarr (c = = '\n') {
 puchar (qa);
 m-> seet steet (aadhih: Instantiate ());
 anyatha jarr (ishaspesa (see)) {
 m-> seet steet (nantarah: Instantiate ());
 ) anyatha {
 puchar (qa);
aat sthirank * sthitih _ drushtant = nalaptra;
nantar sthirankah twarit () {
 jarr (!_udaharan) {
 udaharan = nantar naveen;
 udaharan parat qaraa (_ in);
nantar shoonyah feedchar (statemshin * const emm, int const see) const {
 jarr (c = = '\n') {
 puchar (qa);
 m-> seet steet (aadhih: Instantiate ());
nantar sthirank * sthitih _ drushtant = nalaptra;
shoonya statemsheenh feedchar (int const see) {
 sthitee-> feedchar (heey, see);
shoonya steet machineh setstate (sthitee sthirank * sthirank ess) {
 sthitee = s;
int maine () {
 int see;
 steet machine emm;
 tarr (c = getcher ())!= eof) {
 emm.feedture (qa);
 0 parat qaraa;
automation aanee automated.
svayanchalit-aadharit programming kharokhar svayanchalit kshetrat aadhalanaya programingchya garjanshi agadi jawalun julate.
utpadan chakr samanyatah asha prakare tayar kele jaateh
vividh samarpit programming bhasha asha modella qamee-adhik pramanat atyadhunik marganni vyakt karnyas anumati detat.
svayanchalit karyakram.
varr dilele udaharan khaleel chhadm-kodpramane yaa drushtikonanusar vyakt kele jaau shakate ('sanch' tarkshastra chull sakriy karato, 'reset' tarkshastra chull nishkriy karato, ':' chull niyukt karato aanee '=' samanatesathi chachanya):
naveen olah '\n'
pandhya jagesathih ('\t', '\n', '\v', '\f', '\r', ")
namood kele aaheh (aadhi, aat, nantar)
setstate (see) {
 jarr aadhi aanee (see!= naveen resha aanee see pandhya jaaget nahee) nantar aat seet qaraa
 jarr aat asel tarr (jarr c pandhya jaaget asel tarr nantar seet qaraa anyatha jarr c = naveen resha asel tarr aadhi seet qaraa)
 jarr nantar aanee see = naveen resha asel tarr aadhi seet qaraa
krutee (qa) {
 jarr aadhi aanee (see!= naveen resha aanee see pandhya jaaget nahee) nantar liha (see)
 jarr aat aanee c pandhya jaaget nasel tarr liha (c)
 jarr nantar aanee c = naveen resha asel tarr (c) liha.
chakr {
 aadhi seet qaraa
 loop hoiparyant (seeh readcarector) = eol {
 setstate (see)
 krutee (qa)
eka bajula chakr pragati vyakt karananya nityakramanche pruthakkaran aanee dusya bajula vastavik krutee (input aanee outputshee julanari) adhik spasht aanee sopee code anumati dete.
ghatana.
svayamchalitatechya kshetrat, tappyatappyane paul takane heey yantrakadunach yenanya input detavar avalambun asate. heey majkuratil akshare vachoon karyakramamadhye darshavile jaate. pratyakshat, tee mahitee sthitee, veg, tapman ityadimbaddal mahitee dete. yantrachya mahattvapoorn ghatakanche.
jee. yuu. aay. programingpramanech, yantrachya avasthetil "badal" asha prakare antim sthitiparyant pohocheparyant, eka rajyatoon dusya rajyat jaanyas karanibhoot tharananya ghatana mhanoon manale jaau shakatat. sambhavya avasthanche sanyojan vividh prakarchya ghatana nirman karoo shakate, asha prakare adhik jatil utpadan chakr paribhashit karate. parinami, chakr heey sahasa sadhe resheey anukram asanyaitke door asatat. samanyatah samantar shakha ekatra chalatat aanee vegvegalya ghatanannusar paryay nivadle jaatat, jeey khalee yojnabaddhapane darshavile aaheth
 esah tappa seeh sthitee
 ess1
 .-|-see2
 ess2
 ----------
 .-see 31 .-see 32
 ess 31 ess 32
 .-see 41 .-see 42
 ----------
 ess 4
anuprayog.
svayanchalit-aadharit programingcha vapar shabdik aanee vakyarachana vishleshananmadhye mothya pramanat keela jaato.
yashivay, samantar prakriya kinwa dhage vaparnyacha ekmev paryay mhanoon ghatana-chalit programingsathi svayanchalit prakriyechya sandarbhat vichar karane (mhanje, amalbajavani prakriyeche 'svayanchalit payyan' madhye vibhajan karane aanee spasht 'svayanchalit sthitee' madhoon tappyatappyane mahitee dene) aavashyak aahe.
aupcharik tapashilanchya kshetrat anekada rajye aanee rajya yantranchya kalpana vaparlya jaatat. udaharanarth, yuu. emm. ell.-aadharit software architecture development programche vartan nirdisht karnyasathi sthitee aakruti vaparte. tasech vividh sampreshan niyamavali anekada sthitichi spasht kalpana vaparoon nirdisht kelya jaatat (udaa.jee.).
svayanchalit (payya aanee avastha) chya sandarbhat vichar karane heey kahee programming bhashanchya shabdarthshastrache varnan karnyasathi dekhil vaparale jaau shakate. udaharanarth, refaul bhashet lihilelya programchya amalbajavaniche varnan tathakathit amoort refaul machinechya "payanyancha" kram mhanoon kele jaate; yantrachi sthitee "drushya" (chalanshivay eka aniyantrit refaul abhivyakti) aahe.
yojana bhashetil satatyasathi payya aanee avasthanchya sandarbhat vichar karane aavashyak aahe, jaree yojana swatach konatyahi prakare svayanchalit-sambandhit nahee (tee punaravrutti aahe). coll/see. see. suvidha karya karane shakya karnyasathi, amalbajavani karyakram amalbajavanichi sampoorn sthitee samajoon ghenyas saksham asane aavashyak aahe, jeey rajyat konatahi antarnihit bhag nasel tarach shakya aahe. asha pakadalya gelelya sthitila 'satatya' mhanatat aanee tee (tulanene klisht) svayanchalit sthitee manali jaau shakate. automaton payari mhanje mageel payaripasoon pudhil satatya vaja karane aanee amalbajavani prakriya hii asha payyanchey chakr aahe.
alekzandar alongren yanni tyanchya pustakat programming bhashanchya shabdarthshastrachya varnanachya tathakathit 'vienna paddhati' chey spashtikaran dile aahe, jee purnapane aupcharik svayamchalitatevar aadharit aahe.
svayanchalit-aadharit drushtikon vaparnyache steet pranali heey eka changle udaharan aahe; yaa pranalimadhye, itar vaishishtyanvyatirikt, "stattle" navachi antarbhut bhasha samavisht aahe jee purnapane svayanchalit-kendrit aahe.
itihas.
aupcharik bhasha vishleshanasarkhya svayanchalit siddhantavar aadharit algoridam asalelya kshetranmadhye svayanchalit-aadharit tantre mothya pramanat vaparali gelee.
yavarcha eka prarambhik lekh johnson aanee itarancha aahe.1968.
samanya tantra mhanoon svayanchalit-aadharit programingcha sarvat suruvaticha ullekh pieter naur, 1963 yanni peparmadhye aadhalato. lekhak yaa tantrala 'turing machine drushtikon' mhanato, tathapi kagdavar konatehi vastavik turing machine dile jaat nahee; tyaeivaji, payya aanee avasthanvar aadharit tantrache varnan kele aahe.
atyavashyak aanee prakriyatmak programingshi tulana.
rajyachi kalpana hii svayanchalit-aadharit programingchi ekmev malmatta nahee.
sarvasadharanpane sangayache tarr, konatyahi sanganak programchya amalbajavanidarmyan, amalbajavanidarmyan badaloo shakananya serve mahitiche sanyojan mhanoon sthitee (kinwa program sthitee) disun yete. udaharanarth, paramparik atyavashyak karyakramachya sthitimadhye khaleel goshtincha samavesh hotoh
heey 'spasht' bhag (jase qee chalanmadhye sathavaleli moolye) aanee 'antarnihit' bhag (paratava patta aanee soochana nirdeshak) madhye vibhagale jaau shakatat.
asey mhatalyavar, svayanchalit-aadharit karyakram heey atyavashyak karyakramache eka vishesh udaharan manale jaau shakate, jyamadhye rajyacha antarnihit bhag qamee keela jaato. step" code vibhagat pravesh karnyachya done vegalya kshani ghetalelya sampoorn karyakramachi sthitee keval automaton sthiteet bhinn asoo shakate. yamule karyakramache vishleshan sope hote.
object-oriented programming sambandh.
object-oriented programingchya siddhantat, objectchi antargat 'sthitee' asate aanee tee 'sandesh prapt karnyas', 'tyanna pratisad denyas', 'itar vastoonna sandesh pathvanyas' aanee sandesh hataltana tyachi antargat sthitee badalanyas saksham asate. adhik vyavharik paribhashet, "ekhadya vastuchi paddhat sangane" heey "vastoola sandesh pathvane" sarkhech manale jaate.
asha prakare, ekikade, object-oriented programingmadhil vastoo svayanchalit (kinwa svayanchalit models) manalya jaau shakatat, jyanche 'steet' heey khajgi kshetranche sanyojan aahe aanee eka kinwa adhik paddhati 'step' manalya jaatat. asha paddhati ekmekanna kinwa swatahla, pratyaksh kinwa apratyakshapane, mhanoo nayet, anyatha vastoo svayanchalit paddhatine amalat aanali jaau shakat nahee.
dusarikade, automatonche model amalat aananyasathi object changla aahe. jevha autometa-aadharit drushtikon object-oriented bhashet vaparla jaato, tevha automaton model sahasa vargadvare amalat aanale jaate, rajyache pratinidhitva vargachya khajgi kshetransah kele jaate aanee payari eka paddhat mhanoon amalat aanali jaate; ashee paddhat sahasa vargachi ekmev sthir nasaleli sarvajanik paddhat asate (constructor aanee distructor vyatirikt). itar sarvajanik paddhati rajyala prashna vicharoo shakatat parantu tyat badal karoo shakat naheet. serve duyyam paddhati (jase qee vishisht rajya hatalanare) sahasa vargachya khajgi bhagat lapavalya jaatat.