JACK™ Intelligent Agents supports two agent reasoning models:
These models are implemented as extensions of the Java language. These extensions:
Figure 2-1: JDE menu bar and work area
The class level constructs provided by the two models are discussed in detail in the Agent Manual and Teams Manual. These constructs are the primary building blocks of every JACK application and can be defined in any text editor. For some, this is the preferred method of program development. However, others prefer to use graphical environments for code development. The JDE provides support for this mode of development through conventional drag-and-drop functionality and context sensitive menus.
The JDE also supports aspects of the software development life cycle other than code generation and execution. In particular, tools are provided to support the design process and the tracing of design and plan execution. These tools are fully integrated with the basic code generation/compilation/execution functionality of the JDE. The Design Tool, the Graphical Plan Editor and the Plan Tracing Tool are each explained separately within their own documents.
When the JDE is invoked, a window is created which initially consists of a menu bar and a work area.
Within the JDE a project consists of a collection of programming elements. Through the JDE menu bar, one can create a new project or open an existing project. When this occurs, a special instance of a JDE browser window is opened. This is known as the project window.
Directly below the JDE menu bar is the JDE Tool Bar. The JDE Tool Bar provides a series of shortcut buttons that can be clicked to bypass the drop-down menus of the menu bar for many of the basic functions of the JDE. The buttons available to the left perform various actions in the JDE, and are referred to as action buttons.
There are also three buttons to the right end of the JDE Tool Bar. These buttons toggle various modes on and off, and are referred to as toggle buttons.
Further details about these buttons and their functions are provided in the JDE Tool Bar chapter of this document.
The project window provides the primary interface for code development including access to the Graphical Plan Editor. It also enables the user to create and access design views for the JACK Agent Model or JACK Teams Model.
The project window is configured differently depending on whether one is developing an agent model or a teams model – the appropriate mode is selected via the View menu from the JDE menu bar. The JDE menu bar also provides access to the Compiler Utility which enables the user to compile and execute agent and teams models.
The JDE menu bar contains the following drop-down menus:
These menus provide access to the high level functions of the JDE, such as loading and saving projects, and editing projects in various ways. These menus are outlined briefly below, and are explained in greater detail elsewhere in the Menu Bar chapter of this document.
The JACK Developer menu exists only in the Macintosh environment. The JACK Developer menu contains the following options:
The File menu contains the following options:
These options are discussed in detail in the JDE menu bar chapter of this document.
Note: To the left of the File menu on the Macintosh appears the JACK Developer menu. The Quit function is listed within this menu on the Macintosh rather than in the File menu.
The Edit menu contains the following options:
The View menu contains the following options:
These options can all be toggled on or off providing alternatives affecting the various functions of the JDE. Checks indicate which of the options is currently toggled on.
The Entity menu contains the following options:
Note: Some of the above menu options are only enabled in Teams mode.
The Trace menu contains the following options:
The Tools menu contains the following options:
Note: On the Macintosh, the Preferences option appears in the JACK Developer menu.
The Window menu maintains a list of titles of all currently opened (not minimised) JDE browser windows. Initially, the Project window will be listed here. Selecting a title form the list will bring a particular window to the front of the JDE.
The Help menu contains the following options:
Note: On the Macintosh, the About JACK Intelligent Agents option is named About JACK Developer and is located in the JACK Developer menu.
Within a JDE session only one project can be active at a time. When a project is first opened, a special JDE browser window is opened which is known as the project window.
Additional JDE browser windows can be opened by selecting items from the project window, and dragging them onto the JDE work area. For example, if a subtree of the project window's folder hierarchy is dragged and dropped into the JDE work area, a new JDE browser window is opened for browsing the selected subtree.
Note: Additional JDE browser windows can be opened, but there can only be one project window.
The project window is opened when an existing project is loaded or a new project is created. This is achieved via the File menu on the JDE menu bar. The project window displays the name of the current project in the title bar. It also displays a hierarchical tree structure of folders which contain the project components. The window may be moved around the JDE window and resized according to the needs of the user.
The project can be closed via the File menu on the JDE menu bar. Note that closing the project window also closes the project. If a project has unsaved changes, a prompt will appear asking whether the changes should or should not be saved. A project can be explicitly saved via the File menu at any time during a JDE session.
Saving a project via the File menu causes any entities that have been changed (highlighted in red in the project window) to be saved. The project file is updated to include any references to newly created or loaded files and any new or updated entity files are saved. A project is stored as a file in JACOB syntax with a .prj extension. To learn more about JACOB, refer to the JACOB Manual. When saving a project, a prompt may appear asking the user to create all required folders necessary for that project.
The project window contains project details (such as Project Name and Documentation) and the Design Views folder. It also holds the Agent Model container and the Data Model container, both of which contain folders for storing the various programming elements of the project. Finally, the project window also contains the Other Files folder, enumerating non-JACK files of interest.
These folders allow grouping of entities in a project. For large projects, some folders will contain many entities. In such situations, it is useful to group the entities within a folder into sub-folders. This is achieved through the use of nested containers. Containers can be nested within containers, without limit to the number of nesting levels. Entities of the same type can be moved between nested containers.
The elements in the project window's folder hierarchy can be expanded or contracted by clicking on the '+' symbol or arrow to the left of the element or by double-clicking on the element's folder or name. When an element is expanded, the '+' symbol becomes a '-' symbol, or the right arrow becomes a down-arrow on the Macintosh. Clicking on the '-' symbol or down-arrow (or, equivalently, double-clicking on the element next to the '-' symbol or down-arrow) collapses the expanded tree.
Context-sensitive menus are provided for performing operations on folders and folder elements. The menus are accessed by placing the mouse cursor over an item and pressing the right mouse button. A menu then appears providing operations that can be applied to that item.
Drag-and-drop is used to associate one entity with another (such as a plan with an agent). The element to be dragged is first selected by clicking and holding the left mouse button down while over the icon. The left button is then kept down while the mouse is moved until the cursor is over the destination item. Releasing the left mouse button will then associate the dragged element with the destination element. Multiple drag-and-drop can also be performed as described in the JDE Browser chapter.
Note that if a drop operation is permitted, the Drop Allowed cursor is displayed.
Figure 2-2: Drop Allowed cursor
If the operation is not permitted, the No Drop Allowed cursor is displayed.
Figure 2-3: No Drop Allowed cursor
A project as a whole encapsulates all of the resources related to an agent model and any extra (non-JACK) files such as regular Java files and data files required.
The project details are the first item in the project window. It has the following seven attributes:
Attribute |
Description |
Project Name |
The name of the project e.g. NewProject. |
Documentation |
Documentation associated with the project. |
Root Package |
The top-level Java package to which all project components belong. |
Save-folder |
This is where the G-Code is stored. G-Code is the graphical file format used by the JDE. The folder is called gcode_ProjectName by default. |
Generated JACK Sub-folder |
This is the sub-folder (of the folder where the project file is located) where the generated JACK code will be stored. |
Generated Java Sub-folder |
This is where the JACK compiler stores the Java files generated while compiling the JACK files. |
Generated Class Sub-folder |
This is where the java compiler stores the class files generated from the Java files. |
Table 2-1: Project attributes
The type definition files created within the JDE are stored as G-Code files in the Save folder. Compiling an application results firstly in JACK files being generated from the G-Code files. The JACK files are written to the Generated JACK Sub-folder. The files in the Generated JACK Sub-folder are then translated to Java code; these files are stored in the Generated Java Sub-folder. Finally, the generated Java code is compiled along with any other Java source files needed. The resulting class files are stored in the Generated Class Sub-folder. Note that the G-Code to JACK code step can be performed independent of the other steps if desired.
Applications that have been developed outside of the JDE can be imported into the JDE. This can be done through the Compiler Utility. Alternately, the G-Code and a project file can be generated by entering the following command in the directory which is the root of the application source tree:
java aos.main.JackBuild -r -x -E myproject.prj -dj backup
myproject can then be opened in the normal way from within the JDE.
The -dj option results in the application files being copied to a directory called backup. If this option is omitted, and the resulting G-Code was compiled with the default setting for the Generated JACK Sub-folder, the original JACK files would be overwritten.
The user can also import components from other projects into the current project. This is discussed in the JDE Browser chapter of this document.
It is possible to design and build an application using the Design Tool. The Design Tool can be accessed by right-clicking on the Design Views folder. Existing designs can be accessed from within the Design Views folder. Entities that exist in the JDE browser can be incorporated into a design by dragging them onto the design canvas. Any new entities or links between entities that are created while building a design will result in corresponding changes to the contents of the JDE browser window.
The Design Tool is discussed in greater detail in the Design Tool Manual.
The following folders are contained within the Agent Model container:
Of these folders, Team Types, TeamPlan Types, Role Types and Named Roles are available only when the Teams mode option is checked in the View menu.
When the JDE is in Teams Mode, the Agent Types folder may be included or excluded (as per your preference settings).
The following folders are located within the Data Model container:
Other files associated with the project are listed here. These files include regular Java files and data files of interest within the project.
The Code Editor appears whenever a text item is edited, unless an external editor is used. Using an external editor is discussed in the Preferences section.
The kinds of items that are edited with the Code Editor include:
The Code Editor has a number of features designed to facilitate writing JACK code. It has a tool bar located in the top-left corner of the Code Editor window. The functions of the Code Editor are discussed in further detail in the Code Editor chapter of this document.
To open the Code Editor:
When editing an internal JDE text item (i.e. not an external file), the Code Editor window has two buttons to the right: Save and Close.
Saving changes to external files is discussed in detail in the Code Editor chapter of this document.
The JDE allows the user to specify an alternative to the Code Editor. This is discussed in the Preferences section of this document.
JACK-based applications can be compiled and run from within the JDE with the Compiler Utility. It provides a graphical user interface to the standard command-line based aos.main.JackBuild utility provided with JACK. Refer to the relevant section of the Agent Manual for further details.
Open the Compiler Utility at any time by selecting Compiler Utility from the Tools menu on the JDE menu bar, or by clicking on the Compiler Utility icon in the tool bar. If the Compiler Utility is already open, its window will be brought to the front.
Figure 2-4: Compiler Utility icon
To close the window at any time, click the Close button.
The Compiler Utility window consists of the tabs listed below. Further details are provided in the Compiler Utility chapter of this document.