User Manual :
1) Six knowledge translations supported by Sweetjess
2) Sweetjess as a RuleML and DamlRuleML inference engine
3) How to invoke methods of the Sweetjess translator ?
4) How to write the knowledge in the RuleML form ?
5) How to write the DamlRuleML ontology for encoding the Knowledge ?
6) Classpath in the Situated Logic
7) Jess Rule Syntax for trans[JD]
1)
Six Sweetjess methods for knowledge transformations

SweetJess
translator studies the issues of the knowledge transformations between RuleML ,
DamlRuleML and Jess. These six translations supported by SweetJess are
illustrated in the diagram above.
2) Sweetjess as a RuleML and DamlRuleML inference engine
Sweetjess provides methods to infer the knowledge encoded
in DamlRuleML and RuleML. Based on the rules and facts encoded in the knowledge
, the engine derives the new facts and the existing knowledge is enriched by
the addition of these newly derived facts.
Sweetjess
inference engine takes the input knowledge facts , adds to it the newly derived
facts and generates the output knowledge file from it.
3) How to invoke methods of the Sweetjess translator ?
The sample class illustrating how
to use the sweetjess translator is given below.
import edu.umbc.igec.sweetjess.translator.*;
public class Testing {
public static void main ( String args[])
{
Sweetjess sweetjess = new Sweetjess ();
sweetjess.transRD(“inputRuleMLfile”,”outputDamlRuleMLfile”);
sweetjess.transDR(“inputDamlRuleMLfile”,”outputRuleMLfile”);
sweetjess.transRJ(“inputRuleMLfile”,”outputJessRuleMLfile”);
sweetjess.transJR(“inputJessRulefile”,”outputRuleMLfile”);
sweetjess.transDJ(“inputDamlRuleMLfile”,”outputJessRuleMLfile”);
sweetjess.transJD(“inputJessRulefile”,”outputDamlRuleMLfile”);
sweetjess.RuleMLInference (“inputRuleMLfile”,”outputRuleMLfile”,
”inferenceRuleMLfile” , ”inferenceTextfile”);
sweetjess.DamlRuleMLInference(“inputDamlRuleMLfile”,”outputDamlRuleMLfile”,
”inferenceDamlRuleMLfile” , ”inferenceTextfile”);
}
}
For more information about these API please refer to the Java API .
4)
How to write knowledge
in the RuleML form ?
Try to study the DTD/ Schema of 0.8 version
of RuleML from the home page of RuleML. After studying this DTD/Schema study
the examples given in the RuleML homepage. Also the examples given for the
usage of RuleML posted in the website of Sweetjess will be helpful to understand how to encode the
knowledge in the RuleML form. We encourage to use XML spy for writing onlogy.
It is advisable to validate the XML externally before feeding it to SweetJess.
5) How to write the DamlRuleML ontology for encoding the Knowledge ?
The complete specification of the
DamlRuleML ontology is given at site.
http://www.gl.umbc.edu/~mgandh1/2002/06/DamlRuleML
If you find that ,it is difficult to understand the constraints given in the ontology , what is suggested is that first write the knowledge in the RuleML form and then using transRD[] convert this knowledge in the DamlRuleML form. Then try to study how the knowledge is mapped from RuleML to DamlRuleML. Once you are conformable in writing knowledge in DamlRuleML form you can directly encode the knowledge DamlRuleML. The Detail design document speaks about the new tag called <drml:position> introduced by DamlRuleML. The semantics of the various tags depends on the position and hence object property position should be defined for these tags. The list of these tags and detail explanation about them is given in the Detail design document.
6)
Classpath in Situated Logic
Current version of Sweetjess does not dynamically update the class path variable. Hence before invoking the methods in the head and body , it is necessary to set the class path MANUALLY. Hence it is strongly suggested that before loading the JVM for running the sweetjess translator set the class path variable manually and then load the JVM .
7) Jess Rule Syntax for trans[JD]
The sweetJess trans[JD] puts the restrictions on the format in which the rule is to be written. These restrictions are summarized below.
1) Every Defrule should start on the new line
2) OR clause if present should be present on the new line and is written as " (or "
3) All the closing brackets should be on the new line and should be singleton. They should be proceeded by anything.
4) All the ATOMs should be on a single line.
5) All the assertions should be on a single line.
For eg. a valid Rule for trans[JD] is given below.
(defrule rule1(or
(foo ?x ?y)
(bar ?y ?z)
)
(or
(bar ?x ?y)
(foo ?y ?z)
)
(poo ?y ?z)
(koo ?y ?z)
=>
(assert (zee1 ?x ?z))
(assert (zee2 ?x ?z))
)