毕业设计(机械)外文翻译bfin.docx
Visuualiizattionn off PLLC PProggramms uusinng XXMLM. BBanii Yoouniis aand G. FreeyJuniiorpproffesssorsshipp Aggenttenbbaseed AAutoomattionnUnivverssityy off KaaiseersllauttemP. 00. BBox 30449, D-6676553 KKaissersslauutemm, GGermmanyyAbsttracct - Duue tto tthe groowinng ccompplexxityy off PLLC pproggramms ttherre iis aan iincrreassingg innterrestt inn thhe aappllicaatioon oof fformmal metthodds iin tthiss arrea. Foormaal mmethhodss allloww riigidd prroviing of sysstemm prropeertiies in verrifiicattionn annd vvaliidattionn. OOne wayy too appplyy foormaal mmethhodss iss too uttiliize a fformmal dessignn appprooachh inn PLLC pproggrammminng. Howweveer, forr exxisttingg sooftwwaree thhat hass too bee opptimmizeed, chaangeed, or porrtedd too neew ssysttemss .TTherre iis tthe neeed ffor an appproaach thaat ccan staart froom aa giivenn PLLC pproggramm. TTherrefoore, foormaalizzatiion of PLCC prrogrramss iss a toppic of currrennt rreseearcch. Thee paaperr ouutliiness a re-enggineeeriing appproaach bassed on thee foormaalizzatiion of PLCC prrogrramss. TThe traansfformmatiion intto aa veendoor iindeepenndennt fformmat andd thhe vvisuualiizattionn off thhe sstruuctuure of PLCC prrogrramss iss iddenttifiied as an impporttantt innterrmeddiatte sstepp inn thhis proocesss. It is shoown howw XMML aand corrressponndinng ttechhnollogiies cann bee ussed forr thhe fformmaliizattionn annd vvisuualiizattionn off ann exxisttingg PLLC pproggramm.I. IINTRRODUUCTIIONProggrammmabble Loggic Conntroolleers (PLLCs) arre aa sppeciial typpe oof ccompputeers thaat aare useed iin iinduustrriall annd ssafeety criiticcal apppliccatiionss. TThe purrposse oof aa PLLC iis tto cconttroll a parrticculaar pproccesss, oor aa coolleectiion of proocesssess, bby pprodduciing eleectrricaal cconttroll siignaals in ressponnse to eleectrricaal pproccesss- rrelaatedd innputts ssignnalss. TThe sysstemms cconttrollledd byy PLLCs varry ttremmenddoussly, wiith apppliccatiionss inn maanuffactturiing, chhemiicall prroceess conntrool, macchinningg, ttrannspoortaatioon, powwer disstriibuttionn, aand manny ootheer ffiellds. Auutommatiion apppliccatiionss caan rrangge iin ccompplexxityy frromaa siimplle ppaneel tto ooperratee thhe llighhts andd mootorrizeed wwinddow shaadess inn a connferrencce rroomm too coomplleteely auttomaatedd maanuffactturiing linnes.Withh thhe wwideeninng oof ttheiir aappllicaatioon hhoriizonn, PPLC proograams aree beeingg suubjeect to inccreaasedd coompllexiity andd hiigh quaalitty ddemaandss esspecciallly forr saafetty-ccritticaal aappllicaatioons. Thhe ggrowwingg coompllexiity of thee apppliicattionns wwithhin thee coomplliannce of limmiteed ddeveeloppmennt ttimee ass weell as thee reeusaabillityy off exxisttingg sooftwwaree orrPLCC moodulles reqquirres a fformmal appproaach to be devveloopedd II. Enssuriing thee hiigh quaalitty ddemaandss reequiiress veerifficaatioon aand vallidaatioon pprocceduuress ass weell as anaalyssis andd siimullatiion of exiistiing sysstemms tto bbe ccarrriedd ouut 2. Onne oof tthe impporttantt fiieldds ffor thee foormaalizzatiion of PLCC prrogrramss thhat havve bbeenn grrowiing up in reccentt tiime is Revversse-eengiineeerinng 3. Reeverrse Enggineeeriing is a pproccesss off evvaluuatiing sommethhingg too unnderrstaand howw itt woorkss inn orrderr too duupliicatte oor eenhaancee itt. WWhille tthe reuuse of PLCC coodess iss beeingg esstabblisshedd ass a toool ffor commbattingg thhe ccompplexxityy off PLLC pproggramms, Revversse EEngiineeerinng iis ssuppposeed tto rreceeivee inncreeaseed iimpoortaancee inn thhe ccomiing yeaars esppeciiallly iif eexittingg haardwwaree haas tto bbe rrepllaceed bby nnew harrdwaare witth ddifffereent proograammiing envviroonmeentssVisuualiizattionn off exxisttingg PLLC pproggramms iis aan iimpoortaant inttermmediiatee sttep of Revversse EEngiineeerinng. Thee paaperr prroviidess ann appprooachh toowarrds thee viisuaalizzatiion of PLCC prrogrramss ussingg XMML wwhicch iis aan iimpoortaant appproaach forr thhe oorieentaatioon aand bettterr unnderrstaandiing forr ennginneerrs wworkkingg wiith PLCC prrogrramss. The papper is strructtureed aas ffolllowss. FFirsst, a sshorrt iintrroduuctiion to PLCCs aand thee coorreespoondiing proograammiing tecchniiquees aaccoordiing to thee IEEC 6611331-33 sttanddardd iss giivenn. IIn SSecttionn an appproaach forr Ree-ennginneerringg baasedd onn foormaalizzatiion of PLCC prrogrramss iss inntrooducced. Thhe ttrannsfoormaatioon oof tthe PLCC coode intto aa veendoor iindeepenndennt fformmat is ideentiifieed aas aan iimpoortaant firrst steep iin tthiss prroceess. XMML aand corrressponndinng ttechhnollogiies succh aas XXSL andd XSSLT thaat ccan be useed iin tthiss trranssforrmattionn arre ppressentted in Secctioon IIV. Secctioon VV prreseentss thhe aappllicaatioon oof XXML forr thhe vvisuualiizattionn off PLLC pproggramms aand illlusttrattes thee appprooachh wiith an exaamplle. Thee fiinall Seectiion summmarrizees tthe ressultts aand givves an outtloook oon ffutuure worrk iin tthiss onngoiing proojecct.PLCC ANND IIEC 611331Sincce iits inccepttionn inn thhe eearlly 70ss thhe PPLC recceivved inccreaasinng aatteentiion duee too itts ssucccesss inn fuulfiilliing thee obbjecctivve oof rrepllaciing harrd-wwireed cconttroll eqquippmennts at macchinnes. Evventtuallly it greew uup aas aa diistiinctt fiieldd off apppliicattionn, rreseearcch aand devveloopmeent, maainlly ffor Conntrool EEngiineeerinng. IEC 61 1311 iss thhe ffirsst rreall enndeaavouur tto sstanndarrdizze PPLC proograammiing lannguaagess foor iinduustrriall auutommatiion. Inn I9993 thee Innterrnattionnal Eleectrroteechnnicaal CCommmisssionn 44 ppubllishhed thee IEEC 6611331 IInteemattionnal Staandaard forr Prrogrrammmablle CConttrolllerrs. Befforee thhe sstanndarrdizzatiion PLCC prrogrrammmingg laanguuagees wweree beeingg deevellopeed aas ppropprieetarry pproggrammminng llangguagges usaablee too PLLCs of a sspecciall veendoor. Butt inn orrderr too ennhannce commpattibiilitty, opeenneess andd innterropeerabbiliity amoong diffferrentt prroduuctss ass weell astoo prromoote thee deevellopmmentt off tooolss annd mmethhodoologgiess wiith resspecct tto aa fiixedd seet oof nnotaatioons thee IEEC 6611331sttanddardd evvolvved. Thhe tthirrd ppartt off thhis staandaard deffinees aa suuit of fivve pproggrammminng llangguagges:Insttrucctioon LListt (IIL) is a llow-levvel texxtuaal llangguagge wwithh a strructturee siimillar to asssembblerr. OOrigginaatedd inn Euuroppe IIL iis cconssideeredd too bee thhe PPLC lannguaage in whiich alll ottherr IEEC611 1331-33 laanguuagees ccan be traansllateed.Laddder Diaagraam (LO) iss a graaphiicall laanguuagee thhat hass itts rrootts iin tthe USAA. LLDs connforrm tto aa prrogrrammmingg sttylee boorroowedd frrom eleectrroniic aand eleectrricaal ccirccuitts ffor impplemmenttingg coontrrol loggicss.Struuctuuredd Teext (STTJ iis aa veery powwerfful higgh-lleveel llangguagge. ST borrrowws iits synntaxx frrom Passcall, aaugmmenttingg itt wiith somme ffeatturees ffromm Adda. ST conntaiins alll thhe eesseentiial eleemennts of a mmodeem pproggrammminng llangguagge.Funcctioon BBlocck DDiaggramm (FFBD) iss a graaphiicall laanguuagee annd iit iis vveryy coommoon tto tthe proocesss iinduustrry. In thiis llangguagge cconttrolllerrs aare moddellled assiignaal aand datta fflowws tthrooughh fuuncttionn bllockks. FBDD trranssforrms texxtuaal pproggrammminng iintoo coonneectiing funnctiion bloockss annd tthuss immproovess moodullariity andd sooftwwaree reeusee.Sequuenttiall Fuuncttionn Chhartt (SSFC) iss a graaphiicall laanguuagee. SSFC eleemennts aree deefinned forr sttruccturringg thhe oorgaanizzatiion of proograammaablee coontrrolller proograams.One proobleem wwithh IEEC 661 1131-3 iis tthatt thheree iss noo sttanddarddizeed fformmat forr thhe pprojjectt innforrmattionn inn a PLCC prrogrrammmingg toool. Att thhe mmomeent theere aree onnly venndorr sppeciificc foormaats. Thhis is alsso oone reaasonn foor tthe resstriictiion of forrmallizaatioon aapprroacchess too siinglle pproggramms oor aalgooritthmss. HHoweeverr, rreceentlly tthe PLCC usserss oorgaanizzatiion PLCCopeen (seee htttp:/wwww.plccopeen.oorg) sttartted a TTechhniccal Commmittteee too deefinne aan XXML bassed forrmatt foor pprojjectts aaccoordiing to IECC 6111311-3. Thhis neww foormaat wwilll eaase thee acccesss oof fformmaliizattionn tooolss too alll rreleevannt iinfoormaatioon oof aa PLLC pprojjectt. RRE-EENGIINEEERINNG AAPPRROACCHThe preesenntedd appprooachh toowarrds re-enggineeeriing (cff. FFig.1) is bassed upoon tthe conncepptioon tthatt XMML ccan be useed aas aa meediuum iin wwhicch PPLC coddes willl bbe ttrannsfoormeed.Thiss trranssforrmattionn offferrs tthe advvanttagee off obbtaiininng aavenndorr inndeppenddentt sppeciificcatiion codde. (Evven if thee PLLCoppen succceeeds in deffiniing a sstanndarrdizzed forrmatt foor PPLC apppliccatiionss, ttherre wwilll reemaiin aa loot oof eexisstinng pproggramms tthatt doo noot cconfformm too thhis staandaard.) Baseed oon tthiss coode a sstepp-wiise traansfformmatiion to a fformmal moddel (auutommataa) iis pplannnedd. TThiss moodell caan tthenn bee ussed forr annalyysiss, ssimuulattionn, fformmal verrifiicattionn annd vvaliidattionn, aand finnallly ffor thee ree-immpleemenntattionn off thhe ooptiimizzed alggoriithmm onn thhe ssamee orr annothher PLCC.Sincce rre-eengiineeerinng oof ccompplette pproggramms wwilll, iin mmostt caasess, bbe oonlyy a semmi-aautoomattic proocesss, inttermmediiatee viisuaalizzatiion of thee coode is an impporttantt poointt. AAt ddifffereent staagess off thhe pproccesss diiffeerennt aaspeectss off thhe ccodee annd/oor fformmal moddel havve tto bbe vvisuualiizedd inn a wayy thhat a ddesiigneer ccan guiide thee fuurthher worrk. XMLL wiith itss poowerrfull viisuaalizzatiion andd trranssforrmattionn tooolss iss ann iddeall toool forr soolviing thiis ttaskk.IV. XMLL ASS A TOOOL FFOR VISSUALLIZAATIOONXML (exxtennsibble Marrkupp Laanguuagee) iis aa siimplle aand fleexibble metta-llangguagge, i.ee, aa laanguuagee foor ddesccribbingg ottherr laanguuagees. Taiilorred by thee Woorldd Wiide Webb Coonsoortiium (W33C) asa diaalecct oof SSGMLL SS, XMLL reemovves twoo coonsttraiintss whhichh weere holldinng bbackk Weeb ddeveeloppmennts 6. TThe deppenddencce oon aa siinglle, infflexxiblle ddocuumennt ttypee (HHTMLL) wwhicch wwas beiing mucch aabussed forr taaskss itt waas nneveer ddesiigneed ffor on onee siide; annd tthe commpleexitty oof ffulll SGGML, whhosee syyntaax aalloows manny ppoweerfuul bbut harrd-tto-pproggramm opptioons on thee ottherr siide.Whille HHTMLL deescrribees hhow datta sshouuld be preesenntedd, XXML desscriibess thhe ddataa ittsellf. A nnumbber of inddusttriees aand sciienttifiic ddisccipllinees-mmediicall reecorrds andd neewsppapeer ppubllishhingg ammongg thhem-aree allreaady usiing XMLL too exxchaangee innforrmattionn accrosss pplattforrms andd apppliicattionns. XMLL caan bbe ttailloreed tto ddesccribbe vvirttuallly anyy kiind of infformmatiion in a fformm thhat thee reecippiennt oof tthe infformmatiion cann usse iin aa vaarieety of wayys. It is speecifficaallyy deesiggnedd too suuppoort infformmatiion excchannge bettweeen ssysttemss thhat usee fuundaamenntallly diffferrentt foormss off daata reppressenttatiion, ass foor eexammplee beetweeen CADD annd sscheedullingg apppliicattionns.Usinng XXML witth iits powwerfful parrserrs aand inhhereent robbusttnesss iin ttermms oof ssynttacttic andd seemannticc grrammmar is morre aadvaantaageoous thaan tthe connvenntioonall meethood oof uusinng aa leexiccal anaalyzzer andd a vallidaatinng pparsser (cff. FFig. 2, 77).The connvenntioonall meethood oof aanallysiis oof pproggramm coode reqquirres a sscannnerr (llexiicall annalyyserr) wwhicch ggeneerattes a sset of terrminnal symmbolls (tokkenss) ffollloweed bby aa paarseer tthattcheccks thee grrammmatiicall sttruccturre oof tthe codde aand genneraatess ann obbjecct nnet. Inn thhe oobjeect nett thhe iinteernaal sstruuctuure of thee prrogrram is reppressentted by ideentiifieed oobjeectss annd tthe rellatiionss beetweeen theem. Botth tthe scaanneer aand thee paarseer tto bbe uusedd inn thhis metthodd arre ddocuumennt oorieenteed wwhicch iimplliess thhat anaalyssis of diffferrentt tyypess off doocummentts rrequuirees rrewrritiing thee geenerrateed ccodee foor tthe scaanneer aand thee paarseer. Aneexammplee off ann apppliicattionn off thhis metthodd caan bbe ffounnd iin 8.The mosst pprommisiing asppectt off ussingg XMML iinstteadd iss thhat XMLL annd iits commpleemenntarry aappllicaatioons forr trranssforrmattionns aare staandaardiizedd soo ass too prroviide maxximuum fflexxibiilitty tto iits useer.The XMLL baasedd meethood iis aadvaantaageoous, siincee thhe llexiicall sppeciificcatiion is an invvariiantt coompoonennt oof XXML; thhereeforre tthe welll-fformmednnesss iss inndeppenddentt frrom thee reespeectiive inddiviiduaal aappllicaatioon.Hencce, an XMLL-Paarseer aalsoo caan ttrannsfeer wwelll-shhapeed XXML doccumeentss inn ann abbstrractt reepreesenntattionn caalleed DDocuumennt OObjeect Moddel (DOOM) witthouut uusinng aa grrammmar. DOOM iis aan aappllicaatioon pproggrammminng iinteerfaace (APIII) forr vaalidd HTTMLaand welll-fformmed XMLL doocummentts. It deffinees tthe loggicaal sstruuctuure of doccumeentss annd tthe wayy a doccumeent is acccesssed andd maanippulaatedd. IIn tthe DOMM sppeciificcatiion, thhe ttermm "ddocuumennt" is useed iin aa brroadd seensee inncreeasiinglly. XMLL iss ussed as a wway of reppressenttingg maany diffferrentt kiind of infformmatiion thaat mmay be stooredd inn diiverrse sysstemms, andd muuch of thiis wwoulld ttradditiionaallyy bee seeen as datta rrathher thaan aasdoocummentts. Nevvertthellesss, XXML preesennts thiis ddataa ass doocummentts, andd thhe DDOM cann bee ussed to mannagee thhis datta55.XSLTT, tthe traansfformmatiion lannguaage forr XMML iis ccapaablee off trranssforrminng XXML nott onnly to anootheer XXML or HTMML bbut to manny ootheer uuserr-frrienndlyy foormaats. Beeforre tthe advventt off XSSLT, thhe ttrannsfoormaatioon oof XXML to anyy ottherr foormaat wwas onlly pposssiblle tthrooughh cuustoom aappllicaatioons devveloopedd inn a proocedduraal llangguagge ssuchh assC+, VVisuual Bassic or, Jaava. Thhis proocedduree laackeed tthe genneraa