Installation | Human interface | Prolog laws | Java laws

Installation

This section addresses questions related to the Moses installation and bootstraping process.

Question: I have Java already installed on my computer. How do I know whether it is a JRE or an SDK? Where do I get the SDK from?

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 .

Question: Why do I need to expand the moses.jar archive? Isn't it possible to run the Moses toolkit directly from the jar?

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.

Question: Whenever I try to create a programmed agent, the Member.adopt(...) method returns 21. What am I doing wrong?

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.

Human interface

This section is dedicated to problems encountered during human (web-based) interaction.

Question: I'm sending a message through the applet but there is no reaction to it at the controller. What's going on?

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.

Prolog laws

This section covers question related to Prolog laws and their evaluation.

Question: There is an error when trying to send a message from a law to another. Both laws are in Prolog, and both agents are running on the same controller.

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.

Java laws

This section covers frequent problems encountered while working with laws written in Java.

Question: I am not able to run any Java law. Every time I load even a trivial law, the controller display the message: "Compilation Exception". What is wrong with the law?

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.