Installation | Human interface | Prolog laws | Java laws
This section addresses questions related to the Moses installation and bootstraping process.
Answer:
Firstly, the name of the installation directory should
give you a hint about the type of Java you have on your computer. If
the name is not relevant, look for javac executable in
the bin subdirectory of your installation. If the javac is there, then your Java
installation is SDK. Double check that the lib
subdirectory contains the tools.jar archive. If you have
a JRE installation instead, you need to install the SDK, separatelly.
We recommend Sun's Java J2SE v 1.4.2_08 SDK , available for
download at
Sun's web site .
Answer:
It is possible indeed to run moses directly from moses.jar -- but this would limit the
functionality of the controller in the following ways:1) The laws
written in Prolog will not be able to be interpreted and
enforced. This is due to the fact that the prolog engine itself is
part of a jar embeded in moses.jar distribution. In order to work
correctly, this jar file has to be explicitelly added in the
CLASSPATH. 2) The XML functionality will not be accessible, due to the
same mechanism.
Answer:
The return value 21 means that the controller is unable to download
the law. This can arise from multiple reasons. The most common are the
misspelling of the URL of the law in the Member constructor, or the
state of the law server. Try to access the URL of the law from a
browser and make sure that the Member constructor uses the very same law.
This section is dedicated to problems encountered during human (web-based) interaction.
Answer:
There many things that can lead to this behavior. First, make sure
that the law treats that particular message explicitelly (i.e., the
controller reacts to it). Change the law to the "simple" law, and
try to re-send the same message. If this works, than the law is the
problem. If this doesn't work, make sure that the message is a regular
expression. Due to legacy reasons, the applet only handles messages
which are properly formatted according to Prolog syntax -- regardles
of the type of the law . In the case of Java laws, make sure that the
messages sent by the law are formatted according to Prolog
conventions, where ',', '.', '(', ')', '[', and ']' all have well
specified meanings.
This section covers question related to Prolog laws and their evaluation.
Answer:
Currently the controller supports only a single Prolog law. That is, a
controller can have many agents, some of them using Prolog, some using
Java laws. The agents using Prolog should operate under the same law.
In order to observe the effects of import-export operations in Prolog
laws, use two different controllers.
This section covers frequent problems encountered while working with laws written in Java.
Answer:
The controller is not properly installed. The file "tools.jar" is not
in the CLASSPATH of the controller, thus there is no dynamic
compilation of the law. In order to solve the problem, find the
directory of your java installation, then look into lib
subdirectory. The file "tools.jar" can be found there. If no such
directory exists, that means that you have an JRE installation. You
need an SDK in order to run the compiler.