FAQ


  1. Does mandarax support RuleML?
  2. Does mandarax support JSR-94?
  3. Can I use Mandarax in a commercial project?
  4. Do I need other libraries in order to use Mandarax?
  5. Must I include the test packages in a runtime that uses Mandarax?
  6. Are Prolog like features such as negation and cut supported?
  7. Is loop checking supported?
  8. Is there a mandarax SQL interface?
  9. What about performance?
  10. How does Mandarax compare to JESS and JRules?
  11. Which version of the JDK is required or recommended?
  12. Where can I get more help?

Q: Does mandarax support RuleML?

A: The DFKI is working on a standard how to represent knowledge bases in XML (the RuleML project). Mandarax includes some XKB drivers to interface with such xml sources. The RuleML editor is a mandarax based application to edit and query knowledge bases stored as RuleML XML-files.

Q: Does mandarax support JSR-94?

A: Mandarax does not support JSR-94. The reason is that this proposal is so general that it is almost useless. We are monitoring the JSR-94 efforts, and perhaps add support later. 

Q: Can I use Mandarax in a commercial project ?

A: Yes. For details refer to the license.

Q: Do I need other libraries in order to use Mandarax ?

A: Yes, you do. To work with version 1.1 (and better), you need the log4j and junit libs. Both have an open source license. In the download section there are links to the the respective web sites. Version 1.0 does not require any additional library. Note that the package names for both libraries have recently been changed. The new JUnit package names (junit instead of test) are supported by Mandarax 1.2 (and better), the new log4j package names (org.apache.log4j instead of org.log4j) are supported by Mandarax 1.3 (and better)

Q: Must I include the test packages in a runtime that uses Mandarax?

A: No, this is not required. Both the test.. and the example.. can be removed. Therefore, a runtime does not need junit.

Q: Are Prolog like features such as negation and cut supported?

A: Yes, negation (negation as failure) has been added in version 2.0, and cut has been added in version 2.1!

Q: Is loop checking supported?

A: As from Mandarax 1.3, a loop checking algorithm can be used as plug-in for the inference engine. There is a reference implementation as well, check out the respective demos / test cases! Note that the loop checking is (theoretically) not correct, but works rather effective for finite domains (e.g, for business applications).

Q: Is there a mandarax SQL interface?

A: Yes. SQL integration is one of the main objectives of mandarax. Roughly speaking, rows in tables (or result sets) can be considered as facts. Therefore, no replication is necessary. Another database related concept are SQLFunctions, function computed using SQL queries. All database related features are in the org.mandarax.sql package. Standard JDBC is used to connect to databases, and therefore all major databases are supported.

Q: What about performance?

A: In general, mandarax uses less memory then forward reasoning systems (such as JESS) but the computation is slower. Whether the mandarax performance is appropriate for a particular purpose is hard to say in general, we recommend making a case study first if the derivation tree is going to be complex. We are working on a couple of improvements to boost mandarax performance, in particular knowledge base indexing and 'lazy' result sets.
To achieve good performance results it is important to switch logging OFF. This can be achieved by executing the following lines of code before issuing a query:
BasicConfigurator.configure();
Category.getRoot().setLevel(Level.INFO);
Tests show that logging on the DEBUG level brings down performance by the factor 5 !

For performance critical applications, you may also consider using the
Take rule compiler.

Q: How does mandarax compare to JESS and JRules?

A: Jess and JRules (and some other libraries) both use (event driven) forward reasoning (an algorithm called RETE). Mandarax uses (query driven) backward reasoning. We believe that this approach is more appropriate in a query driven (Http requests, SQL queries) system landscape - facts can stay in the database and are integrated on the fly. However, if the rule base (not the underlying database!) is large, forward reasoning systems provide much better performance. Users reported that the mandarax api is much simpler to use than JESS. Yet another difference to JRules is the price tag ..

This topic has been discussed in various discussion groups and opinions are controversial. You will have to do some research in order to find out what is best for your project!

Q: Which version of the JDK is required or recommended?

A: Older versions require JDK 1.3. The ZKB package introduced in version 2.2 uses some JDK 1.4 features, in particular identity dictionaries and XML encoding/decoding for arbitrary objects. If JDK 1.3 compatibility is required, this package should simply be removed.

Q: Where can I get more help?

A: There are various options. The main source of information is the mandarax manual and other documents and articles on mandarax. Please click here to go to the docs page.

If you have questions on mandarax, please join one of the mandarax source forge mailing lists and send the questions to the list. You can also browse the respective mail list archives.