13.07.2015 Views

Software Design 2e - DIM

Software Design 2e - DIM

Software Design 2e - DIM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Many notations can be conveniently reduced to a tabular form to assist in checkingthem for completeness and consistency. Conversely, starting from a tabular formcan assist with generating a diagram. Tabular forms are generally better at handlinglarge-scale descriptions, while diagrams make it much easier to visualize and recognizerelationships between elements. The two are therefore largely complementary innature, and there are good arguments in favour of recording the details of a designusing both formats.To illustrate these points we will briefly examine two examples. In the first wewill transform a diagram into its corresponding tabular form, while in the second wewill begin with a table and then develop the diagram. As examples, the choices of theparticular forms used in these are purely illustrative, and both techniques are capableof being adapted for use with a wide range of diagrammatical forms.169Developing a diagram7.4.1 A tabular representation of a diagramFor this, we will return to the STD that was described in Section 7.2.3. As we notedthere, this is a non-hierarchical form of diagram, and hence becomes complex to managewhen used to describe systems with large numbers of states and transitions.The tabular form of the STD is generally referred to as a State Transition Table orSTT. A common convention used is to plot the set of states down the left hand columnand the events as column headers to the remaining columns. Entries in the table thendenote the final state that results when a given event occurs at a time when the systemis in the state denoted at the left hand edge of the row.Figure 7.36 is an example of an STT that corresponds to the ‘simple’ STD describingthe Unix vi text editor that was originally depicted in Figure 7.10. For convenienceand as an aid to comparison, both are shown, with the STD being slightly abbreviatedto show only the events and not the actions and, again, with only a small subset of thevi command set being described.Figure 7.36An STT describing the Unix vi text editor, with corresponding STD.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!