Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach [email protected] 5OverviewStepwise RefinementStepwise Refinement Case StudyTypical file of input transactionsDecompose ProcessFirst RefinementStepwise Refinement Case Study (contd)Second RefinementThird RefinementSlide 12Appraisal of Stepwise RefinementCost–Benefit AnalysisCASE (Computer-Aided Software Engineering)Software MetricsDifferent Types of MetricsThe Five Basic MetricsTaxonomy of CASEGraphical ToolEssential Coding ToolsSyntax-directed EditorOnline Interface CheckerOnline Interface Checker (contd)Slide 25Slide 26Slide 27Operating System Front-End in EditorOperating System Front-End in Editor (contd)Source Level DebuggerSource Level Debugger (contd)Programming WorkbenchProgramming Workbench (contd)Software VersionsRevisions and VariationsRevisions and Variations (contd)Configuration ControlVersion Control ToolVersion Control Tool (contd)Configuration Control and MaintenanceBuild ToolsProductivity Gains with CASE ToolsSlide 5.1© The McGraw-Hill Companies, 2002Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002Stephen R. [email protected] 5.2© The McGraw-Hill Companies, 2002CHAPTER 5THE TOOLS OF THE TRADESlide 5.3© The McGraw-Hill Companies, 2002Overview Stepwise refinement Cost–benefit analysis Software metrics CASE Taxonomy of CASE Scope of CASE Software versions Configuration control Build toolsSlide 5.4© The McGraw-Hill Companies, 2002Stepwise Refinement A basic principle underlying many software engineering techniques –“Postpone decisions as to details as late as possible to be able to concentrate on the important issues” Miller’s law (1956)–A human being can concentrate on 7±2 items at a timeSlide 5.5© The McGraw-Hill Companies, 2002Stepwise Refinement Case StudyDesign a product to update a sequential master file containing name and address data for monthly magazine True Life Software Disasters Three types of transactions –Type 1: INSERT (new subscriber into master file)–Type 2: MODIFY (existing subscriber record) –Type 3: DELETE (existing subscriber record) Transactions are sorted into alphabetical order, and by transaction code within alphabetical orderSlide 5.6© The McGraw-Hill Companies, 2002Typical file of input transactionsSlide 5.7© The McGraw-Hill Companies, 2002Decompose ProcessNo further refinement is possibleSlide 5.8© The McGraw-Hill Companies, 2002First RefinementSlide 5.9© The McGraw-Hill Companies, 2002Stepwise Refinement Case Study (contd)Assumption –We can produce a record when PROCESS requires itSeparate INPUT and OUTPUT, concentrate on PROCESSWhat is this PROCESS?Slide 5.10© The McGraw-Hill Companies, 2002Second RefinementSlide 5.11© The McGraw-Hill Companies, 2002Third RefinementThis design has a major faultSlide 5.12© The McGraw-Hill Companies, 2002Stepwise Refinement Case Study (contd)The third refinement is WRONG–“Modify JONES” followed by “Delete JONES”After the third refinement has been corrected–Details like opening and closing files have been ignored up to now–Fix after the logic of the design is complete–The stage at which an item is handled is vitalOpening and closing files is –Ignored in early steps, but–Essential laterSlide 5.13© The McGraw-Hill Companies, 2002Appraisal of Stepwise RefinementA basic principle used in–Every phase –Every representationThe power of stepwise refinement–The software engineer can concentrate on the relevant aspectsWarning–Miller’s Law is a fundamental restriction on the mental powers of human beingsSlide 5.14© The McGraw-Hill Companies, 2002Cost–Benefit AnalysisCompare estimated future benefits, costs–Estimate costs–Estimate benefits–State all assumptions explicitlySlide 5.15© The McGraw-Hill Companies, 2002CASE (Computer-Aided Software Engineering)Scope of CASE–Can support the entire life-cycleGraphical display tools (many for PCs) –Data flow diagrams–Entity-relationship diagrams–Module-interconnection diagrams–Petri nets–Structure chartsSlide 5.16© The McGraw-Hill Companies, 2002Software MetricsTo detect problems early, it is essential to measureExamples:–LOC per month–Defects per 1000 lines of codeSlide 5.17© The McGraw-Hill Companies, 2002Different Types of MetricsProduct Metrics –Examples:»Size of product»Reliability of productProcess Metrics–Example:»Efficiency of fault detection during developmentMetrics specific to a given phase–Example:»Number of defects detected per hour in specification reviewsSlide 5.18© The McGraw-Hill Companies, 2002The Five Basic MetricsSize–In Lines of Code, or betterCost–In dollarsDuration–In monthsEffort–In person monthsQuality–Number of faults detectedSlide 5.19© The McGraw-Hill Companies, 2002Taxonomy of CASEUpperCASE versus lowerCASETool versus workbench versus environmentSlide 5.20© The McGraw-Hill Companies, 2002Graphical ToolAdditional features–Data dictionary –Screen and report generators–Consistency checker; the various views are always consistent »Specifications and design workbench Online Documentation–Problems with»Manuals»UpdatingEssential online documentation–Help information –Programming standards–ManualsSlide 5.21© The McGraw-Hill Companies, 2002Essential Coding ToolsCoding tools–Products (such as text editors, debuggers, and pretty printers) designed to»Simplify programmer’s task»Reduce frustration»Increase programmer productivityConventional coding scenario for programming-in-the-small–Editor-compiler cycle–Editor-compiler-linker cycle–Editor-compiler-linker-execute cycle“There must be a better way”Slide 5.22© The McGraw-Hill Companies, 2002Syntax-directed Editor“Understands” language –Speeds up implementation –User interface of an editor is different to that of a compiler»There is no need to change thinking mode»No mental energy is wasted on these adjustments–One piece of system software, two languages»High-level language of module»Editing command language –Pretty-printerSlide 5.23© The McGraw-Hill Companies, 2002Online Interface CheckerExample–The programmer tries to call procedure computeAverage, but the linker cannot find it–The programmer realizes that the actual name of
View Full Document