Alignment API: lightweight versions

Because we want the Alignment API to be used in resource-limited environments, we experiment with offering minimal versions.

The plugins/android folder contains necessary tools for generating stripped down versions of the Alignment API so that they can be embedded in a small platform (the target being the Android platform for our own purposes).

Microalign

So far, we only offer a client version of the API implementation which should be suitable for any program which simply wants to retrieve and manipulate alignments. This version does not embark any matcher, evaluator, test generator, server, or command line interfaces. So if you have implemented a matcher, it should work simply with this version. Microalign can still act as a client for the Alignment server and retrieve alignments from the server.

What is included/excluded

+ org.semanticweb.owl.align                  (API)
+ fr.inrialpes.exmo
+                  .ontowrap                 (Ontology API wrappers)
-                           .*               (All implementations)
+                  .align                    (Implementation)
-                        .cli                (Command line interface)
+                        .util               (Utility classes)
-                        .gen                (Test generator)
-                        .service            (Alignement server)
+                        .impl               (Basic implementation)
-                             .eval          (Evaluators)
-                             .matchers      (Matchers)
+                        .parser             (Parsers)

Only the libraries related to Jena are needed: Jena (+ icu4j and iri), log4j, xerces (+resolver) and xsdlib (+relaxngDatatype).

Further stripping

We are currently experimenting with ProGuard in order to strip down the code further. The results are displayed with the "*" prefix in the table below.

How to generate

It is necessary to go in the plugin/android directory and use the ant file.

$ ant compileall ==> compile the strict necessary $ ant jar ==> generate the microalign.jar library $ ant zip ==> gerenate the malign.zip file with necessary jars $ ant testindep ==> recompile the sources in isolation for testing independence $ ant clean ==> restore the initial state of this directory $ ant shrink ==> uses proguard to shrink the Jar file (experimental)

How to use

Move the content of the microalign.zip file in the lib(s) directory of your Android project.

The microalign.jar may be used alone if a version of Jena is already embedded.

Other profiles

Of course, you can define other profiles by modifying the build.xml file.

We are considering, introducing a pair of other profiles:

align
the API itself, without any implementation, is already a minimal version of the API which requires no additional libraries;
picoalign
an even smaller package without jena and edoal;
microalign
The procalign.jar generated here is called microalign.jar and contains around 30k of ontowrap.jar.
aservlite
a minimal Alignment server version.

The resulting sizes to be embedded are the following:

standardmicromicro*picoalign
align.jar16k16k16k16k16k
ontowrap.jar61k-
procalign.jar238k154k99k152k
alignsvc.jar98k-
lib29232k7444k7444k2272k

It is clear that the only interest of picoalign comes from dropping Jena. One can also use androjena which amounts to 5332k (version 0.5 12/2010; all Jena libs involved). μjena is a rewritting of Jena for MIDP-2.0/CLDC-1.1 mobile phones (but some have managed to use it under Android). It has been developed in 2007, but the 1.5 version dates back to 2010. It only weights 393k but can only parse ntriples. The authors have been able to demonstrate its use in running an ontology matcher (XSom) on a phone!


https://moex.gitlabpages.inria.fr/alignapi/micro.html