2.5. PROGRAMMING IN THE LARGE

The term programming in the large refers to the high-level design of subsystems and modules. Techniques and concerns of high-level design are different from the concerns of algorithm design, and it has been argued that high-level design should be done in a language distinct from that used to create data structures and algorithms. In most real-world environments, the high-level design is done ad hoc or on paper. The following systems not only provide computer-assisted ways of doing high-level design, but also provide formal output from the process.

2.5.1. PV: Software design visualization

G. P. Brown (1985) describes a system called PV built to visualize the software design process.

The system calls for linking together a whole range of diagram types:

Graphic conventions are used to situate the programmer in the hierarchy of diagrams being edited. A smaller overall diagram is always shown; this diagram has a region highlighted that corresponds to the detail diagram being edited. The system seeks to handle everything from data flow diagrams to algorithm animation. The approach is more encompassing and less rigorous than the Pegasys system described below.

2.5.2. Pegasys

Pegasys (Moriconi 1985) links design diagram to underlying logic. The system uses a form calculus. As an example, when a network diagram is created, and an arrow is drawn between a shape labeled host and a shape labeled line, predicates such as the following would be generated:

Active entities in this system are:

Pictures are drawn through an interactive editor that enforces the form calculus. The drawing can be refined at different levels, meaning that a program is defined through a hierarchy of pictures.

Figure 2.47. Pegasys network diagram. From Moriconi (1985)

Every atomic entity, that is, one that is not refined, must be associated with program units. Passive entities are associated with data objects. The system is built to be tied to Ada, so the active entities are associated with subprograms, packages, tasks and generics. The diagrams produced using the system correspond to a set of predicates, and since the editor enforces a set of rules the predicates are internally consistent. Pegasys can then, in an automated way, prove that the design hierarchy is consistent with the code it describes.

2.5.3. Goguen

Goguen (1985) suggests that semantics be used on large systems by attaching theories to program units. He suggests that this process is a visual, diagrammatic one, and should be made explicit.

Figure 2.48. Mapping graphs with meta-edges. From Goguen (1985)

The diagrams he uses are of two sorts. Above, a graph with meta edges shows the mapping between graphs. Below, a puzzle-piece convention, an instance of the adjoinment convention, is used to illustrate how software modules can be fit together.


Return to Chapter 2 of Visual Programming