v
I want to cover two issues today
Ø
A brief look at the software lifecycle
Ø
Then a quick look at a classic design problem, KWIC, with the intent of
drawing out some key issues in design
v On Monday I’ll do an “overview” of design
v Today is KWIC day, with the goal being an exploration of the tradeoffs one makes in choosing a design
Ø “The KWIC [Key Word In Context] index
system accepts an ordered set of lines, each line is an ordered set of words,
and each word is an ordered set of characters. Any line may be "circularly
shifted" by repeatedly removing the first word and appending it at the end
of the line. The KWIC index system outputs a listing of all circular shifts of
all lines in alphabetical order.”
v Although KWIC is
especially simple, it is still illustrative of many of the key issues in design
v Points to make (see
the first Parnas paper in the readings for more details on some of these)
include
Ø Design for change
§
At the very least, design decisions necessarily affect ease of change
Ø Potential problems
with straightforward top-down decomposition
Ø Tend to optimize for
speed because it’s an immediate reward
Ø Influence of
programming language on design (probably more than vice versa)
Ø Specifications are
tricky to write
v Possible extensions
and modifications of KWIC include (incomplete):
Ø Incremental vs.
monolithic sorting algorithms
Ø Representation of lines, words, characters
Ø Storing on disk vs.
in-memory
Ø Eliminating noise words (fixed or by choice
of the user)
Ø Interactive vs. batch (consequences?)
v The attached architectural styles are from
Garlan and Shaw’s paper