The Zoea Visual programming language now allows developers to define programs using a hierarchy of embedded test cases. This significantly reduces the number of test cases required to define large and complex programs.
The ability to combine any number of smaller programs to form larger programs is a key element in Zoea's composable inductive programming approach. Composability helps to make inductive programming practical by overcoming the combinatorial complexity associated with larger programs. It also helps to formulate a more natural and accessible user experience for inductive programming.
The core Zoea language supports composition with the 'use' keyword. This allows one Zoea program to include another program as though it were an additional instruction set operation. This works well for code that might be included in standard libraries in more conventional languages. Zoea also supports the concept of intermediate (or derived) values. This allows the behaviour of complex programs to be defined as multiple steps that correspond to a set of back-to-back test cases.
Zoea Visual introduced another mechanism for composition in the form of dependencies. A Zoea Visual program is a set of data flow diagrams that describe the relationships between input, derived and output data elements. Each intermediate value or output data element in Zoea Visual corresponds to a distinct test case. The data flow elements define both the test case structure and the relationships between different test cases.
Subsidiary test cases are the latest enhancement to Zoea Visual. These allow the behaviour of a dependency in Zoea Visual to be defined as a completely separate data flow diagram. In effect a subsidiary test case is a complete test case that is embedded in another test case. This allows the developer to define a hierarchy of test cases of any size.
In terms of the user experience subsidiary test cases are marked with a blue dot. Any derived value or output data element can be turned into a subsidiary test case by selecting it and choosing the appropriate menu option. Users can also use the Zoea Visual user interface to navigate into and out of subsidiary test cases to any depth.
The Zoea compiler processes subsidiary test cases first, visiting each in turn in a depth-first manner. Compilation of remaining dependences then proceeds in input to output order.
Subsidiary test cases have a number of advantages. Firstly the use of subsidiary test cases can greatly reduce the overall number of test cases required. With subsidiary test cases the maximum number of test cases required is the sum rather than the product of the test case counts for each of the composite elements. This significantly reduces the developer effort and also reduces compilation time.
Subsidiary test cases can help to reduce the number of inter-program dependencies. Test cases that define logic which is specific to one program can now be bundled together. This will help to improve the scalability of the development process.
Another advantage of subsidiary test cases is that they can utilise completely different values from those used in the parent test case. This allows the developer intent for each test case to be expressed more clearly.
With subsidiary test cases Zoea Visual is now able to produce much larger and more complex programs in significantly less time.