Escolar Documentos
Profissional Documentos
Cultura Documentos
Object-Oriented and
Classical Software
Engineering
Fifth Edition, WCB/McGraw-Hill, 2002
Stephen R. Schach
srs@vuse.vanderbilt.edu
THE TOOLS
OF THE TRADE
● Stepwise refinement
● Cost–benefit analysis
● Software metrics
● CASE
● Taxonomy of CASE
● Scope of CASE
● Software versions
● Configuration control
● Build tools
● Assumption
– We can produce a record when PROCESS requires it
● Separate INPUT and OUTPUT, concentrate on
PROCESS
● What is this PROCESS?
● This design
has a major
fault
● Scope of CASE
– Can support the entire life-cycle
● Graphical display tools (many for PCs)
– Data flow diagrams
– Entity-relationship diagrams
– Module-interconnection diagrams
– Petri nets
– Structure charts
● Product Metrics
– Examples:
» Size of product
» Reliability of product
● Process Metrics
– Example:
» Efficiency of fault detection during
development
● Metrics specific to a given phase
– Example:
» Number of defects detected per hour in
specification reviews
● Size
– In Lines of Code, or better
● Cost
– In dollars
● Duration
– In months
● Effort
– In person months
● Quality
– Number of faults detected
● Additional features
– Data dictionary
– Screen and report generators
– Consistency checker; the various
views are always consistent
» Specifications and design workbench
● Online Documentation
– Problems with
» Manuals
» Updating
● Essential online documentation
– Help information
– Programming standards
– Manuals
© The McGraw-Hill Companies, 2002
Essential Coding Tools Slide 5.21
● Coding tools
– Products (such as text editors, debuggers, and
pretty printers) designed to
» Simplify programmer’s task
» Reduce frustration
» Increase programmer productivity
● Conventional 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”
● “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-printer
● Example
– The programmer tries to call procedure
computeAverage, but the linker cannot find it
– The programmer realizes that the actual name
of the procedure is computeMean
● A structure editor must support online
interface checking
– Editor must know name of every procedure
● Interface checking is an important part of
programming-in-the-large
● Example
– The user enters the call
average = computeAverage (dataArray, numberOfValues);
– Editor immediately responds with a message such as
Procedure computeAverage not known
● Programmer is given two choices
– Correct the name of the procedure
– Declare new procedure computeAverage and specify
its parameters
● Enables full interface checking
● Example
– Declaration of q is
void q (float floatVar, int intVar, String s1, String s2);
– Call (invocation) is
q (intVar, floatVar, s1, s2);
– Online interface checker detects the fault
● Help facility
– Online information as to parameters of
method q
– Better: Editor generates a template for the call
» Shows type of each parameter
» Programmer replaces formal by actual parameter
● Advantages
– No need for different tools with different interfaces
– Hard-to-detect faults are immediately flagged for
correction
» Wrong number of parameters
» Parameters of wrong type
● Essential when software is produced by a team
– If one programmer changes the interface specification,
all modules calling that changed module must be
disabled
● Remaining problem
– The programmer still has to exit from the editor to
invoke the compiler (to generate code)
– Then, the linker must be called to link the product
– Must adjust to the JCL, compiler, and linker output
● Single command
– go or run
– Use of the mouse to choose icon, or menu
selection
● Causes editor to invoke the compiler, linker,
loader, and execute the product
● Online documentation
– Help information regarding
» Operating system
» Editor
» Programming language
– Programming standards
– Manuals
» Editor manuals
» Programming manuals
● Example:
– Product executes terminates abruptly and prints
Overflow at 4B06, or
Core dumped, or
Segmentation fault
● Revision
– Version to fix a fault in the module
– We cannot throw away an incorrect version
● Perfective and adaptive maintenance also
results in revisions
● Variation
– Version for different operating system–hardware
– Variations are designed to coexist in parallel
© The McGraw-Hill Companies, 2002
Configuration Control Slide 5.37
● Every module
exists in three
forms
– Source code;
object code;
executable load
image
● Configuration
– Version of each
module from
which a given
version of a
product is built
© The McGraw-Hill Companies, 2002
Version Control Tool Slide 5.38
● Possible notation
– printerDriver (laser) / 13
– printerDriver (inkJet) / 25
● Problem of multiple variations
– Deltas
● Version control is not enough—maintenance issues
● Example
– UNIX make
● Compares the date and time stamp on
– Source code, object code
– Object code, executable load image
● Can check dependencies
– Ensures that correct versions/variations are
compiled and linked