![]()
Basic construction
To begin, a user creates a new project, a fully relational database of the information. Everything the user creates is stored in this database, which automatically saves data as it is entered to prevent loss. Since all projects require at least one top-level task, the project opens with a top task in the model (working) pane.
The mechanics of construction are simple. To create a method, the user double-clicks on the top task. To create a sub-task, the user double-clicks on the method, which adds a new sub-task to the method. Double-clicking on a sub-task creates one or more associated methods, either ordered or conditioned.
The hierarchy provides a visual decomposition of the user's strategies for solving a particular problem (the top task). The problem may be solved in a number of different ways (the methods). The methods encompass an ordered set of sub-tasks for carrying out the method. For as long as desired, the user can continue to construct this hierarchy of tasks, methods to achieve those tasks, and sub-tasks comprising those methods. The user also can reuse these elements as needed throughout the hierarchy.
To terminate a branch of the hierarchy, the user creates a special, primitive method, called a procedure, underneath a sub-task. A procedure has no further hierarchy below it. Procedures capture specific formulas or functions. They carry out calculations, data manipulations, and calls to external systems or functions.
To create a procedure, the user right-clicks on a sub-task to bring up a pop-up menu from which the user selects New Procedure. (Note that double-clicking would create a new method beneath the sub-task.) The user can continue in this fashion to create a Discovery Machine model that is as simple or as complex as desired. To name the task, method, or procedure, the user types that name in the Task Properties pane.
Parameters easily can be added to a model by using the pop-up menu (right-click) or by selecting the element in the Task Properties pane. Parameters are used to utilize information to carry out tasks and make decisions within the model. Parameters form the "input" and "output" of data for elements of the model. Parameters can have either primitive types-such as integers, strings, reals, etc.-or they can be created as classes. A class can be a simple collection of elements or a fully object-oriented class structure. Here, we show how a user would add a new primitive parameter and then add a new class.
Classes can be created to support within the Model Pane and in a view of the details of the class called the Knowledge Form View (KFV). The new class can be edited in the Overview pane by double-clicking on the class.
Components are added to the class by right-clicking. These components can be related semantically by connecting them together.
As users become more proficient in creating classes and strategies, they may want to create behaviors specific to those classes. Behaviors are class-specific methods that have the object-oriented characteristics typical of modern programming languages. The user creates behavior hierarchies that then are inserted into strategies.
Creating Conditions, Loops and Expressions
Additional important aspects of DM models include conditions, loops, and procedure editing.
First, since the Discovery Machine Modeler allows users to add multiple methods to a task, it also allows users to specify logical conditions under which a particular method is appropriate, and to associate those conditions with that method. To specify a condition for a method, the user double-clicks on the method link. This brings up a window that allows him or her to specify and edit the condition. A small orange symbol of a brain with a question mark appears on the link to graphically indicate the existence of a condition.
Second, users can include loops within DM models by adding them within the structure of a method's sub-tasks. A loop consists of a link established between method sub-tasks. The loop enables repetition of one or more of the sub-tasks. To provide control, the user can specify conditions that apply to the loop link, so that the link is only appropriate if those conditions are true.
To create a loop, the user clicks on the loop block of the sub-task node being looped from, and drags a loop link to the sub-task node being looped to. When she or he releases the mouse button, the loop is established. To add conditions to a loop link, the user double-clicks on the link and edits the condition in the same way that he or she establishes conditions for a procedure or for a method link.
Third, DM models are allowed to terminate in the primitive methods called procedures, rather than in tasks or in ordinary methods. A procedure always is found beneath a task, and it cannot be de-composed further. Instead, Discovery Machine allows the user to define the procedure by writing one or more expressions or formulas, using a simple proprietary language. These expressions can specify either a numerical or a symbolic computation, can obtain data from an external source, or can send data to an external system. This easy-to-use, computationally complete language is capable of carrying out any desired computation. In most cases, expressions consist of spreadsheet-like formulas. But complex expression sequences are possible when more complicated computations must be carried out. To open a procedure editing window, the user double-clicks on the procedure.
Running the Hierarchy
The key aspect of Discovery Machine that provides power to users is the fact that the resulting DM model can be executed like a computer program, accepting inputs, producing outputs, and performing computations. Such execution proceeds top-down, in order, depth-first, starting with the top task and proceeding to either the first method in order or to the first method whose link condition evaluates to "true". Execution proceeds down to the individual procedures whose code is executed. If execution ever fails-for example, if all methods for some task have false conditions-then The Discovery Machine backs up to the next node and continues executing. Overall, the capability to actually execute DM models provides users with the ability to develop executable strategies for accessing and manipulating large complex datasets.
To execute a DM model, the user clicks the Run button, and execution commences. If desired, the user can have The Discovery Machine graphically display the path of successful execution by marking the successfully traversed nodes in a different color. Also, the user can set breakpoints in order to single-step through the execution of the model. In this area, DM models bear superficial resemblance to data-flow software; both provide a graphical view of an ongoing process.



