CLIPS4Android is a project created to adapt CLIPS to Android (I know, too obvious).
The project is organized as follows:
- ClipsAndroid
- It is an Android library which is intended to be used by other Android applications. To compile the eclipse project, it is necessary to compile CLIPS for Android first (see Compiling CLIPS for Android.).
- Examples
It contains different Android applications which use ClipsAndroid:
- Simple demo performs basic operations
- Animal demo is an expert system to identify animals
- Semantic reasoning demo infers new semantic content (RDF triples)
Follow the following steps to compile CLIPS for Android:
[*] Providing you have added it to your PATH.
The cleanest way to show messages from a native library in Android is by simply redirecting its output (see Redirecting stdout). However, this method has not always work for me (sorry, I don't know the cause). That's why I forced CLIPS to show all its messages using Logcat (see Logcat from native code).
CLIPS may throw system exits. As a result, the Android process using CLIPS can unexpectedly crash without giving any useful information. To show CLIPS' original error messages, redirect NDK's standard output to LogCat using the following commands:
$ adb shell stop
$ adb shell setprop log.redirect-stdio true
$ adb shell start
Sometimes the previous property does not work (I don't know why yet). Since messages can be directly logged on Logcat, we replaced the printf's with these Logcat's logs in the issue 2 .
To that end, we have done an utility macro. Common usage:
#include "logcat.h"
...
aprintf("This is an standard message\n");
CLIPS's source files remain licensed in the public domain.
The rest of the parts of this project will be licensed also as public domain unless the contrary is stated.
The development of the ClipsAndroid library was possible thanks to the work done in the CLIPSJNI project.
Besides, this project is supported or has been supported by the THOFU R&D project (project grant CEN-20101019). THOFU was funded by the Spanish Centro para el Desarrollo Tecnológico Industrial (CDTI) and supported by the Spanish Ministerio de Economía y Competitividad.