[Xesam] Rewriting the build tools
Antoni Mylka
antoni.mylka at gmail.com
Wed Jul 22 17:10:40 PDT 2009
Ivan Frade pisze:
> Hi,
>
> In some platforms (specially mobile world) there is no java. We could
> depend on java IF there were tools that we cannot have/use in other
> languages. Taking a quick look to the documentation you wrote i think
> there is nothing we cannot do in plain C.
>
> My comments:
>
>
> On Tue, Jul 21, 2009 at 6:06 PM, Antoni Mylka <antoni.mylka at gmail.com
> <mailto:antoni.mylka at gmail.com>> wrote:
<snip description of RDFS2Tex>
> I did something similar to this in C + Redland [1]. It uses two turtle
> files (X.ontology, X.description) and the same algorithm. I stopped
> doing it waiting for this documentation discussion, so it is not
> complete (it generates proper links to classes/properties with "real
> URIs" [the uri of the resource points to a valid HTML with the
> documentation]).
>
> You can use a proper data model to get the direct super/sub
> class/properties, and then you dont need "RDFS inference" anymore. The
> problem is that you cannot easily find "all superclasses of class X",
> but anyway this is only useful to get "all properties available for
> class X" and AFAICS this information is not available in the HTML documents.
Basically the inference was to get the transitive closure of
(sub|super)(classes|properties), obviously you can just traverse that
tree/dag by yourself, so indeed it doesn't need to be that much of a
problem.
<another snip>
> 6. Another tool we developed in NEPOMUK is the nrlvalidator (which
> requires unionsail and infsail). There is some CLI interface, but it was
> meant to be accessed with a java API. They currently live within the
> aperture-tools package in the aperture sourceforge repository.
>
>
> I wrote something similar [2]. It is call data-validator, and i use it
> to validate my test-data generators against the ontology.
>
> It is written in C + Redland, and at the moment it doesn't validate
> data errors, but it should be easy to fix that.
>
>
>
> Rewriting:
> - very difficult, would require a rule-based inference engine,
> there is one in Jena, and infsail is a port from the Jena-one
> to sesame made by Gunnar Grimnes from DFKI. IMHO nearly impossible
> with redland, dunno about virtuoso, or CWM
>
>
> Maybe not all the ultra-fancy validations can be done with redland, but
> at least all the common mistakes generating data i have found while
> testing tracker, are
> detected with my pet-validator.
The most important part is that when we say that
nie:isPartOf rdfs:domain nie:DataObject;
rdfs:range nie:InformationElement;
and then we have
ns:att a nfo:Attachment
ns:eml a nmo:Message
then ns:att nie:isPartOf ns:message is ok, but the reverse is an error.
You can check this only if you're able to implement a loop:
foreach (s,p,o) in dataset
d = domain(p)
r = range(p)
dt = type(s)
ot = type(o)
assert(d is a subclass of dt)
assert(o is a subclass of ot)
With our inferencer this was simple. With a c program this will require
some thinking to do it efficiently. I'll try to compile some plain-text
spec of the exact types of errors our validator checks for, so that we
can agree on that.
> - it's IMHO important because such a tool would be the only way
> to ensure we deliver on the backward-compatiblity promise
>
>
> I never used it for that. But it is a good use-case.
>
> Regards,
>
> Ivan
>
> [1] http://git.gnome.org/cgit/tracker/tree/utils/services/ttl2html.c
> [2] http://git.gnome.org/cgit/tracker/tree/utils/services/data-validator.c
Some remarks:
1. Why is it that necessary for the compilation process to work on
maemo? I mean most mobile platforms don't usually require the user to
download, edit and compile code on the mobile device itself (javame,
android, .net compact, symbian...) for obvious reasons. You work on your
computer with the maemo sdk, and there you can use whatever tool you need.
2. If that's really so important to ditch java, then could you extract
those c programs from the tracker repository and upload them to the SF
repo, together with some makefile?
Antoni Mylka
antoni.mylka at gmail.com
More information about the Xesam
mailing list