《计算机科学导论》课件Unit 9Programming Languages_第1页
《计算机科学导论》课件Unit 9Programming Languages_第2页
《计算机科学导论》课件Unit 9Programming Languages_第3页
《计算机科学导论》课件Unit 9Programming Languages_第4页
《计算机科学导论》课件Unit 9Programming Languages_第5页
已阅读5页,还剩45页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

?计算机科学导论?课件Unit9ProgrammingLanguages29-1Development9-2ProgramTranslation9-3Languages’LatestRanking,Categories

andFeatures9-4CommonConceptsofProgramming

Languages9-5NotoriousSoftwareErrors9-6ReferencesandRecommendedReading9-7Summary9-8PracticeSetOUTLINE5Development

Computerlanguageisthemediumofcommunicationbetweenmanandcomputer.Aprogramminglanguageisaformalconstructedlanguagedesignedtotransmitinstructionstoamachine,particularlyacomputer.Programminglanguageshaveevolvedtremendouslyfrommachinelanguage,andassemblylanguagestohigh-levellanguages.Ofcourse,naturallanguage

isthebestprogramminglanguageandalsoourfinalgoal.Figure9.1presentsatimelineforcomputerlanguages.

Figure9.1Developmentofcomputerlanguages6Machinelanguages

(1)Machinelanguages

Machinelanguagesareexecuteddirectlybyacomputer’sCPU(CentralProcessingUnit).Theyaretypicallyformulatedasbitpatterns,usuallyrepresentedinoctalorhexadecimal.Machine-languageprogramsarewrittenbyenteringaseriesofinstructionsintheirbinaryformwhichismadeofstreamsof0sand1s,andeachcomputerhasitsownmachinelanguage.Theonlyprogramminginstructionsthatacomputeractuallyexecutesarethosewrittenusingmachinelanguage,theinstructionsbuiltintothehardwareofaparticularcomputer.Machinelanguagehasthefeaturesofflexibility,directexecutionandhigh-speed.

Note:Theonlylanguagethatcomputerisabletounderstandismachinelanguage.

7Machinelanguages

MachinelanguageinstructionsFinishedoperation0001000000100000Getanintegerfromthememoryunit

20,thensetittoregister

A0011000000100001Addthevalueofthememoryunit21toregisterA0010000000100010StorethevalueofregisterAtothememoryunit220000000000000000FinishtheprogramTable9.1MachinelanguageprogramforaddingtwointegersTable9.1showsthemachinelanguageprogramtoaddtwointegers.8Assemblylanguages

(2)Assemblylanguages

PeopleuseEnglishstrings,whichareeasiertoread,torepresentthemachinecodeandintroducetheassemblylanguage.Assemblylanguageusesmnemoniclettercodestorepresenteachmachine-languageinstruction.Theprogrammerusesthesemnemonicsinplaceofbinarydigits.Assemblylanguageallowsprogrammerstowriteinstructionsineasierways.However,theCPUcannotunderstandthissymboliclanguage,soithastobeassembledintomachinelanguagebeforethecomputercanexecuteit.Hence,itthendevelopedintotheassemblylanguage.Theassemblylanguageisadirectlyinvokedprocessor-oriented

programminglanguage.

Inassemblylanguage,useofmnemonicinsteadofmachineinstructionop-code,andaddresssymbolorlabelinsteadofinstructionoroperandaddress,enhancesthereadability

oftheprogramandreducesthedifficultyofpreparation.

9Assemblylanguages Theprocessoftranslatingtheprograminassemblylanguageintomachinecodeiscalledassemblyprocess,asshowninFigure9.2.

Figure9.2Assemblyprocess

Assembly

languageinstructionsFinishedoperationLOADXGetanintegerfromthememoryunitX,thensetittoregisterAADDYAddthevalueofthememoryunitYtoregisterASTORESUMStorethevalueofregisterAtothememoryunitSUMHALTFinishtheprogramTable9.2Assemblylanguageprogramforaddingtwointegers10High-levellanguages

(3)High-levellanguages

Eachinstructionoftheassemblylanguagerequiresseparatecoding,whichmeansinefficiencyforprogramming.Thus,inordertoimprovetheefficiencyofprogrammers,andmakethemfocusonapplicationsratherthancomputerhardware,thehigh-levellanguageswereintroducedanddeveloped.

Thehigh-levellanguageisnotspecifiedforaspecificlanguage,butincludesmanyprogramminglanguages,suchasBASIC(Beginner’sAll-purposeSymbolicInstructionCode),FORTRAN(FormulaTranslation),COBOL(CommonBusiness-OrientedLanguage),Pascal,C,VisualBasic,Perl,Python,PHP,HTML,FoxPro,Delphi,VisualC,C++,Java,C#(pronouncedasCsharp),LISP(ListProgramming),Prolog(ProgramminginLogic),andsoon.Thesyntaxandthecommandformatoftheselanguagesarenotidentical.

11High-levellanguages

Table9.3BasiclanguageprogramforaddingtwointegersTable9.3showstheBasiclanguageprogramforaddingtwointegers.BasiclanguagestatementsFinishedoperationx=3Addendx,valuation3y=4Addendy,valuation4Sum=x+yStorexandytothesum12Naturallanguages(4)NaturallanguagesThenaturallanguageisalanguagewhichisusedinoureverydaylife.Itisusedforcommunication,whetherbyspeech,signingorwriting.English,Chinese,andArabicareexamplesofnaturallanguagesandthesentence“Ilikeallprogramminglanguages〞isastatementofanaturallanguage.Naturallanguageprocessing(NLP)isafieldofcomputerscience,artificialintelligence(AI),andlinguisticsconcernedwiththeinteractionsbetweencomputersandhuman(natural)languages.

139-2ProgramTranslation

Theprogramswritteninoneofthehigh-levellanguages,iscalledasourceprogram.Itissavedastextfilecalledsourcefile.Thecomputerdoesn’tunderstandandexecutesuchprogramunlessitistranslatedintothemachinelanguage.Translationhastwodifferentmethods:compilationandinterpretation.Compilation:Thecompilerisaprogramthattranslatesthewholesourceprogramintoamachinelanguageprogramcalledanobjectprogram.ThisobjectprogramcanthenbelinkedwithsupportinglibrariesusingalinkertocreateanexecutablefilethatrunsdirectlyontheCPU.Figure9.3showsthetranslationprocessesofacompiler.

Interpretation:Theinterpreter【解释器】isaprogramthatreadseachstatementofasourceprograminsequence,analyzesitwhatitmeans,translatesitintothecorrespondingmachinecodeandthenimmediatelyexecutesit,andthengoesontothenextline.Aninterpreterisatranslatingprogramthattranslatesandexecutesthestatementsinsequence.14ProgramTranslation

Figure9.3Sourcecodecompilationprocess15LatestrankingProgramminglanguageparadigmsFeaturesofprogramminglanguages9-3Languages’LatestRanking,CategoriesandFeatures16LatestrankingItisdifficulttodeterminewhichprogramminglanguagesaremostwidelyused,becauseeverylanguagehasitsownfeatures.Forthesameapplication,Clanguagemayneedmorelinesofcode(LOC)thanPython,butitmaybemoreefficient.Somelanguagesareverypopularforspecifickindsofapplications.Forexample,COBOLisstillwidelyusedinthecorporatedatacenter,oftenonlargemainframes;Fortranisusedinengineeringapplications;Cisusedinembeddedapplicationsandoperatingsystems;andotherlanguagesareregularlyusedtowritespecificapplications.TheTIOBEProgrammingCommunityIndexhasbeenpublishedsince2001andupdatedmonthly.TheratingsarebasedonsearchingtheWebwithparticularphrasesthatincludelanguagenamesandcountingthenumberofhits.Table9.4showsthelatestrankinginJun,2021andthechangeincontrasttoJun,2021.

17Latestranking

Table9.4Programminglanguages’rankingJun2016Jun2015ProgrammingLanguageRatingsChange11Java20.794%+2.97%22C12.376%-4.41%33C++6.199%-1.56%46Python3.900%-0.10%54C#3.786%-1.27%68PHP3.227%+0.36%79JavaScript2.583%+0.29%812Perl2.395%+0.64%97VisualBasic.NET2.353%-0.82%1016Ruby2.336%+0.98%1111VisualBasic2.254%+0.41%1223Assemblylanguage2.119%+1.36%1310Delphi/ObjectPascal1.939%+0.07%1414Swift1.831%+0.39%155Objective-C1.704%-2.64%1613R1.540%+0.02%1715MATLAB1.447%+0.01%1817PL/SQL1.346%+0.12%1926D1.063%+0.45%2018COBOL1.048%+0.10%18Latestranking

Inadditiontothe20mostcommonlanguagesinthetableabove,therearealsomanyfamouslanguages,forexample,Fortran,Scratch,ABAP(AdvancedBusinessApplicationProgramming),Dart,SAS,Groovy,T-SQL(Transact-SQL),Lisp,Ada,Scala,Lua,Logo,Prolog,Scheme,RPG,LabVIEW,OpenEdgeABL(OpenEdgeAdvancedBusinessLanguage),Erlang,Haskell,Alice,Apex,Bash,F#,Q,LadderLogic,Rust,Awk,Go,FoxPro,VBScript,TypeScript,andsoon.Wewillnotgointodetailsonotherlanguages.19Programminglanguageparadigms

Computerlanguagescanbedividedintofourcategoriesaccordingtotheapproachtheyusetosolveaproblem:procedural(imperative)languages,object-orientedlanguages,functionallanguagesanddeclarativelanguages.Table9.5showsthecategoriesofprogramminglanguageswithexamples.

Computerlanguageparadigms

ProceduralFORTRAN/COBOL/BASIC/C/Pascal/AdaObject-orientedSmalltalk/C++/VisualBasic/C#/Java/Python/Ruby/JavaScript/Perl/PHP/Simula/Lua/R/ObjectiveC/TCL/IoFunctionalLISP/SchemeDeclarativeProlog/ErlangTable9.5Categoriesofprogramminglanguages20Programminglanguageparadigms

(1)Procedural(imperative)languages

Proceduralprogramming,derivedfromstructuredprogramming,isbasedupontheconceptofprocedure-call.Aproceduralprogramiscomposedofoneormoreunitsorproceduresormodules.Proceduresarealsocalledfunctions,routines,subroutines,ormethods.Theycontainaseriesofcomputationalstepstobeexecuted.Duringaprogram’sexecution,anygivenproceduremightbetriggered(called)atanypoint,byotherproceduresoritself.

TypicalexamplesofprocedurallanguagesareFORTRAN,COBOL,BASIC,C,PascalandAda.

21Programminglanguageparadigms(2)Object-orientedlanguages

Theobject-orientedprogramming(OOP)handlessomeinteractingobjects.Eachobjectisresponsibleforitsownactions.Intheproceduralprogramming,dataitemsareconsideredpassiveandaremanipulatedbytheprogram.Whileinobject-orientedprogramming,dataobjectsareactive.Theyhavetheirownactionsanddata,andtheexecutiondependsonthem.Objectsandtheactiontobeperformedontheseobjectsarebundledtogether,thusmakingeachobjectresponsibletoperformoneoftheactionswhenitreceivestheappropriatestimulusbysomeexternalevent.Theselanguagesallowtheprogrammerstoimplementalgorithmsasahierarchyofobjects.Object-orientedprogrammingachievesthreemainobjectivesofsoftwareengineering:reusability,flexibility,andscalability.Inordertostandardizethebehaviorsofobjects,eachobjectcanreceiveinformation,processdataandsendinformationtootherobjects.Thedesignconceptsofobject-orientedprogrammingincludeobjects,classes,methods,dataabstraction,inheritance,dynamicbinding,dataencapsulation,polymorphism,andmessagepassing.Theseconceptsconcretelyexpresstheideaofobject-orientedprogramming.

22Programminglanguageparadigms

Typicalexamplesofobject-orientedlanguagesareSmalltalk,C++,VisualBasic,C#,Java,Python,Ruby,JavaScript,Perl,PHP,SIMULA,LUA,ObjectiveC,TCL,IoandR.(3)FunctionallanguagesFunctionallanguagesdefineprogramsandsubroutinesasmathematicalfunctions.Inthiscontext,afunctionisablackboxthatmapsinputsintooutputs,dependingontheargumentsthatareinputtothefunction.Computationisexpressedasfunctions.Thesolutiontoaproblemisexpressedasfunctioncalls.Figure9.4showsafunctioninafunctionallanguage.

TypicalexamplesoffunctionallanguagesareLISPandScheme.

Figure9.4Afunctioninafunctionallanguage23Programminglanguageparadigms

(4)Declarativelanguages

Declarativelanguagedescribethelogicofacomputationratherthanexpressingitscontrolflow.Thisisincontrastwithprocedural(imperative)programming,whichneedsanexplicitlyprovidedalgorithmandhavetopassconsecutiveorderstoacomputer.Infact,all(pure)functionalandlogic-basedprogramminglanguagesaredeclarative.

TypicalexamplesofdeclarativelanguagesarePrologandErlang.24Featuresofprogramminglanguages

Table9.6showsthefeatures,applicationscenariosanddevelopmenttoolsofsomepopularprogramminglanguages.

Table9.6ProgramminglanguagesLanguageFeatureApplicationScenariosDevelopmentToolsJavaObject-oriented;Cross-platform;Multi-thread;Powerfulclasslibrary;Allkindsofwebdevelopment,especiallylargeenterpriseapplications.Eclipse/NetBeans/JBuilderCProcedure-oriented;Highperformance;Strongexpressionability;Highportability;Dynamicmemorymanagement;Mostoftheoperatingsystems,driversandtheunderlyingsoftwareVC6.0/VisualStudio/CodeBlocks/GccC++Object-Oriented;Flexible;Compatible;Highperformance;Standardtemplatelibrary;DynamicmemorymanagementLargeclientapplications,gamedevelopment,andtheunderlyingframework.VC6.0/VisualStudio/Code::Blocks/G++C#Object-oriented;Highscalability;Garbagecollection;CloselyintegratedwiththeWebVisualStudio/MonoDevelopPythonSimple;Clear;Powerfulclasslibrary;Dailyneedofsmalltools,includingscripttaskofsystemadministratorsPyCharm25Featuresofprogramminglanguages

Table9.6ProgramminglanguagesLanguageFeatureApplicationScenariosDevelopmentToolsPHPSever-Based;PerfectcombinationwithApacheandMySQL;Serverdevelopment,suchasUnix,Linux,WindowsAppserv/phpStudyVisualBasic.NETEasytolearnanduse;Visual-design;Powerfulclasslibrary;Interactivity;MultimediaVisualStudioJavaScriptSimple;Secure;Dynamic;Cross-platform;Almostallthefields,suchasWebandmobiledevelopmentSpket/Ixedit/KomodoEdit/EpicEditor;PerlComplexandflexibledatastructure;Simple;Powerfulpatternmatching;ManyStandardandthird-partymodules,Graphicaluserinterfaces(GUIs)developmentWxPerl/ActivePerl/PerlBuilder/PadreRubyCross-platform;Flexible;Scalable;Object-oriented;Powerfulrails;RapidwebdevelopmentRDT(RubyDevelopmentTools)/RadRails26Featuresofprogramminglanguages

Someimportantprogramminglanguagesforspecificareasaregivenbelow:(1)MathematicalAnalysisandProcessing:MATLAB,R,SAS

MATLAB(matrixlaboratory)isabusinessmathematicalsoftwareproducedbytheAmericanMathWorkscompany.Itcanachievealgorithmdevelopment,datavisualization,dataanalysisandnumericalcalculationofseniortechnicalcomputinglanguageandinteractiveenvironment,mainlyincludingtwomostofMATLABandSimulink.

Risacompletesetofdataprocessing,calculationanddrawingsoftwaresystem.Ithassomeuniquefeaturesthatmakeitverypowerfulandsimple,suchasdataprocessing,array

operation,statisticalanalysis,andstatisticalgraphics.SAS(StatisticsAnalysisSystem)ismainlyusedforstatisticalanalysis.Itcanreadindatafromcommonspreadsheets

anddatabasesandoutputtheresultsofstatisticalanalysesintables,graphs,andasRTF(RichTextFormat),HTML,andPDF(PortableDocumentFormat)

documents.

(2)ParallelComputingModel:CUDA,OpenACC,OpenMP,OpenCL27FeaturesofprogramminglanguagesThereisnospeciallanguageforparallelprogramming,butalotoflanguagesareusedinparallelcomputingmodel,suchasCUDA(ComputetheUnifiedDeviceArchitecture),OpenACC(OpenAccelerators),OpenMP(OpenMuti-processing),OpenCL(OpenComputingLanguage),andsoon.(3)Database:SQL(StructuredQueryLanguage),PL(SQL),Transact-SQL

SQLisastandardizedcomputerlanguagethatwasoriginallydevelopedbyIBMforquerying,alteringanddefiningrelationaldatabases,usingdeclarativestatements.

T-SQL(Transact-SQL)isMicrosoft’sandSybase'sproprietaryextensiontoSQLandiscentraltousingMicrosoftSQLServer.

PL/SQL(ProceduralLanguage/StructuredQueryLanguage)isOracle’sproceduralextensiontoSQLandtheOraclerelationaldatabase.

(4)DesigningfortheOSXandiOSoperatingsystems:Object-C,SwiftNativeapplicationofiOSmustbewritteninSwiftorObjective-C,whereassomeelementscanuseCorC++optionally.28Featuresofprogramminglanguages

(5)ArtificialIntelligence:Prolog,LISPProlog(ProgramminginLogic)isageneralpurposelogicprogramminglanguagemostwidelyusedinartificialintelligence.Itsprogrammingmethodismorelikeusinglogictodescribeprogramming,soitcandevelopmorequicklythananyotherlanguage.

LISPisagenerichigh-levelcomputerprogramminglanguage.Itisoneoftheoldesthighlevelprogramminglanguagesandcontinuestobepopularinthefieldofartificialintelligencetothepresentday.(6)AutomaticTesting:TCL(ToolCommandLanguage)

TCLismainlyusedforindividualandembeddedcompaniessuchasHuaweiandMaipu.(7)WebPageDevelopment:HTML,HTML5

HTML(HypertextMarkupLanguage)isthestandardmarkuplanguageusedtocreatewebpages,alongwithCSS(CascadingStyleSheets),andJavaScript.

HTML5isamarkuplanguageusedforstructuringandpresentingcontentontheWorldWideWeb.ItisthefifthandcurrentversionoftheHTMLstandard.HTML5canundertakeindependentgamedevelopment.299-4CommonConceptsofProgrammingLanguages

Inthissection,weintroducesomebasicelementsandcommonconceptsinaprogramminglanguage.AlltheexamplesinthissectionarebasedonClanguage.

IdentifiersAnidentifierisusedtonameanobject.Identifiersallowustoreservememorylocationsthatcanbereferencedbytheidentifier’snameinourprogram.

DataType:

Adatatypedefinesasetofvaluesandthesetofoperationsonthosevalues.Forexample,inClanguage,therearefivebasicdatatypes:int,char,float,double,andvoid.Apartfromthesimpledatatypes,Clanguagealsodefinesarrays,pointers,structures,unions,andfunctions.

30

Variables:Variableisanamedmemorylocationassociatedwithanidentifier,whichcontainssomeknownorunknownstoredvalue,asshowninFigure9.5.Thevalueofvariablescanchangeduringruntime.

Variabledeclarations:Adeclarationisastatementthatassociatesatypeandname(identifier)withavariable,anaction,orsomeotherentitywithinthelanguagethatcanbegivenanamesothattheprogrammercanaccessthatitem,object,orprocessbyname.Mostprogramminglanguagesrequirethatvariablesmustbedeclaredpriortouse.Thecomputerallocatestherequiredstoragespaceandnamesit.

CommonConceptsofProgrammingLanguages 31CommonConceptsofProgrammingLanguages

Constants:

Aconstantisanamedmemorylocationwithanassociatedvalue,butthevaluecannotbealteredduringtheexecutionafterithasbeendefinedatthebeginningoftheprogram.ForexampleinCorC++program,πcanbedefinedatthebeginningandusedduringexecutionoftheprogram,suchas

constfloatpi=3.14;

Thetypeofconstantmustbedefinedwhenitisdeclared.

Figure9.5Variables32CommonConceptsofProgrammingLanguages

InputandOutput:

Inputisusedtoreaddatafromotherdevices(e.g.monitorandfile).Outputisusedtowritedatatootherdevices.Everylanguageusuallyprovidessomeinput/outputfunctionsorinterfaces.

Expressions:

Anexpressiondefinesasetofoperandsandoperators.Theseoperatorsincludearithmeticoperators,relationaloperatorsandlogicaloperators.Table9.7,Table9.8andTable9.9showssomeoperatorsusedinC,C++,andJava.

OperatorDefinitionExample+-*/%AdditionSubtractionMultiplicationDivision(theresultisthequotient)Division(theresultistheremainder)7+118-3a*2a/b20%3++--Increment(add1tothevalueofthevariable)Decrement(subtract1fromthevalueofthevariable)i++i--Table9.7Arithmeticoperators33CommonConceptsofProgrammingLanguages

Table9.8RelationaloperatorsOperatorDefinitionExample<

<=>

>===!=LessthanLessthanorequaltoGreaterthanGreaterthanorequaltoEqualtoNotequaltocount<6count<=6count>5count>=5a==(b+c)a!=bOperatorDefinitionExample!&&||NotAndOr!(a>b)(a<3)&&(b>6)(a<7)||(b>15)Table9.9Logicaloperators34CommonConceptsofProgrammingLanguages

Statements:

Astatementisacommandthatcausesaspecificactiontobeperformedbytheprogram.InClanguage,anexpressionbecomesastatementwhenitisfollowedbyasemicolon.Statementsareexecutedinsequenceanddonothavevalues.Theyaretranslateddirectlyintooneormoreexecutablecomputerinstructions.Figure9.6showsthecategoriesofthestatements.

Figure9.6Statements35CommonConceptsofProgrammingLanguages

Functions:

Functionisanindependentmodule

thatiscalledtodospecifictasks.Insomeprogramminglanguages,afunctionisequivalenttoasubroutine,oraprocedure.Forexample,afunctionissimilartoasubroutineorfunctioninFORTRAN,amethodormemberfunctioninmostobject-orientedlanguages,oraprocedureorfunctioninCandPascal.Afunctionprovidesaconvenientwaytoencapsulatesomecomputation,whichcanthenbeusedwithoutcaringaboutitsimplementation.Sometimes,knowingtheexecutionresultisenough.So,withproperlydesignedfunctions,itispossibletoignoretheexecutionprocessofajob.Figure9.7isanexampleoffunctiondeclaration.

36CommonConceptsofProgrammingLanguages

Figure9.7Functiondeclaration379-5NotoriousSoftwareErrors

Intheprogrammingprocess,youmustbethoughtfultoavoidvariousmistakes.Otherwise,thosemistakesmaycausedisastrousconsequences.Herearesomeexamplesofnotoriousbugswhichhavebadinfluenceatthattime.

Bug1:MarinerIspaceprobe(1962)

Whiletranscribingahandwrittenformulaintoacomputernavigationcode,asinglebarwasleftout.

Consequence:Thevesselwentsofaroffthemissioncontrolthatithadtobedestroyed.An$18.5millionspaceexplorationvehiclewaslost.Bug2:AT&Tnetworkoutage(1990)

AbuginanewreleaseofthesoftwarethatcontrolsAT&T's#4ESSlongdistanceswitchescausesthesemammothcomputerstocrash.

Consequence:Leavinganestimated60thousandpeoplewithoutlongdistanceserviceforninehours.AT&Tlostsome$60millionto$75million.38NotoriousSoftwareErrorsBug3:Pentiumchipsmathcoprocessorerror(1993)

Thebuilt-individerinthePentiumFPU(floatingpointunit)hadaflaweddivisiontable.

Consequence:Intel’sPentiumchipoccasionallymademistakesbeyondtheeighthdecimalpoint.Bug4:ExplosionoftheAriane5rocket(1996)

Theconversionofa64-bitfloatingpointtoa16bitsignedintegerwasfailedbecausethefloatingpointnumberwaslargerthan32,767,whichisthelargestintegerstorableina16bitsignedinteger.

Consequence:Therocketexplodedjust40secondsafterlift-offonitsmaidenvoyage.39NotoriousSoftwareErrorsBug5:Marsclimateorbitercrashes(1998)

Theuseofimperialunitsinsteadofmetricsystemintheorbiterbythesubcontractorcausesthisaccident.

Consequence:Thecrashofthe$125millionspacecraftonRedplanet.Bug6:MillenniumBugorY2K(1999)Twodigitswereusedtostoretheyearfordates,soyear2000couldonlyberepresentedas‘00’,whichmightconfusecomputersintomisinterpreting‘00’asyear1900ratherthan2000.

Consequence:ManydevicescontainingcomputerchipswerebelievedtobeatrisksopreparationsfortheY2Kbughadasignificantcostandtimeimpactonallindustries.40NotoriousSoftwareErrorsBug7:Software-relatedradiationtherapyfailure(2001)

AbugintheMultidatasoftwarecausedthepatientstobeover-radiatedandtheprocesswentonforsevenmonths.

Consequence:Cobalt-60machineinPanama'sNationalCancerInstituteoverdosedmorethantwo-dozenpatients

withgammaradiation,whichclaimedseverallives.Bug8:DisastrouspoweroutageinNortheasternAmericaandSoutheasternCanada(2003)Theoperatorturnedoffalarmcausedbyabugprovokedbythepowerflowmonitoringtool.

Consequence:PowerlinesweredeadinAmericaandtheinternationalconnectionsbetweenCanadaandtheUnitedStateswentofflineresultingin55millionpeoplewithoutpower.41NotoriousSoftwareErrorsBug9:MichiganDepartmentofCorrectionsgrantsprisonersearlyrelease(2005)

Theregisterincorrectlyreportedearlyreleaseof23prisonersduetoacomputerprogrammingglitch.

Consequence:Anundisclosednumberofinmateswerealsokeptinjailpasttheirreleasedates.Bug10:ShutdownoftheHartsfield-JacksonAtlantaInternationalAirport(2006)

Asoftwaremalfunctionfailedtoalertthesecurityscreenersthattheimageofasuspiciousdevicewasjustpartofaroutinetest.

Outcome:Theairportauthoritiesevacuatedthesecurityareafortwohourswhilesearchingforthesuspiciousdevice,causingmorethan120flightdelays,andforcingmanytravelerstowaitoutsidetheairport.42NotoriousSoftwareErrorsBug11:L.A.Airportflightsgrounded(2007)Duetoasinglepieceoffaultyembeddedsoftwareonanetworkcard,incorrectdatawassentoutontheU.S.CustomsandBorderprotectionnetwork.Consequence:Morethan17,000planesweregroundedforthedurationoftheoutage.Bug12:GoogleaccidentlyblockstheInternet(2021)OneofGoogle'sprogrammerswasaddingwebsitestothemalwareregistrywhenhe

accidentallyentered"/"insteadofafullURL.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论