Mary Shaw Beyond Objects: A Software Design Paradigm Based on Process Control 1
Beyond Objects: A Software Design Paradigm Based on Process Control
Mary Shaw Carnegie Mellon University
Pittsburgh PA 15213
Abstract
A standard demonstration problem in object-oriented programming is the design of an automobile cruise control. This design exercise demonstrates object-oriented techniques well, but it does not ask whether the object-oriented paradigm is the best one for the task. Here we examine the alternative view that cruise control is essentially a control problem. We present a new software organization paradigm motivated b y process control loops. The control view leads us to an architecture that is dominated by analysis of a classical feedback loop rather than by the identification of discrete stateful components to treat as objects. The change in architectural model calls attention to important questions about the cruise control task that arent addressed in an object-oriented design.
1 . Design Idioms for Software Architectures
Explicit organization patterns, or idioms, increasingly guide the composition of modules into complete systems. This stage of the design is usually called the architecture, and a number of common patterns are in general, though quite informal, use [Garlan and Shaw 93]. One of these, the object-oriented architecture [Booch 86], is the subject of much current attention. Although several architectural idioms have strong advocates, no single paradigm domi- nates. The choice of an architecture should instead depend on the computational character of the application.
Here we explore a software idiom based on process control loops. This system organization is not widely recognized in the software community; nevertheless it seems to quietly appear within designs dominated by other models. Unlike object-oriented or functional design, which are characterized by the kinds of components that appear, control loop designs are characterized both by the kinds of components and the special relations that must hold among the components.
The paper first explains process control models and derives a software paradigm for control loop organizations. Then it applies the result to a well-known problem, the design of a cruise control system. The differences between the control-loop-based and the object-oriented designs reveal relative strengths of the models for problems of this kind. The control view clarifies the different roles played by various problem inputs; further, it helps the designer recognize a safety problem and a system limitation. Drawing on the knowledge of process control also offers prospects for design guidance and quantitative analysis of system response characteristics.
1 . 1 . Process control paradigms
Continuous processes of many kinds convert input materials to products with specific properties by performing operations on the inputs and on intermediate products. The values of measurable properties of system state (materials, equipment settings, etc.) are called the variables of the process. Process variables that measure the output materials are called the controlled variables of the process. The properties of the input materials, intermediate products, and operations are captured in other process variables. In particular, the manipulated variables are associated with things that can be changed by the control system in order to regulate the process. Process variables must not be confused with program variables; this error can lead to disaster [Åström and Wittenmark 84, Leveson 86, Perry 84, Seborg et al 89].
Mary Shaw Beyond Objects: A Software Design Paradigm Based on Process Control 2
Process Control Definitions Process variables: properties of the process that can be measured; several specific kinds are
often distinguished. Do not confuse process variables with program variables. Controlled variable: process variable whose value the system is intended to control Input variable: process variable that measures an input to the process Manipulated variable: process variable whose value can be changed by the controller Set point: the desired value for a controlled variable Open loop system: system in which information about process variables is not used to
adjust the system. Closed loop system: system in which information about process variables is used to ma-
nipulate a process variable to compensate for variations in process variables and operating conditions.
Feedback control system: the controlled variable is measured and the result is used to manipulate one or more of the process variables
Feedforward control system: some of the process variables are measured and disturbances are compensated for without waiting for changes in the controlled variable to be visible.
The purpose of a control system is to maintain specified properties of the outputs of the process at (sufficiently ne
Recent Comments