Design Documentation
Table of Contents
1 Description of a Design
- Recall that: A spec is a relationship between IO, expressed using discrete math, logic, and grammars. We prefer it to be declarative. But, occasionally we do use an older version of a program to be a spec for a new version to be built, with additional spec details added.
- A design is a how-to expressed in a high-level notation, far higher than typical programming languages such as C++ and Java.
1.1 Req v Spec v Design Docs
- A Spec Doc overlaps with Req Doc
- Spec Doc should cite the Req Doc
- But Spec Doc should be self-contained.
- Motivational paragraphs are relevent in Req Docs.
- Not in Spec Docs.
- Remember the cliche: The "what" is the spec, the "how" is the design.
- Design Doc should cite the Req and Spec Docs
1.2 Current Practice
- Prose descriptions in English
- Figures: UML, data flow, block diagrams
- All global data structures/ classes
- Collections of methods and their code
2 VHLL: Very High Level Languages
- Consider a design to be a VHLL program, i.e., executable.
- Psuedo Code http://en.wikipedia.org/wiki/Pseudocode
- All programs, in particular "First Time" Programs, should be prototyped in VHLL.
- Python and other languages at that "level" are acceptable, but make up an appropriate VHLL, at a higher level.
2.1 VHLL components
- High-Level Data Structures: Sets, Sequences, Tables, Maps, …
- High-Level Operations: Matrix ops, Bag Intersect, …
- High-Level Control Structures: Map/Reduce, Higher Order Funcs, Concurrency, …
- Ex: Book "Domain Specific Languages", by Martin Fowler, 2010. See below
3 Design rationale
"A design rationale is the explicit listing of decisions made during a design process, and the reasons why those decisions were made. Its primary goal is to support designers by providing a means to record and communicate the argumentation and reasoning behind the design process. It should therefore include:
- the reasons behind a design decision,
- the justification for it,
- the other alternatives considered,
- the trade offs evaluated, and
- the argumentation that led to the decision."
- [from Wikipedia]
4 Document Format
- By now you have read a number of peer-reviewed academic papers. Follow their style; e.g., follow JML fmdoc.pdf. Technical Reports are more generous with page layouts, and such.
- Cover Page
- Abstract
- All pages, except cover page, are numbered Table of Contents (TOC)
Sections: Sections must be numbered also; Typical: Three levels;
too many: > 5 First Section
= "Introduction" 1. Last Section =
"Conclusion" Unnumbered "References" Section; Cite them. See Chicago Manual of Style. 7 Misc
5 References
- http://en.wikipedia.org/wiki/Design_rationale. Required Reading.