Appendix A. Changes and Compatibility Issues

Jadex is a rapidly evolving project. If you have used a previous version of Jadex, you should read this section carefully, to learn what has changed since then. This section shortly introduces important features that have been added and changes that have been made to the API, which may cause incompatibilities to applications you may have developed with an older Jadex version. For a detailed description of the many single changes and numerous bug fixes, have a look at the changes document ( changes.txt), where you will find a history of all important changes that have been made since the initial release.

A.1. New Features in 0.94

JADE separation.  Jadex has been cleanly separated from JADE. From this version Jadex is realized as reasoning engine that can be easily combined with different underlying agent platforms or even other kinds of middleware. Of course, it is still possible to run Jadex over JADE. The corresponding JADE adapter can be downloaded from the website.

Jadex standalone adapter.  The new default middleware layer for Jadex is the new Jadex Standalone platform that represents the most efficient environment for running Jadex agents. The Standalone adapter supports most of the Jadex tools that were already available (except the logger) and additionally offers a new way for administering agents via the new Jadex Control Center tool.

Initial states.  Agents and capabilities can be configured with so called initial states. An initial state comprises all information about instances of elements that should be created at startup such as initial plans or goals.

Faster model loading times.  The underlying XML-databinding framework for loading XML files to Java objects has been changed. Since this version Jadex uses JiBX as primary databinding framework which is one of the fastest tools available.

Improved performance and scalability.  Jadex has been greatly improved with respect to performance and memory usage. The new version running on the Standalone adapter is up to 100% (depending heavily on the concrete application) faster than the old version.

Finer-grained triggers and waitForXXX() methods.  In the new version Jadex supports more diverse trigger types and many specialized waitForXXX() methods in plans. Most notably it is now possible to wait directly for belief and belief set changes (cf. e.g. waitForBeliefChange(), waitForFactAdded(), <beliefchange ref="belname"/>, etc.).

Unification of binding options with parameters.  A simpler way for handling plans and goals with binding options is provided. Plans and goals only have parameters. If a plan or goal should be customized via binding options you can now delcare a parameter to fetch its value via binding options.

Improved examples.  The BlackJack example now offers a human player interface. You can play with a mixture of human players and agents at one dealer. Of course the players can be distributed accross the network.

Re-established support for mobile agents.  The support for serialization of Jadex agents at runtime has been re-established. Using the JADE adapter and the JADE migration service it is possible the migrate Jadex agents as well (using mobile plans).

Note

Jadex Add-ons.  Several new tools and extensions are available for Jadex from the Jadex add-ons page. These include:

  • Expression Compiler: In the normal version Jadex utilizes a Java expression interpreter. The expression compiler is based on Janino and allows to compile Java expressions on demand at runtime. The expression compiler can be used to further improve the performance of agents significantly. In addition to the faster evaluation of expressions the Jadex expression compiler add-on also provides the possibility to define inline plan bodies. This means that a whole agent can be programmed in one XML file without any additional plan classes. The add-on includes also a precompiler tool that allows to generate precompiled expression files for ADFs that are stored on disk. Using the tool avoids the need for runtime compilations of expressions that would delay the first agent execution otherwise.

  • Webbridge tool:  It can be used to seamlessly integrate Jadex agents with Java Server Pages (JSPs) and servlets. Using the Webbridge tool it is possible to design agent-based applications that can be used from a web interface. Web-requests are forwarded to the Jadex system and can be processed by the agents as normal message events. The result for a web-request will be returned to the web layer. If the result is a complete web page it will be displayed directly. On the other hand a result object can be postprocessed by some designated JSP for producing the final html page.

  • Planner: For certain problem domains reactive planning is not the best achievable soluation. Instead planning from first principles should be used. Jadex is available in an extended version with an integrated high-speed state-of-the-art planner.

  • Diet adapter (experimental):  Besides the JADE and Standalone adapter an experimental adapter for the Diet platform has been developed. It shows the applicability of Jadex even running on fundamentally different middleware platforms. The adapter is still experimental as it has not reached a level of maturity yet and also does not explore the full potential of the Diet platform. Nonetheless, we could achieve that all examples bundled with the normal Jadex release are executable under every adapter including Diet without changes.

A.2. Incompatibilities to Release 0.932

Jadex is still in beta stage and to facilitate effective further development backwards compatibility is currently not explicitly addressed. As the concepts and the API undergoes continuous changes, applications developed with older versions of Jadex may not directly work with the current release. We hope that design issues will settle down until the release of version 1.0, at least for the common features.

Until then, this section tries to highlight the issues which might cause problems with your old code. Use this section as a hint how to adapt your Jadex applications to the new release.

A.2.1. Changes in the ADF Definition

ADF XML header.  Due to the changed XML binding framework the headers of the XML agent and capability files have to be adapted with correct schema specifications (see Figure A.1, “Header of an agent definition file”).

<agent xmlns="http://jadex.sourceforge.net/jadex"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://jadex.sourceforge.net/jadex
                           http://jadex.sourceforge.net/jadex-0.94.xsd"
       name=".."
       package="..">

Figure A.1. Header of an agent definition file

Capabilities from planlib.  The capabilities from the Jadex plan library are available for the different platform adapters in different implementations. All of these implementations follow the specifications of the abstract capabilities contained directly in the jadex.planlib package. Nevertheless, from an application view all these implementations provide the same functionality through the same set of beliefs, goals, and plans. To build applications independently of the underlying adapter the planlib capabilities should be declared with their full name, such as jadex.planlib.DF. The system will resolve these names by using the properties from the Jadex configuration to the concrete implementation names such as jadex.adapter.standalone.planlib.DF_standalone.

Initial State.  Instead of specifying plans as "initial", and initial goals directly in the goalbase, the initial state of the agent is now specified in a separate initial states section.

Agent/Service Descriptions.  These have been removed as explicit tags. For creating agent or service descriptions the createServiceDescription(...)createAgentDescription(...) methods in class jadex.adaper.fipa.SFipa can be used.

Languages/Ontologies.  These have also been removed as explicit tags. IF you are using Jadex without JADE you don't need to define those languages and ontologies in the agent resp. capability scope. Using the JADE adapter you can define properties starting with jade.language.xxx and jade.ontology.yyy for that purpose. The JADE agent adapter registers automatically all languages and ontologies that are declared in this way. This allows to en- and decode messages using the standard JADE codecs.

<!-- Example language/ontology properties. -->
<properties>
    <property name="jade.language.sl0">new SLCodec(0)</property>
    <property name="jade.ontology.cleaner">CleanerOntology.getInstance()</property>
</properties>

Outgoing Messages.  From now on, only messages defined in the ADF can be sent and received. Message declarations in the ADF require the type attribute being set to "fipa". This equips "fipa" messages automatically with all required FIPA parameters such as "sender", "receivers", "conversation-id" and the like. In addition to the type a direction attribute can be used to distinguish explicitly betweeen messages that can be sent ("send"), received ("receive") and both ("send_receive").

A.2.2. API Changes

createAID()
This method has been moved to the new jadex.runtime.adapter.jade.SJade class.
JadeWrapperAgent
This class has been renamed and moved to jadex.runtime.adapter.jade.JadeAgentAdapter.
getJadeAgent()
This method has been renamed to getPlatformAgent().
getGUIWrapper()
This method has been renamed to getExternalAccess() and returns an extended interface (see Chapter 16, External Processes).
MessageEventFilter
MessageEventFilter (formerly MessageFilter) has been refactored to allow matching for instances and model elements or message events (as opposed to ACL messages).
util.jade
Contents of this package have been moved to jadex.runtime.adapter.jade.
Messages
Direct links to ACLMessage have been removed, so explicit casts are required to access JADE specific message features. Moreover, creation methods such as createMessageEvent() and IMessageEvent.createReply() have been changed (cf. Chapter 10, Events).
createConversationId()
This method has been moved and renamed to SFipa.createUniqueId().
Agent
The agent now requires an additional configuration (string or model) argument before the custom arguments.
Arguments
Command-line arguments now are available as Object[] "$args" in the agent.