The tracer is accessible from the Jadex Control Center tool
menu. It is a tool inspired by
the Ph.D. work of Dung N. Lam
working on agent software comprehension with abductive
reasoning.
The tracer provides basically an interface and means to log the
internal state of a BDI agent, and to analyze and visualize the
logged information. It is made of two components. The first one
is the TracerAdapter placed in front of an agent as a tool
adapter. It is responsible for filtering messages concerning the
tracing process away from the message queue of an agent and it
collects the information about agent's internal state changes
and other occurrences in the system. The information is then
sent to the Tracer Agent, if an instance is present on the
platform. The latter has the duty to analyze the traces, store
them, and to present them to the user in a graphical form.
The main window of the tracer agent may be seen in Figure 6.1, “Tracer Main Window”. The traces presented here are from the Blocksworld example. In order to indicate a type of traces, they are marked with icons and their different meaning is explained in Table 6.1, “Information logged by the tracer”. The tracer perspective is split into three views including a tree view of agents and traces, a tabular view of traces and a 2D trace space exploring panel.
Table 6.1. Information logged by the tracer
|
Actions describe internal processes of an Agent and are by default ignored by the tracer. |
|
Beliefs are meta traces, that collect all traces concerning the use of beliefs and their change. |
|
Belief read and write access indicate that an agent or its plans have accessed a belief and possibly changed it. |
|
The icons stand for message receive or send events respectively. |
|
Goals are traced when they are adopted by the agent. |
|
Plans are shown, when created in response to a goal or event. |
|
Events represent any agent state changes. |
At the left there is a tree view showing all Jadex BDI agents known to the tracer. The meaning of a particular icon depicting an agent is shown in Table 6.2, “State of an agent”. Descending from the BDI agents, all traces are linked beneath nodes identified to be their cause.
Table 6.2. State of an agent
|
The agent did not send any traces yet. |
|
The agent sends its traces to the tracer. |
|
The agent is ignored by the tracer. |
|
The agent died. |
The functionality provided by the tree popup menu is similar to the functionality from the (Section 6.2.1, “Agent Menu”) and concerns the currently selected trace or agent. In the case of an agent the user may choose to observer it and to adjust the trace filter and history limit ( ). The other options allow to show or hide traces in the graph or table. With the last menu item the trace or the agent may be removed from the tracer perspective.
On the right there are two views. The upper one shows a tabular view of the traces. The traces are ordered in sequence they arrive. The table shows information like a unique trace id. For plans and goals it is the instnace name. For beliefs it is the name of the belief. Also shown is the value, causes and the time this trace happened. The value show the content of a specific trace. For beliefs it is the value of the beliefs. For plans and goals, the string representation of the runtime instance.
The user may select traces in the table based on different criteria, remove them from the table, show them in the graph panel or delete from the tracer perspective. All the fuctionality is accessible under the Section 6.2.2, “Table Menu”) and a coresponding popup menu.
(The lower of the two right views is the graph panel allowing to explore the space of traces. It also allows to multiple presentation options, navigation and choice of among the traces. All this functionality may be accessed from the Section 6.2.3, “Graph Menu”) and a graph popup menu (Figure 6.5, “Graph Popup Menu”).
(The menu provides access to functions concerning the tracer agent itself and the BDI agents analyzed. Functions corresponding to the tabular view and the 2D graph view are also accessible from here.
Under this menu (cf. Figure 6.3, “Agent Menu” concerning agents the user has the option to:
- an agent. This will tell the agent to send its traces to the tracer.
- will cause all BDI agents (known to the tracer) to send their data.
- an agent. Has the complementary effect to Observe.
- is the reverse of Observe all.
- causes the tracer to ignore all newly occurring agents.
- tells the tracer to show the traces of an agent in the 2D graph as soon as they arrive.
- removes all agent traces from the 2D graph.
- tells the tracer to show the traces of an agent in the table.
- removes all agent traces from the table.
- removes the agent and corresponding traces from all views.
- removes all dead agents and their traces from all views.
- shows a filter dialog for the current selected agent.
- shows a filter dialog for a prototypical agent all new agents will inherit their properties from.
The Figure 6.4, “Table Menu” ) provides functionality concerning the table view. Following options are available to the user:
menu (cf.- selects immediate causes of selected traces.
- selects the immediate effects.
- shows all selected traces in the 2D graph.
- hides selected traces from the 2D graph.
- removes traces from the table.
- deletes the traces and removes them from all views.
- tells if the table should be scrolled, when new traces arrive.
The tracer graph menu is accessible from the main menu and as pop-up in the graph view(cf. Figure 6.5, “Graph Popup Menu” ). It provides access to following functions:
- is used to show actions, beliefs or messages connected to trace nodes already shown in the graph. If a trace is selected, the user may choose to show the causes and effects of that trace.
- hides actions, beliefs or messages from the graph view. A single trace, its causes or its effects may be removed form the view.
- will expand the trace by one level of the causes or effects.
- will shrink and hide the traces around the selected one.
- will remove the trace from all views in the tracer.
- may be used to collapse all belief access nodes into a single one.
- will join the send and receive events of a message with an edge, therefore establishing connections between agents.
- this check-box indicates that the traces in the graph should be shown with thier corresponding labels instead of an anonymous icon. The labels ar turcated by length and a selected trace is always shown with its label.
The filter dialog can be accessed from the Agent Menu or from the agent popup menu (see Figure 6.6, “Agent Filter Dialog” ). There is also a menu item allowing to set the same values for a prototypic agent used for new agents introduced to the tracer.
It allows the user to customize, what kind of traces are interesting for her. The trace type filter can be used to choose among different kinds of traces. The fillter will pass all traces by kind if the corresponding check box is marked. The limit of trace history below allows to store only a specified number of traces in the tracer and may be set for each agent. Moving the slider to the right-most position implies that no limit will be enforced.
Changes in the dialog are applied immeadiately. The dialog will hide when it looses the focus.