Software reusability and prototyping based on programming in an equational language
Evan Lock, Noah S. Prywes, Phillip Q. Hwang · 7th Computers in Aerospace Conference · 1989
Software reusability is the underlying technique for two types of development activities. First, implementation of a new system involves selection of building blocks from a ware- house of existing software fragments. Second, enhancing functionality of an existing system, such as increasing the throughput or expanding the scope, would merely involve adding software plug-ins similar to expanding a hardware system. The paper addresses the problem that fragments of procedural language programs do not lend themselves to a building block or plug-in approach. Fitting them together incurs loss of efficiency, as well as time consuming and costly manual labor. This paper describes a software reusability and prototyping approach based on retaining blocks of equa- tions instead of fragments of procedural programs, in the warehouse. Each equation can be viewed as expressing a rule applied to the problem's variables. The language of algebraic and boolean equations is used to express the rules. It is general purpose and can be used to express the concept embedded in any program fragment. Equations may be in any arbitrary order. Each equation is a self-contained rule and produces no side effects as in procedural programs. Therefore, under- standing equations is much easier than understanding an equivalent program. It is proposed to use the MODEL system to automatically integrate the selected blocks of equations into a corresponding procedural program. The MODEL system can compile equa- tions into a program in Ada, C or PLJ1 languages. The gener- ated programs are efficient, and competitive with manually developed equivalent programs. In this way, the MODEL system solves the problem of fitting together blocks into an effective integral entity. The MODEL system generates 100% of the procedural code and there is no need for the user to make any additions or modifications to the code. The automatically generated program and test data serve as a prototype. The output may be examined and the functional- ity improved. The developer of a system would draw a block diagram, similar to those used in hardware systems, showing by boxes the respective equation blocks, and showing by connecting lines the variables that flow between the respective blocks. To construct a prototype or enhance its functionality, the block diagram is used to copy the blocks of equations in the boxes from the warehouse. The blocks of equations, together with declarations of input and output, are then sub- mitted to the MODEL system to generate the desired proce- dure. The testing and any desired modifications are performed by modifying, adding or deleting the equations and then re- peating the generation of a new procedure that reflects the changes.