Logo
Visual Programming
Block Diagram

 

Introduction

Cyclops provides an environment in which to assemble application programs from reusable components by drawing box-and-wire diagrams.  With reference to the example shown in the figure below, components appear as annotated boxes with input-output ports and directed wires connecting the input-output ports indicate message flow.  Software reuse is possible to the extent that components satisfy the requirements of a specific application but also encapsulate patterns of usage which are common to a variety of applications.

Cyclops revolutionizes the software development workflow by achieving the following goals:
  • Promote a division of labor between programmers and system integrators so that they may focus on different aspects of application program development.  Programmers design, implement, test, and improve components.  System integrators create application programs in response to customer requirements by combining existing components in a mix-and-match way.
  • Provide a means of customizing component behavior to satisfy the requirements of a particular application without modification of the source code.
  • Partition the set of problems involved in applications development into manageable parts in order to control the intellectual complexity of application program development.
  • Establish and maintain an infrastructure of readily implemented, well understood components in support of new application program development.  Inheriting the capabilities provided by such components allows system integrators to think about the parts of new applications which are unique instead of the parts which unique instead of the parts which are common to existing applications.
  • Provide a stable environment in which to judge and optimize component performance without impacting the design of existing applications.
  • Provide fast prototyping capability.  This allows system integrators to make their biggest mistakes first by providing timely feedback regarding the viability and technical adequacy of a design at the early stages of development.
  • Respond to individual customer needs without losing the economies of scale and scope.
  • Provide Real-Time and Embedded (RT&E) systems development capability.
Visual programming tools may be compared to Cyclops based on the type of component which they are designed to manipulate and assemble into application programs.  Two extreme component types include white boxes and black boxes. 
 

Black Box Composition

A black box is a fully implemented component with predictable functionality and pre-defined interface for communicating messages.  Black boxes are connected by systems integrators without regard to implementation details of how the outputs are computed as a function of the inputs.  This serves to partition the set of problems involved in applications development into manageable parts.  The partition exists on an implementation level so that black boxes may be built, tested, and improved separately from other components to which it may be connected and the context to which it is put to use.  The partition also exists on a conceptual level so that the black box may be analyzed separately in order to characterize performance, suggest ways to improve performance, and provide information vital to the design of applications.  The aforementioned partitioning is important because black box implementation details are typically overwhelming and involve disciplines which are unimportant to the systems integration.

Consider the black box implementation of a median filter.  The filter accepts as an input a time sequence of integers via a single input port.  It produces a single output equal to the median of the current and previous eight inputs.  At the implementation level, computation of the output may be achieved by sorting the current and previous eight inputs using word-parallel, bit-serial operations and selecting the fifth element of the result as the current output.  At a conceptual level, the median filter improves the quality of input data by smoothing without blurring edges which may evolve over time.  The relationship between median filter input and output density functions is predictable using results from probability theory.   Furthermore, this performance is independent of improved implementations of the median filter which use bit-parallel, word-serial operations and do not involve sorting.

Black boxes are ready to use without modification but may not be customized to satisfy the requirements of a particular application.  Black box composition, therefore, is similar to writing a story given a collection of stock paragraphs.  Either the story is so similar to existing stories that it is not worth writing (or the time required to create a comprehensive library of stock paragraphs is prohibitively long), or it is highly unlikely that the appropriate combination of paragraphs exist to write the story (or the time required to create a comprehensive library of stock paragraphs is prohibitively long).  In the later case, the time required to find an appropriate combination of stock paragraphs is prohibitively long. 

Although black boxes encapsulate patterns of usage for existing applications, they may not be modified for incorporation into new designs.  This ultimately leads to a collaboration between systems integrators and component makers to develop special purpose black boxes for each specific application, precluding the economies of scale and scope.
 

White Box Composition

At the other extreme, a white box is a partially designed component which is implicitly defined by its potential relationship with other white boxes.  It consists of virtual functions and data types encapsulating patterns of interaction and usage, respectively, which are common to a variety of applications.  Virtual data types are data types with incomplete semantics.  Virtual functions are partially implemented functions and may include operators, constructors, destructors, modifiers, and selectors.  Constructors, destructors, modifiers, and selectors are used to create, destroy, modify, and access instances of the virtual data types, respectively.  Contructors create instances a virtual data type by completing its semantics and allocating computer resources in order to store the resulting data variable.  Operators respond to messages received from other white boxes and events detected by the operating system.  Responding to external messages and events may involve completing a self-contained task.  It may also involve generating new messages in situations when decisions or computations based on distributed information must be made.  It can be seen that white boxes are partially designed components.  The design of a particular white box may only be completed with respect to other components to which it may be connected and the context to which it is put to use.  In short, white box composition is essentially a declaration the messages sent between white boxes to invoke behavior and request data. 

The advantage of virtual functions and abstract data types is that it provides a means of customizing white boxes to satisfy the requirements of a particular application.  Instances of a white box with application-specific characteristics are created by completing the semantics of virtual data types and completing the implementation of the virtual functions.  The disadvantage is unmanageable intellectual complexity and a corresponding loss in the economies of scale and scope.  Systems integrators must understand and complete the partial designs of multiple white boxes in the context of application-specific concerns.  A given white box cannot be fully understood, implemented, and tested separately from its interaction with other white boxes through message sends. Furthermore, application programs do not always benefit from relevant expertise since the intellectual complexity of white box composition make it impractical for all but computer scientists who are immersed in object-oriented development methods to participate.

A major complication in white box composition is that white boxes only have some of the information required for application-specific computation and decision making.  White boxes make distributed decisions and perform distributed computations based on distributed information which is communicated through message sends over time.  Therefore, white box composition must account for complex design issues such as the possibility of deadlocks, the costs of delaying messages and sending messages before they are needed, and the relationship between message statistics and application program performance.  A deadlock is a subtle failure mode that occurs when two components are simultaneously waiting for the other to complete an intermediate computation or make an intermediate decision.  If messages are sent when they are produced then they are sometimes received before they are needed.  Similarly, if messages are received only when needed then they are sometimes produced before they are sent.  In either case, buffer management strategies are required to store messages at the cost of increased utilization of computer resources to include memory and processor instruction cycles.  Message statistics are temporally averaged quantities that characterize message lengths and service times.  Message length and service time is a function of the amount of information contained in the message and the amount of time required to process this information.  Queuing theory predicts that application program performance, in terms of response time and speed of execution, decreases exponentially with increasing message length and service times.  Queuing theory also predicts that deterministic response time is only possible when the variance of message lengths and service times is zero. 

It can be seen that a system and method for white box composition satisfies only the third goal of visual programming.  The gap between white box abstractions and physical realization is typically large making it difficult to predict system behavior during the analysis and design phases of development. Most bugs are not discovered and articulated until coding.  And in many cases the only difference between writing and maintaining software is that a delivery date exists between these two activities.
 
 

Gray Box Composition

Cyclops provides an intermediate solution between white and black box composition.  Components are gray-box abstractions of procedures and data controlled by user-defined initialization parameters. 

Application programs may be constructed from networks of simple and hybrid component types.  Simple components are developed and tested using the full flexibility of a programming language such as C or Pascal.  Similar to application programs, hybrid components are constructed from networks of simple components and other hybrid components.  They are named and manipulated as gray box abstractions similar to simple components in order to develop programs in progressive levels of detail. 

Simple components consist a set of initialization parameters and dynamically linked library which exports initialization, iteration, and termination routines.  The number of inputs and outputs of the iteration routine equal the number of input and output ports, respectively, of the box which is drawn to represent the component during box-and-wire construction.  Iteration routine outputs are a function of its inputs and a set of state variables.  The initialization routine accepts as an input user-defined initialization parameters in order to establish state variable initial values and perform any operations required as a prerequisite for interation routine execution.  This may involve opening an input or output file, allocation of private memory, or establishing an interface to physical devices in a computer system.  For example, initialization parameters of a dynamically linked library for motion control may specify the sampling interval and porportional, integral, and derivative terms of a servo loop and establish an interface to a motion controller.

It can be seen that Cyclops provides the essential elements of a programming language to include primitive elements, a means of combination, and a means of abstraction as described in the text book by Harold Abelson and Gerald Jay Sussman, entitled Structure and Interpretation of Computer Programs, published by the Department of Electrical Engineering and Computer Science at the Massachusetts Institute of Technology, and in particular Chapter 1.1 entitled “The Elements of Programming”.  Primitive elements include parametric dynamically linked libraries and initialization parameters.  A single dynamically linked library may be utilized to implement multiple components by association with different combinations of initialization parameters.  Box-and-wire diagrams are the means of combination by which hybrid components and application programs are built from simple components.  Finally, the ability to name and manipulate hybrid components as gray boxes similar to simple components provides a means of abstraction.
 

Copyright © 2000 by Interstate Robotics, Incorporated.   All Rights Reserved.