CSE503: Software Engineering
Lecture 3 (March 31, 2000)

David Notkin

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 Ill 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 its 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 Shaws paper