Due Friday January 15, 1999
(part is due on Friday January 8, by lecture)
It has come to my attention that there is some confusion about this homework assignment. In particular, the "right" definition of YFPL (Your Favorite Programming Language) is unclear. Let me clarify.
Consider the following description of a simple software system:
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.
By lecture on Friday January 8th, you are to design and implement KWIC in any language that you chooseYFPL, Your Favorite Programming Language. (It would be boring, although not a problem, if everyone happened to implement KWIC in the same language, such as Haskell or 68010 assembly language.) In lecture that day, we plan to look at some of the programs the class produces, focusing on the design decisions that were made.
For Friday, when the full assignment is due, you should turn in (preferably via a Web page):
Your KWIC program, with any other information (such as design documents) you produced while you were writing the program. If you didn't write any, don't make any up. If you scratched stuff out by hand, feel free to scan it in rather than retyping anything.
A discussion (at most a page or so) about the design you chose, why you initially chose the design, and whether you feel (after the discussion in lecture on Friday) whether your decisions were good or not (and why).
The fundamental objective of this assigment is to get you to introspect about design on a simple but surprisingly rich problem. It will lay the basis for some lectures and readings on information hiding and other related software design topics.
The Y2K or Millenium problem is of great visibility now. As you know, the problem is that years were represented by using the final two digits and now, with the year 2000 right around the corner, comparisons between (say) 55 and 00 will give the incorrect belief that David Notkin will turn -55 years old on his 45th birthday, which is January 1, 2000. Again, as you know, this representation was chosen because memory (both RAM and disk) was expensive.
However, the problem isn't really the representation of years per se, but rather that the representation was exposed. Therefore, to fix the Y2K problem, all places where the representation was used have to be changed. In this part of the assignment, you will show how it's possible to both save the space, as desired by those programmers a couple of decades back, and also to hide the representation to allow it to change.
You are to write (again, in YFPL) a date module that has the following properties:
There are three papers to be read (I will hand them out in class on Friday, 1/8/99, with the two Parnas papers stapled together):
The first paper covers the basics of information hiding, using KWIC as an example. It will help you with answering the last piece of Part I.
The second paper covers the basics of layered designs.
The third paper provides an overview of the recent work in software architecture.
Briefly (a paragraph or so for each) the following questions: