My notes about computer science, programming, and software
© 2008-2009 Jean-Marc Vanel

e-mail: Send your comments - My home page

Last update:
This is my blog. Sometimes I say things in French there, and sometimes in english here.

Parfois je dis les choses en Français, et parfois ici en Anglais.

Table of contents - Years before blog (2004-2007) .

AI use for software development : the new paradigm

Intermediary versions of EulerGUI: http://eulergui.sourceforge.net/tmp/

EulerGUI Download statistics - To view the EulerGUI downloads: http://sourceforge.net/projects/eulergui/files/


2010-02-07

I discover the usage of rdf:value:

http://www.w3.org/TR/2004/REC-rdf-primer-20040210/#rdfvalue

I'm annoyed by the Java bug in URL implementation : "URL class definition voilates RFC 1738 Section 3.10"

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6561321

http://jena.hpl.hp.com/ has disapeared.

List of Projects That Use Protege

I should add myself to

http://protege.cim3.net/cgi-bin/wiki.pl?ProjectsThatUseProtege

or maybe the registration form I filled does it.

On this list of Projects That Use Protege, These Projects look good:

The EssentialProject is the collective name for a set of free, open source, Enterprise Architecture support tools that have been developed for use in conjunction with a variety of Enterprise Architecture approaches and frameworks (including TOGAF).    (AI2)

DynaGent is an Enterprise Management Software, where Business Model are modeled as Ontology Model plus drools rules. We have developed a full ERP and CRM ontology Model, and we have starter to marketed it.    (AHH)

Gloze problems

The gloze.base parameter

There are things to know for the drop (RDF to XML conversion) with Gloze.

The gloze.base parameter is "tolerant" when the "root resource" is <> : e.g. adding this is mandatory, but any URL can be provided, e.g. :

-Dgloze.base=file://foo.com

This should be modified: the gloze.base parameter should not be mandatory.

But when the "root resource" is not <> , the right gloze.base parameter is mandatory.

When the input file has root resource with a file URL, one must be cautious.

For example with this root resource:

<file:///tmp/translation-57.n3>

this does not work:

-Dgloze.base=file:/tmp/translation-57.n3

One must use this URL form:

-Dgloze.base=file:///tmp/translation-57.n3

Apparently this is related to the Java bug in URL implementation : "URL class definition voilates RFC 1738 Section 3.10"

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6561321

Jena URI ressources from the Jena API have file:/// , contrary to the JDK implementations of classes File, URL, URI.

Morewover, when reading an RDF file, the root resource must start with file:///, and gloze.base also. When reading an RDF file, Gloze tolerates a single slash in the resource URI for root in the file. So it's better to stick to triple slashes when authoring or generating an RDF for XML translation.

Problem with xml:lang in the XML Schema

With the very simple N3 file based on the XHTML Schema (see below), I got that stack :

Thread [main] (Suspended (exception NullPointerException))
attribute.toXML(Element, Resource, Set<Statement>, Context) line: 326
attributeGroup.toXML(Element, Resource, Set<Statement>, Context) line: 140
attributeGroup.toXML(Element, Resource, Set<Statement>, Context) line: 136
complexType.toXML(Element, Resource, int, Set<Statement>, boolean, Context) line: 258
complexType.toXML(Element, Resource, int, Set<Statement>, Context) line: 246
element.toXML(Node, RDFNode, Context) line: 632
Context.toXML(Document, Resource) line: 221
Gloze.drop(Resource) line: 747
Gloze.drop(Model, URI) line: 724
Gloze.rdf_to_xml(URL, File, URI, Model) line: 524
Gloze.rdf_to_xml(URL, String) line: 560
Gloze.runGloze(String[]) line: 821
Gloze.main(String[]) line: 774

It was simple to apply some defensive programming.

Problem with the XHTML Schema and string content

Here a simple N3 file based on the XHTML Schema. This rather complex Schema is important in applications.

@prefix : <http://example.com#>.
@prefix html: <http://www.w3.org/1999/xhtml#>.
<> html:html _:html.
_:html html:body :body .
_:html html:head :head .
:head html:title "bla" .

With there arguments:

/home/jmv/src/eulergui/test/xhtml.n3
http://www.w3.org/1999/xhtml
http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd

I got this rather long stack that is hard to understand. What is clear is that a Literal "bla" is cast as a Resource.

Thread [main] (Suspended (exception ClassCastException))
element.toXML(Node, RDFNode, Context) line: 631
element.toXML(Element, Resource, int, Set<Statement>, Context) line: 559
sequence.toXML(Element, Resource, int, Set<Statement>, Context) line: 184
choice.toXML(Element, Resource, int, Set<Statement>, Context) line: 155
sequence.toXML(Element, Resource, int, Set<Statement>, Context) line: 188
complexType.toXML(Element, Resource, int, Set<Statement>, boolean, Context) line: 263
complexType.toXML(Element, Resource, int, Set<Statement>, Context) line: 246
element.toXML(Node, RDFNode, Context) line: 632
element.toXML(Element, Resource, int, Set<Statement>, Context) line: 559
sequence.toXML(Element, Resource, int, Set<Statement>, Context) line: 184
complexType.toXML(Element, Resource, int, Set<Statement>, boolean, Context) line: 263
complexType.toXML(Element, Resource, int, Set<Statement>, Context) line: 246
element.toXML(Node, RDFNode, Context) line: 632
Context.toXML(Document, Resource) line: 221
Gloze.drop(Resource) line: 747
Gloze.drop(Model, URI) line: 724
Gloze.rdf_to_xml(URL, File, URI, Model) line: 524
Gloze.rdf_to_xml(URL, String) line: 560
Gloze.runGloze(String[]) line: 821
Gloze.main(String[]) line: 774

A bad warning message

I also found the origin of a strange warning message :

[ WARN] - 2010-02-06 11:14:22,226 [AWT-EventQueue-0] com.hp.gloze (BeanLoader.java:load:102)

cannot load http://www.w3.org/1999/xhtml#div

This is due to a div element , but not in the input of Gloze, in the XML Schema, inside an <xsd:documentation> . In this particular case, that is not in the main XSD :

http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd

but in

http://www.w3.org/2001/xml.xsd ,

that is imported.

Gloze should ignore the content of <xsd:documentation> .

I modified BeanLoader to avoid the message.

Gloze within EulerGUI

The XML rood node is an RDF blank node

I'm testing "drop" on a N3 file like this, corresponding to an XHML document :

@prefix html: <http://www.w3.org/1999/xhtml>.
_:root html:html _:html.
_:html html:body _:body.
_:body html:p _:sk1.
_:sk1 html:span :NealStephenson.
_:sk1 html:span "a".
_:sk1 html:span :scifiWriter.

First my code for "smart drop" was not good when the XML rood node is an RDF blank node ( _:sk0 ).

I did a correction in Gloze.rdf_to_xml() , but that was not enough. I got the "classical" error in method drop(Resource resource) :

[ WARN] - 2010-02-06 12:41:02,431 [main] com.hp.gloze (Gloze.java:drop:736)
drop: no schema mapping for resource: file:/home/jmv/src/eulergui/test/xhtml.n3

[ WARN] - 2010-02-06 12:41:02,435 [main] com.hp.gloze (Gloze.java:drop:739)
because no properties, is gloze.uri correctly defined?

I will let that aside <<<<

2010-02-05

RDFa

Google Search Engine Adds Support for RDFa, Or Do They?

http://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html

By popular demand, they added FOAF:

http://googlewebmastercentral.blogspot.com/2009/10/help-us-make-web-better-update-on-rich.html

TODO: this list of Converters to RDF should be made into RDFa: http://esw.w3.org/topic/ConverterToRdf

http://rdfa.info/wiki/Tools#RDFa_Extractors

2010-02-03

To read

phd_kaljurand.pdf ; Controlled English for Reasoning on the Semantic Web: decoi2009rewerse.pdf

Attempto Controlled English for Knowledge Representation : reasoningweb2008_fuchs.pdf

owled2007_kaljurand.pdf : Verbalizing OWL in Attempto Controlled English

owled2008eu_kaljurand.pdf : ACE View — an ontology and rule editor based on Attempto Controlled English

Faraz_Fallahi_Vorlage.pdf

Mark Watson's JavaAI3rd.pdf

http://www.faviki.com/person/Got

http://www.faviki.com/person/Got/website/www.xml.com

http://www.faviki.com/ Faviki is a social bookmarking tool that lets you use Wikipedia concepts as tags.

http://www.bbc.co.uk/blogs/radiolabs/s5/linked-data/s5.html

http://www.dfki.uni-kl.de/~sauermann/2006/11/cooluris/

http://www.w3.org/TR/cooluris/

How to Design Programs

An Introduction to Computing and Programming

http://www.htdp.org/2003-09-26/Book/curriculum.html

http://mitpress.mit.edu/sicp/

2010-02-02

http://drupal.org/irc

http://blog.athico.com/2010/01/drools-inference-and-truth-maintenance.html

I found this called "Vim as Haskell IDE" : http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/Vim/vim.html

Haskell

compare ocaml haskell

http://www.haskell.org/pipermail/haskell-cafe/2005-May/009850.html

Haskell is rather mathematical, and mostly about functions, but it droped the essential of math functions syntax: the parenthesis!

Got these answers on the IRC :)

<ksf> jmv, that's because we don't multiply stuff as often as apply functions

<xerox> jmv - it's because the most important construct should use the lightest syntax: in this case function application, and the syntax is just juxaposition

Recent EulerGUI commits

[Eulergui-user] EulerGUI: new style of queries ==> snapshot, EulerGUI server

Snapshot uploaded at noon.

Revision 1200 - Directory Listing

Modified Tue Feb 2 10:09:52 2010 UTC (13 minutes, 23 seconds ago) by jmvanel

N3 searches / Drools queries: appearance in the GUI:

- buttons for search : TESTED red cross delete button

Revision 1199 - Directory Listing

Modified Mon Feb 1 23:26:04 2010 UTC (10 hours, 57 minutes ago) by jmvanel

an icon file was forgotten : search.png

2010-02-01

LarKC: The Large Knowledge Collider http://www.larkc.eu/

Recent EulerGUI commits

Snapshot uploaded at 12pm

Revision 1198 - Directory Listing

Modified Mon Feb 1 23:12:12 2010 UTC (18 minutes, 43 seconds ago) by jmvanel

N3 searches / Drools queries: appearance in the GUI:

- test the new SEARCH action: commit the test facebook.n3p

Revision 1197 - Directory Listing

Modified Mon Feb 1 22:50:39 2010 UTC (40 minutes, 16 seconds ago) by jmvanel

N3 searches / Drools queries: appearance in the GUI:

- test the new SEARCH action

- editor button for searches the right doc.

TODO

- button for search should have a red cross delete button

Revision 1196

Add a button in ButtonsForN3Source to launch the new N3 search

Revision 1194

Refactor : extract the panel for buttons For an N3 Source to a new class ButtonsForN3Source

Revision 1193 - Directory Listing

Modified Mon Feb 1 15:39:50 2010 UTC (24 minutes, 2 seconds ago) by jmvanel

N3 searches / Drools queries: first appearance in the GUI:

- for the second query created with orange ? button and after, it is put among the searches

- button is present after re-opening project

TODO

- button for search should be different from the unique query button, without "activated" checkbox

- editor for searches open the unique query

Revision 1192 - Directory Listing

Modified Mon Feb 1 15:32:46 2010 UTC (31 minutes, 6 seconds ago) by jmvanel

doc.: more about EulerGUI Drools N3 engine built-ins

A multi-valued property that is a LinkedHashMap: question on ##swing

Question on irc.freenode.org##swing

Hi ! I have a multi-valued property that is a LinkedHashMap<String, Something> ,

and I want to have a listener on that for add and remove;

this does not fit well with the standard indexed property;

is there some good practice, or some support classes , similar to java.beans.PropertyChangeSupport ?

2010-01-30

Nice post on the Jena list:

Re: [jena-dev] What is JENA inference support lacking in the technical sense

Specification of EulerGUI Server : parametrized queries

Working on the specification of EulerGUI Server:

https://sourceforge.net/apps/trac/eulergui/wiki/EulerGUIServer. That wiki is not very agreable :( .

I wonder if there is a more of less standard way of wrapping a pre-cooked SPARQL query as a simple HTTP GET request.

It would have the query name, and possibly parameters that would be replaced in the query before running it. Here is discussion for parametrized (or parameterized ?) queries for SPARQL :

http://www.w3.org/2009/sparql/wiki/Feature:Parameters

http://www.w3.org/2009/sparql/wiki/Feature:Query_by_reference

that proposes a query like:

/sparql?query-uri=http://www.example.org/queries/test.rq

See also: BioGateway: a semantic systems biology tool for the life sciences

2010-01-27

Noop , the new Java deescendant from Google:

http://code.google.com/p/noop/

Installed Thea

Thea is an OWL 2 and SWRL engine in Prolog . I got responses from Vangelis.

Running FuXi from repository: trouble

Complained on group fuxi-discussion

Here is the FuXi command that EulerGUI generates:

EX=http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/examples

FuXi --input-format=n3 --output=n3 --ruleFacts --closure \
  --rules=$EX/facebook-rules.n3 \
  --rules=$EX/facebook-data.n3 \
  --rules=http://eulersharp.svn.sourceforge.net/viewvc/eulersharp/trunk/2003/03swap/owl-SymmetricProperty.n3 \
  --filter=$EX/facebookQ.n3

Here is the stack I get:

/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc_II.dev-py2.6.egg/FuXi/Rete/AlphaNode.py:6: DeprecationWarning: the sets module is deprecated
  from sets import Set
/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc_II.dev-py2.6.egg/FuXi/Rete/TopDown.py:12: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import itertools, copy, md5
Traceback (most recent call last):
  File "/usr/local/bin/FuXi", line 8, in <module>
    load_entry_point('FuXi==1.0-rc-II.dev', 'console_scripts', 'FuXi')()
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2180, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1913, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc_II.dev-py2.6.egg/FuXi/Rete/CommandLine.py", line 14, in <module>
    from FuXi.Rete.TopDown import *
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc_II.dev-py2.6.egg/FuXi/Rete/TopDown.py", line 16, in <module>
    from FuXi.Rete.Magic import AdornLiteral
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc_II.dev-py2.6.egg/FuXi/Rete/Magic.py", line 27, in <module>
    from rdflib.sparql.Algebra import RenderSPARQLAlgebra
ImportError: No module named Algebra

Links

https://sourceforge.net/mailarchive/forum.php?forum_name=jena-devel

http://tech.groups.yahoo.com/group/jena-dev/messages

https://launchpad.net/acewiki/

http://attempto.ifi.uzh.ch/webapps/acewikiattempto/?showpage=AceWiki

2010-01-25

Funny , but certainly a fake interview of Sroustrup:

http://artlung.com/smorgasborg/Invention_of_Cplusplus.shtml?

Readings: ACE View, Jena 2 Inference support

ACE View — an ontology and rule editor based on Attempto Controlled English, by Kaarel Kaljurand

Jena 2 Inference support

2010-01-22

Misc. links on OWL reasoners

http://www.semanticoverflow.com/questions/235/simple-cli-useable-owl-reasoner

W3C list of OWL 2 wiki/Implementations

YSR - Yet another Semantic web Reasoner, in SWI Prolog

Sent a mail to Vangelis, the author of Thea OWL engine in Prolog

http://www.w3.org/TR/owl2-profiles/ : EL, QL, RL

http://lat.inf.tu-dresden.de/systems/cel/

http://www.hermit-reasoner.com/java.html

(Re)Tried Open Mind / Common sense

I tried to teach him about carpel: it has parts: style, stigma, ovary (cf Flower Morphology ).

Several things are wrong

Open Mind has 20 predefined predicates (MadeOf, isA) ,see :

http://openmind.media.mit.edu/en/add/

It is part of a larger project, ConceptNet .

It could maybe benefit from a cooperation with Attempto.

I wonder how to extract a part of the database, and also in which format it is available.

I also wonder how the contradictory and low-quality assertions are filrered.

2010-01-21

Recent EulerGUI commits

documentation.html : add Other useful tools / Export from N3/RDF

Revision 1161 - Directory Listing

Modified Thu Jan 21 13:55:32 2010 UTC (100 minutes, 51 seconds ago) by jmvanel

Thanks to the exec-maven-plugin one can now launch the GUI with

mvn exec:java

Revision 1160 - Directory Listing

Modified Wed Jan 20 18:44:06 2010 UTC (20 hours, 52 minutes ago) by jmvanel

When creating a new SPARQL query, with a non-existing file, the result of the query is put in a new /tmp file, but it was not available through the leftmost button.

Revision 1159 - Directory Listing

Modified Wed Jan 20 12:33:06 2010 UTC (27 hours, 3 minutes ago) by jmvanel

was a regression : drag'n'drop of a Project .n3p was not working

Revision 1158 - Directory Listing

Modified Wed Jan 20 12:18:56 2010 UTC (27 hours, 17 minutes ago) by jmvanel

for Bernard , add the OK label on button that was missing in popup URL Chooser

2010-01-20

Announces EulerGUI 1.4.1

EulerGUI bug: creating a new SPARQL query

When creating a new SPARQL query, with a non-existing file, the result of the query is put in a new /tmp file, but it was not available through the leftmost button.

NOTE: I "simply" redo the layout, because the action for the leftmost button is not easily accessible. I could pre-create the /tmp file, or have an observer for changes on the N3 source. The RDF case is implemented differently :( .

2010-01-19

(re)trying Euler server

The main reference is:

http://eulersharp.sourceforge.net/README : "Just running Euler via RESTfull webservice" .

I unzipped the Euler distribution in /home/jmv/apps/Euler-2009-12-18 , then

cd /home/jmv/apps/Euler-2009-12-18
chmod u+x eye

First I ensure that eye is in the path : this runs fine:

~/bin/eye --nope  http://www.agfa.com/w3c/euler/medic.n3 \
          --query http://www.agfa.com/w3c/euler/medicF.n3

I simply created a script ~/bin/eye containing:

( cd /home/jmv/apps/Euler-2009-12-18
  ./eye $* & )

But this was useless for the server.

I simply started the class euler.Codd in the Euler distribution's directory /home/jmv/apps/Euler-2009-12-18 , with this argument :

--port 8088

Then I can run from Firefox the URL-encoded version of the Euler run above :

http://localhost:8088/.eye+http%3A%2F%2Fwww.agfa.com%2Fw3c%2Feuler%2Fmedic.n3+--query+http%3A%2F%2Fwww.agfa.com%2Fw3c%2Feuler%2FmedicF.n3

Using REST Client ( chrome://restclient/content/restclient.xul ) , or even Firefox, one can send this (the URL-encoding is done before sending):

http://localhost:8088/.eye --nope http://www.agfa.com/w3c/euler/medic.n3 --query http://www.agfa.com/w3c/euler/medicF.n3

I wonder whether there is a way to output plain N-Triples (no prefixes).

2010-01-18

http://www.2paths.com/2008/12/30/mulgara-rdf-store/

http://planetrdf.com/guide/

EulerGUI doc.: details on UML import, add borders

There is an OMG specification for the "Ontology Definition Metamodel (ODM)":

http://www.omg.org/spec/ODM/1.0/PDF/

Among other things, it describes "Mapping UML to OWL" (Chapter 16).

2010-01-13

Add to doc.; add an example

Trying Joseki from sources

Joseki is a Web for RDF in the Jena project.

cvs -d:pserver:anonymous@joseki.cvs.sourceforge.net:/cvsroot/joseki login  
cvs -z3 -d:pserver:anonymous@joseki.cvs.sourceforge.net:/cvsroot/joseki co Joseki3
cd Joseki3
ant jar
export JOSEKIROOT=$PWD
chmod u+x  bin/rdfserver bin/joseki_path bin/make_classpath
bin/rdfserver

That's it, I have my Joseki server here :

http://localhost:2020/query.html

To go further: Configuring Joseki + Pellet + TDB

$JOSEKIROOT/doc/configuration.html

http://www.w3.org/Submission/SPARQL-Update/#sec_examples

A server that wraps EulerGUI

Now, I should add a server that wraps the class Project from EulerGUI ...

More precisely, it should wrap a Drools Working Memory that can keep the user data for the duration of the session. The data persistence needs more thinking, as the first version will be a pure expert system.

But what requests will this server accept? Several possiblities:

  1. generic CRUD: relative URL : insert , delete

    insert or delete an single triple, given by parameters subject, predicate, object

  2. it can also wrap a series of insertions with the same subject in a single URL, e.g. http://swi/note_de_frais/facture?payeur=p1&fournisseur=f1&montant=123.45&date=2010-01-11+17:20:50

    this is not particularly interesting, neither on the calling nor callee side; we will either use next option, N-Triples message sent by an HTTP PUT message:

  3. N3 facts: relative URL : n3;

    this will replace options 1 and 2 ( even delete via predicates kb:replace )

  4. N3 rules : relative URL : n3
  5. N3 query : relative URL : n3_query

    this will work much like a SPARQL query, except that the syntax is N3 logic for query, and N3 or N-Triples for result;

TODO in EulerGUI Drools engine:

Updated Fuxi

jmv-desktop:~/src/fuxi% hg pull
pulling from https://fuxi.googlecode.com/hg/
searching for changes
adding changesets
adding manifests
adding file changes
added 6 changesets with 16 changes to 15 files
(run 'hg update' to get a working copy)
jmv-desktop:~/src/fuxi% hg update
15 files updated, 0 files merged, 0 files removed, 0 files unresolved

Subtleties of regular expressions

This article illustrates the subtleties of regular expressions, and their limits compared to compiler generators:

Finding Comments in Source Code Using Regular Expressions

Drools N3 engine: factorial test

Move towards a normalization of strings and number when Triples are created (not in toString() and equals() ).

Now the factorial test passes with initialization

0.0 :factorial 1.0 .

but not with

0 :factorial 1.

Tests were in error (solved):

test_cv2(eulergui.gui.TestGenericGuiGeneration)

test_uml2(eulergui.gui.TestGenericGuiGeneration)

test_ecore2(eulergui.gui.TestGenericGuiGeneration)

test_uml(eulergui.gui.TestSwingGeneration)

test_ecore(eulergui.gui.TestSwingGeneration)

2010-01-11

RDF servers

Sesame 2.3.0 was released on December 1, 2009 . They write:

First of all, all of SPARQL's functionality is now also available in SeRQL.

but it's not clear whether Sesame 2.3.0 is fully compliant with SPARQL.

It is not clear what is the difference between Joseki and TDB, as they both support the SPARQL Protocol and the SPARQL RDF Query language.

2010-01-10

I should announce EulerGUI 1.4 on jena-dev@yahoogroups.com .

Does not work with SWI Prolog Version 5.6.64 included in Ubuntu:

prolog_ide(  open_navigator( '.' )).
false.

2010-01-08

EulerGUI 1.4 Announce for English language followers

EulerGUI is a GUI for RDF, N3 and rules, open source in Java.

The main new feature in this release is plain XML import and export, based on XML Schema and a reasonable mapping between RDF and plain XML. The following XML Schema are hard coded (but you may ask for more): XHTML, SVG, MathML, XForms, XSLT, WSDL, DocBook, XBRL, Maven, Dublin Core in XML, UBL (from Oasis), KML (geography).

There is also a new N3 / RDF source: query from SPARQL services (using ARQ 2.8.2 from Jena project ) .

The OWL reasoner Pellet is integrated in a simple way, and shows OWL class tree for each source.

We now test the GUI at the functional level . It is happiness to see all these use cases that turn on their own quickly ! It now runs in about 3 minutes, but it should even be reduced by parallelizing the Drools compilations, which takes several seconds each. Jemmy is a test library for Swing and SWT. Jemmy has been used for years by the NetBeans team. The tests are written in Java, and JUnit tests added to the EulerGUI test set. These EulerGUI tests include the use cases of the Manual of Deductions Project : generation of applications from sources on Internet in languages N3, OWL, RDFS, UML, and eCore.

Download:

http://sourceforge.net/projects/eulergui/

Change Log

- update to Euler(sharp) 2009-12-18

- D'n'D for URL of project documents

- New Action to Open result in N3 editor;

the result (originally in N-Triples) is converted in N3.

- new N3 source: query from SPARQL services (using ARQ 2.8.2)

- First shot at integrating OWL reasoner Pellet: show class tree for all sources

- export from N3/RDF to plain XML, with Gloze converter, for project sources

and inference result

- larger set of pre-configured XML Schemata for importing and exporting

- now drag'n'drop with a plain XML (non RDF) works and is processed by Gloze;

- Drools N3 engine : built-ins: combine e:findall and math:memberCount; implemented greaterThan, notLessThan, notGreaterThan, notEqualTo, equalTo

- keep the order of N3 statement by the parser

- upgrade Jena to version 2.6.2

- upgrade Drools to 5.1.0M1

- add Jemmy GUI high-level functionnal tests

- svn revision number and Class-Path are visible in Help / About ... as SCM-Revision:

- import URL with .xml suffix: distinguish RDF and plain XML files

EulerGUI 1.4 Announce on Protégé list

EulerGUI is a GUI for RDF, N3 and rules, open source in Java.

The preceding announce for EulerGUI on this list was :

https://mailman.stanford.edu/pipermail/protege-owl/2009-September/012051.html

I said that the rule language is N3 logic . N3 logic is similar to SWRL in its semantics, but the syntax is similar to the body of SPARQL queries.

But I forgot to say that, contrary to SWRL, the predicates and classes do not need to be declared beforehand. There are 4 rule engines available, including one 100% Java based on the famous RETE engine Drools .

EulerGUI has a notion of project, including many kinds of sources that participate in the inference launch: N3, RDF, OWL/RDF, XMI/UML, plain XML, results of SPARQL queries.

The Euler Prolog engine can use rules in N3 logic for most of OWL concepts, see documents in owl-*.n3 in

http://eulersharp.svn.sourceforge.net/viewvc/eulersharp/trunk/2003/03swap/?sortby=file#dirlist

The main new feature in this release is plain XML import and export, based on XML Schema and a reasonable mapping between RDF and plain XML. The following XML Schema are hard coded (but you may ask for more): XHTML, SVG, MathML, XForms, XSLT, WSDL, DocBook, XBRL, Maven, Dublin Core in XML, UBL (from Oasis), KML (geography).

There is also a new N3 / RDF source: query from SPARQL services (using ARQ 2.8.2 from Jena project ) .

Download:

http://sourceforge.net/projects/eulergui/

Change Log

[EulerGUI 1.4 2010-01-05]

- update to Euler(sharp) 2009-12-18

- D'n'D for URL of project documents

- New Action to Open result in N3 editor;

the result (originally in N-Triples) is converted in N3.

- new N3 source: query from SPARQL services (using ARQ 2.8.2)

- First shot at integrating OWL reasoner Pellet: show class tree for all sources

- export from N3/RDF to plain XML, with Gloze converter, for project sources

and inference result

- larger set of preconfigured XML Schemata for importing and exporting

- now drag'n'drop with a plain XML (non RDF) works and is processed by Gloze;

- Drools N3 engine : combine e:findall and math:memberCount; implemented greaterThan, notLessThan, notGreaterThan, notEqualTo, equalTo

- keep the order of N3 statement by the parser

- upgrade Jena to version 2.6.2

- upgrade Drools to 5.1.0M1

- add Jemmy GUI high-level functionnal tests

- svn revision number and Class-Path are visible in Help / About ... as SCM-Revision:

- import URL with .xml suffix: distinguish RDF and plain XML files

Drools N3 engine: built-ins

java.lang.IndexOutOfBoundsException: index 35
at java.util.concurrent.atomic.AtomicReferenceArray.rawIndex(AtomicReferenceArray.java:31)
at java.util.concurrent.atomic.AtomicReferenceArray.set(AtomicReferenceArray.java:94)
at org.drools.common.ConcurrentNodeMemories.clearNodeMemory(ConcurrentNodeMemories.java:50)
at org.drools.common.AbstractWorkingMemory.clearNodeMemory(AbstractWorkingMemory.java:1601)
at org.drools.reteoo.QueryTerminalNode.doRemove(QueryTerminalNode.java:196)
at org.drools.common.BaseNode.remove(BaseNode.java:95)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:414)
at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:731)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:659)
at n3_project.helpers.N3SourcetoDrools.removeRulePackage(N3SourcetoDrools.java:625)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:57)
at eulergui.project.Project.translateN32Drools(Project.java:711)

2010-01-06

Trying TDB Jena

The user manual is here:

http://openjena.org/wiki/TDB

Intelligent test generation

Dragomir D. liked my article "AI use for software development : the new paradigm". I'm reading his article quest to automated test generation .

Thanks to him, I knew NeON toolkit . I tried it , but the pre-release is unusable ... And the 1.2.3 release has no download for Linux 64 bits.

ordered lists in OWL

Dialog on the Protégé list:

http://article.gmane.org/gmane.comp.misc.ontology.protege.owl/31431

To model in OWL a route through several cities, I do not know what is good practice: use rdf:List , or rdf:Seq , or something else .

You are thinking at the rdf level of abstraction and not the owl level. If you use rdf:List or rdf:Seq then you will have an owl full specification. Reasoners generally will not work and it is very likely that the meaning of the ontology will not be the same for each reader.

Nick Drummond has given several presentations where he has described how to do what you want in OWL and exactly what you can say in OWL. A quick google search gives the powerpoint presentation [1] where he describes the approach. There is also an ontology that you can find here [2].

-Timothy

[1] http://www.co-ode.org/resources/tutorials/bio/slides/owl-lists29_11_05.ppt

[2] http://www.co-ode.org/ontologies/lists/2008/09/11/list.owl

Thanks a lot Timothy .

So what I did is import the OWL List ontology from the generic URL

http://www.co-ode.org/ontologies/lists/list.owl

and particularize the class OWLList as a list of cities, by two owl:Restrictions :

Itinerary equivalentTo
  hasContents only City
  and OWLList
  and isFollowedBy only Itinerary

As exemplified in :

http://www.co-ode.org/ontologies/lists/examples/motif-example.owl

What I regret is that the OWL List ontology is not a standard ontology , but it's not a big deal.

Further to the references that Timothy provided, there is a paper describing the list pattern:

Drummond, N., Rector, A.L., Stevens, R., Moulton, G., Horridge, M., Wang, H, Seidenberg, J. Putting OWL in Order: Patterns for Sequences in OWL, in 2nd OWL Experiences and Directions Workshop, Athens, GA

http://www.webont.org/owled/2006/acceptedLong/submission_12.pdf

Links: Non-monotonic_logic, Closed_world_assumption, etc

http://granddictionaire.com/ propose pour call back, "procédure de rappel". Je dirais plutôt "rappel sur évènement"

http://foldoc.org/ Free On-line Dictionary of Computing

http://en.wikipedia.org/wiki/Non-monotonic_logic

http://en.wikipedia.org/wiki/Closed_world_assumption

http://en.wikipedia.org/wiki/Horn_clause

2010-01-05

Attempto (ACE)

Subscribed to the attempto Mailing List . my message: "Introduction and translation to N3 logic"

There is in fact some Prolog sources for SWRL in utils/drs_to_owlswrl.pl , but it is not accessible through the command line predicate ...

2010-01-04

http://www.w3.org/2005/rules/wg/wiki/List_of_Rule_Systems

Releasing EulerGUI 1.4

Maven generated Project Dependencies

The CHANGELOG:

- update to Euler(sharp) 2009-12-18

- D'n'D for URL of project documents

- New Action to Open result in N3 editor;

the result (originally in N-Triples) is converted in N3.

- new N3 source: query from SPARQL services (using ARQ 2.8.2)

- First shot at integrating OWL reasoner Pellet: show class tree for all sources

- export from N3/RDF to plain XML, with Gloze converter, for project sources

and inference result

- larger set of preconfigured XML Schemata for importing and exporting

- now drag'n'drop with a plain XML (non RDF) works and is processed by Gloze;

- Drools N3 engine : combine e:findall and math:memberCount; implemented greaterThan, notLessThan, notGreaterThan, notEqualTo, equalTo

- keep the order of N3 statement by the parser

- upgrade Jena to version 2.6.2

- upgrade Drools to 5.1.0M1

- add Jemmy GUI high-level functionnal tests

- svn revision number and Class-Path are visible in Help / About ... as SCM-Revision:

- import URL with .xml suffix: distinguish RDF and plain XML files

jmv-desktop:~/src/eulergui_test/eulergui% DISPLAY=:1 mvn release:prepare
 ...
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 minutes 13 seconds
[INFO] Finished at: Mon Jan 04 21:30:29 CET 2010
[INFO] Final Memory: 19M/288M

MVEL

I had never realized that MVEL used in Drools is in fact a separate language: http://mvel.codehaus.org/About. It will also be used in rule engine Take.

RIF (W3C Rule Interchange Format)

RIF is the W3C Rule Interchange Format. It's an XML language for expressing rules which computers can execute.

public-rif-comments@w3.org Mail Archives

R2ML is a comprehensive and user-friendly XML rule format.

From this RIF Implementations list , I see that Euler implements RIF ! :) , using external RIF/XML->N3 translator . But where is this external translator ?

This works, but it is just the test for RIF builtin predicates and functions:

eye --nope --plugin \
http://eulersharp.sourceforge.net/2006/02swap/rif-plugin.yap \
http://eulersharp.sourceforge.net/2007/07test/rifP.n3 --query \
http://eulersharp.sourceforge.net/2007/07test/rifQ.n3

Other implementation of RIF: SILK (by Grossof et al., site down), fuxi (see FuXiUserManual#FuXi_.SPARQL )

This is how to launch and ordinary Euler run (reminder) :

yap -l euler.yap -g main -- --nope graph.filter.n3 --query graph.axiom.n3

or

./eye --nope graph.filter.n3 --query graph.axiom.n3

Attempto (ACE): tried some examples

Reading http://attempto.ifi.uzh.ch/site/docs/

I installed ACE without problem from the distribution. Then I can run commands e.g. (can also run on the the APE Web client without installing anything ) :

./ape.exe -cfol -text "Every cat is an animal."  
 ./ape.exe -solo fol -text "Every cat is an animal."
 ./ape.exe -solo drsxml -guess -text \
          "If the customer is a student then he receives a discount."
 ./ape.exe -solo drspp -guess -text \
  "If a customer has more than 50 total purchases then he/she is a gold customer."

 ./ape.exe -solo drspp -guess -text "if the customer is premium and the product is luxury then the discount for a customer who buys a product is 7.5%."
[]
   [A, B, C, D, E, F]
   object(C, customer, countable, na, eq, 1)-1/3
   property(A, premium, pos)-1/7
   predicate(B, be, C, A)-1/4
   object(F, product, countable, na, eq, 1)-1/12
   property(D, luxury, pos)-1/16
   predicate(E, be, F, D)-1/13
   =>
   [G, H, I, J, K]
   object(K, discount, countable, na, eq, 1)-1/21
   object(G, customer, countable, na, eq, 1)-1/24
   object(H, product, countable, na, eq, 1)-1/30
   predicate(I, buy, G, H)-1/26
   modifier_pp(J, for, G)-1/22
   predicate(J, be, K, real(7.5))-1/31

This last one coming from the RuleML tutorial is interesting because, calling ./ape.exe -solo paraphrase on it, one sees that the input is wrong. After some trials and errors I got this:

./ape.exe -solo paraphrase -guess -text "If a customer C is premium and the customer C buys a product P and P is luxury then the discount is 7.5% for P applied to C ."
If a customer X1 is a:premium and the customer X1 buys a n:product X2 and the n:product X2 is a:luxury then a n:discount is 7.5 applied to the customer X1 for the n:product X2.

Note also that here "the discount" triggers this message on the APE Web client :

The definite noun phrase 'the discount' does not have an antecedent and thus is not interpreted as anaphoric reference, but as a new indefinite noun phrase.

Note also that here "applied" is interpreted as an adverb. This variant is propably better:

./ape.exe -solo drspp -guess -text \
  "if a customer C is premium and the customer C buys a product P and P is luxury then a discount of 7.5% for P is applied to C ."
[]
   [A, B, C, D, E, F, G]
   object(A, customer, countable, na, eq, 1)-1/3
   property(B, premium, pos)-1/8
   predicate(C, be, A, B)-1/5
   object(D, product, countable, na, eq, 1)-1/17
   predicate(E, buy, A, D)-1/13
   property(F, luxury, pos)-1/24
   predicate(G, be, D, F)-1/21
   =>
   [H, I, J]
   object(H, discount, countable, na, eq, 1)-1/29
   relation(H, of, real(7.5))-1/30
   modifier_pp(J, for, D)-1/32
   property(I, applied, pos)-1/37
   predicate(J, be, H, I)-1/34
   modifier_pp(J, to, A)-1/38

TODO :

Note : ACE has nothing to do with ACE - a collaborative editor :

http://en.wikipedia.org/wiki/ACE_%28editor%29

Tests with empathy and Google Talk

This bug is still present:

https://bugs.launchpad.net/ubuntu/+source/empathy/+bug/421572

(empathy:24589): tp-fs-DEBUG: stream 2 0x21725b0 (video) set_remote_codecs: called
(empathy:24589): tp-fs-DEBUG: stream 2 0x21725b0 (video) set_remote_codecs: adding remote codec H264-SVC [96]
(empathy:24589): tp-fs-DEBUG: stream 2 0x21725b0 (video) set_remote_codecs: adding remote codec H264 [97]
(empathy:24589): tp-fs-DEBUG: stream 2 0x21725b0 (video) set_remote_codecs: adding remote codec H264-SVC-RFC [99]
tp-fs-Message: tf_stream_error: stream error errorno=2 error=Codec negotiation failed: There was no intersection between the remote codecs and the local ones

introductory material on the semantic web

I was looking for some solid links for resources and entry level to medium introductory material on the semantic web, RDF, and SPARQL. I like this intro by Marko A. Rodriguez: http://markorodriguez.com/Lectures_files/rdfrdfsowl.pdf

This was answered by Peter Neubauer, the guy of Neo Technology http://neo4j.org/

http://neotechnology.com/about-us

neo4j

NEO4J Getting_Started_Guide

I'm surprised that one can add properties to a relationship !

2010-01-03

Checking EulerGUI dependencies

Euler (updated to 2009-12-18), Jena, Pellet, Drools

RuleML

I had a look at a RuleML example: http://ruleml.org/translator/exa/hunger.ruleml .

The various modularized parts of the XML Schema for RuleML are here:

http://ruleml.org/0.91/xsd/

For instance, datalog.xsd includes by schemaLocation 8 other modules. The hierarchy of models is detailed here:

http://ruleml.org/modularization/model/ruleml_m12n_09_uml_06-09-01.svg , which mainly says:

Binary-->datalog-->hornlog-->dishornlog-->folog

There is a PDF document called Content Models for RuleML .

http://ruleml.org/indesign.html : this design document seems to have a historical value...

http://www.ruleml.org/papers/tutorial-ruleml.html : this tutorial document is indeed the best one to understand the XML structure of RuleML.

See also the Cover pages on ruleML

RuleML and ACE

I was able to compile and launch the translator from ACE to RuleML. It calls the Web service for ACE (that parses the Controlled English), and prints the XML for RuleML in a JPanel. The class DRSParser (made with JavaCC from the grammar DRSParser.jj , described in thesis "TRANSLATOR: A TRANSlator from LAnguage TO Rules", by David Z. Hirtle, April 12, 2006 ) parses the DRS from ACE, and directly generates the XOM XML elements obeying the XML Schema for RuleML. The translation rules are described in the JavaCC grammar. The crucial lines are:

queryString = QUERYBASE + PARAMS + URLEncoder.encode(aceText, "UTF-8");
nu.xom.Document doc = builder.build(queryString);
String drs = doc.getRootElement().getFirstChildElement("drs").getValue();
java.io.Reader r = new java.io.BufferedReader(new java.io.StringReader(drs));
Element as = null;
// parse DRS with DRS parser
if (parser == null) parser = new DRSParser(r);
else parser.ReInit(r);
as = parser.Start();

Attempto and N3

I'm trying to figure out how I can export an ACE rule base (in DRS, discourse representation structure ) as N3 logic. RuleML is just one possible intermediary. Directly using the ACE tools in SWI Prolog might be better. There is in fact some Prolog sources for SWRL in utils/ , but no command line predicate ...

I tried to re-use the DRS XML, by converting it with EulerGUI and Gloze. Alas the order of the 2 DRS tags inside Implication is not kept in the conversion, and there is no XSD available for DRS. I could follow the same path, but with the XML RuleML translation provided by the translator from ACE to RuleML .

There is a short "Rosetta stone" between RuleML and N3, called "N3 in Object-Oriented RuleML".

An interesting article: Querying Ontologies: A Controlled English Interface for End-users

2009-12-24

Consolidating EulerGUI

DONE

2009-12-23

TODO: test person_xforms.n3p

Gloze

DONE

Tested XHTML import: TODO : clarify this:

Starting Gloze.main() with args
/home/jmv/src/eulergui/test/simple.html 
java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.hp.gloze.XMLUtility.read(XMLUtility.java:71)
at com.hp.gloze.Gloze.xml_to_rdf(Gloze.java:370)

2009-12-22

Gloze use cases

1. XML import

2.0 XML export if "root" RDF URI predicate is known

2.1 XML export if target namespace is known

3. XML export if only the RDF source is known ( "smart drop" )

2009-12-21

Gloze

Maybe use this constructor to initialize Gloze with the important Schema list from EulerGUI :

public Gloze(URL[] schemaLocation, URI[] targetNS) throws Exception {

DONE

2009-12-20

Gloze

now all 39 Gloze specific tests pass, including TestOWL

2009-12-19

Gloze

TODO for Gloze itself:

DONE

2009-12-18

http://www.mtholyoke.edu/courses/dstrahma/cs341/myslides/Ch25_DedDB.PPT

Recompiling Gloze 1.01-beta2

I changed the Ant of Gloze:

<property name="java.debuglevel" value="source,lines,vars"/>

because vars was missing !!!!!!!! The debugger showed only the arguments, not the local variables.

On december 2nd, I tested Gloze with Ant (see Testing my modifications in Gloze ). Now I can't do ant compile anymore (but did I really run it ?) ! But ant test still runs !

Debugging Maven test cases with eclipse

I applied this recipe :

"Debug Maven using Standalone Maven install"

from http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration, that is:

First of all you need to get corresponding Maven projects into the Eclipse workspace.

To debug Maven standalone Maven CLI you can set the following environment variable:

MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE \

-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

Then start Maven as usual and attach remote debugger to Maven process on port 8000 using Eclipse's "Remote Java Application" configuration.

To that I added in pom.xml an ingredient from the next recipe:

<plugin>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <forkMode>never</forkMode>
  </configuration>
</plugin>

2009-12-17

EulerGUI

XML export with Gloze

Issues with "root" resource in an RDF graph

Gloze "drop" (RDF to XML conversion) now works on an N3 file, but a special one, starting with :

<>
      kml_:kml
              [ a       kml_:KmlType ;
                kml_:Placemark
                 ...etc ...

This way the <> resource stands for the URI of the N3 file.

I discovered the role played by the gloze.base parameter . In the case of drop, this means the URI of the resource that will be converted to the XML root element. Indeed in a general RDF graph there is no such thing as a root.

I expected (naively) that Gloze was able to detect in a general RDF graph this "root" resource. But it does not, as it is not trivial.

So it has to be either given to Gloze, through the System Property "gloze.base" , or computed from the RDF graph and some information related to the XML Schema. The XML root element(s) for a given Schema is probably something that will have to be set in configuration (because an XML Schema does not specify a root element). Then to find the RDF statement that will be converted to the XML root element, one has to iterate on the statements, finding one that has the right predicate ( kml_:kml in the example above). So we could add in Gloze this method to set the RDF predicate of the "root" resource corresponding to the XML root:

void setRootPredicate(String root);

The root RDF predicate would also be associated to a System Property "gloze.root" .

Arranged URI management in EulerGUI

Now at 1pm, it only works with eclipse; in fact there was 2 errors in file URI management:

But now from Maven I get this ( from eclipse it works in the same directory ) :

[ WARN] - 2009-12-17 13:28:56,408 [AWT-EventQueue-1] com.hp.gloze (Gloze.java:drop:663)
 drop: no schema mapping for resource: file:///home/jmv/src/eulergui/test/kml2.n3

[ WARN] - 2009-12-17 13:28:56,409 [AWT-EventQueue-1] com.hp.gloze (Gloze.java:drop:671)
 because no matching property: http://www.opengis.net/kml/2.2#kml

In fact, given the message, and the fact that this particular Schema for KML does not declare the root element <kml>, it seems normal that it does not work.

The strange effect with Maven it certainly due to a mixture of static and non-static stuff in Gloze. Before me, Gloze was never tested a a reusable object.

After even more investigations, an EulerGUI test project with 2 sources, one N3 and one RDF, both using the KML vocabulary from the Schema, shows the same problem when exporting the second RDF source [on 21st could not reproduce that].

2009-12-16

http://ebusiness-unibw.org/ - http://www.unibw.de/ebusiness/

E-Business and Web Science Research Group

We are a young team of researchers with backgrounds in information systems, conceptual modeling, economics, computer science, and related disciplines. In our research, we work on the theoretical and practical challenges of using the World Wide Web for facilitating the exchange of tangible and intangible goods between economic actors, and economic activity in general. Our core research interest is employing Semantic Web technology for E-Procurement and Business Process Management.

EulerGUI

XML export with Gloze

DONE

Currently we have this diagram:

ProjectGUI<>---SourceFactory<>---Gloze

We need to reuse this instance of Gloze in class XMLExport, instead of the static method

GlozeAdapter.main(args);

I used XSLT to compare the output to the original XML. I tested my XSLT with:

saxonb-xslt -s:xml-export/kml2.rdf.xml -xsl:test/identquery2.xslt
saxonb-xslt -s:test/kml.xml            -xsl:test/identquery2.xslt

It works, my test !!!!!!!!!!!

I kill all the white spaces and line breaks with this:

<xsl:template match="text() [fn:matches(.,'^ +$|^$','m' )]"
  priority="100"></xsl:template>

For the rest, I'm copying recursively.

model

 (com.hp.hpl.jena.rdf.model.impl.ModelCom)
 <ModelCom   {-33d905d4:12598ad7114:-7ffd @kml_:Placemark -33d905d4:12598ad7114:-7ffc; -33d905d4:12598ad7114:-7ffd @rdf:type kml_:KmlType; -33d905d4:12598ad7114:-7ffb @kml_:coordinates -33d905d4:12598ad7114:-7ffa; -33d905d4:12598ad7114:-7ffb @rdf:type kml_:PointType; file:///tmp/translation-5764596566461002629.n3 @kml_:kml -33d905d4:12598ad7114:-7ffd; -33d905d4:12598ad7114:-7ffc @kml_:name "New York City"^^http://www.w3.org/2001/XMLSchema#string; -33d905d4:12598ad7114:-7ffc @kml_:description "New York City"^^http://www.w3.org/2001/XMLSchema#string; -33d905d4:12598ad7114:-7ffc @kml_:Point -33d905d4:12598ad7114:-7ffb; -33d905d4:12598ad7114:-7ffc @rdf:type kml_:PlacemarkType; -33d905d4:12598ad7114:-7ffa @rdf:rest rdf:nil; -33d905d4:12598ad7114:-7ffa @rdf:first "-74.006393,40.714172,0"^^http://www.w3.org/2001/XMLSchema#string} | >
 
model.getNsPrefixMap()
 (java.util.HashMap<K,V>) {atom=http://www.w3.org/2005/Atom, 
 ns1=http://example.org#, 
 xs_=http://www.w3.org/2001/XMLSchema#, 
 kml_=http://www.opengis.net/kml/2.2#,
 kml=http://www.opengis.net/kml/2.2, 
 xs=http://www.w3.org/2001/XMLSchema, 
 rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#, 
 xal=urn:oasis:names:tc:ciq:xsdschema:xAL:2.0, 
 atom_=http://www.w3.org/2005/Atom#, 
 xal_=urn:oasis:names:tc:ciq:xsdschema:xAL:2.0#}
 }

No JUnit tests in Gloze :( :

grep --recursive TestCase ~/src/Gloze-1.01-beta2/src/

but there are Ant tests somehow.

Expression for debugging Jena API:

resource.getModel().listStatements().toList()
resource.getModel().listObjects().toList()

2009-12-15

Ontology+Development on hal.archives-ouvertes.fr

Fetching Jena sources from depots

Eyeball , ARQ are on CVS

svn co https://jena.svn.sourceforge.net/svnroot/jena/Gloze
svn co https://jena.svn.sourceforge.net/svnroot/jena/TDB
svn co https://jena.svn.sourceforge.net/svnroot/jena/ARQ
cvs -z3 -d:pserver:anonymous@jena.cvs.sourceforge.net:/cvsroot/jena co -P jena2

EulerGUI

DONE

XML export with Gloze

Currently it does not work.

As a side task I need to find a small XML Schema, preferably non trivial and useful. I try KML, a geographical Schema used in Google Earth, with this pair XML namespace + Schema location:

http://www.opengis.net/kml/2.2"
http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd

To test, I can click on XML export on a small KML document (eulergui/test/kml.xml) imported in EulerGUI. The question is: how can I find the pairs XML namespace + Schema location corresponding to an N3 /RDF documents ( typically coming from a rule engine ) ?

So from this N3, how can I find the pairs XML namespace ?

@prefix kml_:    <http://www.opengis.net/kml/2.2#> .
@prefix kml:     <http://www.opengis.net/kml/2.2> .

<file:/tmp/translation-5764596566461002629.n3>
      kml_:kml
              [ a       kml_:KmlType ;
                kml_:Placemark
                        [ a       kml_:PlacemarkType ;
                          kml_:Point
                                  [ a       kml_:PointType ;
                                    kml_:coordinates ("-74.006393,40.714172,0"^^xs_:string)
                                  ] ;
                          kml_:description "New York City"^^xs_:string ;
                          kml_:name "New York City"^^xs_:string
                        ]
              ] .

So we see that Jena RDF to N3 translator has created two N3 prefixes for KML. Note that there is a loss a information here, but I don't think that Gloze keeps the correspondance between the RDF predicate kml_:kml and the XML elements they come from. Note that the root <kml> element is not in the XML Schema for KML .

KML reference on code.google.com

So we need to get access to the list of N3 prefixes, see if some of them match the XML namespaces in namespace2schema0 in XMLExport.java, and add the pair XML namespace + Schema location to the Gloze arguments.

In fact this is what XMLExport.selectSchemataFromProject() does :) . But for an N3 source coming from RDF, method N3Source.getKnownURIPrefixes() returns an empty set. In fact, even for an N3 source, this method returns an empty set when the Drools N3 engine has not been launched, i.d. when the N3 parser has not run yet. So I'm adding a "lazy" N3 parsing to method N3Source.getKnownURIs() .

2009-12-14

EulerGUI Drools N3 engine

Cardinality

DONE

2009-12-13

ncal -w

EulerGUI Drools N3 engine

Need to change that in Triple, because loading factsTriples.xml currently is broken .

public Object
// String 
getObject() {

Cardinality

In the Drools N3 engine , there was a confusion between the results and the rest; it was not serious as long as we did not count the triples. But this test, findall3.n3 , returns 3 instead of 2 :

{ # output the number of children for each father
        ?X :marriedTo ?Y .
        (?SCOPE ?SPAN) e:findall (
                ?CHILD { ?X :hasChild ?CHILD }
                ?CHILDREN
        ) .
        ?CHILDREN math:memberCount ?C .
} => {
        ?X :with_children ?C .
} .

2009-12-12

Installed Drools eclipse plugin

JBoss Tools Update Sites

Note: on Ubuntu, the eclipse installation directory is /usr/share/eclipse/ , but I don't need that right now.

Create a Drools project

When asked to "Select a Drools Runtime", just click on "Configure Workspace settings ..." / Add / "Create a new Drools Runtime ..." , and then just give it a new directory.

Alas, it's only possible to put breakpoints in the antecedent.

EulerGUI Drools N3 engine: cardinality

2009-12-10

EulerGUI Drools N3 engine: cardinality

First commit for this combination of e:findall , math:memberCount , and math:greaterThan :

( need more tests and code generalization, but current tests pass )

_:d e:findall (
  ?CHILD { ?X :hasChild ?CHILD }
  ?CHILDREN
) .
?CHILDREN <http://www.w3.org/2000/10/swap/math#memberCount> ?COUNT .
?COUNT math:greaterThan 1 .

2009-12-09

EulerGUI Drools N3 engine: cardinality

Conmmited a big change to pave the way for cardinality rules in Drools N3 engine

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 2 seconds

java.lang.NumberFormatException: For input string: ""1""

2009-12-08

java.net People

NIEM, the National Information Exchange Model, is a partnership of the U.S. Department of Justice and the Department of Homeland Security. It is designed to develop, disseminate and support enterprise-wide information exchange standards and processes that can enable jurisdictions to effectively share critical information in emergency situations, as well as support the day-to-day operations of agencies throughout the nation.

JPA FAQ (Java Persistence API)

2009-12-04

DONE

TODO

java.io.FileNotFoundException: /home/jmv/src/eulergui/XMLSchema.dtd (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.hp.gloze.XMLUtility.read(XMLUtility.java:71)
at com.hp.gloze.Gloze.loadSchema(Gloze.java:180)
at com.hp.gloze.Gloze.initSchema(Gloze.java:230)
at com.hp.gloze.Gloze.initSchemaLocation(Gloze.java:307)
at com.hp.gloze.Gloze.runGloze(Gloze.java:710)
at com.hp.gloze.Gloze.main(Gloze.java:683)

2009-12-03

EulerGUI: SPARQL queries

DONE

With latest ARQ 2.8.2 from Jena these language constructs seem not to work:

I have a look in the ARQ ChangeLog to see what would be a replacement. I found this interesting page with the solution:

http://jena.sourceforge.net/ARQ/negation.html

In fact, as exemplified in

http://www.w3.org/TR/rdf-sparql-query/#func-RDFterm-equal

these operators work only inside a FILTER clause:

# This query finds the people who have multiple foaf:name triples:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name1 ?name2
 WHERE { ?x foaf:name  ?name1 ;
            foaf:mbox  ?mbox1 .
         ?y foaf:name  ?name2 ;
            foaf:mbox  ?mbox2 .
         FILTER (?mbox1 = ?mbox2 && ?name1 != ?name2)
       }

Enhancement in opening buggy projects

A Project with an N3 source throwing an exception at restore during prepare() does not prevent the project from being loaded; the N3 source is shown with a rose background and a tooltip showing the exception.

2009-12-02

TODO : EulerGUI Manual: review recent features: SPARQL, XML import and export

EulerGUI : enhancements in tests

Bypass the Parser4J tests

The Parser4J N3 parser in EulerGUI is quite stable now. So, shorten the test time, I added this in 2 places in the Parser4J tests in EulerGUI:

  // possibility to bypass long Parser4J tests:
  String runTests = System.getProperty("PARSER4J_TESTS");
  if( "no".equals(runTests) )
    return;

Now one can run the tests like this:

mvn -DargLine="-DPARSER4J_TESTS=no" test

Disactivate the windows in Jemmy tests

I got an answer to my question on the Jemmy list:

https://jemmy.dev.java.net/servlets/ReadMsg?list=users&msgNo=55

It works ! Note that I used to have close request sent by Jemmy to Firefox (bug of Jemmy, of my tests, of Firefox or of X-Windows ?). Of course this trick of running inside a second X server removes also this problem.

Now with this incantation I run all the important tests in 2 minutes !

DISPLAY=:1 mvn -DargLine="-DPARSER4J_TESTS=no" \
--no-plugin-updates --offline test

All this is nox documented in the Manual .

Testing my modifications in Gloze

~/src/Gloze-1.01-beta2% ant test
Buildfile: build.xml

test-lift:
    [junit] Running com.hp.gloze.test.TestLift
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 4,889 sec

test-owl:
    [junit] Running com.hp.gloze.test.TestOWL
    [junit] Tests run: 22, Failures: 0, Errors: 0, Time elapsed: 13,686 sec

test-samples:
    [junit] Running com.hp.gloze.test.TestSamples
    [junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed: 2,909 sec

test:

BUILD SUCCESSFUL
Total time: 23 seconds

Then I changed Gloze.java with my URL enabled version from

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/com/hp/gloze/Gloze.java

I restarted ant test, and it worked !

The details of the modification are here:

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/com/hp/gloze/Gloze.java?view=log

2009-12-01

export EMPATHY_DEBUG=all

Testing Gloze in EulerGUI

There was a problem (a NPE) when adding one XML after another, both having the same XML Schema. Related to that, Gloze.main() was not made to run twice.

Question; can I reactivate the standard output when Jemmy has started waiting for stuff ?

DONE

gloze.target=/tmp/translation-1805042465621371530.n3
Starting Gloze.main() with args
/home/jmv/src/eulergui/pom.xml 
http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd 
Ran Gloze in 4405 ms
contentType: "text/xml"
extracted XML Namespaces from plain XML source "http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/pom.xml"
{http://maven.apache.org/POM/4.0.0=http://maven.apache.org/maven-v4_0_0.xsd}
fileName: /tmp/translation-3893167880162646404.n3
getSources().size(): 2
getSources().size(): 2
getSources().size(): 3

gloze.target=/tmp/translation-3893167880162646404.n3
Starting Gloze.main() with args
http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/pom.xml 
http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd 
Ran Gloze in 201 ms
java.lang.NullPointerException
at com.hp.gloze.Gloze.initSchema(Gloze.java:229)
at com.hp.gloze.Gloze.lift(Gloze.java:614)
at com.hp.gloze.Gloze.xml_to_rdf(Gloze.java:363)
at com.hp.gloze.Gloze.xml_to_rdf(Gloze.java:379)
at com.hp.gloze.Gloze.xml_to_rdf(Gloze.java:424)
at com.hp.gloze.Gloze.main(Gloze.java:745)
at eulergui.inputs.N3SourceFromXML_Gloze.prepare(N3SourceFromXML_Gloze.java:61)
at n3_project.SourceFactory.addSource(SourceFactory.java:58)

This Exception is currently "normal" in Gloze :

Thread [AWT-EventQueue-0] (Suspended (exception NoSuchElementException))
Tokenizer.nextToken() line: 82
Rule$Parser.nextToken() line: 719
Rule$Parser.peekToken() line: 755
Rule.parseRules(Parser) line: 603
FBRuleReasoner.loadRules(String) line: 257
RDFSRuleReasoner.loadRulesLevel(String) line: 197
RDFSRuleReasoner.<init>(ReasonerFactory) line: 69
RDFSRuleReasoner.<init>(ReasonerFactory, Resource) line: 81
RDFSRuleReasonerFactory.create(Resource) line: 46
OntModelSpec.getReasoner() line: 382
OntModelImpl.generateGraph(OntModelSpec, Graph) line: 2742
OntModelImpl.<init>(OntModelSpec, Model, boolean) line: 139
OntModelImpl.<init>(OntModelSpec, Model) line: 120
ModelFactory.createOntologyModel(OntModelSpec, Model) line: 402
ModelFactory.createOntologyModel(String) line: 361
ModelFactory.createOntologyModel() line: 344
schema.<init>() line: 207
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method]
NativeConstructorAccessorImpl.newInstance(Object[]) line: 39
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27
Constructor<T>.newInstance(Object...) line: 513
Class<T>.newInstance0() line: 355
Class<T>.newInstance() line: 308
XMLBean.newShallowInstance(Element) line: 656
GlozeURL.loadSchema(URL) line: 240
GlozeURL.initSchema(URI, URL, Map<URL,schema>) line: 288
GlozeURL.initSchemaLocation(URI, URL, String, Map<URL,schema>) line: 365
GlozeURL.main(String[]) line: 762
N3SourceFromXML_Gloze.prepare(Project) line: 60
XMLInputAction.actionPerformed(ActionEvent) line: 47

2009-11-30

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd

Maven test details

Jemmy Operators Environment

Sent a mail to users@jemmy.dev.java.net :

change a WindowWaiter.AfterWindowTimeout after the JFrame is displayed ?

https://jemmy.dev.java.net/servlets/ReadMsg?list=users&msgNo=48

http://weblogs.java.net/blog/editor/archive/2009/11/24/stephen-colebourne-update-closures-jdk-7

http://en.wikipedia.org/wiki/Closure_%28computer_science%29

http://www.jibbering.com/faq/faq_notes/closures.html

2009-11-29

EulerGUI + Déductions : update Jemmy 2 test

Functional (Jemmy) tests:

Trying Jester, a test tester

Jester - Test your tests with Jester

Quote from the site:

Jester finds code that is not covered by tests. Jester makes some change to your code, runs your tests, and if the tests pass Jester displays a message saying what it changed.

The changes are very simple, like changing true to false, but the "succeded" changes point to missing tests, or in some cases to unnecessary code. Here is how I launched Jester. Because it re-builds after each change, it is quite slow, so I just ran one test and provided only one source class for changes

java -jar /home/jmv/apps/simple-jester120/simple-jester.jar \
  -classpath target/eulergui-1.4-SNAPSHOT-jar-with-dependencies.jar:\
/home/jmv/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar \
  -buildCommand "mvn -Dtest=unif.InstanciatorTest test" \
  -source src/main/java/unif/Instanciator.java -shouldShowProgressDialog true
 ...
196 mutations survived out of 246 changes. Score = 21
took 43 minutes

This means that only 21% of the mutations were caught by the tests. Actually in this package only one file is relevant : Instanciator.java , but a package directory could have been given instead, e.g. :

-source src/main/java/unif/

As an example, here is the result of Jester; a copy of the original source files as ".html" pages, with all the changes Jester made that did not cause the tests to fail shown in red, and the code it changed shown with a line through it : Instanciator.html

Work in progress:

mvn -Dtest=eulergui.gui.TestGenericGuiGeneration \
    -Ddemo=active test

Joafip + Drools

Luc worked towards actual persistence. For now, it only runs in memory, but already uses the P* modified Joafip ollections.

The Subversion incantation to copy sources from one branch to another:

cd ~/src/eulergui
svn cp examples/simplest.n3* \
  https://eulergui.svn.sourceforge.net/svnroot/eulergui/branches/eulergui-joafip/examples/

2009-11-28

EulerGUI + Déductions : update Jemmy 2 test

It is nice for demos to keep the GUI active for interactions after scenario is played.

TODO

Add to one test the EulerGUI features: display class hierarchy with Pellet, plain XML as N3 source, SPARQL query, export as Drools, export as XML;

and also the generated aplication features: click on object properties, round trip with use N3 file, ...

2009-11-27

EulerGUI + Déductions : update Jemmy 2 test

I realize that the Jemmy API is like a scripting API for any Swing application. I should open the Euler GUI Manual and write the script for all the features.

DONE

2009-11-26

http://generic-concept.com/blogs/olivier/

EulerGUI + Déductions : update Jemmy 2 test

I update Jemmy 2 test to include the main Déductions use cases: generate application from URL : N3 , OWL , RDFS , UML , and eCore documents.

While doing that, I met the annoying problem that the RDFS URL is long to download (in a separate thread), but the Drools engine does not wait.

DONE:

I also set the right entry in Maven depot for Grappa ( this will accelerate every build ) :

VERSION=1.2
mvn deploy:deploy-file \
    -Durl=sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2 \
    -DrepositoryId=repository.eulergui.sf.net \
    -Dfile=${HOME}/apps/grappa-1.2.jar \
    -DgroupId=att \
    -DartifactId=grappa \
    -Dversion=${VERSION} -Dpackaging=jar

So now the Maven build says:

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 33 seconds
[INFO] Finished at: Thu Nov 26 22:35:45 CET 2009
[INFO] Final Memory: 42M/353M

On phone with Olivier Moïse

orbit from eclipse foundation

buckminster is kind of a super-Maven

generic-concept/blog/

2009-11-25

Top 10 Principles for Software Generation

by jkennedy on June 17, 2009

EulerGUI + Déductions : added a Jemmy 2 test

Jemmy is a Java GUI testing library for Swing and SWT.

eulergui revision=995

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 4 seconds
[INFO] Finished at: Wed Nov 25 15:38:15 CET 2009
[INFO] Final Memory: 58M/388M

This works:

mvn -Dtest=eulergui.gui.TestJemmy --errors --no-plugin-updates --offline test

But mvn test has a problem:

test1(eulergui.gui.TestJemmy) Time elapsed: 61.16 sec <<< FAILURE!
junit.framework.AssertionFailedError: Test generated app. expected:<0> but was:<1>

Start to wait action "Wait for "Component having "Ontologies" name." subcomponent to be displayed"                                                         
Error:                                                                                                                                                     
"Wait for "Component having "Ontologies" name." subcomponent to be displayed" action has not been produced in 60009 milliseconds                           
org.netbeans.jemmy.TimeoutExpiredException

Apparently, the presence of the other windows from previous tests are a nuisance.

2009-11-24

If you add; &fmt=18 in the end of each video on youtube, you will get the high quality version of the video. Works on every movie.

http://highscalability.com/product-project-voldemort-distributed-database

Looking for java gui testing frameworks

Searching for alternatives to Abbot (no commits since april 2009) ...

Looked in http://java-source.net/open-source/testing-tools

Considered :

Jemmy , Marathon, Jacareto, uispec4j

http://jfcunit.sourceforge.net/ : Page last updated on 12/31/2004

Jemmy tutorial

<dependency>
  <groupId>org.netbeans</groupId>
  <artifactId>jemmy</artifactId>
  <version>2.2.7.5</version>
</dependency>

JToolbar problem with uispec4j

When calling

panel.getUIComponents( UIComponent.class, "Ontologies")

where "Ontologies" is the name of a contained JToolbar, I get this stack:

java.lang.RuntimeException: Class interface org.uispec4j.UIComponent should have a field 'public static String TYPE_NAME'
at org.uispec4j.utils.UIComponentFactory.checkTypeNameField(UIComponentFactory.java:147)
at org.uispec4j.utils.UIComponentFactory.checkClass(UIComponentFactory.java:132)
at org.uispec4j.utils.UIComponentFactory.register(UIComponentFactory.java:59)
at org.uispec4j.Panel.getComponents(Panel.java:437)
at org.uispec4j.Panel.getUIComponents(Panel.java:347)

In fact, I found no convenient way of selecting my JToolbar, except by calling

Panel.findSwingComponent()

but then I loose the facilities offered by uispec4j to select further inside the JToolbar .

2009-11-23

removed at revision 990 in class n3_project/helpers/N3SourcetoDrools :

conf.setSequentialAgenda( SequentialAgenda.SEQUENTIAL );

My PS1 for zsh

export PS1="%m:%~%# "

which gives e.g. :

jmv-desktop:~/src/joafip% 

2009-11-22

IDE's and tools

Jester - Test your tests with Jester

http://findbugs.sourceforge.net/downloads.html

Scala language available via Ubuntu:

dpkg --status scala
Package: scala
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 6252
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: all
Version: 2.7.5.dfsg-1

A Tour of Scala

I tested (not latest) NetBeans available via Ubuntu. The import of my eclipse projects failed, because I have 2 eclipse projects on the Subversion depot ( trunk and a branch).

IntelliJ is open source ; IntelliJ IDEA editions_comparison_matrix

Questions about Abbot

I'm having troubles updating an Abbot test script after enhancements in my GUI.

There are several entry tutorials, but I found no reference manual.

Working on Joafip + Drools

Thread [main] (Suspended)
HashSupport<E>.get(Object) line: 102
PHashSet<E>.get(Object) line: 86
PHashMap<K,V>.get(Object) line: 83
SingleThreadedObjectStore.getHandleForObject(Object) line: 125
ReteooStatefulSession(AbstractWorkingMemory).insert(Object, boolean, boolean, Rule, Activation) line: 912
ReteooStatefulSession(AbstractWorkingMemory).insert(Object) line: 829
RandomGraphMaker.insertOneTriple(Project, String, String) line: 58
RandomGraphMaker.makeRandomGraph(Project, int, int, String, String, String) line: 37
StressTestReasoning.runTest() line: 83
StressTestReasoning.main(String[]) line: 50

2009-11-21

http://maven.apache.org/guides/mini/guide-central-repository-upload.html

Working on Joafip

Download sources and build

cd ${HOME}/src
svn co https://joafip.svn.sourceforge.net/svnroot/joafip/trunk/joafip/
ant -f buildjar.xml build

Deploy on local repository with pom.xml (just for testing) :

cd ${HOME}/src/joafip
mvn deploy:deploy-file -Dfile=dist/joafip-2.2.2.jar \
    -Durl=file:${HOME}/.m2/repository/ \
    -DpomFile=${HOME}/src/joafip/pom.xml

To upload on remove repository, just change the url pamameter, and add repositoryId:

mvn deploy:deploy-file -Dfile=dist/joafip-2.2.2.jar \
  -Durl=sftp://web.sourceforge.net/home/groups/j/jo/joafip/htdocs \
  -DrepositoryId=repository.joafip.sf.net \
  -DpomFile=${HOME}/src/joafip/pom.xml

The repository Id refers to the following content in <HOME_DIRECTORY>/.m2/settings.xml :

<settings>
    <servers>
      <server>
        <id>repository.joafip.sf.net</id>
        <username>jmvanel,joafip</username>
        <password>???</password>
      </server>
    </servers>
</settings>

This allows to completely automatize the upload.

One can also add this at the end of the pom.xml, but I think it's facultative :

  <repositories>
        <repository>
            <id>repository.joafip.sf.net</id>
            <url>http://joafip.sourceforge.net</url>
        </repository>
  </repositories>

On cygwin you should install:

ant, maven2, sftp, sun-jdk

Putting Abbot on Maven

I asked what they think on the Abbot list .

Download sources and build

cd ${HOME}/src
svn co https://abbot.svn.sourceforge.net/svnroot/abbot/abbot/trunk \
       abbot
cd ${HOME}/src/abbot/
ant jar

Work on local repository without pom

I don't want to pollute my remote Maven repository for these trials. So I first did this to upload on the local Maven repository the jar from the Abbot Sourceforge project:

ARTIFACT=abbot
VERSION=1.0.3-SNAPHOT
mvn deploy:deploy-file \
    -Dfile=${HOME}/src/abbot/build/${ARTIFACT}.jar \
    -Durl=file:${HOME}/.m2/repository/ \
    -DgroupId=net.sourceforge.abbot \
    -DartifactId=${ARTIFACT} \
    -Dversion=${VERSION} -Dpackaging=jar
ARTIFACT=costello
# mvn deploy:deploy-file ...

I have no pom.xml at all; but it's OK, and Maven answers:

[INFO] [deploy:deploy-file {execution: default-cli}]
Uploading: file:/home/jmv/.m2/repository//net/sourceforge/abbot/costello/1.0.2-SNAPHOT/costello-1.0.2-SNAPHOT.jar
599K uploaded  (costello-1.0.3-SNAPHOT.jar)
[INFO] Retrieving previous metadata from remote-repository
[INFO] repository metadata for: 'artifact net.sourceforge.abbot:costello' could not be found on repository: remote-repository, so will be created
[INFO] Uploading repository metadata for: 'artifact net.sourceforge.abbot:costello'
[INFO] Uploading project information for costello 1.0.2-SNAPHOT

Work on local repository with pom.xml

Then I go further and use the pom.xml for Abbot I made from this discussion on the Abbot list :

http://old.nabble.com/Maven-2-POM-ts20489891.html ,

following this Maven page: deploying-with-customed-pom.html

In fact there are 2 artifacts: the core Abbot, and the recorder GUI, Costello, depending on Abbot. For EulerGUI we will need both.

mvn deploy:deploy-file \
   -Dfile=${HOME}/src/abbot/build/costello.jar \
   -Durl=file:${HOME}/.m2/repository/ \
   -DpomFile=${HOME}/src/abbot/pom.xml

Note that the groupId, artifactId, version and packaging informations are automatically retrieved from the given pom.

mvn deploy:deploy-file \
   -Dfile=${HOME}/src/abbot/build/abbot.jar \
   -Durl=file:${HOME}/.m2/repository/ \
   -DpomFile=${HOME}/src/abbot/pom_abbot.xml

Using Abbot in my EulerGUI project managed by Maven

Then I can test the local Maven installation for Abbot, adding this in pom.xml :

    <dependency>
      <groupId>net.sourceforge.abbot</groupId>
      <artifactId>abbot</artifactId>
      <version>1.0.3-SNAPHOT</version>
      <scope>test</scope>
    </dependency>

It seems to work.

Of course, I have another problem. My tests were recorded with Costello, and depend on some absolute positions.

2009-11-20

http://www.octoberrulesfest.org/speakers.html

EulerGUI TODO

Rules for form generation

DONE

TODO

REFLEXION

There should be a way to infer the action for events, based on a semantics added to the fields.

2009-11-18

Rules for form generation

DONE

Test with FOAF:

remove FlowLayout on frames; reestablish Button for ChoicePanel

Manage consistently events classes:

WindowOpenedEvent, WindowClosingEvent;

ApplicationStartEvent, ApplicationClosingEvent

and statements

?WINDOW gui:status gui:mainWindow .

so that N3 user file is saved and restored.

WIP: we have 0 user triples.

The roundtrip with user triples works :)))

Tested with n3_new/person_import2.n3p

Migrated to Pellet 2.0 ; show leverage on: incremental classification, fine-grained inference extraction (?), SWRL rules, SPARQL queries

TODO

2009-11-17

svn co https://eulersharp.svn.sourceforge.net/svnroot/eulersharp/trunk \
       eulersharp 

My Philips webcam works with cheese!

Philips SPC 210NC PC Camera

But not with Empathy :(

Rules for form generation

DONE

For focus lost events there was often the creation of a new object and form;

Remedy: clean relationship between user objects, fields, forms and windows.

Precisely:

user_object---field----<>form---<>window

Questions:

# an instance of a businessClass has one and only one Form
{ ?RESOURCE a ?EDITED_CLASS .
  ?EDITED_CLASS  a app:businessClass .
(?SCOPE ?SPAN) e:findall (
?WINDOW_ { ?RESOURCE app:resourceHasWindow ?WINDOW_ . } ()
) .
} => {
  ?APPINST app:hasWindow ?WINDOW .
  ?RESOURCE app:resourceHasWindow ?WINDOW .
  ?FORM :createFormFromResource ?RESOURCE .
  ?WINDOW gui:components ?FORM .
  _:d eg:trace ( ">>>> starting createFormFromResource: " ?FORM ?RESOURCE ).
  _:d eg:trace ( "    " ?WINDOW ?EDITED_CLASS ) .
} .

2009-11-16

http://linuxfund.org/projects/

Rules for form generation

Work on creation button: in the new window there was a extra form for the main class;

also for focus lost events there is often the creation of a new object and form.

Add FOCUS_GAINED event: change the color of the text field to light gray.

Java(Script) instantiatior:

RDF objects can be interpreted as static members, e.g. :

?JTEXT_FIELD javam:setBackground java:java_awt_Color_lightGray .

Deduction runtime: add a helper for putting a text field in bold

2009-11-14

Deductive+Databases

bddbddb stands for BDD-Based Deductive DataBase. It is an implementation of Datalog, a declarative programming language similar to Prolog for talking about relations. What makes bddbddb unique is that it represents the relations using binary decision diagrams (BDDs). BDDs are a data structure that can efficiently represent large relations and provide efficient set operations.

Third, it makes program analysis accessible, and dare I say it, actually fun.

I probably made the wrong move when upgrading to Jena 2.6.2,because it is incompatible with Pellet rc7 . So I have to wait for the next release of Pellet, says Thorsten Möller.

Rules for form generation

2009-11-13

Webcam on Packard Bell

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/55567

I connect on Marie's computer:

ssh -X jmv@192.168.1.28

I had a answer from the project lead Erik :) .

Rules for form generation

At last !!!!!!! ( like Etta sings).

I get several instances of edited class !

There was a bad extra e:findall in app_gui-rules2.n3 .

Also tested test_person_import.n3p , foaf_import.n3p, cv.n3p (no fields at all ), uml.n3p.

TODO

2009-11-12

Aleph & Inductive Logic Programming

http://www.comlab.ox.ac.uk/activities/machinelearning/Aleph/aleph.html

http://www.cs.mu.oz.au/481/project/aleph/aleph_workshop.html

2009-11-05

Explanations about rules for form generation

Tidied the pom.xml after upgrading to Jena 2.6.2 : remove slf4j-api and slf4j-log4j12 .

Added explanations about the rules for form generation : Déductions - runtime Architecture : rules

Writing Business Rules Engines in Mercury: Ian MacLarty Functional Programming Union, University of Melbourne, 24 July 2009. Available here (156K).

2009-10-30

Keyboard problems on ubuntu

I tried all sort of things like

sudo showkey -s

I finally discovered that my minus and vertical bar are activable with Windows key ! Equal is with = and control key on terminal and eclipse.

Prepare EulerGUI 1.4

Now it's always successful ! :)

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 4 seconds

Grunt at subversive

I have a trunk and a branch in 2 different projects.

For the latter, I used command line svn ( version 1.5.4 (r33841)) to download, and made an eclipse project from that.

And now, I'm in a situation where some updates don't come to me,

and the command line svn does not work anymore :( .

(SOLVED when upgraded to Ubuntu 9.10 ).

Ubuntu 9.10

If you have a question, or if you think you may have found a bug but

aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC

channels on Freenode, on the Ubuntu Users mailing list, or on the

Ubuntu forums:

http://help.ubuntu.com/community/InternetRelayChat

http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

http://www.ubuntuforums.org/

acl
binutils-static
cpp-4.3
cupsddk
g++-4.3
gcc-4.3
gcc-4.3-base
gcj-4.3-base
gnome-mount
gstreamer0.10-gnomevfs
hotkey-setup
klogd
libdbus-1-qt3
libgcj9-0
libgcj9-jar
libgnome-speech7
libmysqlclient15off
libpolkit-gnome0
libsmbios2
libstdc++6-4.3-dev
nvidia-180-modaliases
openoffice.org-style-crystal
phonon
policykit-gnome
python-clientform
python-gdata
python-launchpad-bugs
python-mechanize
python-twisted-web2
python-tz
python-usb
qt4-qtconfig
strigi-client
sysklogd
ttf-kochi-gothic
ttf-sazanami-gothic
xulrunner-1.9
zope-common

2009-10-29

Solved strange random errors in Maven tests for EulerGUI

Failed tests:
testInstanciateListOfTriple(unif.InstanciatorTest)
testProjectFile(n3_project.TestProject)
Tests run: 73, Failures: 2, Errors: 0, Skipped: 0

After a innocent change:

incorporate into the trunk most of the changes from the joafip + drools branch

(done this manually with gvim -d and kompare, as subversive eclipse is sooooo slooow)

Failed tests:
  testInstanciateListOfTriple(unif.InstanciatorTest)

Could this be due to multi-thread issues with reading files from the web ?

I try to upgrade to Drools 5.1.0M1 . It works !

In fact there was a modification in Instanciator introduced recently, that makes an error in the test. This modification removes the error messages in the JavaScript console.

Pause in Drools-Joafip-EulerGUI integration

Our Joafip man rests for a while ...

He does not a have on Windows with JDK 1.6_18 the error I have on Linux with JDK 1.6_16:

net.sf.joafip.store.service.StoreException:
 net.sf.joafip.store.service.classinfo.ClassInfoException:
 interface org.drools.FactHandle is not serializable

2009-10-25

Hyperlinks: ubiquity-xforms, Nepomuk, transmodel.org, ...

http://code.google.com/p/ubiquity-xforms/

Nepomuk in Mandriva 2010 Release Candidate 1.0

http://doc4.mandriva.org/bin/view/labs/Nepomuk-mdv2010-RC

http://recordmydesktop.sourceforge.net/documentation.php

http://www.transmodel.org/en/cadre1.html

http://semanticweb.org/wiki/EulerGUI

2009-10-24

10-Open-Source-Companies-to-Watch : : lessons to draw ?

http://www.voelter.de/conferences/index.html

Create a branch in EulerGUI for joafip + Drools

This is the first branch in EulerGUI, so I must create the directory branches first:

cd ~/src/eulergui_test2/eulergui
ls
#  tags  trunk
mkdir  branches
svn add branches  
svn commit  branches
svn copy https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui \
         https://eulergui.svn.sourceforge.net/svnroot/eulergui/branches/eulergui-joafip

Now to work on that branch, go to a fresh location like ~/src/ , and type :

svn co https://eulergui.svn.sourceforge.net/svnroot/eulergui/branches/eulergui-joafip
cd eulergui-joafip
mvn install
mvn eclipse:eclipse
eclipse &

Then create an eclipse project from directory eulergui-joafip.

Alas today (saturday!) the Maven site http://jena.hpl.hp.com/repo/ for Jena is awfully slow.

2009-10-23

Adapt a persistent storage to Drools ?

There is a new discussion in French :

Virtuoso versus Sesame - versus joafip

To integrate into Drools we would need a DAO design pattern, or the possibility to plug a specific implementation of ObjectStore (or SingleThreadedObjectStore).

http://joafip.sourceforge.net/

2009-10-22

EulerGUI : on semanticweb.org; group in French

At last ! added EulerGUI here: http://semanticweb.org/wiki/EulerGUI

I made a new discussion group in French for projects Déductions and EulerGUI:

http://groups.google.com/group/deductions-fr

Discussions en Français pour les développeurs et architectes intéressés par les évolutions, les choix et la feuille de route des projets EulerGUI (http://eulergui.sourceforge.net/) et Déductions ( http://deductions.sourceforge.net/ ):

Moteurs de règle, Web Sémantique, génération d'applications

EulerGUI

TODO : does not work with JavaScript instanciator: end-of-lines in literal strings in N3

org.drools.runtime.rule.ConsequenceException: java.lang.ClassCastException: org.drools.util.ObjectHashMap cannot be cast to org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)
at org.drools.base.FireAllRulesRuleBaseUpdateListener.beforeRuleBaseUnlocked(FireAllRulesRuleBaseUpdateListener.java:41)
at org.drools.event.RuleBaseEventSupport.fireBeforeRuleBaseUnlocked(RuleBaseEventSupport.java:123)
at org.drools.common.AbstractRuleBase.unlock(AbstractRuleBase.java:408)
at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:517)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:388)
at n3_project.helpers.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:301)

2009-10-21

Trying Virtuoso RDF store, Open Source version

I'm on Ubuntu 9.04, architecture x86_64.

Download the source from here:

http://sourceforge.net/projects/virtuoso/files/

I took the 6.0.0 version, that has no release notes :( . The licence is GPL v2. Then, according to the README, I missed these packages :

sudo apt-get install flex bison gperf libssl-dev

Otherwise this is very classic:

export CFLAGS="-O2 -m64"
 ./configure
make
sudo make install

Alors je peux lancer le serveur (toujours suivant le README) :

cd /usr/local/virtuoso-opensource/var/lib/virtuoso/db
sudo chown $USER .
/usr/local/virtuoso-opensource/bin/virtuoso-t -f &

I can then open the web admin interface : http://localhost:8890/conductor/

The main entry point for the documentation is: http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/

In the doc. , I find a page on "RDF Insert Methods in Virtuoso".

Since I have not created any other user, I upload an OWL file as dba with an HTTP PUT :

curl -T PeriodicTable.owl http://localhost:8890/DAV/home/dba/rdf_sink/PeriodicTable.owl -u dba:dba

The trouble is that this OWL file was uploaded as a binary, as it was sent with Content-Type application/octet-stream. You can see this by clicking on WebDAV Browser.

Let's try a .rdf file :

curl -T foaf1.rdf http://localhost:8890/DAV/home/dba/rdf_sink/foaf1.rdf -u dba:dba

Then this is recognized as RDF (Content-Type application/rdf+xml).

Complete Kubuntu to Ubuntu migration

I'm considering a Kubuntu to Ubuntu migration.

After this site, here are the packages to remove for a Complete Kubuntu to Ubuntu migration

http://psychocats.net/ubuntu/puregnome

sudo apt-get remove akregator amarok amarok-common apport-qt ark cdrdao dolphin dontzap dragonplayer exiv2 foomatic-db-gutenprint gdebi-kde gnupg-agent gtk2-engines-qtcurve gwenview hpijs-ppds ijsgutenprint install-package jockey-kde k3b k3b-data kaddressbook kamera kate kde-icons-oxygen kde-printer-applet kde-style-qtcurve kde-window-manager kde-zeroconf kdebase-bin kdebase-data kdebase-plasma kdebase-runtime kdebase-runtime-bin-kde4 kdebase-runtime-data kdebase-runtime-data-common kdebase-workspace-bin kdebase-workspace-data kdebase-workspace-libs4+5 kdebluetooth kdegraphics-strigi-plugins kdelibs-bin kdelibs-data kdelibs4c2a kdelibs5 kdelibs5-data kdemultimedia-kio-plugins kdepasswd kdepim-kresources kdepim-strigi-plugins kdepim-wizards kdepimlibs-data kdepimlibs5 kdeplasma-addons kdeplasma-addons-data kdesudo kdm kfind khelpcenter4 klipper kmag kmail kmix kmousetool knotes konqueror konqueror-nsplugins konqueror-plugin-searchbar konsole kontact kopete korganizer kpackagekit krdc krfb ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-artwork-usplash kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-konqueror-shortcuts kuser kvkbd kwalletmanager language-selector-qt libakonadiprivate1 libao2 libaudio2 libavahi-qt3-1 libboost-program-options1.35.0 libclucene0ldbl libdbus-qt-1-1c2 libeet1 libexiv2-5 libflac++6 libgeoip1 libk3b3 libk3b3-extracodecs libkcddb4 libkdecorations4 libkdepim4 libkexiv2-7 libkholidays4 libkipi6 libkleo4 libkonq5 libkonq5-templates libkpgp4 libksieve4 libkwineffects1 libloudmouth1-0 liblua50 liblualib50 libmad0 libmimelib4 libmodplug0c2 libmpcdec3 libmsn0.1 libmysqlclient15off libokularcore1 libpackagekit-glib11 libpackagekit-qt11 libphonon4 libplasma3 libpoppler-qt4-3 libpq5 libqca2 libqca2-plugin-ossl libqedje0 libqimageblitz4 libqt3-mt libqt4-assistant libqt4-core libqt4-dbus libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-webkit libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libqzion0 libraptor1 librasqal1 librdf0 libsearchclient0 libsoprano4 libstreamanalyzer0 libstreams0 libstrigihtmlgui0 libstrigiqtdbusclient0 libvncserver0 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxine1 libxine1-bin libxine1-console libxine1-misc-plugins libxine1-x libzip1 mysql-common okular okular-extra-backends openoffice.org-kde openoffice.org-style-crystal oxygen-cursor-theme packagekit packagekit-backend-apt phonon phonon-backend-xine pinentry-gtk2 pinentry-qt4 plasma-widget-network-manager plasma-widget-quickaccess python-dev python-kde4 python-packagekit python-plasma python-qt4 python-qt4-common python-qt4-dbus python-sip4 python2.6-dev qt4-qtconfig quassel quassel-data raptor-utils redland-utils software-properties-kde soprano-daemon speedcrunch strigi-client strigi-daemon system-config-printer-kde systemsettings ttf-dejavu ttf-dejavu-extra update-manager-kde update-notifier-kde && sudo apt-get install ubuntu-desktop

2009-10-20

Biological Collections software

I briefly come back to my main topic of many years ago (see wwbota).

Data exchange standards for Biological Collection Data:

http://www.bgbm.org/TDWG/acc/Referenc.htm ; look at "The International Transfer Format (ITF) for Botanic Garden Plant Records.".

Bauble: a botanical collection manager

Open Source; in Python; easily instable on Ubuntu. Alas on a fresh database several actions lead to an internal error. The families are builtin, but completion does not always occur. Could not make the report work. Note: I'd love to make a similar applicatoin with an RDF database and my GUI generation techniques.

Generating XForms with EulerGUI

For XForms (and XHTML?) output, I think about using the other, more abstract, layer in my rules stack, "gui_generic.n3" (see also Supporting ontologies).

Capturing desktop session for demos

recordMyDesktop is a desktop session recorder for GNU / linux.

Looking for tools for doing JavaScript animations

Found nothing!

http://www.pencil-animation.org/index.php?id=Home

http://ktoon.toonka.com/

http://wiki.svg.org/SVG_Links

http://www.openmovieeditor.org/index.html

http://kdenlive.org/

Troubles with webcam Philips SPC210C on Ubuntu x86_64

The title says it all!

% lsusb
 ...
Bus 001 Device 005: ID 0471:032d Philips

Starting the dvr video recorder gives this:

% dvr-qtgui &
[4] 27601
~/src/deductions/n3_new% <init> : Avifile RELEASE-0.7.47-080115-14:47-4.2.3
<init> : Available CPU flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm3dnowext 3dnow constant_tsc rep_good pni mon
<init> : 1250.00 MHz AMD Phenom(tm) 9850 Quad-Core Processor detected
*** WARNING *** : the driver doesn't provide a correct size for memory mapping. DVR tries to correct this error, but some strange things may happend, you are warned.
Can't map memory for capture : Argument invalide

2009-10-19

EulerGUI Jena output stack trace

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: com.hp.hpl.jena.rdf.model.impl.LiteralImpl cannot be cast to com.hp.hpl.jena.rdf.model.Resource
at com.hp.hpl.jena.rdf.model.impl.IteratorFactory$2.map1(IteratorFactory.java:45)
at com.hp.hpl.jena.rdf.model.impl.IteratorFactory$2.map1(IteratorFactory.java:45)
at com.hp.hpl.jena.util.iterator.Map1Iterator.next(Map1Iterator.java:35)
at com.hp.hpl.jena.util.iterator.WrappedIterator.next(WrappedIterator.java:68)
at com.hp.hpl.jena.rdf.model.impl.ResIteratorImpl.nextResource(ResIteratorImpl.java:31)
at com.hp.hpl.jena.n3.N3JenaWriterCommon.writeModel(N3JenaWriterCommon.java:272)
at com.hp.hpl.jena.n3.N3JenaWriterCommon.processModel(N3JenaWriterCommon.java:255)
at com.hp.hpl.jena.n3.N3JenaWriterCommon.write(N3JenaWriterCommon.java:172)
at com.hp.hpl.jena.n3.N3JenaWriterCommon.write(N3JenaWriterCommon.java:183)
at com.hp.hpl.jena.n3.N3JenaWriter.write(N3JenaWriter.java:156)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.write(ModelCom.java:268)
at jena.rdfcat.go(rdfcat.java:262)
at n3_project.rdfcatOutStream.parse(rdfcatOutStream.java:24)
at n3_project.ResultEditorN3Action.actionPerformed(ResultEditorN3Action.java:59)

Generating XForms with EulerGUI

See "Déductions & XForms"

Here is the kind of XML that must be generated in the end of the tool chain (after the RDF to XML conversion by Gloze) :

   <body>
      <xf:textarea ref="MyTextValue">
         <xf:label>Note:</xf:label>
      </xf:textarea>
   </body>

Since XML elements and attributes correspond through Gloze to RDF / N3 predicates, the kind of N3 that must be generated is (with all blank nodes explicited):

_:n1 xhtml:body _:n2.
                _:n2 xf:textarea _:n3.
                                 _:n3 xf:ref "MyTextValue".
                                 _:n3 xf:label "Name:".

Currently, the corresponding fragment of the generic GUI (actually very Java-oriented) that is produced before applying the N3 rules for Java translation :

_:sk_JPANEL_FIELD_34 a gengui:Panel.
_:sk_JPANEL_FIELD_34 gengui:hasComponent _:sk_JTEXT_FIELD_36.
_:sk_JPANEL_FIELD_34 gengui:hasComponent _:sk_JLABEL_DT_35.
_:sk_JPANEL_FIELD_34 gengui:belongsToForm _:sk_JPANEL_FORM_23.
_:sk_JLABEL_DT_35 a gengui:Label.
_:sk_JLABEL_DT_35 <http://java.sun.com/method#setToolTipText> ("First name and last name").
_:sk_JLABEL_DT_35 java:text "name".
_:sk_JTEXT_FIELD_36 a gengui:TextField.

The correspondance is indicated above with the color code: the panel becomes the subject of xf:textarea.

So, in plain english, I must for a panel having a gengui:TextField such as _:sk_JTEXT_FIELD_36, add a triple with the xf:textarea predicate:

{
  ?PANEL gengui:hasComponent ?TEXT_FIELD.
                             ?TEXT_FIELD a gengui:TextField.
  ?PANEL gengui:hasComponent ?LABEL_COMPONENT.
                             ?LABEL_COMPONENT java:text ?LABEL.
}=>{
  ?PANEL xf:textarea ?TA.
  ?TA xf:ref "???".
  ?TA xf:label ?LABEL.
}.

Of course the big trouble is the xf:ref , bacause the XML data model of XForms is not RDF.

Links: TAP, etc

http://www-ksl.stanford.edu/projects/TAP/

http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B758F-4B4X4HF-7&_user=10&_rdoc=1&_fmt=&_orig=search&_sort=d&_docanchor=&view=c&_searchStrId=1051473659&_rerunOrigin=google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=1f3210ebc45ea17df5f5d3dcf43987ad

http://www.w3.org/TR/owl-xmlsyntax/apd-example.html

http://xmltwig.com/article/bw/bw_04-schema_repositories.html

http://www.oagi.org/dnn/Default.aspx?alias=www.oagi.org/dnn/oagi

http://www.xbrl.org/SpecRecommendations/

jena inference API

http://jena.sourceforge.net/inference/index.html

Solving problems with 2 screens on Ubuntu

I first adjusted the Virtual parameter in xorg.conf.

I then used grandr to put the second screen to its maximum resolution.

Then this worked:

xrandr --output VGA-0 --above DVI-0

http://doc.ubuntu-fr.org/xrandr

2009-10-16

Unix_way_of_sex = unzip; strip; touch; finger; mount; fsck; more; yes; gasp; umount; sleep

EulerGUI features

D'n'D of a Project URL, the N3 source buttons were not there, due to method D'n'D of a Project URL, due to method makeButtonsPanel()

TODO documentation: add something about examples for each feature;

in deductions/html/GUIgenerator.html , open Project by dropping URL

2009-10-15

Déductions & XForms

These lines in deductions/n3_new/generic_gui_projection-rules.n3 are a problem, because they are much too Java-oriented:

javapr:GUIKBAdapter javam:add (?JPANEL_FIELD ?JLABEL_DT 0).
javapr:GUIKBAdapter javam:add (?JPANEL_FIELD ?JTEXT_FIELD 1).

So I added in the same rule 2 triples for a new predicate gengui:hasComponent :

# added when working on XForms
?JPANEL_FIELD gengui:hasComponent ?JLABEL_DT .
?JPANEL_FIELD gengui:hasComponent ?JTEXT_FIELD .

2009-10-14

The tests for N3 ParserJ4 from rdflib

The tests for N3 ParserJ4 have moved here :

http://rdflib.googlecode.com/svn/branches/2.4.x/test/n3/listTest.n3

EulerGUI feature: read plain XML from URL

DONE add .ttl suffix recognition

Revision 894

- import URL with .xml suffix: recognize RDF and plain XML files

needed to adapt Gloze to process input URL's instead of Files : created GlozeURL as a replacement of Gloze

tested with http://www.agencexml.com/xsltforms/address.xml


Will mail to Steve Battle of Gloze, and also tell him that :

Although it's not implied by your License, it's a pleasure to share my modifications.

First I needed to adapt Gloze to process input URL's instead of Files, so I created GlozeURL as a replacement of Gloze :

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/com/hp/gloze/GlozeURL.java?view=markup&pathrev=894

The modifications are rather systematic, replacing File by URL in the right places. So it should be really a replacement of original Gloze, and work whenever original Gloze works.

I made class GlozeURL extend Gloze, to avoid compilation errors and propagation of modifications elsewhere. But if you agree to use GlozeURL as the new Gloze, you should just remove the inheritance and rename GlozeURL to Gloze, and it should be OK. While I was here, I added generic arguments in a few places to avoid yellow markers in eclipse, and added curly braces for if blocks, that most code checkers object to.

Second, I've made a "short" list of important XML Schema that are automatically added to Gloze argument, depending on XML namespaces present in input file.

The "short" list of important XML Schema is here in class XMLExport :

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/eulergui/export/XMLExport.java

The automatic addition to Gloze argument, depending on XML namespaces present in input file, occurs here in class N3SourceFromXML_Gloze :

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/eulergui/inputs/N3SourceFromXML_Gloze.java

There is a small SAX ContentHandler that just records the XML namespaces present in input file.


There still problems:

Starting Gloze.main() with args
http://www.agencexml.com/xsltforms/address.xml 
http://www.w3.org/2002/xforms 
http://www.w3.org/MarkUp/Forms/2007/XForms-11-Schema.xsd 
[ WARN] - 2009-10-14 16:06:10,749 [AWT-EventQueue-0] com.hp.gloze (Content.java:addAttributes:129) 
 ignored attribute schemaLocation in schema

[ WARN] - 2009-10-14 16:06:10,840 [AWT-EventQueue-0] com.hp.gloze (Content.java:addAttributes:129) 
 ignored attribute default in attribute

[ WARN] - 2009-10-14 16:06:10,891 [AWT-EventQueue-0] com.hp.gloze (Content.java:addAttributes:129) 
 ignored attribute default in attribute

2009-10-13

EulerGUI features

Detect RDF, OWL and plain XML

TODO : to be able to download a plain XML from an URL, need to detect such root elements in SourceFactory and DropURLTranferHandler:

<rdf:RDF xml:lang="en-GB"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

and

<owlx:Ontology owlx:name="http://www.example.org/wine" 
  xmlns:owlx="http://www.w3.org/2003/05/owl-xml">

( cf http://www.w3.org/TR/owl-xmlsyntax/apd-example.html )

XML import

Enhanced XML import :

extracted XML Namespaces from plain XML source and transmit them with Schema location to Gloze.

2009-10-12

Déductions GUI rules: generate XForms

I don't know yet how easy it will be... Anyway it is a good example of generating XML.

Commited:

Add 2 projects and 4 rules sets for generic GUI to XFORMS translation

WIP : empty result; will convert with Gloze an XForms to see how it looks like.

A generic_to_xforms-rules.n3

A query_xforms.n3

A xforms-rules.n3p

A xforms_library.n3

A person-app-spec_xforms.n3

A person_xforms.n3p

2009-10-11

SPARQL Implementation Coverage Report

http://www.w3.org/2001/sw/DataAccess/tests/implementations

Isaac project: IsaacOS : object prototype based operating system, Lisaac : object prototype based language

TODO : watch Henry Story: http://blogs.sun.com/bblfish/entry/froscon_the_free_and_open

EulerGUI new feature: XML Export

I need to expose the N3 prefixes to the XMLExport class. Indeed Gloze iterates on the given XML Schema for the RDF to plain XML translation, so it's not possible to add all the known XML Schema to the context. A partial list of of the most famous and useful XML Schema: XSD itself, XHTML, XForms, XSLT, SVG.

EulerGUI is a hybrid creature

I sent this message on EulerGUI to the java-source.net team .

After more reflection, EulerGUI (http://eulergui.sourceforge.net/) is a hybrid creature.

I suggested it in the category "rules engines" because it wraps Drools as a rules engine for the N3 logic language (http://www.w3.org/DesignIssues/N3Logic), and because it integrates 4 rule engines.

But EulerGUI is also an IDE, not for Java, but for the Semantic Web.

So it could well be in categories IDE, and RDF.

EulerGUI also has importers for models and data in UML, eCore, plain XML, XML Schema. So it could well be in category UML.

Kind regards

2009-10-09

EulerGUI new feature: XML Export

2009-10-08

Almost ready for EulerGUI 1.4 . I'd like to add XML export using Gloze .

Xorion : a CMS with XRX architecture

Xorion will be an open source, XML-database based content/community management system that makes extensive use of XQuery and related technologies. The goal is to create a Drupal-like community project that can be used with a RESTful Services architecture to host rich XML documents as well as blogs and other components.

http://code.google.com/p/xorion/wiki/GeneralRequirements

Communication

2009-10-07

Learning SPARQL

2009-10-06

Trying dbpedia

http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&should-sponge=&query=select+distinct+%3FConcept+where+{[]+a+%3FConcept}&format=text%2Fplain&debug=on&timeout=ĵĵ

2009-10-05

Trying Sesame 2.3-pr1 SPARQL server

It refuses to start for a stupid packaging issue:

cause mère
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:189)
org.slf4j.LoggerFactory.bind(LoggerFactory.java:112)
org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:105)
org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:235)
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208)
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221)
org.openrdf.workbench.proxy.WorkbenchGateway.<init>(WorkbenchGateway.java:42)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

Trying Joseki SPARQL server

Since I had problems with public servers, I wanted to try a local one.

I did this :

cvs -z3 -d:pserver:anonymous@joseki.cvs.sourceforge.net:/cvsroot/joseki co Joseki3
ant build

Then I started the server like this:

http://www.joseki.org/start.html

Then the server was here:

http://localhost:2020/

Alas! With a simple query pasted from using SPARQL to explore an unknown dataset :

SELECT DISTINCT ?Concept WHERE {[] a ?Concept}

I got :

HTTP ERROR: 500
INTERNAL_SERVER_ERROR
RequestURI=/sparql
Powered by Jetty://

So I started the Joseki distribution. It works !

I have to see how to add documents in the database, and also try TDB (TDB is a component of Jena. It provides for large scale storage and query of RDF datasets using a pure Java engine. TDB supports SPARQL.).

EulerGUI new feature: calling SPARQL end point

The feature is implemented and documented, but I still have to find some SPARQL public endpoint with responses for CONSTRUCT queries.

Revision 869 - Directory Listing

Modified Tue Oct 6 10:17:04 2009 UTC (3 hours, 11 minutes ago) by jmvanel

Doc.:

- reorganize into paragraphs : Data sources , Local tools , Global tools

- write new paragraphs: Show N3 parse tree, Show original source of N3 document,Launch OWL reasoner, SPARQL queries as N3 sources

Revision 866 - Directory Listing

Modified Mon Oct 5 21:52:21 2009 UTC (15 hours, 35 minutes ago) by jmvanel

query from SPARQL services (using ARQ): reloading project file is OK

TODO : change the test to have a non-empty query result - WIP

Exploring SPARQL public endpoints

To start with nothing but a SPARQL endpoint and to dive in and learn about the data, the basic mechanism by which we can do this is by writing queries that use variables to find all of the predicates and all of the types that exist in a dataset, and then to pick out interesting predicates and types and use open-ended queries to explore the structure of the data. Dean Allemang has written a blog post on this exact subject, so I'll gladly reference his writing on using SPARQL to explore an unknown dataset.

2009-10-05

SPARQL Endpoints

http://www.pidgin.im/download/ubuntu/

2009-10-01

EulerGUI new feature: calling SPARQL end point

First shot at integrating SPARQL services like in Twinkle; see ARQ

Maven + Pellet

Added Thorsten's repository for Pellet in EulerGUI.

http://lists.owldl.com/pipermail/pellet-users/2009-June/003650.html

2009-09-30

http://protegewiki.stanford.edu/index.php/Protege4DevDocs

Got a very good answer by Thomas Schneider to my question "where are the implied individuals ?"

EulerGUI new features

Integrating Pellet

First shot at integrating Pellet: show class tree, show unsatisfiable classes

TODO

EulerGUI doc. date

EulerGUI doc.: add Subversion substitution for date

but also kept manual date, as Subversion substitution does not work with ViewVC

cf http://viewvc.tigris.org/issues/show_bug.cgi?id=352

2009-09-29

Trying DL queries in Protégé 4

http://protegewiki.stanford.edu/index.php/DLQueryTab

Trying Pellet SPARQL-DL queries with Pellet

Using Leigh Dodds' tutorial: introducing-sparql-querying-semantic-web-tutorial page 3

See SPARQL Query Language for RDF ( W3C Recommendation 15 January 2008 )

./pellet.sh query -q ~/ontologies/examples/pe.sparql ~/ontologies/PeriodicTable.owl

where pe.sparql contains:

PREFIX table: <http://www.daml.org/2003/01/periodictable/PeriodicTable#>
SELECT ?name
WHERE { ?element table:name ?name. }

the answer is :

"erbium"^^http://www.w3.org/2001/XMLSchema#string                                                          
"strontium"^^http://www.w3.org/2001/XMLSchema#string                                                       
etc ...

Its also possible to replace the SELECT with:

CONSTRUCT { ?element table:name ?name. }

but then the result will be in RDF XML (no N3 output possible).

See also for Protégé 3 : http://protege.stanford.edu/doc/sparql/

EulerGUI : change the description on main page

It was:

Provides a GUI for the eulersharp.sourceforge.net Euler/SEM reasoning engine. The sources can be N3 (Notation 3), RDF, OWL, UML or eCore, files or URL's. It also wraps Drools as an N3 rules engine. It is becoming a lightweight IDE for Artificial Intelli

After suggestions by Paul:

A lightweight IDE for Artificial Intelligence. Started as GUI for the Euler reasoning engine. The sources can be N3, RDF, OWL, UM, eCore, plain XML or XSD, files or URL's. Wraps Drools (or CWM, FuXi) as N3 rules engines. Model based app. generation.

2009-09-28

XML & XSD import : update

Now both ReDeFer and Gloze are integrated in EulerGUI (in Subversion), so it's more simple to compare. The output is quite similar in both. I corrected <xsd:all> in ReDeFer. I did nothing in Gloze, except a bit of defensive programming in two Jena classes. The problems I'm aware of are:

EulerGUI: specifications

Open a form "Déductions style"

From "missing features":

- open a form "Déductions style" for an N3 file in project;

this one is a nice feature that rises architectural questions:

This is quite easy to create a EulerGUI Project, add to it the current N3 source, and the swing-rules2.n3p project, then run that project (need to set the edited File to the current N3 source). The point needing more reflexion is "guess where are the RDFS or OWL sources that define used properties and prefixes".

Export whole project as XML

Not in "missing features"

Using Gloze, this feature is quite easy to add.

Export whole project as application

From "missing features": that was not writen, only this was listed:

button to export the whole project:

- as a zip file, that is, the .n3p file plus all local files refered

- as a Drools project (what is a Drools project ?)

- as Protégé OWL project

- as Prolog files

An equivalent Web application

TODO <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

2009-09-27

EulerGUI: Reading plain XML files or XML Schema

Implement <xsd:all>

XSD2OWL: implement <xsd:all>

tested with http://maven.apache.org/POM/4.0.0

The output for this test was incorrect RDF before; the message was:

Error: {E201} rdf:resource not allowed as attribute here.[Line = 21, Column = 50]

There are other messages in EulerGUI:

file:/home/jmv/ontologies/maven-v4_0_0.xsd converted to RDF/OWL in file:/tmp/translation-7228225454597360457.n3
[ WARN] - 2009-09-27 22:10:44,541 [AWT-EventQueue-0] com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler (RDFDefaultErrorHandler.java:warning:36) 
 file:/tmp/translation-7228225454597360457.n3(line 12 column 30):
 {W109} The namespace URI: <&xs;> is relative. Such use has been deprecated by the W3C,
 and may result in RDF interoperability failures. Use an absolute namespace URI.

[ WARN] - 2009-09-27 22:10:44,627 [AWT-EventQueue-0] com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler (RDFDefaultErrorHandler.java:warning:36) 
 file:/tmp/translation-7228225454597360457.n3(line 486 column 57):
 {W105} Redefinition of ID: propertiesType

[ WARN] - 2009-09-27 22:10:44,628 [AWT-EventQueue-0] com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler (RDFDefaultErrorHandler.java:warning:36) 
 file:/tmp/translation-7228225454597360457.n3(line 388 column 57):
 {W105} Previous definition of 'propertiesType'.

Mail to Roberto G.

Hi Roberto

I now fully integrated XML and XSD mapping in EulerGUI, see :

http://eulergui.svn.sourceforge.net/viewvc/eulergui/?view=log

Now I can work comfortably for the transforms themselves.

The OWL API used in Protégé and in other validators does not show all

accurately all problems.

An OWL RDF document has to be correct RDF, and to check that, the W3C

RDF Validator is convenient (based on the ARP Jena API:

http://www.w3.org/RDF/Validator/

About the test cases, I'll work on the Gloze samples, while also

comparing results between Gloze and ReDeFer.

Others XSD will include Maven (http://maven.apache.org/POM/4.0.0) and

XForms (http://www.w3.org/MarkUp/Forms/2007/XForms-11-Schema.xsd).

I'd like to have JUnit tests.

For conformance tests about the generated OWL, we can use the Jena

API, and the OWL API.

For testing the result themselves and non-regression, I propose to use

the test infrastructure of EulerGUI. It has the capability to query

any RDF.

Adios

2009-09-25

Links: Java sources

http://kickjava.com/src/ : source code hyperlinked of many Open Source Java projects

Downloaded the Java source from Sun : http://download.java.net/jdk6/source/, but it is available as well through an Ubuntu package.

A list (trying to be complete) of currently available JAXP Factory implementations.

http://selfawaresystems.com/posts/

Maven ecosystem

Saxon B (now at version 9) is not up-to-date on Maven central, and not anymore on ibiblio :

http://mirrors.ibiblio.org/pub/mirrors/maven2/net/sf/saxon/saxon/

<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>8.7</version>

cimtool.org

Through Pierre Attar, I heard of CIM Tools:

http://www.cimtool.org/

add Maven config. in ReDeFer

add Maven config. in ReDeFer (not tested; for Maven build to work, it will need some directory changes in sources)

Crash with Jena 2.6.0 and HSQLDB

This happens the second time the application is started, as if Jena was not aware of the real database being opened .

The stack trace:

com.hp.hpl.jena.shared.JenaException: Database created with incompatible
   database type for this version of Jena: HSQLDB
at com.hp.hpl.jena.db.impl.DriverRDB.checkEngine(DriverRDB.java:378)
at com.hp.hpl.jena.db.impl.DriverRDB.getSystemSpecializedGraph(DriverRDB.java:356)
at com.hp.hpl.jena.db.DBConnection.containsModel(DBConnection.java:196)
at com.hp.hpl.jena.db.impl.GraphRDBMaker.hasGraph(GraphRDBMaker.java:132)
at com.hp.hpl.jena.db.impl.GraphRDBMaker.createGraph(GraphRDBMaker.java:94)
at com.hp.hpl.jena.db.impl.GraphRDBMaker.createGraph(GraphRDBMaker.java:80)
at com.hp.hpl.jena.rdf.model.impl.ModelMakerImpl.createFreshModel(ModelMakerImpl.java:55)
at net.rhizomik.redefer.XSD2OWLMapper.<init>(XSD2OWLMapper.java:69)
at eulergui.inputs.N3SourceFromPlainXML.prepare(N3SourceFromPlainXML.java:30)
at eulergui.project.Project.prepare(Project.java:791)
at eulergui.project.Project.restore(Project.java:760)
at eulergui.project.Project.restore(Project.java:818)
at n3_project.ProjectGUI.main(ProjectGUI.java:120)

I found this in the Jena source, which looks suspect:

package com.hp.hpl.jena.db.impl;
public class Driver_HSQLDB extends Driver_HSQL 
{
    public Driver_HSQLDB()
    {
        super() ;
        DATABASE_TYPE = "HSQL";
    }
}

Haha !!!!!!!! the latest version has:

DATABASE_TYPE = "HSQLDB";

Alas there is nothing more recent than Jena 2.6.0 in the repo:

http://jena.hpl.hp.com/repo/com/hp/hpl/jena/jena/

This means that I'm forced to debug Jena just because the newest stuff is not in Maven!

2009-09-24

Now I'm commiter to ReDeFer on Google Code !

2009-09-23

Déductions: plain XML as RDF

Testing Redefer plain XML to RDF conversion

XML2RDF is not based on a XSLT. It is implemented using Java and the Jena library. The code is available from

http://code.google.com/p/redefer

Problem with attribute namespace

I tested this small XHTML with XForms inside: http://www.agencexml.com/xsltforms/textarea.xml

The result from the web converter at http://rhizomik.net/redefer/#XML2RDF is globally satisfying, but I saw something questionable.

For this fragment:

   <body>
      <xf:textarea ref="sample:MyTextValue">
         <xf:label>Note:</xf:label>
      </xf:textarea>

the converted fragment is:

<rdf:RDF
    xmlns:j.0="http://www.w3.org/2002/xforms#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:j.1="http://www.w3.org/1999/xhtml#"
    xmlns:j.2="http://www.agencexml.com/sample#">
  <rdf:Description rdf:about="http://www.agencexml.com/xsltforms/textarea.xml">
    <j.1:body rdf:parseType="Resource">
      <j.1:div rdf:resource="http://www.agencexml.com/xsltforms/textarea.xml#console"/>
      <j.0:textarea rdf:parseType="Resource">
        <j.0:label>Note:</j.0:label>
        <j.1:ref>sample:MyTextValue</j.1:ref>
      </j.0:textarea>

According the XML namespaces Rec., the attribute ref in the input XML is in no namespace (not in default namespace in scope !). I propose to translate it with an RDF prefix correcponding to the original base URI.

Looking at the specification

http://www.w3.org/TR/REC-xml-names/#scoping-defaulting

I read

The namespace name for an unprefixed attribute name always has no value.

2009-09-22

Missing feature in Gloze: enumerations

http://thread.gmane.org/gmane.comp.misc.ontology.protege.owl/30551/focus=30576

A binary search revealed that around

> line 371 the following representation of a class as a union of strings.

> Take this out and the file parses fine.

Thanks for having a look. After some debugging, I saw that too.

I hope that this , and other stuff not conforming to the OWL 2

structural model, will be cought with appropriate error messages.

Maybe doing XML Schema validation ; I saw this Schema for OWL XML :

http://www.w3.org/2007/OWL/wiki/OWL_XML_Schema

but I don't know whether there is one for RDF XML serialization of OWL.

In the Protégé OWL 2 tutorial I saw the way to create Enumerated Classes in Protégé 4 (see parag. 7.3 Enumerated Classes).

Then I know how it should look like in RDF XML serialization for OWL:

<owl:Class rdf:about="http://www.w3.org/2002/xforms#appearanceType">
<owl:equivalentClass>
<owl:Class>
<owl:oneOf rdf:parseType="Collection">
<rdf:Description rdf:about="#minimal"/>
<rdf:Description rdf:about="#compact"/>
<rdf:Description rdf:about="#full"/>
</owl:oneOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>

instead of :

> <owl:Class rdf:about="http://www.w3.org/2002/xforms#appearanceType">

> <owl:unionOf rdf:parseType="Collection">

> <owl:DataRange>

> <owl:oneOf rdf:parseType="Resource">

> <rdf:rest rdf:parseType="Resource">

> <rdf:rest rdf:parseType="Resource">

> <rdf:rest

> rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>

> <rdf:first

> rdf:datatype="http://www.w3.org/2001/XMLSchema#string"

> >minimal</rdf:first>

> </rdf:rest>

> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string"

> >compact</rdf:first>

> </rdf:rest>

> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string"

> >full</rdf:first>

> </owl:oneOf>

> </owl:DataRange>

> </owl:unionOf>

> </owl:Class>

2009-09-21

Artificial Intelligence: Structures and Strategies for Complex Problem Solving : http://www.cs.unm.edu/~luger/ai-final/

triplr

http://triplr.org/

What it is

Triplr (verb): a service that generates RDF Triples from URIs.

The content at the original URIs must be readable as one of the syntaxes Raptor knows - RDF ones, RSS, Atom, Microformats that have a GRDDL profile and so on. The full list is given in How... can I use it?

EulerGUI instantiation: correction

For instanciating a Method call with a list as object, a resource was wrongly taken in account as a literal string.

Déductions GUI rules: migration after package change in EulerGUI

Before doing a new release of EulerGUI, I put the Déductions GUI rules in a new directory:

cp -r n3 n3_new
cd n3_new
sed  -e 's/class="n3_project/class="eulergui.project/' -i *.n3p

I need also to change the eclipse launch configurations in workspace :

cd .metadata/.plugins/org.eclipse.debug.core/.launches
sed -e 's=/deductions/n3/=/deductions/n3_new/=' -i *.launch

2009-09-20

EulerGUI : refactoring : moving Project and N3Source in a separate package

Alas this broke all the XML .n3p files.

Java instantiation in EulerGUI

A triple involving a Java object in first position (subject) will be interpreted as a JavaBean property, e.g. :

:myWindow any_prefix:visible xsd:true .

will be interpreted as :

myWindow.setVisible(true);

Precedently only predicates with the Java prefix were interpreted as Java properties.

Also method calls are now detected, no matter what the N3 prefix is, as long as it ends with # :

:myWindow any_prefix:setState ( 1 ) .

This paves the way for Déductions GUI rules: migration to generic platform.

Trying rhizomik / Redefer project

After the correction from Roberto, it works fine :

saxonb-xslt XForms-11-Schema.xsd xsd2owl.xsl > XForms-11-Schema.redefer.owl

And I can load it readily Protégé 4 ! :))))))))

2009-09-19

I saw this; in fact it passes through UML (two dialects!):

From OWL to Plone : I found a working path to transform an OWL ontology into a working Plone content-type. Here is my recipe

http://www.akasig.org/2005/04/28/from-owl-to-plone/

Déductions GUI rules: migration to generic GUI platform

I created a new variant of the basic Person test, person_import2.n3p, that imports a new variant of the basic Déductions GUI rules, swing-rules3.n3p.

For now only the classes are modified, not the java-specific predicates. The generic GUI platform objects are tagged as Java objects according to the chosen platform, e.g. :

{ ?W a gengui:TextField.
  javapr:thisApplication app:platform app:Java .
} => {
  ?W a java:javax_swing_JTextField } .

This amounts to insert one more inference step.

2009-09-18

OWL API is available through Maven: http://owlapi.sourceforge.net/source.html

FuXi Builtin Predicates

Déductions: plain XML as RDF

Tonight I realized the big potential of having a 2 directional plain XML <--> RDF correspondance. On input, a plain XML can be added to the RDF store. For instance, it can come from an XForms form. On output, it can solve the problem of generating plain XML out of an RDF object graph. And this last feature is needed for many use cases, as plain XML is ubiquitous today (feed an instance for an XForms, XBRL report). XBRL in Cover pages .

Gloze is maintained ! Got a mail from Steve after 1 day.

There is also : Krextor – An Extensible XML→RDF Extraction Framework, by Christoph Lange, but it is not generic like Gloze, it is a framework where one has to wrtie XSLT for each XML vocabulary. I just noticed Christoph Lange's answer to my post on Protégé list :

https://mailman.stanford.edu/pipermail/protege-owl/2009-August/011907.html

I read Gleaning Resource Descriptions from Dialects of Languages (GRDDL). W3C is now completely at a stage where new specifications are meant to connect newer concepts (RDF here) to older (plain XML).

Trying to debug the output of Gloze

Same stack , but a 32 lines input RDF file:

http://jmvanel.free.fr/ai/XForms-11-Schema_test_small.owl.rdf

I 'm not sure if it's correct or some special case left over ...

Trying rhizomik / Redefer project

One more project, XSLT based, to convert from XML and XSD to RDF and OWL :

http://rhizomik.net/

Sent a mail to Roberto:

The resources provided on the Rhizomic are all interesting to me in

the perspective of developing business application with RDF

techniques.

I tried the XSD to OWL transform from your site, with this large XSD,

namely latest XForms XML Schema :

http://www.w3.org/MarkUp/Forms/2007/XForms-11-Schema.xsd

The result has an error at line 79 :

<owl:onProperty rdf:resource="#&xforms;instance"/>

as you can see e.g. in Protégé 4.

It should be :

<owl:onProperty rdf:resource="&xforms;instance"/>

or

<owl:onProperty rdf:resource="#instance"/>

I wanted to try locally, but the xsl file provided on your site is not

sufficient, because the imported XSLT xsd2owl-functions.xsl cannot be

found on your site.

Examine XForms for integration with Déduction GUI rules

XForms specification

XForms for HTML Authors - Steven Pemberton

https://sourceforge.net/search/?type_of_search=soft&words=xforms

https://sourceforge.net/projects/xsltforms/

"required" and "relevant" properties are interesting, as ell as "constraint" and "calculate". All are attributes of the <bind> element.

The contruct <repeat nodeset="/some/xpath"> takes care of multi-valued domain properties.

The kind of XML to generate:

<group xmlns="http://www.w3.org/2002/xforms" >
   <label>Personal Information</label>
   <input ref="lastname"><label>Last name:</label></input>
   <input ref="firstname"><label>First name:</label></input>
   <input ref="address"><label>Address:</label></input>
</group>

2009-09-17

Jos De Roo on sf.net

Déductions GUI rules: migration to generic platform

See "Déductions: reflexions on multi-platform generation"

Links: Dbin

Dbin looks interesting as an example of Web navigation and annotating of an RDF database : http://www.dbin.org/overview.php

http://infomesh.net/2001/cwm/

No abstract classes in OWL:

https://mailman.stanford.edu/pipermail/protege-owl/2007-September/003823.html

Tried Gloze on a large XSD

Namely latest XForms XML Schema.

I had to tweek the code, and even then the result does not open in Protégé 4.

Sent a mail to Gloze author Steve Battle, and also a question on Protégé list:

It's worse with Protégé 4 (build 113). I just get a stack trace. Is there a way to get a line number in the document without using a debugger ?

2009-09-16

Installing Sonar

Sonar enables you to collect, analyze and report metrics on source code. Sonar not only offers consolidated reporting on and across projects throughout time, but it becomes the central place to manage code quality.

I followed http://docs.codehaus.org/display/SONAR/The+2+minutes+tutorial, but I didn't like the idea of deleting something in my local Maven repo, so I did:

mvn clean install org.codehaus.mojo:sonar-maven-plugin:sonar

Then I got my project page (dashboard) at http://0.0.0.0:9000/project/index/1

The default password for settings is admin / admin .

I discovered this rule from Checkstyle:

http://stackoverflow.com/questions/662598/howto-design-for-extension

http://www.squale.org/

I also applied for SonarJ (unrelated and non open source )

http://www.hello2morrow.com/products/downloads

2009-09-15

Exploring Jena

Exploring Jena code base

Some extensions to Jena, (Gloze, TDB, Eyeball, ... ) are on Subversion:

https://jena.svn.sourceforge.net/svnroot/jena/

while the base is in CVS:

http://jena.cvs.sourceforge.net/viewvc/jena/

Among this, the core is on jena2/ .

TDB is a high performance, pure-Java, non-SQL storage subsystem for Jena that scales to billions of triples.

Trying jena eyeball

I downloaded Eyeball from CVS. Then I added this small script run_main_class.sh :

#!/bin/bash
echo running $*
for file in lib/*.jar
do
  echo $file
  classpath=${classpath}":"${file}
done

echo java -cp $classpath $*
java -cp $classpath $*

Then I can check one of the example (bad) files:

./run_main_class.sh jena.eyeball -check examples/bad-uris.rdf
 WARN [main] (RDFDefaultErrorHandler.java:36) - file:examples/bad-uris.rdf(line 11 column 46): {W107} Bad URI: <http:no-authority> Code: 58/REQUIRED_COMPONENT_MISSING in HOST: A component that is required by the scheme is missing.

On statement:  unknown:scheme rdf:type rdfs:Class
    eye:badURI: "unknown:scheme"
    for reason: URI has an unrecognised scheme
 ..... etc ......

Amaya : features wished

3 features wished: copy & paste

Fuxi

Fuxi and N3 syntax

/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Rete/AlphaNode.py:6: DeprecationWarning: the sets module is deprecated
  from sets import Set
/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Rete/SidewaysInformationPassing.py:7: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import unittest, os, sys, itertools, md5
Parsing RDF facts from  file:/tmp/uml_owl-rules.n3
Traceback (most recent call last):
  File "/usr/local/bin/FuXi", line 8, in <module>
    load_entry_point('FuXi==1.0-rc.dev', 'console_scripts', 'FuXi')()
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Rete/CommandLine.py", line 154, in main
    rs = HornFromN3(fileN)
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Horn/HornRules.py", line 37, in HornFromN3
    return Ruleset(n3Rules=store.rules,nsMapping=store.nsMgr)
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Horn/HornRules.py", line 105, in __init__
    self.formulae.append(Rule(Clause(body,head),declare=allVars))
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Horn/HornRules.py", line 199, in __init__
    self._bodyHash = hash(antHash)
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Rete/Network.py", line 90, in __hash__
    _concatPattern = [pattern and self._hashRulePattern(pattern) or "None" for pattern in self._l]
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Rete/Network.py", line 78, in _hashRulePattern
    if not self.skipBNodes or not isinstance(i,BNode)])
  File "/usr/local/lib/python2.6/dist-packages/FuXi-1.0_rc.dev-py2.6.egg/FuXi/Rete/Network.py", line 77, in <lambda>
    return reduce(lambda x,y:x+y,[ i for i in item 
TypeError: coercing to Unicode: need string or buffer, QuotedGraph found

Fuxi has moved

Chimezie has decided to separate the expert system (FuXi) into its own Google Code project and will decide soon what to do with python-dlp (the idea, anyways): http://code.google.com/p/fuxi/

See post "Updates to FuXi"

I updated FuXi integration in EulerGUI, now that FuXi has the --filter feature. I was not without pain; first at some time the main script changed from Fuxi to FuXi; then rdflib 2.4.0 provided by Ubuntu was too old. I tried to summarize the install in the EulerGUI Manual .

2009-09-14

Trying SGML/XML with Yap

It looks compatible with SWI's implementation.

use_module(library(sgml)).

Then you can do the same as with SWI:

load_html_file(
  '/home/jmv/src/yap_git/yap-6/packages/sgml/sgml_mode.html', Term ).

sourceforge download stats KO

https://sourceforge.net/apps/trac/sourceforge/ticket/4347

There is currently an issue preventing download stats from being displayed properly. All the download data is being recorded, it simply isn't being displayed. This is a known issue, and we're working on a fix for it.

Trouble with Philips Webcam SPC210NC

dvr-qtgui &
[3] 9747
~/src/pwc-10.0.12-rc1% <init> : Avifile RELEASE-0.7.47-080115-14:47-4.2.3
<init> : Available CPU flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good pni mon
<init> : 1250.00 MHz AMD Phenom(tm) 9850 Quad-Core Processor detected
*** WARNING *** : the driver doesn't provide a correct size for memory mapping. DVR tries to correct this error, but some strange things may happend, you are warned.
Can't map memory for capture : Argument invalide

Links:

RETE engine for PHP:

http://forum.joomla.org/viewtopic.php?f=500&p=1688036

http://www.lespetitescases.net/ISWC-2008-premieres-impressions-generales

http://data-gov.tw.rpi.edu/wiki/Generating_RDF_from_data.gov

http://optimix.sourceforge.net/ Optimix lets the user specify graph transformations in a declarative language, based on relational graph rewriting.

http://wwwcs.uni-paderborn.de/cs/varlet/tour.html The purpose of this guided tour is to demonstrate some functionality of the Varlet database reengineering environment.

http://swik.net/RDF+visualization

http://www.openvest.com/trac//wiki/n3SyntaxHighlighting

http://www.esec-fse-2009.ewi.tudelft.nl/

2009-09-04

http://www.troposproject.org/

My program for "vacancies"

Announces for EulerGUI 1.2.1

Announce in the Protégé list

Thread : EulerGUI 1.2.1 + Déductions application generator

Déductions is a Java Swing application generator from OWL models and N3 logic rules.

The User Manual, for the application designer.

This is a framework (Open Source, compatible but not Protégé-based) allowing to mix ontologies and a RETE forward chaining engine (Drools). This a quite similar to the SWRL plugin of eclipse, except that the rule language is N3 logic . N3 logic is similar to SWRL in its semantics, but the syntax is similar to the body of SPARQL queries. N3 is a good candidate for a universal data + models + rules + queries textual language. The RDF subset of N3 is perfectly isomorphic to RDF, but as human readable as can be. And it is readable by Protégé, Jena, and others tools. OWL, being expressed as RDF, is thus also expressible in N3. Here is an example:

:Person a owl:Class .

:name    a       owl:DatatypeProperty ;
      rdfs:domain :Person ;            
      rdfs:range xsd:string ;          
      rdfs:comment "First name and last name" ;
      rdfs:label "name" .

:Address a owl:Class .

:hasAddress    a       owl:ObjectProperty ;
      rdfs:domain :Person ;
      rdfs:range :Address ;
      rdfs:comment "click to enter address"@en ;
      rdfs:label "address" .

For a developper, and even some domains experts, it can be quicker to enter initial models and facts in N3 with an editor having syntax coloring. Then Protégé can be used to visualize, navigate, update, and Description Logics reasonning.

EulerGUI is a lightweight IDE for developping and testing projects composed of N3, OWL, RDF(S) and UML ontologies and databases, and rules in N3 logic.

User Manual, for EulerGUI

The sources can be N3 (Notation 3), RDF, OWL, UML or eCore, files or URL's.

The rules are in N3 logic; so the same rule language is used for infrastructure (form generation) and for business rules. There are four N3 rules engines: in Prolog, Python (Fuxi, CWM) , Java (Drools - RETE) .

In 2 clicks EullerGUI allows to generate and run Java Swing GUI's from OWL models and rules from the Deductions project.

See also:

* The Deductions vision .

* Summary for AI researchers

Announce for the Drools list

[Announce] EulerGUI 1.2.1 + Déductions application generator

http://www.nabble.com/drools---user-f11823.html

http://www.nabble.com/-Announce--EulerGUI-1.2.1-%2B-D%C3%A9ductions-application-generator-td25298621.html

The preceding announce on this list was on february 23:

http://www.nabble.com/EulerGUI-released---IDE-for-semantic-Web-with-Drools-engine-and-Drools-export-td22164229.html

In short, EulerGUI is an IDE centered around a Semantic Web language called N3. N3 is a good candidate for a universal data + models + rules + queries textual language. The RDF subset of N3 is perfectly isomorphic to RDF, but as human readable as can be. And it is readable by Protégé, Jena, and others tools. OWL, being expressed as RDF, is thus also expressible in N3. Here is an example for an OWL model :

:Person a owl:Class .

:name    a       owl:DatatypeProperty ;
      rdfs:domain :Person ;            
      rdfs:range xsd:string ;          
      rdfs:comment "First name and last name" ;
      rdfs:label "name" .

:Address a owl:Class .

:hasAddress    a       owl:ObjectProperty ;
      rdfs:domain :Person ;
      rdfs:range :Address ;
      rdfs:comment "click to enter address"@en ;
      rdfs:label "address" .

Here is an example of a simple rule in N3 logic :

{ ?C hasParent ?P. ?P hasBrother ?B } => { ?C hasUncle ?B }.

This rule is translated into Drools, giving this:

rule "family-rules.n3 0"
when
  Triple( $C : subject, predicate == "<file:/home/jmv/family-rules.n3#hasParent>",
          $P : object )
  Triple( subject == $P, predicate == "<file:/home/jmv/family-rules.n3#hasBrother>",
          $B : object )
  not(
    Triple( subject == $C, predicate == "<file:/home/jmv/family-rules.n3#hasUncle>",
    object == $B ) )
then
  Triple newTriple;
  newTriple = new Triple( $C, "<file:/home/jmv/family-rules.n3#hasUncle>", $B );
  insert( newTriple );
endncle>", $B );  insert( newTriple );
end

As you can see, a negation of the consequent (RHS) is added in the antecedent, to avoid extra responses.

This is one of the new features. The others are :

The rule base, the models, and the data are exportable for using with Drools independently. So, for the Drools community, EulerGUI allows to import models and data from N3, RDF, OWL, UML, eCore documents. Also for some people, writing N3 rules can be easier than Drools language.

As you see above, the translation makes use of a particuliar form of Drools language, which makes use of a single Java class, Triple, that models RDF statements. This is quite far from the intended Drools usage, but it shows the power and flexibility of Drools. When embedded into generated Java Swing applications, a Drools engine is able to generate a form in a few milliseconds from the class model! Also this design, based on a single Java class, allows to add and remove business classes at runtime.

The EulerGUI documentation.

Déductions is a Java Swing application generator from OWL models and N3 logic rules.

The User Manual for the application generator .

Announce for the PlanetMDE list

Announce for the news AI list

Announce for news:fr.comp.lang.java

Announce for LinuxFr.org

Annonce EulerGUI 1.2.1 sur LinuxFr.org

2009-09-03

Déductions generated applications : test and debug

update convert-UML2_metamodel_to_OWL.n3p to download directly the UML.ecore from the Web

TODO: it is not currently possible in EulerGUI to set an URL for an eCore document, so the convert-UML2_metamodel_to_OWL.n3p project was edited by hand.

Test cases for Déduction from Web

test_person_import.n3p
foaf_import.n3p : OK
cv.n3p : OK; was KO : no datatype properties: query2.n3 is really necessary in cv.post.n3p

rdfs_food_gui.n3p:OK
uml.n3p : OK

ecore.n3p : OK

2009-09-02

Project Sequence : postProcessingURL was not taken in account when it's a relative URL.

How to find any eclipse source file

Search e.g. this in Google:

class URIHandlerImpl site:http://dev.eclipse.org/viewcvs/

If you want to see line numbers, add this to the URL:

?view=annotate

Converting UML 2 metamodel into OWL

After correcting a slow algorithm and adding N3 escape """ to strings if necessary, I was able to use EulerGUI to convert the UML 2 metamodel into OWL. This is just a by-product of being able to express eclipse eCore models in N3. The funny thing is that the UML-OMG guys want to translate the Semantic Web things into their stuff (see OMD), and the Semantic Web guys (like me) do the converse.

To go from XMI to OWL the data flow (completely implemented by EulerGUI) is:

XMI --> N3 representation of the XMI --> conversion through N3 rules --> OWL N3 representation

The N3 rules used for conversion are here :

http://deductions.svn.sourceforge.net/viewvc/deductions/n3/ecore_owl-rules.n3

A typical rule is the following:

{
  ?ECORE_CLASS a ecore:EClass .
} => {
  ?OWL_CLASS a owl:Class .
  ?OWL_CLASS :translatedFromECORE ?ECORE_CLASS .
} .

This simple eCore to OWL translation processes: Class, eSuperTypes, name, eStructuralFeatures. These eCore features are left aside for now: lowerBound, upperBound, eOpposite, containment="true", derived="true".

The resulting OWL converted from the UML 2.2 metamodel allows one to navigate into this big metamodel in Protégé, to write rules relying on UML metaclasses and predicates, and to enter instances (actual UML user models) in Protégé.

To make a complete translation, one should also translate the OCL constraints and operations, that could be converted into SWRL or N3 logic. This is quite a bit a work, but the OCL parser from eclipse is usable.

There might still be some imperfections from the point of view of UML or OWL experts.

I put the N3 file for the OWL conversion of the UML 2.2 metamodel (suitable for Protégé) here:

http://deductions.sourceforge.net/models/UML2-OWL_model.n3

The HTML generated in Protégé with OWLDoc is here:

http://deductions.sourceforge.net/models/UML2-OWL_model_doc/

On the web the UML2 metamodel in the eclipse eCore XMI dialect, that was used for the conversion, is here :

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.mdt/org.eclipse.uml2/plugins/org.eclipse.uml2.uml/model/UML.ecore?root=Modeling_Project&view=co

2009-09-01

I found where the settings are on kubuntu: in konqueror, open settings:.

See http://www.kubuntu.org/docs/kquickguide/C/ch04s04.html

2009-08-31

Instead of monitoring several forums and threads , it is simpler to monitor Jos De Roo's profile:

https://sourceforge.net/users/josd

Translating Java class into OWL

To be very concrete here is the translation I propose for :

public class Item {
  public String name; // or getName + setName
  public int unitPrice;
  public int computePrice( int quantity ) {return unitPrice*quantity;}
}

----------- OWL/N3 translation ------------------

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix um2: <http://schema.omg.org/spec/XMI/2.1/>.
:Item a owl:Class.
:name a owl:datatypeProperty;
  rdfs:label "name";
  rdfs:domain :Item;
  rdfs:range xsd:string.
:unitPrice a owl:datatypeProperty;
  rdfs:label "unitPrice";
  rdfs:domain :Item;
  rdfs:range xsd:positiveInteger.
:Item uml2:ownedOperation :computePrice.
:computePrice rdfs:label "computePrice";
  uml2:ownedParameter :quantity.
:quantity uml2:type xsd:positiveInteger;
  rdfs:label "quantity".
:computePrice uml2:ownedParameter :returnComputePrice.
:returnComputePrice uml2:type xsd:positiveInteger;
  uml2:direction "return".

Above I follow paragraph "7.2 Abstract Syntax" in "OMG Unified Modeling Language (OMG UML),

Superstructure, V2.1.2", except that I use XSD datatypes and rdfs:label as usual in OWL.

Convert UML2 metamodel into OWL

First I took the eCore version of the UML 2 metamodel from my eclipse 3.5 installation:

% unzip -l \
 ~/apps/eclipse-SDK-3.5/eclipse/plugins/org.eclipse.uml2.uml_3.0.0.v200905151700.jar \
 'model/*'
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  06-15-09 16:06   model/
   141754  06-15-09 16:06   model/CMOF.ecore
    32081  06-15-09 16:06   model/CMOF_2_UML.ecore2xml
  1184081  06-15-09 16:06   model/UML.ecore
   396820  06-15-09 16:06   model/UML.genmodel
      619  06-15-09 16:06   model/UML21_2_UML.ecore2xml
     7847  06-15-09 16:06   model/UML2_2_UML.ecore2xml
  1159773  06-15-09 16:06   model/UML_21.ecore
 --------                   -------
  2922975                   8 files

2009-08-30

https://sourceforge.net/search/?type_of_search=soft&words=rdf+uml

2009-08-28

OWL 2 with form generator: TODO

Google Summer of Code 2009

Google Summer of Code 2009 Home Page

http://socghop.appspot.com/program/home/google/gsoc2009

List all accepted organizations

http://socghop.appspot.com/program/accepted_orgs/google/gsoc2009

Prolog

Another Prolog in Java : http://www.binnetcorp.com/OpenCode/kernelprolog.html

http://www.cs.unm.edu/~luger/ai-final/index.html

Prolog design patterns

Ways of processing a list: http://computing.unn.ac.uk/staff/cgpb4/prologbook/node71.html

Some General Program Schemata

Bravo, Paul Brna ! ( 10 years ago )

I should buy this book: Artificial Intelligence: Structures and Strategies for Complex Problem Solving

2009-08-26

http://sewiki.iai.uni-bonn.de/research/gentl/example

UIMA

http://incubator.apache.org/uima/

http://gate.ac.uk/

Pyke, Logic Programming in Python

I saw this recent project that looks good:

http://pyke.sourceforge.net/

Pyke introduces a form of Logic Programming (inspired by Prolog) to the Python community by providing a knowledge-based inference engine (expert system) written in 100% Python.

It is both forward and backward chaining.

Spell check in different language in Amaya

To change the language, apply a lang attribute to the text with the Attributes tool, and restart the spell-check procedure.

2009-08-25

Links: fresnel, etc

N3 Rules Processing and HTML Translation for the Semantic web

Leung, Chun Yip

HPL-2003-199

Keyword(s): N3; forward chained rules; RDF translation; semantic web ht

tp://www.hpl.hp.com/techreports/2003/HPL-2003-199.html

http://www.w3.org/2005/04/fresnel-info/

http://marbles.sourceforge.net/

https://sourceforge.net/projects/simply-rdf/

OWL structural view with UML diagrams: http://www.w3.org/TR/2008/WD-owl2-syntax-20081202/

Releasing EulerGUI with Maven

Because the pom.xml was not in a good state, I had to run release:prepare this way :

mvn release:prepare -Dresume=false

The release.properties file, generated by the release:prepare stage, was:

#release configuration
#Tue Aug 25 13:02:14 CEST 2009
scm.tag=eulergui-1.2
project.scm.eulergui\:eulergui.developerConnection=scm\:svn\:https\://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.2
project.scm.eulergui\:eulergui.connection=scm\:svn\:https\://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.2
scm.url=scm\:svn\:https\://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.2
preparationGoals=clean verify
project.dev.eulergui\:eulergui=1.3-SNAPSHOT
scm.commentPrefix=[maven-release-plugin] 
scm.tagBase=https\://eulergui.svn.sourceforge.net/svnroot/eulergui/tags
project.scm.eulergui\:eulergui.tag=HEAD
completedPhase=end-release
project.rel.eulergui\:eulergui=1.2
project.scm.eulergui\:eulergui.url=https\://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.2

During the release:prepare stage, Maven manipulates these tags in pom.xml :

  <version>1.3-SNAPSHOT</version>
  ...
  <scm>
<developerConnection>scm:svn:https://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.2</developerConnection>
         <connection>scm:svn:https://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.2</connection>
    <url>https://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.2</url>
  </scm>

and commits the copy of the sources in the tags/ directory in the Subversion repository.

The release:perform stage just uploads the files on the EulerGUI Maven depot on sf.net .

Then I created the Web site generated by Maven :

mvn site
mvn site:deploy

but the unzipping didn't work :

Transfer finished. 43792 bytes copied in 1.831 seconds
Executing command: cd /home/groups/e/eu/eulergui/htdocs/maven-site/.; unzip -q -o wagon812543537683092844.zip; rm -f wagon812543537683092844.zip
Executing command: chmod -Rf g+w,a+rX /home/groups/e/eu/eulergui/htdocs/maven-site
sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven-site - Session: Disconnecting
sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven-site - Session: Disconnected

It fails when a shell is not active through :

ssh -t jmvanel,eulergui@shell.sourceforge.net create

One can do the unzipping through the shell on Sourceforge. But it is clean to do it with:

mvn site:deploy

The error above was due to a bad <url> in pom.xml :

  <distributionManagement>
      <repository>
<!-- id corresponds to a <server> tag in ~/.m2/server.xml -->
        <id>repository.eulergui.sf.net</id>
        <name>Repository for eulergui and 3rd party libraries not having Maven repo.</name>
        <url>sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2</url>
      </repository>
      <site>
        <id>eulergui.sourceforge.net</id>
        <!-- CAUTION: these don't work with site:deploy :
        <url>sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven-site</url
        <url>sftp://shell.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven-site</url>
        -->
        <url>scp://shell.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven-site</url>
      </site>
  </distributionManagement>

Anyway, finally, the generated site is here :

http://eulergui.sourceforge.net/maven-site/

And the release 1.2 is here:

http://sourceforge.net/projects/eulergui/

2009-08-24

Conzilla - A Concept Browser

I tried through the Java Cache Viewer :

javaws -viewer &

But it didn't start without any message :( .

Mail sent to the project administrator.

Links: graph transforms, etc

http://www.w3.org/TR/rdf-sparql-query/#ask

http://www.w3.org/2005/rules/wiki/RIF_Working_Group

Gloze : https://sourceforge.net/projects/jena/files/

http://data-gov.tw.rpi.edu/wiki/Generating_RDF_from_data.gov

TODO : watch videos by Martin : http://martinfowler.com/

http://pypi.python.org/pypi/archgenxml - UML to code generator for Plone

Towards Concrete Syntax Patterns for Logic-based Transformation Rules, Malte Appeltauera and Günter Kniesela

GenTL: Logic Program Transformation with Concrete Syntax

http://www.gratra.org/ - graph transformation and graph grammars

http://en.wikipedia.org/wiki/Graph_rewriting

http://www.acceleo.org/pages/overview/en

http://en.wikipedia.org/wiki/Model-driven_architecture

http://www.lyria.com/rubrique.php3?id_rubrique=195 : Leonardi Documentation

http://swik.net/RDF+visualization

Concrete vs. Abstract Syntax

By me:

Applying rules to form generation from OWL models


http://www.google.fr/search?hl=fr&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=38t&q=grap%C4%A5+transform+logic+rules&btnG=Rechercher&meta=

Temporal Graph Queries to Support Software Evolution

Handbook of Graph Grammars and Computing by Graph Transformation

Towards Model Transformation with TXL

From Graph to GUI: Displaying RDF Data from the Web with Arago

Towards Graph Transformation based Generation of Visual Editors using Eclipse


MDWE 2008 - Model-Driven Web Engineering

A Mapping Language from Models to DI Diagrams

On Model Transformation and Graph Transformation, Tom Mens,
   Service de Génie Logiciel, Institut d’Informatique,   Université de Mons-Hainaut : READ!

Refactoring of UML models using AGG

Code Generation Network - Generators for MDA

Tiger Project

The Tiger Project (Transformation-based generation of modeling environments) is a tool environment that allows to generate an Eclipse editor plugin based on the Graphical Editing Framework (GEF) from a formal, graph-transformation based visual language specification. Moreover the Eclipse JET engine is used for generation.

Conzilla - A Concept Browser | Overview / Conzilla - The Concept Browser browse

Not found freely:

http://www.springerlink.com/content/l31200735ml16781/

EulerGUI mailing list management at sf.net

I had to set a mailman password. For that I had to go to "admin/features".

N3 refactoring: extract part of antecedent

Put in EulerGUI project in n3_rules_good_practices.html .

Motivation

Suppose the original rule OR is writen as :

{ T1 ... Tn . Tn+1 ... Tp } => { Consequent } .

You want to reuse that rule with the rest of antecedent Tn+1 ... Tp and the consequent unchanged, but with a different begining of antecedent.

You are tempted to copy and paste the original rule, and change the begining of antecedent.

Mechanics

Instead of that bad copy and paste, here is the refactoring:

  1. rewrite the begining of antecedent T1 ... Tn with new predicates, using the same variables, resulting in T'1 ... T'm ;

    then OR becomes OR' :

    { T'1 ... T'm . Tn+1 ... Tp } => { Consequent } .

    and it is this form that can be reused;

  2. to leave the rule base logically unchanged, add this rule OR" :
    { T1 ... Tn } => { T'1 ... T'm } .

In situations where the original rule OR would trigger, OR" then OR' will trigger.

Example

The original begining of antecedent is in blue, and the rewriting with new predicates is in green.

Original rule in app_gui-rules2.n3 :

{
?CLASS gui:hasForm ?FORM .
?CLASS log:notEqualTo owl:Thing .
?PROP a :OWLProperty . ?PROP rdfs:domain ?CLASS . # only if there is no field for that property: (?SCOPE 1) e:findall ( ?FIELD_ { ?FIELD_ gui:inputWidgetSpecification ?PROP . } () ) . } => { ?FORM gui:hasField ?FIELD . ?FIELD gui:inputWidgetSpecification ?PROP . _:d eg:trace ( "add an EMPTY field in the form: " ?PROP ?FIELD ) . } .

Extraction of the rest of antecedent as a second intermediary rule (note that the consequent is copied verbatim ) :

{ # add Fields To Form From Class (direct properties, no properties of subclass)
?FORM gui:addFieldsToFormFromClass ?CLASS . ?PROP a :OWLProperty . ?PROP rdfs:domain ?CLASS . # only if there is no field for that property: (?SCOPE 1) e:findall ( ?FIELD_ { ?FIELD_ gui:inputWidgetSpecification ?PROP . } () ) . } => { ?FORM gui:hasField ?FIELD . ?FIELD gui:inputWidgetSpecification ?PROP . _:d eg:trace ( ">>> addFieldsToFormFromClass: add an EMPTY field in the form: " ?PROP ?FIELD ) . } .

Extraction of the begining of antecedent as a first intermediary rule :

{
?CLASS gui:hasForm ?FORM .
?CLASS log:notEqualTo owl:Thing .
} => { ?FORM gui:addFieldsToFormFromClass ?CLASS . } .

Déductions generated applications : choice of a subclass

Use case : When the user clicks to choose among subclasses, the fields for chosen subclass are added at once, without fields for its superclass of course.

Problem with Drools recompilation

java.lang.ClassCastException: org.drools.util.ObjectHashMap cannot be cast to org.drools.reteoo.BetaMemory
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148)
at org.drools.reteoo.AlphaNode$ObjectSinkUpdateAdapter.assertObject(AlphaNode.java:302)
at org.drools.reteoo.ObjectTypeNode.updateSink(ObjectTypeNode.java:252)
at org.drools.reteoo.AlphaNode.updateSink(AlphaNode.java:162)
at org.drools.reteoo.BetaNode.attach(BetaNode.java:209)
at org.drools.reteoo.builder.BuildUtils.attachNode(BuildUtils.java:160)
at org.drools.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:150)
at org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:73)
at org.drools.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:153)
at org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:126)
at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:117)
at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:362)
at org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:618)
at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:500)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:388)
at n3_project.helpers.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:296)

2009-08-21

Déductions generated applications : choice of a subclass

The text field and the focus lost listener both come from the same reason: a property value must be updated by the user.

2009-08-20

Rules about rules with Euler / Eye

Contributed in EulerSharp forum : "rules about rules"

N3 syntax error with EYE in rule about rules (New)

By: Jean-Marc Vanel (jmvanel) - 2009-08-20 13:17

Hi

This time it is an undoubtful error. I created a simple rule to infer RDFS properties from rules :

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/examples/add-properties-from-rules.n3

{
  ?A => ?C .
  ?A log:includes { ?SA ?PA ?OA } .
  ?C log:includes { ?SC ?PC ?OC } .
} => {
  ?PA a rdfs:Property .
  ?PC a rdfs:Property .
} . 

Déductions generated applications : choice of a subclass

TODO: primitive type checking

WIP:

use case 2.??? : user clicks to choose among subclasses:

pave the way to add fields for chosen subclass: assert:

?FIELD gui:addFieldsFromClass ?CLASS

2009-08-19

Déductions generated applications : choice of a subclass

TODO : use inverseProperty to create inverse triples at the instance level

DONE - For the RDFS food example, there is no more an empty GUI produced with editedClass == PreparedFood; this was because there is no properties at all. PreparedFood, however, has many subclasses. We give a choice to create and edit one of these subclasses. This reuses what is done for object properties.

Memory analyser

Maven eclipse integration

eclipse update site : http://m2eclipse.sonatype.org/update/

I can debug a single test run from Maven by creating in "Debug configurations" a new configuration under "Maven build"

N3 syntax for jEdit

Found an N3 syntax for jEdit !

It is not present in the JEdit installed with Ubuntu :( .

https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/trunk/modes/n3.xml

Mail sent to the author, Jakub Roztočil .

http://www.jedit.org/users-guide/installing-modes.html

2009-08-15

RDFS to OWL conversion - food example

RDFS to OWL conversion was creating wrong OWL classes for superclasses.

Opened in Protégé 4, it looks good.

TODO - I undersand why there is still an empty GUI produced with editedClass == PreparedFood; this is because there is no properties at all. However, it works fine with the CV RDFS model. PreparedFood, however, has many subclasses. We should give a choice to create and edit one of these subclasses. This is already what is done for object properties.

2009-08-14

Déductions generated applications

2009-08-13

svn diff -r BASE --diff-cmd /usr/bin/diff -x -bw -x --unified=1 \
java_projection-rules2.n3

processing (?X ?Y) log:dtlit ?Z .

implemented case when N3 Variable for ?Z was Already Met

tested with deductions/n3/ecore_owl-rules.n3

http://xml.mfd-consult.dk/foaf/explorer/?foaf=http%3A%2F%2Fjmvanel.free.fr%2Fjmv.rdf

2009-08-08

Article for OWLED 2009

I gave it yesterday at the last minute !

Applying rules to form generation from OWL models

FOAF: when owl:Thing is specified as a placeholder

The reference specification: http://xmlns.com/foaf/spec/index.rdf

http://xmlns.com/foaf/spec/#term_mbox

I came across this, that Déduction form gen. does not process well :

foaf:mbox
a owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:comment "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox. This is a 'static inverse functional property', in that there is (across time and change) at most one individual that ever has any particular value for foaf:mbox."^^xsd:string ;
rdfs:domain foaf:Agent ;
rdfs:isDefinedBy "http://xmlns.com/foaf/0.1/"^^xsd:anyURI ;
rdfs:label "personal mailbox"^^xsd:string ;
rdfs:range owl:Thing .

The explanation is simply that "personal mailbox" is an RDF resource, and not a string, e.g. :

<foaf:mbox rdf:resource="mailto:wkearney99@hotmail.com" />

What is lacking in the FOAF specification is the information that this RDF resource is a mailto: URL (to be able to assist user input). So we should somehow enforce in the GUI the constraint that a the URL begins with mailto: .

The other interesting thing is that mbox is an Inverse Functional Property. The consequence for the GUI is that, given the Agent being the domain of the property, and in the absence of an existing mbox, the mbox is necessarily a new RDF resource.

2009-08-05

RIF_Working_Group at W3C

Corese Tutorial

http://marbles.sourceforge.net/ Marbles is a server-side application that formats Semantic Web content for XHTML clients using Fresnel lenses and formats. Colored dots are used to correlate the origin of displayed data with a list of data sources, hence the name.

graph transformation and graph grammars

http://projects.semwebcentral.org/projects/fuxi/

Team EDELWEISS INRIA

A community written in Java ! :)

Eclipse [3] is an open platform for tool integration managed by an open community written in Java [19].

Déductions generated applications

2009-08-04

Déductions generated applications

2009-08-03

http://www.aaai.org

Déductions generated applications

2009-08-02

Generate readable diagrams

One must be able to generate readable diagrams, and that in itself is a big challenge. There is GraphViz occupying this territory; but what it does without specific instructions it is not beautiful.

GraphViz is already added to EulerGUI. But I do not give specific instructions, just the nodes and links

For half a dozen nodes and links, things are going well ... But beyond :-( .

This is a nice use case for rule based processing; for a long time I have been running around this problem. My boss at MW was also interested in that. Now I am better prepared because I got like a training with the generation of forms.

Until today I had not thought of  generating instructions for GraphViz. The least I can do is :

Also it is very important to connect specific diagram rules with pre-canned queries like:

Drawing graphs with dot .

Déductions generated applications

Notes:

2009-07-31

Déductions generated applications

2009-07-30

A concurrent to N3, and JSON: http://www.yaml.org/

Déductions generated applications

TODO :

DONE

2009-07-29

Downloaded Firefox Minefield from:

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/

2009-07-28

Conversation avec Alain Couder, PDG de Solid Information Technology - 14:56 - May 30, 2006

http://video.google.com/videoplay?docid=-7995288971119025129

The classic Canadian documentary Manufacturing Consent based on the Noam Chomsky/Edward Herman book by the same name. Explores the the propaganda model of the media.

http://video.google.com/videoplay?docid=-5631882395226827730

2009-07-27

Déductions generated applications

2009-07-26

intelligent modularity: example of graphic file formats; for e.g. OCR software one wants to seamlessly integrate any graphic file format ( which not the case of many graphic programs).

2009-07-24

TODO EulerGUI: give (facultative) name to projects

2009-07-23

Misc. link on RDF, OWL

An assessment of RDF/OWL modelling

http://www.hpl.hp.com/techreports/2005/HPL-2005-189.pdf

http://etutorials.org/Misc/Practical+resource+description+framework+rdf

http://www.inf.unibz.it/~franconi/dl/course/

Good explanation of why personName has also rsfs:domain Animal :

http://esw.w3.org/mt/esw/archives/000036.html

A Semantic Web Primer for Object-Oriented Software Developers : http://www.w3.org/TR/sw-oosd-primer/

XForms

http://www.xformsinstitute.com/

XForms for HTML Authors - Steven Pemberton

XForms and Declarative Applications, by Steven Pemberton

http://www.w3.org/2009/Talks/03-06-steven-moz/

The second part of the essence of XForms is that the form controls, rather than expressing how they should look (radio buttons, menu, etc), express their intent ("this control selects one value from a list").

Bind an XPath nodeset or ref to "facets" : type, constraint, required, relevant, calculate

Then an XPath is refered to by a Form Control

RDF Forms

Ten XML Schemas you should know

https://www.ibm.com/developerworks/xml/library/x-schematips/

2009-07-21

Isaviz: /usr/share/fonts/X11/75dpi/

http://www.learnprolognow.org/

Resource for linking in the web of data http://sameas.org

Déductions generated applications

Idea: JCHR

Instead of Drools, JCHR could be used for inferring forms in Déductions generated applications. But there no examples with Java user classes.

Update

Now the events are correctly passed to the rules storing it in the KB, at least for the first event (when no existing value for this property about this resource).

TODO:

2009-07-20

x11vnc -usepw -grabalways -scale 2/3 -scale_cursor 1

Thanks to Chris Muller for this:

http://www.sdtimes.com/blog/post/2009/07/16/The-End-of-Sun.aspx

Idea : intelligent window manager

The use case:

Add Fuxi inference engine in EulerGUI

Trying CHR as a production rule system

Classical monkey and banana problem, illustrates how CHR can be used as a fairly efficient production rule system.

The initial output is:

emacs('/tmp/monkey.pl'). 
testcase(1).
ERROR: not/1: Undefined procedure: find_constraint/2

To adapt to SWI, need to change line 23 to :

not Fact :- find_chr_constraint( Fact ), !, fail.

Then the output is :

?- testcase(1).
Jump onto the floor
Walk to 4-3 carrying blanket
Drop blanket
Grab ladder
Move ladder to 9-9
Drop ladder
Climb onto ladder
Grab bananas
CONGRATULATIONS the goals are satisfied
phys_object(blanket, 4-3, light, floor, _G158961, _G158962, _G158963)
phys_object(bananas, 9-9, light, nothing, _G158783, _G158784, ok)
phys_object(ladder, 9-9, light, floor, _G158902, high, _G158904)
phys_object(garbage_can, 3-5, light, floor, _G159037, low, _G159039)
phys_object(couch, 7-7, heavy, floor, _G158843, low, _G158845)
monkey(9-9, ladder, bananas)
goal(satisfied, on, floor, _G159724, _G159725)
goal(satisfied, at, nothing, _G159611, 4-3)
goal(satisfied, holds, ladder, _G159446, _G159447)
goal(satisfied, at, ladder, _G159298, 9-9)
goal(satisfied, on, ladder, _G161737, _G161738)
goal(satisfied, holds, bananas, _G159144, _G159145)
goal(satisfied, holds, nothing, _G161294, _G161295)
goal(satisfied, holds, nothing, _G160244, _G160245)
found
true

2009-07-17

Updated a Déduction+and+EulerGUI+Blog

2009-07-16

TODO

Déduction generated application new architecture

Connecting Focus lost events.

2009-07-15

Hosted XML Database Solution ? We provide supported hosting of eXist XML Database!

http://www.webcomposite.com/host.html

OWLED 2009 - OWL: Experiences and Directions

http://www.webont.org/owled/2009/

Important dates

July 24th 2009 Titles and Abstract due

Subscribe to the iCal calendar.

July 31st 2009 Paper Submissions due

September 1st 2009 Paper acceptances sent out

October 9th 2009 Camera ready versions of papers due

October 23-24th 2009 (tentative) OWLED 2009 Workshop

2009-07-14

Links : B method, etc

http://en.wikipedia.org/wiki/XRX_%28web_application_architecture%29

http://www.agencexml.com/xsltforms/xsltforms/xsltforms.xsl

Méthode B : description de la méthode B

Krextor

http://www.semanticscripting.org/SFSW2009/short_2.pdf

2009-07-06

http://en.wikipedia.org/wiki/Graph_rewriting

I have to be here:

http://semanticweb.org/wiki/Tools

Generating XML from RDF

???? TODO

RETE engines in Phyton

http://www.mindswap.org/~katz/pychinko/

Drools N3 engine: Duplicated triples

Implemented something for "Duplicated triples with Drools engine"

cf http://eulergui.wiki.sourceforge.net/page/edit/A + D% C3% A9duction + and + + EulerGUI Blog? token = 27a713ef5247da534b80e1321b9165e4

The "Person" test passes , but in some cases it might remove some correct results.

Anyway this a major improvement; it will make thingd easzier for Déductions new architecture.

2009-07-04

CALO, Cognitive Assistant that Learns and Organizes

Had a very quick look at CALO, a US defense project, that aims at a:

Cognitive Assistant that Learns and Organizes

Although neither application (under Windows only) nor source is available, some ideas could be extracted.

Anyway, quite similar to my "good servant" concept.

In fact, there is an Open source project : SPARK (the SRI Procedural Agent Realization Kit )

Spark In A Nutshell

The tones project

They have lots of tools:

http://www.tonesproject.org/index.php?option=com_wrapper&Itemid=84

For me, the most interesting seems:

The Ontology Modularization tool implemented an algorithm for extracting modules from OWL ontologies.

They also have an ontology repository (integrated in Protégé 4):

http://owl.cs.manchester.ac.uk/repository/browser

OWL 2

http://www.w3.org/2007/OWL/wiki/New_Features_and_Rationale

For OWL 1, here is a clean implementation by Jos de Roo in the Euler project :

http://eulersharp.svn.sf.net/viewvc/eulersharp/trunk/2003/03swap/eye-owl2.html

Each OWL feature is implemented in a separated file, generally with a single N3 implication. This allows to add to the rule base just the needed features. This makes for cleaner and more efficient rule bases.

In Déduction form generation I should remove rpo.n3 and use these N3 rules.

2009-07-03

Drools N3 engine

What

I attack to something I left out for months:

Duplicated triples with Drools engine

cf http://eulergui.wiki.sourceforge.net/page/edit/A + D% C3% A9duction + and + + EulerGUI Blog? token = 27a713ef5247da534b80e1321b9165e4

and it's annoying to write the output on the fly ...

To add a condition in the generated Drools code, I must have treated all the triples in the consequence, and is not convenient with my event based API.

Basically I must assert the consequence only if that if it is not already true.

It will be better, but not yet perfect.

How

Pave the way by slitting the output in 4 string buffers.

2009-07-01

ftp://releases.mozilla.org/ubuntu/dists/jaunty/

http://www.xbrl.org/ XBRL stands for eXtensible Business Reporting Language.

http://jade.tilab.com/

http://fr.wikipedia.org/wiki/Système_multi-agents

http://en.wikipedia.org/wiki/Multi-agent_system

Thanks to Chris. Muller for this :

http://vikashazrati.wordpress.com/2008/01/06/do-you-follow-agile-you-are-fired/

2009-06-29

http://www.defeasible.org/ruleml2009/who

The Sourcerer project

I'm not the only one thinking about largescale software reuse! ( see Intelligent Modularity in my Déductions project ) .

Cristina Videira Lopes, Professor at University of California, Irvine

http://sourcerer.ics.uci.edu/

Inference engine with database access

I just added this to the "Missing features" list in EulerGUI Manual:

- connect to Sesame database; this includes extracting the relevant triples from the database into the in-memory inference engines; both in EulerGUI and in the generated application.

But I realize that analysing a rule base to find a low volume extraction (from the most specific antecedents) from an RDF database is not an easy task.

A scenario both easy to implement, and that makes sense from a user point of view, is to add to the facts made available to the inference engine the result of a user SPARQL query from a SPARQL database. Here are the databases I selected:

2009-06-28

CommonKads course slides:

http://www.commonkads.uva.nl/INFO/course-slides/

Explanations on N3 + Java in Déductions generated applications

There are 2 way of translating the N3 result into Java :

  1. a batch simple translation of instantiations, property assignements, and method calls into JavaScript; this happens (in class Instantiator) after rules firing;
  2. a hook into the translation of N3 rules into Drools rules, by which this Java is executed during rules firing; this allows to manipulate the Working Memory (insert, retract)

Building Protégé from sources

Protégé 4:

http://www.cs.man.ac.uk/~iannonel/eclipseSetup/eclipseSetupMain.html

Web Protégé:

http://protegewiki.stanford.edu/index.php/WebProtegeDevelopersGuide

Failed trials:

Alas !!!!!

The binary for Linux is just for 386 architecture, not for 64bit AMD :( :

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/jmv/apps/gwt-linux-1.5.3/libswt-pi-gtk-3235.so: /home/jmv/apps/gwt-linux-1.5.3/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:301)
Could not find the main class: com.google.gwt.dev.GWTShell. Program will exit.

To get the right version for Protégé, I typed this:

svn checkout http://google-web-toolkit.googlecode.com/svn/releases/1.5/

Building GWT from svn source:

http://allahbaksh.blogspot.com/2009/02/building-gwt-from-svn-source.html

That was not the right way; in fact there is no 64 bits version for GWT ! The explaination:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/b166e320cd3b42b2/

Enf of Failed trials

In fact, instead of compiling the C and C++ for 64 bits, I need to use a 32 bits JVM :( .

I also need to copy the 3 files of the "metaproject" :

cp ~/apps/Protege_3.4.1/examples/server/* \
~/src/web-protege_trunk/tomcat/webapps/ROOT/projects/metaproject/

And then it works !!!!!!!!!

web_protege

Proposals for the Protégé team

Use RDF/turtle format instead of XML or Java properties files

Example: portlet definition file, project file (.pprj)

Leverage on semantics and rules for Java insfrastructure

In order to unify the GUI models for Protégé 4 Swing GUI and Protégé 3 Web, I should come with an architecture based on rules and a unified model for Swing and GWT (Google Web Toolkit), including the callbacks.

This would :

  1. ease the unification of Protégé 3 and 4
  2. create a larger common code base for Protégé Swing GUI and Protégé Web, by leveraging the similarity of concepts
  3. move towards ontology based software design

To ease the porting of Protégé 3 plugins to Protégé 4, maybe also an ontology based approach could be appropriate.

Compare Euler Eye engine and Drools N3

Local files project:

between 192 and 240

drools compile Time: 4034 ms; fireAllRules: 132 ms

deductions/n3/test_person.n3p

100% Web project:

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/examples/deductions_person.n3p

drools compile Time: 1311 ms; fireAllRules: 99 ms

networking 120 msec

reasoning 280 msec

networking 116 msec

reasoning 252 msec

drools compile Time: 3558 ms; fireAllRules: 257 ms

drools compile Time: 1243 ms; fireAllRules: 74 ms

drools compile Time: 3742 ms; fireAllRules: 121 ms

2009-06-27

sudo dpkg --install amaya_wx-11.2-pre4-1_amd64.deb

TODO Déduction form generation new architecture

Trying Sindice

Sindice is a nice Semantic Web search engine. It is different from Swoogle in that it searches and shows fact triples, not ontology documents. There is a nice "advanced" query where one can enter e.g.:

* <http://www.w3.org/2006/vcard/ns#title> 'research'

Back from Protégé conference 2009 in Amsterdam

I learned much new stuff:

Met many people nice people:

2009-06-21

UML Textual (UMLT)

Working with Luc on UMLT input in EulerGUI.

2009-06-20

I should take time to read Adam Pease's publications:

http://www.adampease.org/professional/

Tried opencalais

This web interface, from a NL sentence, marks it with RDF statements for the words it recognized.

http://viewer.opencalais.com/

Mostly Proper Nouns are recognized.

This can be complementary to Attempto.

Open Mind Common Sense

If I had time, I'd make an account and play with Open Mind Common Sense :

http://openmind.media.mit.edu/

2009-06-18

Readings about logic

While preparing today's seminar, I read about logic:

http://en.wikipedia.org/wiki/Decidability_%28logic%29

http://en.wikipedia.org/wiki/Signature_%28logic%29

http://en.wikipedia.org/wiki/Type_theory

Mathematical logic for computer science by Mordechai Ben-Ari

2009-06-17

Déductions app. generator: calling user Java code

Updated

http://deductions.svn.sourceforge.net/viewvc/deductions/html/unification.html

added "Calling user Java code"

2009-06-16

http://developers.sun.com/learning/javaoneonline/j1online.jsp?track=javase&yr=2009

Ontology links

Recovered excellent presentation by Adam Pease "tutorial - Introduction to Ontology / SUMO"

http://ontolog.cim3.net/cgi-bin/wiki.pl?Tutorial_2003-05-29

(there is also an Audio Stream).

http://www.semantic-conference.com/

2009-06-13

http://www.ow2.org/

The OW2 Consortium is an open source community committed to making available to everyone the best and most reliable middleware technology.

http://www.shirky.com/writings/ontology_overrated.html

Ontology is Overrated: Categories, Links, and Tags

http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTab

http://protege.cim3.net/file/pub/files/SWRL/SWRLTalkProtegeShortCourse2006.pdf

http://t37.net/le-dernier-sprint-meeting-dhitler-chef-de-produits-agile.html

http://semtech2009.com/session/1660/

A Programmer's Introduction to Pellet: How to Build Ontology-based Semantic Applications

Evren Sirin

2009-06-12

I met a software company who does about the same stuff than I do.

They use SWRL.

The International Association for Ontology and its Applications

http://www.iaoa.org/index.html

2009-06-10

Twitter message

my seminar on software engineering, rules, and ontologies, Paris 19:00,

http://jmvanel.free.fr/seminaires/seminaires_gratuits.html

Was:

Working on my next seminar on software engineering rules engines, and ontologies.

2009-06-08

Trying Protégé 4.0.111 with an N3 file

I didn't realize that Protégé is accepting N3 files ( I kept converting my files to RDF using CWM ).

Now downloading build 122 "release candidate".

Déductions: mixing languages in rules

In N3 rules, it should be possible to add Java or Drools code on the RHS.

This would be a good feature to reassure new users, although in general mixing languages is a bad thing.

e-commerce demo.

Search Swoogle for

commerce order item category

Open this in Protégé:

http://rhizomik.net/ontologies/2005/07/FrameNet_1.1.owl

Obviously this OWL file is not suitable.

Here is a useful resource :

http://www-ksl.stanford.edu/projects/DAML/UNSPSC.daml

My first FOAF description

I rapidly created my first FOAF description jmv.rdf with foaf-a-matic by Leigh Dodds.

Seen by RDF Explorer, here is my FOAF:

http://xml.mfd-consult.dk/foaf/explorer/?foaf=http%3A%2F%2Fjmvanel.free.fr%2Fjmv.rdf

Also I registered it here :

http://swordfish.rdfweb.org/rweb/who?mbox=mailto:timbl@w3.org

http://swordfish.rdfweb.org/rweb/who?mbox=mailto:jeanmarc.vanel@gmail.com

2009-06-04

The 6th Annual European Semantic Web Conference (ESWC2009)

SMILA - SeMantic Information Logistics Architecture (eclipse)

Knowledge_Interchange_Format (KIF)

Déductions: testing new generated GUI

Work in progress on testing new generated GUI ( error corrected in rdf:type )

Now we get at real Drools problem:

org.drools.runtime.rule.ConsequenceException: org.drools.FactException:

Retract error: handle not found for object:

<http://test#id1> <http://jmvanel.free.fr/ontology/examples/person#name> "Lennon" .

. Is it in the working memory?

3.3.7.1. Sequential Mode

I'm using a rule base with AssertBehaviour.EQUALITY .

I want to retract an object in the RHS.

I don't have a handle, but I have an object that is equal() to the one I want to retract.

How can I do ?

sotty on the IRC tried this :

rule "TestEquality" 
when
Double(this == 37.0)
then
System.out.println("I am here");
Double d = new Double(37.0);
Object handle = drools.getWorkingMemory().getFactHandle(d);
System.out.println(""+handle);
end

2009-06-02

Sound is silent on Ubuntu

The remedy is here

http://ubuntuforums.org/showthread.php?p=2742327

It was necessary to do :

lsof | grep pcm
# stop evince and amarok
sudo /etc/init.d/alsa-utils restart

2009-06-01

CouchDB

Open Futon and browse your Couchdb database: [WWW] http://localhost:5984/_utils/

Read more about Futon in Getting started with Futon.

Testing EulerGUI with WordNet hyponyms

#ENDS 146317 msec

Idea: Using Déduction Forms for creating a Déduction application

Software categories

Where can I download the "Trove" Sourceforge Software classification?

Is there any standard way (namespace, mapping of concepts, ...) of using the WordNet database in RDF statements?

2009-05-27

Testing APE (ACE, Attempto)

With the command line

I first tried the raw sentence:

./ape.exe -solo paraphrase -guess -text "A card is a means of payment ."
There is a card X1.
The card X1 is a n:means of p:payment .

Ones sees that this is wrongly understood, as p: stands for proper noun. Adding

% ./ape.exe -solo paraphrase -guess -text "A card is a means of a payment ."
There is a card X1.
The card X1 is a n:means of a n:payment .

% ./ape.exe -solo paraphrase -guess -text "Every card is a means of a payment ."
If there is a card X1 then the card X1 is a n:means of a n:payment .

Alas for OWL translation, "Adjectives not supported", for example in:

./ape.exe -cowlfsspp -guess -text 'A customer is trusted .'

With the Web client

Open this page: http://attempto.ifi.uzh.ch/ape/

If you push "show menu" and activate "OWL FSS" , from this :

p:EulerGUI is an n:IDE.

you get:

Ontology(
http://attempto.ifi.uzh.ch/ontologies/owlswrl/test
ClassAssertion(
Class(:IDE)
Individual(:EulerGUI)
)
)

From this pages you have many examples to paste: ACE in a Nutshell

Oslo

Microsoft modeling strategy: Work in progress

http://searchsoa.techtarget.com/news/article/0,289142,sid26_gci1333523,00.html

Conferences

http://protege.stanford.edu/conference/2009/index.html

http://is.tm.tue.nl/staff/pvgorp/events/grabats2009/

http://jazoon.com/ - Jazoon – Where Java People Meet

rmll.info

IWOCE2009 - Open Component Ecosystems

Making invitations for his seminars in Paris

http://jmvanel.free.fr/seminaires/seminaires_gratuits.htm

http://groups.google.com/group/fr.comp.lang.java/browse_thread/thread/20505a1176840415#

http://groups.google.com/group/fr.comp.ia/browse_thread/thread/259a7af4b2859632#

http://groups.google.com/group/fr.comp.developpement/browse_thread/thread/e925d96419372249#

Changing status on LinkedIn

is making invitations for his seminars in Paris on ontologybased development

http://jmvanel.free.fr/seminaires/seminaires_gratuits.html

Was:

Jean-Marc is seeking what business can be done with his Semantic Web + rule based programming techniques

2009-05-24

Misc. links

http://semantic-conference.com/2008/ataglance/index.html

sat4j.org

the Sesame backend for Protege: http://protege.stanford.edu/plugins/rdfs-db/ (old stuff)

http://www.nabble.com/SPARQL-queries-and-Protege-4--td20109202.html

http://www.cs.man.ac.uk/~iannonel/oppl/documentation.html OWL transform

http://blip.tv/file/1949416/ Drop ACID and think about data Bob Ippolito - Pycon 2009

BASE, BigTable, Dynamo(), Cassandra, Tokyo Cabinet, Redis, CacheDB, MongoDB(C++), MonetDB(bad), LucidDB(?), Vertica(C Store), FastBit, Bloom Filter,

graph databases ?

Guice dependency injection

Reading

http://code.google.com/docreader/#p=google-guice&s=google-guice&t=Motivation

Updated EulerGUI summary and categories

https://sourceforge.net/project/admin/group_trove.php

Compare modelization OWL UML

Lots of interesting stuff with these search words, including my home page :) .

http://www.google.fr/search?q=compare+modelization+OWL+UML&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a

2009-05-23

Tidying HTML

I used some HTML generator for images, and the HTML was not correct, so used the good old tidy :

tidy -asxhtml index.html > index.html

Note that jtidy did installed in Ubuntu didn't work.

2009-05-21

Uploading stuff to Maven central repository

At last I found how to do it:

http://maven.apache.org/project-faq.html

http://maven.apache.org/guides/mini/guide-central-repository-upload.html

2009-05-20

Setting time on Ubuntu wth ntpdate

ntpdate definitely needs an argument:

sudo ntpdate ntp.ubuntu.com

Registered for EulerGUI to be here :

http://java-source.net/open-source/rss-rdf-tools

EulerGUI is already present here:

http://esw.w3.org/topic/ConverterToRdf

and in numerous mailing lists and newsgroups.

Misc. links

http://www.kwoksys.com/wiki/index.php?title=Software_Module

Yahoo! Semantic Web in Production

David Beckett - Technical Yahoo

http://www.dajobe.org/talks/200805-semtech/Yahoo%20Semantic%20Web%20in%20Production.pdf

PHP rules: http://www.swindle.net/rules/ - http://www.billbreitmayer.com/drupal/node/155

2009-05-19

RDF databases and applications built on them

It's interesting that Amabra / Topaz uses Trac for its bugs management !

Sesame, Mulgara, Redland, ...

Groupware

http://java-source.net/open-source/groupware

Language Comment
libresource

Java
PHPGroupware PHP

Bug tracking systems

http://java-source.net/open-source/issue-trackers

Language Comment

Trac

Python looks good, many features and users

codendi

? supposedly Open Source, but looks like a closedsource software

redmine

Ruby Written using Ruby on Rails framework; no task management and doc. management
mantis PHP bugs only, but adding plugins is possible
bugzilla PHP extensive search capabilities; not very ergonomic, no tasks

flyspray

PHP apparently no documentation
scarab Java from the same forge as ArgoUML

2009-05-14

Group comp . lang . java . programmer

announce: EulerGUI 1.1

2009-05-12

Oracle bought Sun and Java:

http://www.oracle.com/us/corporate/press/018363

Input file for EulerGUI

It would not difficult to to write a rule set to populate the current class Project from a N3 document.: instantiate Project, instantiate the sources Map<String, N3Source>, add the URI to N3Source, etc.

A new file extension is needed, to avoid the confusion witth ordinary N3 sources. Or maybe just *.project.n3 .

Déductions: reflexions on multi-platform generation

Currently we have :

Model+App.Spec.--> Conceptual GUI--> Swing GUI --> instantiation

We want to migrate to:

Model+App.Spec. --> Conceptual GUI--> Detailed Abstract GUI--> Swing GUI --> instantiation

This may add an exessive CPU time. There should be a way to "compile" the rule base given that we are not interested in intermediary results, but just by final Java objects.

Anyway, what we will have is many correspondences like:

agui:Panel ---> java:JPanel

For one-to-one correspondences like this, there can be declarations like:

agui:Panel aj:correspondence java:JPanel .

plus a rule at instance level:

{ ?ABSTRACT_CLASS aj:correspondence ?JAVA_CLASS .
?ABSTRACT_INSTANCE a ?ABSTRACT_CLASS .
} => {
?JAVA_INSTANCE a ?JAVA_CLASS .
# keep track of the translation for further rules:
?ABSTRACT_INSTANCE aj:translation ?JAVA_INSTANCE .
} .

and similar rules at instance level for properties of the translated objects:

{ ?ABSTRACT_PROPERTY aj:property_correspondence ?JAVA_PROPERTY .
?ABSTRACT_INSTANCE ?ABSTRACT_PROPERTY ?VALUE .
?ABSTRACT_PROPERTY a owl:DatatypeProperty .

?ABSTRACT_INSTANCE aj:translation ?JAVA_INSTANCE .
} => {
?JAVA_INSTANCE ?JAVA_PROPERTY ?VALUE .
} .

{ ?ABSTRACT_PROPERTY aj:property_correspondence ?JAVA_PROPERTY .
?ABSTRACT_INSTANCE ?ABSTRACT_PROPERTY ?ABSTRACT_VALUE .
?ABSTRACT_PROPERTY a owl:ObjectProperty .

?ABSTRACT_INSTANCE aj:translation ?JAVA_INSTANCE .
?ABSTRACT_VALUE aj:translation ?JAVA_VALUE .
} => {
?JAVA_INSTANCE ?JAVA_PROPERTY ?JAVA_VALUE .
} .

Lots of rules for a one-to-one correspondence ! An alternative is to just reuse the existing objects, and simply annotate them as Java objects.

A rule at instance level:

{ ?ABSTRACT_CLASS aj:correspondence ?JAVA_CLASS .
?ABSTRACT_INSTANCE a ?ABSTRACT_CLASS .
} => {
?ABSTRACT_INSTANCE a ?JAVA_CLASS .
} .

Similar rules at instance level for properties of the translated objects; they are also simpler:

{ ?ABSTRACT_PROPERTY aj:property_correspondence ?JAVA_PROPERTY .
?ABSTRACT_INSTANCE ?ABSTRACT_PROPERTY ?VALUE .
} => {
?ABSTRACT_INSTANCE ?JAVA_PROPERTY ?VALUE .
} .

2009-05-08

http://www.student.dtu.dk/~s042078/magicrescue/manpage.html

Tasks

TODO

2009-05-05

Challenges

RuleML Challenge

http://www.defeasible.org/ruleml2009/cfp.txt

2009-05-04

Former LinkeIn header:

Jean-Marc extends the Deductions frameworks for GUI generation to inheritance and adding pointers to a selection of objects.

2009-05-03

I should add my projects to http://swik.net/

GATE summer school 2009 July 20th - 31st 2009 - University of Sheffield http://www.gate.ac.uk/conferences/fig09/

Deductions

Command-line User Interface

I think about doing a command-line User Interface (CL-UI) generator alongside the GUI generator. This will generalize the design, and make it easier to record user actions and explore intelligent behaviors.

Design GUI - KB architecture

After writing "Summary for AI researchers", and exchanging mails with David Holz, I'm ready to design the exchanges between GUI and KB . There are 2 issues:

  1. do as much as possible in rules, avoiding ad-hoc Java code
  2. subscribe to events in a generic way on a whole component tree or application, much like Abbot does
  3. manage the heterogeous content of the KB: the user data + current GUI objects

Point 2 is not a problem, although there may be ways more elegant than others.

The Java Swing architecture hopefully allows to catch events in a generic way. I should ask to the Abbot list.

Point 3 is more architectural and difficult for me.

I want the KB (Knowledge Base) to be dynamic and persistent, it's not only one inference pass and goodbye. It is necessary to infer a GUI, which is dynamic.

One question is "how to manage the correspondance between real GUI objects and their counterpart in the KB" ? But I'm not sure whether I really need to manage the correspondance. Should I need that, the current instantiation architecture involving JavaScript variables whose name is the N3 Id makes the bidirectional correspondance. However the instantiation architecture involving JavaScript has one inconvenient; the variables are here forever when not explicitely disallocated. This can entail memory consumption; but readjusting the starting number for creating Id's will overwrite some of them.

The user data, on the other hand, lives only in the KB. I added 2 primitives in N3 to remove and update a triple.

Currently I only use the inference engine to generate forms (at runtime), but the actions after user events to update the KB are done in Java, but now that I can create a form from specification in milliseconds, I'll do as much as I can in rules. Currently, for each user actions involving creation of new GUI items, I hack a fresh Working Memory with the permanent facts + the user data but no GUI items at all. The Java objects and field assignments are done in a single batch just after rules firing.

Proposed change: dynamic KB

Currently the relation between the KB and generated GUI objects is "fire and forget". To enable inferences on the GUI objects we want to keep the same KB for the whole user session.

The user events considered are classical: Statements such as :
 ?X :createFormFromResource ?RESOURCE
will trigger the whole form generation inference for the given resource (see form-rules.n3) . And if this statement is retracted, the whole object graph representing the form in the KB is also removed. Since it started from a given Resource Id, no other GUI objects will be removed.

PENDING: It would be nice if the KB could work directly on the real GUI objects. It should be possible since, after all, the KB is also in Java. A possibility is make hybrid obects implementing Triple and subclassing the Swing classes.

Migration path

A variant of the GUIHelper class, deductions.runtime.GUIKBAdapter, will forward the relevant events to the KB. This can be done via introspection. There will be no decisions made in this Java code, just verbatim forwarding of the event properties. Related to the event forwarding, the enhancement is that now the binding of the event actions is not done in Java code, but through rules. A variant could be to use an event recorder like Abbot. Anyway the event actions will be GUIKBAdapter , so the loop is closed. For the 4 user events considered the rules in the KB will do the job (from a user p.o.v.) : Three other packages will be created: As new packages are used, a branch in Subversion is not needed for EulerGUI. However for Déductions ( the N3 models and rules ), due to numerous hyperlinks existing, a branch and a tag in Subversion is needed, or a new directory like n3/gui .

Tests

The class deductions.runtime.GUIKBAdapter is really stupid. However, one can test the correct translation of Java GUI events to a list of N3 statements.

The main thing is testing the rules in the KB for the 4 user events considered. This can be done (bypassing GUIKBAdapter) by adding statements to the KB corresponding to the user events, firing rules, and checking the KB.

The Java instantiator must also be tested for:

Finally, the N3 Drools engine needs more testing, notably the implementation of the CWM and Euler builtins.

2009-05-02

Trying the music in command line:

http://wiki.xmms2.xmms.se/wiki/Using_the_application

2009-04-30

http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&discussionID=3015442&gid=134407&trk=EML_anet_qa_ttle-cDhOon0JumNFomgJt7dBpSBA

http://www.w3.org/TR/rdf-sparql-protocol/#intro

http://cmap.ihmc.us/conceptmap.html

http://www.cs.waikato.ac.nz/~ml/weka/index.html

http://www.gate.ac.uk/conferences/fig09/

http://www.lemonde.fr/technologies/article/2009/04/24/l-internet-des-objets-n-est-pas-celui-que-vous-croyez_1185201_651865.html#ens_id=1150782

http://swig.xmlhack.com/

http://esw.w3.org/topic/FrontPage

http://www.xml.com/pub/a/2004/09/01/tr.html Converting XML to RDF

Ask to be added here : http://planetrdf.com/guide/

2009-04-29

Add EulerGUI in :

http://esw.w3.org/topic/ConverterToRdf : UML, eCore

Semantic Web Authoring Tools

Dave Beckett's Resource Description Framework (RDF) Resource Guide : http://planetrdf.com/guide/

10-awesome-things-built-on-the-facebook-api

Details on the Jena parser:

http://www.java2s.com/Open-Source/Java-Document/RSS-RDF/Jena-2.5.5/CatalogJena-2.5.5.htm

( http://www.java2s.com/ is a interesting site )

2009-04-28

Problems with Maven release:perform

I have the impression that, after downloading to target/checkout/eulergui, for some reason it doesn't execute goal 'deploy' here .

[INFO] [release:perform]                                                       
[INFO] Checking out the project to perform the release ...
[INFO] Executing: svn --non-interactive checkout https://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.1 checkout
[INFO] Working directory: /home/jmv/src/eulergui_test/eulergui/trunk/eulergui/target
[INFO] Executing goals 'deploy'...
[INFO] Executing: mvn deploy --no-plugin-updates -DperformRelease=true -f pom.xml
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [deploy]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one.

2009-04-27

Downloaded http://sourceforge.net/projects/weka/

Using Abbot on EulerGUI

http://abbot.sourceforge.net/doc/overview.shtml

2009-04-26

serach : "ergonomic UML editor"

UMLT == UML Textual

I wrote the first shot of a BNF grammar:

EulerGUI demo. : Facebook rules

This a nice way to show how rule based programming can be applied.

Also I'd like to create command-line User Interfaces.

Next thing on my plate, integrate Sesame or OWLIM as a storage back-end, with management of the working memory extracted from the RDF store.

EulerGUI release

2009-04-25

Sesame first steps

Reading about new Sesame 3.0 alpha1

http://www.devx.com/semantic/Article/40987

I started the 3.0 server, and the command-line console.

> connect http://localhost:8080/ .
Disconnecting from /tmp/sesame-5599
Connected to http://localhost:8080/

Then I used the 2.0 documentation about the console:

http://www.openrdf.org/doc/sesame2/users/ch07.html

Then I created a repository with RDFS and datatype inferencing :

> create native-rdfs-dt .
Please specify values for the following variables:
Repository ID [native-rdfs-dt]:
Title [Native store with RDF Schema and direct type inferencing]:
Triple indexes [spoc,posc]:
Repository created
> open native-rdfs-dt .
Opened repository 'native-rdfs-dt'
native-rdfs-dt> load http://spypixel.com/2006/tap/tap.xmlns.com/tap-food-schema.rdf .
Loading data...
Data has been added to the repository (1455 ms)

Now I can send SPARQL queries:

native-rdfs-dt> sparql
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?X WHERE {
?X rdfs:subClassOf <http://tap.xmlns.com/data/NutFood> . }
.
Evaluating query...
+-----------------------------------------------------------------------------+
| X |
+-----------------------------------------------------------------------------+
| <http://tap.xmlns.com/data/AlmondNut> |
| <http://tap.xmlns.com/data/NutFood> |
| <http://tap.xmlns.com/data/CashewNut> |
| <http://tap.xmlns.com/data/HazelnutNut> |
| <http://tap.xmlns.com/data/MacadamiaNut> |
| <http://tap.xmlns.com/data/PecanNut> |
| <http://tap.xmlns.com/data/WalnutNut> |
+-----------------------------------------------------------------------------+
7 result(s) (121 ms)

N3 rule to change a literal type ?

I'm writing a rule base to convert eclipse eCore models to OWL; this works much like RDFS to OWL and UML to OWL . In the test input file, I have this:

:id616991384 ecore:name "Book"^^ecore:EString .

In the rule, I'm matching this in the ancedent :

?ATTRIBUTE ecore:name ?NAME .

and I currently have this in the consequent:

?PROPERTY rdfs:label ?NAME .

but what I want is a plain N3 String , not an ecore:EString .

But I don't know how to do that in a rule .

aaai08 proceedings available !

http://www.aaai.org/Library/AAAI/aaai08contents.php

Trying OpenCyc OWL Web interface

http://sw.opencyc.org/

This page looks just like an Web page, but look at the page source: it's OWL !

http://sw.opencyc.org/2008/06/10/concept/en/Game

2009-04-09

Déductions

New use case

Beside generating from models, Déduction can bring rule-based programming to existing applications, by wrapping the Drools rule engine within Semantic Web languages. Many other use cases are envisioned, see below "vision".

Developers' training

Seminar " computer specialist "

Themes to add to current presentation: architecture.odp

2009-04-08

Trying Twinkle SPARQL GUI on DBPedia

Just download Twinkle , choose dbpedia.org in "Remote services" pulldown menu on the left, and paste the following SPARQL query :

PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?pname ?v
WHERE {
dbpedia:Buddy_Guy ?p ?v .
?p rdfs:label ?pname .
}

Note that CONSTRUCT queries seem to bring empty results.

Links:

http://jena.sourceforge.net/ARQ/Tutorial/

http://wiki.dbpedia.org/OnlineAccess?v=9ug

http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData

morla rdf

Tried to install Morla RDF, but that doesn't compile on KUbuntu :( . Sent a mail to the list.

2009-04-07

Integrate ACE (Attempto) in EulerGUI

It would not be difficult at all to integrate ACE in EulerGUI :

APE is available under the LGPL license, and it can also be used through a REST webservice. For example, an OWL ontology that corresponds to the ACE text

``Every man is a human.''

is given by the URL

http://attempto.ifi.uzh.ch/ws/ape/apews.perl?text=Every+man+is+a+human.&solo=owlrdf

More details here:

http://attempto.ifi.uzh.ch/site/docs/writing_owl_in_ace.html

Also:

AceWiki: A Natural and Expressive Semantic Wiki

Slides presented at TAO Industrial Workshop

The slides presented at our last TAO Industrial Workshop that took place at ATOS, Paris La Défense on the 27th of January 2009.

All the video demos will be soon available on the Tao project website : http://www.tao-project.eu and you will also be able to watch the presentations on the videolectures.net website.

2009-04-04

In RDF class membership (rdfs:type) is just another property .

Discussions on OO (Object Orientation) versus DL (Description Logics)

What are the advantages of ontologies over UML?

http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&gid=49970&discussionID=2211887&goback=.anh_49970

Public repository for reusable Object Oriented models ? (started by me)

http://groups.google.com/group/comp.object/browse_thread/thread/84e768f67fa3304d#

What are the advantages of ontologies over UML? ( on LinkedIn )

Resizable frames in JavaScript

Thanks to Pieter Van Gorp, I rediscovered the pUML list:

http://www.cs.york.ac.uk/puml

Model Driven Engineering on http://planet-mde.org

Added new mailing list for Déductions

https://sourceforge.net/mailarchive/forum.php?forum_name=deductions-user

2009-04-01

Connect on SourceForge with ssh

ssh -t jmvanel,eulergui@shell.sourceforge.net create

2009-03-29

OWL definition in RDFS : http://www.w3.org/2002/07/owl

Testing RDFS to OWL conversion

Having the OWL properties plus the RDFS properties in the same KB apparently is the reason for infinite loops.

It's too much trouble to filter out the unwanted stuff; it's really time for implementing the N3 processor pipes.

2009-03-27

add rdfs_owl-rules.n3 for rdfs to owl conversion

(similar to UML to owl conversion),

plus a test project

Public repository for reusable models ?

By chance, is there a public repository for reusable Drools rulesets and models ?

By chance, is there a public repository for reusable eCore models ?

Published on news://comp.object

Is there a public repository for reusable Object Oriented odels ?

For years I couldn't find one.

I think one of the reasons for non-existence is lack of reusable exchange format.

XMI is pretty variable and poorly formalized.

UML is too complex, also unstable, and the strictly OO part (Class diagrams) is mixed with the rest of the huge 250 metaclasses metamodel.

eCore could be a good exchange format, but it's rather limited to the eclipse - Java world.

It seems that the best exchange format for business model is OWL - Web Ontology Language ( http://www.w3.org/2004/OWL/ ).

OWL has classes and properties . It has no methods and interfaces, but for that it is quite possible to reuse exactly the UML metamodel.

An advantage of OWL (and more generally Description Logics frameworks) is that a class defined by its properties (e.g. an UnemployedPerson is a Person that has no Job) provides a more natural way of modelizing a domain than classic OO, where you have to use delegation for the situation when a Person becomes UnemployedPerson.

And, contrary to classic OO models, there are sites for searching and hosting OWL and RDFS ontologies on the Web :

http://swoogle.umbc.edu/

http://olp.dfki.de/ontoselect

http://www.schemaweb.info/

But maybe there are projects and sites I'm not aware for OO models ?

2009-03-26

Searched:

owl rdfs models public repository

owl rdfs search engine

Working on the UML--OWL rules.

Maven extra sources and eclipse

the schema for Maven pom.xml

We have a projet ( http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/pom.xml ) using a parser generator , for which we have extra Java sources, not for building with the application.

We generate the eclipse configuration with Maven, but I found no way to specify these extra Java sources so that they appear in the eclipse configuration.

2009-03-24

When searching for "RDF OWL Drools", I saw Mark Protor's blog on declarative-relational-programming , also speaking of RDF :

http://blog.athico.com/2007/06/declarative-relational-programming.html

The Timeline Ontology

http://motools.sourceforge.net/timeline/timeline.html

Searching for a generic XMI parser

cf my post on news eclipse.tools.emf

My answer to Ed Merks:

Ed Merks wrote:

> Jean-Marc,

> Comments below.

> Jean-Marc Vanel wrote:

>> Hi all

>>

>> I have written a translator from XMI to N3 ( a variety of RDF):

>> http://eulergui.sourceforge.net/tmp/XMIToN3Converter.java

>>

>> This works ,I have written a generic traversal following EObject and

>> EClass objects. There remains still a problem. What I do is completely

>> generic, I use only the eCore API. But to read file UML (or another

>> specific data) I do not know if one can avoid a call like this :

>>

>> resourceSet.getPackageRegistry () .put ( UMLPackage.eNS_URI,

>> UMLPackage.eINSTANCE );

>> So I get a runtime dependency that I would like to avoid.

> When running in an OSGi environment, it's not necessary because the

> plugin.xml registrations do this for you.

Good to know, but currently I'm not .

...

>> In other words I need a EPackage able to instanciate for any URI. Or

>> another way to read an XMI ...

> I'm not sure if this option helps. In general, if you want to build an

> instance of a model, you really need the model to be registered. And

> some models need special resource implementations to handle them

> correctly, in which case those need to be registered as well.

If you saw my code, you would see that I'm traversing the UML model just like it were a plain eCore model (and by the way, I'm as much critic as you regarding UML, I heard you in Paris this winter).

So, what I'm asking is : is there a way to instantiate plain eCore objects from an XMI, disregarding the actual package ?

From what you answered I'm afraid that the answer is no, and that my use case was never considered.

Maybe it's enough to redefine this method in org.eclipse.emf.ecore.xmi.impl.XMLHandler :

protected EFactory getFactoryForPrefix(String prefix)

Before being independent like now, I spent 2 years building an EMF-like framework with generator in Java, generating C++. And I did exactly that, an XMI parser that instantiates plain vanilla MOF classes. But I doubt if can use my work for an OSS project.

2009-03-23

http://protege.stanford.edu/download/protege/4.0/zip/?C=N;O=D

http://en.wikipedia.org/wiki/List_of_UML_tools#Comparison_of_non-proprietary_UML_tools

Idea for rules applied to UML

detect all association cycles : they are suspect

Problems with Maven repo. for eclipse

http://www.nabble.com/working-around-eclipse-artifacts-in-repo-version-problems:-Couldn%27t-find-a-version-in--1.0.0-v20070606--to-match-range--1.0.0,2.0.0%29-td20054852.html

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Versions are old , e.g. :

https://maven.atlassian.com/browse/org.eclipse.emf.ecore/xmi/2.3.0-v200706262000

XMI to N3 translator

TODO

This does not give a uml:Property object; there is only a uml:ownedAttribute predicate :

  <packagedElement xmi:type="uml:Class" xmi:id="__I2CkBIREd6JhZv7DW6I_g" name="Employee">
<ownedAttribute xmi:id="_E1RuABcBEd6ZiIivjjsQHA" name="name" aggregation="composite"/>
</packagedElement>

generic emf factory for any URI

Sent to the EMF newsgroup:

http://www.eclipse.org/newsportal/article.php?id=40335&group=eclipse.tools.emf#40335

UML input integration in EulerGUI

Sent to the team:

I'm working on UML integration in EulerGUI , by using the EMF eclipse infrastructure.

Much like for RDF, the UML (or any XMI) is translated on the fly into N3.

It works already quite well, with also rules to translate UML expressed in N3 into OWL (in eulergui/examples ) .

The only point is jar dependencies; I want to avoid adding UML2 jars, and also eclipse stuff on Maven central depot is bugged.

So I'm asking you if it bothers you if I temporarily add the modifications in EulerGUI SVN .

It will not disturb your runs, it's just that you will have one class not compiling.

You might also want to add manually the necessary jars :

(after installing the corresponding eclipse plugins).

To avoid having a large release, I'm thinking of using Java Web Start (JNLP) , plus the Maven JNLP plugin :

http://mojo.codehaus.org/webstart/webstart-maven-plugin/jnlp-mojos-overview.html

Hopefully this would allow to download the auxiliary jars on demand, when the user starts using the feature.

An alternative is to use OSGi; but would OSGi reuse the Maven configuration ?

Searching Maven and OSGi bring several plugins , including this one :

http://docs.codehaus.org/display/M2ECLIPSE/Tycho+project+overview

2009-03-21

Eclipse Platform Technical Overview

UI designers : Untangle the knots, use EMF (live) models ! Olivier Moises - http://www.eclipsecon.org/2009/sessions?id=475

http://www.eclipsecon.org/2009/sessions?id=765

XMI to N3 Converter

Snapshot here:

http://eulergui.sourceforge.net/tmp/?C=M;O=D

The class XMIToN3Converter has a main .

ecore_raw.n3 is produced from a simple UML XMI file default.uml (produced by eclipse UML2 editor).

Then ecore_raw.n3 is simplifyed by the CWM utility to produce a more readable ecore.n3 .

The Converter is designed to process any XMI file .

EulerGUI Demo.

to add to Demo: show annotation of an existing resource that interacts existing rules: e.g. "good customer" => "send reward"

Reading and thinking on EMF

2009-03-20

Upgraded to

2009-03-19

http://dbtune.org/

http://sourceforge.net/mailarchive/forum.php?forum_name=yap-users&max_rows=25&style=nested&viewmonth=200903

Optimizing for recursive rules

http://groups.google.com/group/fuxi-discussion/browse_thread/thread/d0db3434cc0c5e17

To test regularly: http://www.rdflib.net/rdflib-2.4.0/test/n3/longString.rdf

Create Your Own IRC Channel

http://www.irchelp.org/irchelp/irctutorial.html#part3

I wait for an answer here:

http://groups.google.com/group/fuxi-discussion

Déduction architecture

I made an HTML page with the features, plan, and status from the N3 documents status.n3

and plan.n3. The (specific) N3 rules to generate the HTML are here: plan-rules.n3 .

Design Java - N3 mixin

This concerns feature "update2" :

update RDF database after user change: keep same features as :update, but do it as much as possible with rule techniques.

???????????

Tried Netbeans profiler on Parser4J ( NetBeans eclipse comparison BTW)

Eclipse's TPTP didn't want to start (Unable to connect to the Agent Controller - Connexion refused). So I installed NetBeans 6.5.1 . Good news is that NB imports easily eclipse projects (using same directory possibly), inclluding run configurations. Bad news is that NB imposes more structure to a project that eclipse:

  1. different source folder folder are compiled in the order specified
  2. as in Maven there is a distinction between test source and application source

Because of point 1 , I couldn't compile the tests, so I removed them from the project. This dependency enforcing feature can be a very good thing, but it should be possible to disactivate it, especially when importing eclipse projects.

The profiler works well ; here is the result for Parser4J . It is really like stairs with even steps, so there is nothing that draws particular attention.

2009-03-18

I'd like to have time to read Jan Wielemaker's PhD thesis, titled Logic programming for knowledge-intensive interactive applications .

Mixed paradigm architecture for Déductions updated

??????????????????????

Building IsaViz from sources (RDF editor)

This means that typically, to checkout the foo/bar CVS Module, you would run the following commands:

CVSROOT=:pserver:anonymous@dev.w3.org:/sources/public cvs login 

(then enter the password anonymous when prompted) and then

CVSROOT=:pserver:anonymous@dev.w3.org:/sources/public cvs checkout java/classes/org/w3c/IsaViz

Alas, the CVS version doesn't run.

2009-03-16

Installing eclipse 3.5 M6

http://www.polarion.org/index.php?page=download&project=subversive

2009-03-16

http://en.wikipedia.org/wiki/MapReduce

Development plan and status for Déductions updated

I updated the development plan and status in N3 :

http://deductions.svn.sourceforge.net/viewvc/deductions/project_management/plan.n3

http://deductions.svn.sourceforge.net/viewvc/deductions/project_management/status.n3

The top Priorities today are :

:search soft:topPriorityOnDate "2009-03-16" .
:export_application soft:topPriorityOnDate "2009-03-16" .
:update2 soft:topPriorityOnDate "2009-03-16" .
:update2 soft:verboseStatus """ maybe make use of action rules in :rdfdb2 """ .

:search a soft:Feature ;
rdfs:label """ Search instances of a class a la Google""".

:export_application a soft:Feature ;
rdfs:label """ export the generated application;
need to package a JavaScript launcher + the RDF database. """.

:update2 a soft:Feature ;
rdfs:label """ update RDF database after user change:
keep same features as :update, but do it as much as possible with
rule techniques """ ;
soft:writtenOnDate "2009-03-16" .

If that 's not clear enough, I'll do an HTML export of these two N3 files :) .

2009-03-15

http://eulersharp.svn.sourceforge.net/viewvc/eulersharp/trunk/2006/02swap/euler.yap?sortby=date&view=log

Lazy load of jars - Maven ?

I asked this on news://comp.lang.java.programmer :

Hi all

In addition to use Maven to manage dependencies and build my application (http://eulergui.sourceforge.net/), I would like to re-use the dependencies specified in the pom.xml to carry out a lazy loading of the jars in my application. That would make it possible to release my application with the most important dependencies in XXX-jar-with-dependencies.jar, and the application would download the dependences as needed, like Maven does.

I see at least 3 possibilities:

I think that I am not the only one to have this kind of needs.

I would like to avoid a big distribution with many jars, and a run.sh and a run.bat. Thus I would not like to develop myself this kind of infrastructure.

Michael Justin answered:

There is a Java(tm) Technology thingy called "Java Web Start".

http://en.wikipedia.org/wiki/Java_Web_Start

Thanks Michael; indeed it helps; I always thought that JNPL donwloaded a monolythic application, but that's not the case :

The JNLP file can list resources as "lazy", which informs the JNLPclient that the application does not need those resources to start,but can retrieve them later on when/if the application requests them.

JNPL also can manage update of the local cache.

And I found this project that looks good to generate JNPL settings from Maven :

http://mojo.codehaus.org/webstart/webstart-maven-plugin/

2009-03-14

http://mind.sourceforge.net/

http://jazoon.com/ - Jazoon – Where Java People Meet

Register by 15 April 2009 and get the 3-days-conference pass for EUR 1035 and save EUR 325.

jOWL, a SPARQL engine in JavaScript :

http://jowl.ontologyonline.org/SPARQL-DL.html

Déductions : debug inheritance in forms

After adding the necessary stuff in subform.n3:

# new <<<<<< extend "reachability" to sub-Classes
{ ?END_CLASS :isReachableFrom ?START_CLASS .
?SUBCLASS rdfs:subClassOf ?END_CLASS .
} => {
?SUBCLASS :isReachableFrom ?START_CLASS .
} .

I get this list of hasForm triples (OK) :

ns2:Project ns1:hasForm _:sk2.
xsd:string ns1:hasForm _:sk16.
os:URL ns1:hasForm _:sk18.
xsd:anyURI ns1:hasForm _:sk24.
os:File ns1:hasForm _:sk26.
os:NetWorkURL ns1:hasForm _:sk40.

Apart from my current problems ( the buttons for sub-classes don't show ) I should do this :

And I get this list of gui:inputWidgetSpecification (OK) :

_:sk4 ns1:inputWidgetSpecification ns2:eulerArguments.
_:sk5 ns1:inputWidgetSpecification ns2:cwmArguments.
_:sk6 ns1:inputWidgetSpecification ns2:N3query.
_:sk7 ns1:inputWidgetSpecification ns2:N3source.
_:sk19 ns1:inputWidgetSpecification os:uri.
_:sk27 ns1:inputWidgetSpecification os:uri.
_:sk41 ns1:inputWidgetSpecification os:uri.

I get a list of :hasField 7 triples : seems OK.

2009-03-13

Yesterday demo. and presentation of Déductions and EulerGUI in Versailles:

2009-03-12

Ideas for Euler GUI

Misc. : pres. on rule-based programming, Science Commons, etc

jmv> Hi ! Is there a presentation showing the advantages of rule-based programming , preferably for developers ?

<mic_hat> jmv: yes there is a funny one involving pirates, will see if I can find it

<mic_hat> jmv: http://www.jboss.org/community/docs/DOC-9157

Asked a question here :

http://www.cavdar.net/2008/09/13/5-tips-for-debugging-java-code-in-eclipse/

Search for deductive+database+open+source

Got this through my Google alert:

Science Commons, a division of Creative Commons, is incubating the adoption of semantic scientific publishing through creation of a robust database of ontologies (http://neurocommons.org) and development of supporting technical standards and code.

http://www.defeasible.org/ruleml2009/cfp.txt

Call for papers - RuleML 2009

3rd International Symposium on Rules, Applications and Interoperability

November 5-7 2009, Las Vegas, Nevada, USA

http://2009.ruleml.org/

http://www.readwriteweb.com/archives/demo_trend_the_smarter_web.php

what Xmarks is doing is very similar to what StumbleUpon's browser extension does too. : Evri, a semantic search engine

http://datao.sourceforge.net/index.html

http://hal.archives-ouvertes.fr/hal-00266448_v1/

CAD/CAPP Integration using Feature Ontology ( CAPP = computer-aided process planning )

drools+conseil+services+France

http://www.google.fr/search?q=drools+conseil+services+France&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

2009-03-11

drools-50-cr1 is out !

Tests with Drools engine + new N3 parser

Now passing:

deductions/n3/java_projection-test.n3p

2009-03-10

Déductions generated GUI

missing feature: set default values for properties

Integrating new N3 parser with Drools engine

Integrity Constraints

I come across a problem I avoided until now: integrity Constraints. This is what Euler EYE generates now:

[ e:falseModel true;
e:because [ e:integrityConstraint
{{<#eau> owl:disjointWith <#feu>.
<#eau_de_feu> a <#eau>.
<#eau_de_feu> a <#feu>} => false}

The test is (no need of a query ) :

{?Y owl:disjointWith ?Z. ?X a ?Y. ?X a ?Z} => false.

:eau owl:disjointWith :feu .
:eau_de_feu a :eau .
:eau_de_feu a :feu .

It will be easy to report something also with Drools, although not as compact as EYE, which does elegant variable substitution.

2009-03-09

Search on JUnit+parallel

Discussion with Pieter Van Gorp - grabats 2009

I am organizing a workshop which may be of your interest

see http://is.tm.tue.nl/staff/pvgorp/events/grabats2009/

at this moment in time, you are very welcome to propse a case study

later on, three case studies will be selected and all international groups working on model transformation are then invited to solve those case studies

so basically you could propose a case study for which you think you can very well illustrate the strengths of your approach

moi: sounds good !

Pieter: obviously, you should propose a well-balanced case study for any approach but you can always have some extension points that allow you to show off particular features :)

if you do participate in this initiative, it becomes part of my daily work to review your work at some point

moi: I feel that the interesting thing in my approach is that I'm not restricted to a technological family , although It's currently based on Web Semantics and Java . I want to interoperate with UML, eclipse EMF etc, SQL , and others . Because, I'm not a standard researcher, I ' am practionner who wants to offer useful stuff for many projects, and who wants to develop a business .

grabats2009 is a good event for me , even if I'm not in the competition .

Solution to last year's competition:

http://www.fots.ua.ac.be/events/grabats2008/solutions.html

2009-03-06

Ideas : JoaFip, EMF, JSR94

If JoaFip were compatible with EMF generated code (and it may well be), it could provide a non intrusive persistence solution for EMF .

I thought about using the JSR94 API for calling Drools, but in fact the N3 Drools engine itself could implement JSR94 .

But there are some bad opinions on JSR-94 :

Why-is-JSR-94-Java-Rule-Engine-API-ill-designed

LinkedIn current status

Changed the LinkedIn current task: What are you working on?

Jean-Marc writes a presentation on EulerGUI and Deductions frameworks for GUI generation. 3 days ago -

Jean-Marc extends the Deductions frameworks for GUI generation to inheritance and adding pointers to a selection of objects.

2009-03-05

Challenges of Deduction project: calling Java

The client visit yesterday was not successful, because I failed to show the benefits of rule - based programming , and the demo. was not convincing enough.

I want to propose them a partnership were I will develop features they need most, like outputting PHP, replacing XSLT producing SVG, or develop business rules ( they offer services for civil engineering management ). I think that the biggest challenge is to come with a way of augmenting the generated application with code in traditional languages so that :

  1. there is IDE help for developing this "augmentation code"
  2. regenerating the application from rules and specs will break as little as possible the "augmentation code"

The first idea that comes to mind is, following the "Intelligent Modularity" principle, is to modelize the (Java) interfaces for the "augmentation code". Thus point 1. is easily realized by eclipse, provided that java source for interfaces is generated. Point 2. can be realized by some checking coherence between the interfaces and the way they are called.

Who says interface also says "factory", so there can be a singleton factory à la Spring.

Another ingredient are extension points à la eclipse to add functionalities in well-defined places. For instance if one want to add action buttons in a context of a property, like the GRAPH and REMOVE buttons of EulerGUI, there will be an extension point for that . The generated interface for N3 property pref:MyProperty could be :

package pref;
interface MyPropertyExtension {
void run( MyType value );
boolean isSameThread();
}

Each button will implement this interface. The design environment will be responsible for generating on the fly such interfaces, plus the Java methods to navigate the object graph , probably following a JavaBeans pattern (to detail <<< ).

The runtime environment will take care of actually calling the extension classes.

The runtime environment will also accordingly generate the glue code to navigate the object graph . There must be also a way to update (CRUD) the Knowledge base, like there is today the ITripleStore interface.

These ideas are quite straightfoward. Is this the way to achieve a seamless integration on the OO and ontology paradigms ?

EulerGUI : Drools engine - findall

I need to implement this in Drools, described thus in log-rules.n3 :

e:findall a rdf:Property;
rdfs:comment """ builtin that (?SCOPE ?SPAN) e:findall (?SELECT ?WHERE ?ANSWER).
unifies ?ANSWER with a list that contains all the instantiations
of ?SELECT satisfying the ?WHERE clause in the ?SCOPE ?SPAN of all
asserted n3 formulae and their log:conclusion """;
rdfs:domain rdf:List;
rdfs:range rdf:List .

A typical use is (1) :

(?SCOPE 1) e:findall (
?SUBTYPE { ?SUBTYPE rdfs:subClassOf ?TYPE } ?SUBTYPES )

or this with an empty result imposed (2) , here to check non-existence of subclasses :

(?SCOPE 1) e:findall (
?SUBCLASS { ?SUBCLASS rdfs:subClassOf ?CLASS } () ) .

A Drools query is not suitable, since the result of findall must be reused at rules firing time.

Looking from the latest Drools doc., the construct

from collect 

seems appropriate.

rule "findall" when
$SUBTYPES : ArrayList()
from collect( Triple( predicate == "rdfs:subClassOf",
object == $TYPE ) )
# $SUBTYPE is in subject position, so to use $SUBTYPES on RHS
# in ?TYPE gui:subClasses ?SUBTYPES we can do:
then
for( Triple triple : $SUBTYPES ) {
String SUBTYPES_item = triple.getSubject();
insert( new Triple( $TYPE, "gui:subClasses", SUBTYPES_item ) );
}
end

This seems to compile in Drools !!!

Notes:

2009-03-04

Yesterday rehearsal for client visit this afternoon in Fontainebleau.

- new feature: refuse a modification when a rule is violated

Updated EulerGUI documentation :

Generated Swing applications, Generated Swing applications

Updated Deductions documentation:

mssing features

2009-03-02

http://www.journaldunet.com/contact/contact.shtml

EulerGUI Generated application

COMMITED: able to make a round-trip with user N3 file and see the modifications in the GUI after re-opening the file.

Tested for sub-forms; tested with

deductions/n3/test_person.n3p
deductions/n3/foaf.n3p

Test VNC - serveur Linux, client Windows UltraVNC

With Olivier Rossel

... the amount spent watching TV worldwide equals to creating 10.000 wikipedia projects each year...

J'ai ouvert des trucs sur ma box:

http://192.168.1.1/basic/fr/config_appli.htm : VNC, SSH

http://192.168.1.1/expert/fr/config_dmz.htm

Coché ceci sur la box : Configuration de la DMZ

Cette fonctionnalité vous permet de rendre un de vos PC accessible depuis Internet (pour des applications de type serveur Web ou FTP) tout en continuant de protéger les autres ordinateurs de votre réseau.

Lancer le serveur :

x11vnc -usepw

On n'a pas réussi à faire marcher SSH.

Docs:

http://www.generation-linux.fr/index.php?post/2008/06/20/121-prise-de-controle-d-un-poste-a-distance-avec-vnc

http://doc.ubuntu-fr.org/vnc

2009-03-01

Thought about application in domotics of the "comprehension without protocol" principle

Deductions: to do before wednesday demo.

EulerGUI: Current data binding partipating classes

This is ugly; will have to clean after wednesday demo.

2009-02-27

TO READ: jena sesame model

Deduction runtime: storage

TODO

2009-02-26

Did not find anything searching for "federation database open source java"

EulerGUI 1.0 announce on LinkedIn and Facebook; developed my social network; invited for a presentation on March 12th.

Yesterday conference at INRIA by Diego Cavanese.

TODO

2009-02-25

Reaching out onto the Web

log:semantics, log:includes, log:notIncludes and log:conclusion .

http://www.w3.org/2004/12/rules-ws/paper/94/

Experience with N3 rules - Tim Berners-Lee, Dan Connolly, Eric Prud'homeaux, Yosi Scharf

http://norman.walsh.name/2004/04/02/notinrdf

Not in RDF

http://dig.csail.mit.edu/2007/Talks/0110-rules2-tbl/#%281%29

2009-02-24

Proposal for a vocabulary for RDF projects for development tools

???????????? TODO

Announce of EulerGUI 1.0

Announce on news:comp.lang.java.announce

I am pleased to announce EulerGUI 1.0 , a development environment for Semantic Web technologies , written in Java , under LGPL licence .

It uses Drools as an engine for the N3 logic and rules

(http://www.w3.org/2000/10/swap/doc/Rules).

N3 is a language equivalent to Semantic Web's RDF language, but much easier to read and write by hand.

Moreover, N3 has, on top of RDF, an extension for rules, e.g. :

{ ?x parent ?y } => { ?y child ?x }.

N3 logic (http://www.w3.org/2000/10/swap/doc/Rules) .

Among many other vocabularies searchable on Swoogle search site (http://swoogle.umbc.edu/), there is OWL from W3C, (OWL Web Ontology Language) that allows to express in RDF, and thus in N3, rich models with classes, properties, inheritance and constraints.

So in summary, N3 is a user-friendly language allowing to express facts, class and properties, and rules.

So what does that bring for developers ?

One of the use cases :

- open any number of RDF / OWL / N3 documents

- test and debug the rules using 3 rule engines (Drools, Euler, CWM)

- export all that project as a set of Drools packages, plus the facts in XMLEncoder format

- export all project as for use with Yap Prolog engine

You can also use standard Semantic Web tools such as Protégé and Swoop to edit and visualize RDF and OWL files. EulerGUI is perfectly complementary to these tools:

- Protégé allows to classify and validate an OWL ontology via the classic algorithms of the Description Logic;

- EulerGUI makes it possible to develop a rule base in N3 logic, and to export it for a Drools runtime, or Prolog Yap

Download from

http://sourceforge.net/projects/eulergui/

Manual here:

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html

Enjoy !

Misc.

Trouble with SF.NET (Sourceforge) Download:

https://sourceforge.net/tracker/?func=browse&group_id=1&atid=200001

news://fr.comp.lang.java

(moderated) http://groups.google.com/group/comp.lang.java.announce/topics?gvc=2

Drools users list

CWM list - preceding announce on CWM public-cwm-talk list: EulerGUI - a light-weight N3 IDE - open source Date: Fri, 31 Oct 2008

Protégé, LinkedIn, FaceBook

AI groups ?

Ideas

2009-02-23

EulerGUI doc. COMMIT for release:

Problems with Maven release:prepare solved

On irc://irc.codehaus.org#maven

<jmv> I confess I have no experience with svn tagging with Subversion alone ...

* juven est parti (Ping timeout)

<jmv> I did svn mkdir tags/ , so that tags/ is at the same level as trunk/ .

<jmv> I don't if I should give the developerConnection and tagBase as local file: path or repository https: path .

<jmv> I don't know

<jmv> I got it !

<jmv> I understood the SVN message : "Local operations do not take a log message"

<jmv> So I tried specifying <developerConnection> and <tagBase> as https: URL's , not file: .

<jmv> And it worked !

<jmv> NOTE: several pages give bad examples of specifying <developerConnection> and <tagBase> as file: URL : e.g. http://maven.apache.org/guides/mini/guide-releasing.html

<jmv> Also the tags directory on the repository is not created automatically by mvn relase:prepare , and nothing in the doc. says it should be done manually before .

<stain_> hm... i thought it would do it for you

<jmv> Me too .

<jmv> I am probably one of the rare people trying to do it the Maven way before having done a single release tagging before .

<jmv> Ok ! BUILD SUCCESSFUL after mvn release:perform !

<jmv> I wonder if it's good practice to use http://MY_PROJECT.sourceforge.net/ as Maven depot ...

<jmv> I suppose that if I want a plain jar in addition to the jar-with-dependencies I have now, I just have to add :

<jmv> <descriptorRefs>

<jmv> <descriptorRef>jar</descriptorRef>

<jmv> </descriptorRefs>

<jmv> Well, it seems that I already have a plain jar here, without asking for it : http://eulergui.sourceforge.net/maven2/eulergui/eulergui/1.0-SNAPSHOT/

<jmv> However, it didn't upload the new release as eulergui-1.0 ; I guess I have to review my deploy specifcation ...

<jmv> I have another complaint : after regenerating my pom.xml upon release:prepare , it left it like this, and I'm afraid it will trigger the same problem next time :

<jmv> <developerConnection>scm:svn:file://PCIVENTIVE/home/jmv/src/eulergui_test/eulergui/trunk</developerConnection>

<handyande> jmv: prepare updates the pom, commits, branches and then updates the pom again

<handyande> so it should reference trunk before and after

<handyande> but it will create the tag for release:perform to use

<jmv> handyande, That's fine , it's just that I had problems with initial pom.xml having <developerConnection>scm:svn:file: , and it worked with initial pom.xml having <developerConnection>scm:svn:https:

2009-02-22

http://eulergui.wiki.sourceforge.net/

http://www.jboss.org/drools/sightings.html

http://www.blogger.com/home

Problems with maven-assembly-plugin + jar-with-dependencies

http://www.scribd.com/doc/238927/Better-Builds-With-Maven

http://docs.codehaus.org/display/MAVENUSER/MavenAndSourceforge

http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchmerge.tags

http://www.func.nl/community/knowledgebase/releases-maven

The first error was:

mvn release:prepare
...
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Cannot prepare the release because you have local modifications :
[eulergui-1.0-SNAPSHOT-jar-with-dependencies.jar:unknown]

The reason was simply that a copy of this jar was, for an unknown reason, at the project root (not in target).

The next error:

        [INFO] Checking in modified POMs...
[INFO] Executing: svn --non-interactive commit --file /tmp/maven-scm-1101252519.commit --targets /tmp/maven-scm-6245939798621326396-targets
[INFO] Working directory: /home/jmv/src/eulergui_test/eulergui/trunk/eulergui
[INFO] Tagging release with the label eulergui-1.0...
[INFO] Executing: svn --non-interactive copy --file /tmp/maven-scm-13056142.commit . file:/home/jmv/src/eulergui_test/eulergui/trunk/eulergui/tags/eulergui-1.0
[INFO] Working directory: /home/jmv/src/eulergui_test/eulergui/trunk/eulergui
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: Local, non-commit operations do not take a log message or revision properties

Added directory tags/ to enable release with Maven

2009-02-19

added GUIgenerator.html, a user manual for the Deduction GUI generator;

TODO : explain internal design

2009-02-18

Drools bug ?

As I mailed to Edson Tirelli, I'd like to know whether loading rules and facts in any order is allowed (before firing rules) . Of course I'm about to change the way I call Drools, but before that I'd like to know the status of this feature, is it a bug or is it forbiden.

DONE

- Drools N3 engine: insert together ALL the facts AFTER adding ALL the rules

This SOLVES ALL CURRENT PROBLEMS with bad results (NRI 2 works !)

2009-02-17

On the path to a Drools bug

I extracted from a larger model 2 rules. The problem is that the results from rule "0" should include all the results from rule "1" .

I claim this because:

  1. the facts include:
    Triple( subject   == "<http://java.sun.com/class#javax_swing_JPanel>",
    predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
    object == "<http://java.sun.com/class#ConcreteClass>" )
  2. so, according to Criteria C1 and C2 in rule "0", every Triple object whose predicate is rdf:type and object is java:javax_swing_JPanel should entail insertion in Working Memory of a corresponding TripleResult
  3. rule "1" was writen to debug things, and tests directly the same conditions as point 2, and asserts a TripleResult object including the original subject of the Triple on the LHS

Now, the issue is that in some test cases, large enough, there are results from rule "1" that are NOT included in the results from rule "0" .

The offending Triple item is here :

$ grep sk_JPANEL_FIELD_20 /tmp/result-34579.n3
_:sk_JPANEL_FORM_18 <http://java.sun.com/method#add> _:sk_JPANEL_FIELD_20 . #R
_:sk_JPANEL_FIELD_20 <http://jmvanel.free.fr/ontology/java_projection.owl#TEST_OK_KKKKKKKKKKKKKKKKKK> <http://java.sun.com/class#javax_swing_JPanel> . #R

There should be a Triple with :

_:sk_JPANEL_FIELD_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> .

I feel that the problem is related to the fact that criteria C1 and C2 are , in the particuliar case of the offending Triple item, the same object .

Note that I use AssertBehaviour.EQUALITY .


The above mentioned rules:

rule "query.n3 0"
when
Triple( $OBJECT : subject,
predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
$CLASS : object ) # C1
Triple( subject == $CLASS,
predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
object == "<http://java.sun.com/class#ConcreteClass>" ) # C2
Triple( subject == $OBJECT, $PROP : predicate, $VALUE : object ) # C3
then
Triple newTriple;
newTriple = new TripleResult( $OBJECT, $PROP, $VALUE ); insert( newTriple );
end

rule "query.n3 1"
when
Triple( $JPANEL : subject,
predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
object == "<http://java.sun.com/class#javax_swing_JPanel>" ) # C4
then
Triple newTriple;
newTriple = new
TripleResult( $JPANEL,
"<http://jmvanel.free.fr/ontology/java_projection.owl#TEST_OK_KKKKKKKKKKKKKKKKK>",
"<http://java.sun.com/class#javax_swing_JPanel>" );
insert( newTriple );
endd

2009-02-12

I tried to make these stupid NTP infrastructure work, for keeping the machine up-to-date, on Ubuntu. No way ! Then I simply did this, looking from my watch:

sudo date --set=16:30

I'd like to have time to read this Drools article "Sequential Rete".

Stateless Drools engine could be used embedded in end-user application.

Problem solved with Drools

I had to comment out the usage of findall, as it is not yet implemented in Drools translation ! And that was the main problem!

Now there are many such messages on NRI 2 (NRI with individuals removed), but the GUI looks good anyway :

java.lang.IllegalArgumentException: adding container's parent to itself

Even though recursive expansion is activated:

app:globalSettings app:expandForms true .

However NRI complete doesn't show anything, with lots of messages :

GUIHelper.addTitledBorder( sk_JPANEL_FORM_225_11_, "traitement>" ) ;
// javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "sk_JPANEL_FORM_225_11_" n'est pas défini

And on Purchase Order ( see Déductions - GUI generation : implement Property details ) there are no label before fields (regression ).

2009-02-11

Testing APE

http://attempto.ifi.uzh.ch/ape/

A car is a kind of vehicule.

This testing page was unreactive one time, but later it worked.

However a correct sentence is:

Every car is a vehicule.

Debug with Drools

Some advices from the IRC :)

But the Drools user mailing list doesn't seem to work well ...

<jmv_> Hi all ; I sent a mail on the user list "debugging generated Drools source code", if you want to chat here, I'm available ...

<krisv> jmv_: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html look at section 3.6.4 and 3.10 to get started

<jmv_> To better read the logs , I should better understand what is a tuple and the fact inside ...

<jmv_> That 's what's inside an event .

<pajac> krisv: thanks

<etirelli> jvm_: for your case, audit log is better... I don't think that looking at the generated code will have any value for you...

<jmv_> audit is something different from what I have with DefaultAgendaEventListener . afterActivationFired() ?

<krisv> jmv_: the audit viewer extracts the most useful information for you and shows it in a tree view

<jmv_> ok .

<jmv_> My rule run lives inside an application in a non-Drool project . Is that preventing me from using the audit view ?

<krisv> no, the log is an xml file, you just need to open that with the audit view

<jmv_> :)

Drools engine for N3 logic: Drools interrogations

After reordering results from Drools according to recency (probably useless), and correcting the Euler parser output (was introducing extra rules), I came to a more fundamental issue. To see that, I logged Drools events "After Activation Fired", and named rule by file name and number, e.g. rule=query.n3 0 .

The main query was this one :

{ ?OBJECT a ?CLASS .  # 1
?CLASS a java:ConcreteClass . # 2
?OBJECT ?PROP ?VALUE . # 3
} => {
?OBJECT ?PROP ?VALUE . # 4
} .

which is translated this way into Drools

rule "query.n3 0"
when
Triple( $OBJECT : subject, predicate ==
"<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
$CLASS : object ) # 1
Triple( subject == $CLASS, predicate ==
"<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
object == "<http://java.sun.com/class#ConcreteClass>" ) # 2
Triple( subject == $OBJECT, $PROP : predicate, $VALUE : object ) # 3
then
Triple newTriple =
new TripleResult( $OBJECT, $PROP, $VALUE ); insert( newTriple );
end

Now the point is that, starting from a statement such as :

:myPanel a java:javax_swing_JPanel .

it should unify with both #1 and #3 . This seems to be a problem with Drools, I need to clarify. As a workaround, I added this rule. It is clearly redundant with a logical engine, but with Drools I'm not sure. But in one case, it made things better (NRI reduced).

{
?OBJECT a ?CLASS .
?CLASS a java:ConcreteClass .
} => {
?OBJECT a ?CLASS .
} .

Now when I test a small case in isolation, it works, which means that Drools can accept a single instance.

rule "multi crit"
when
Plate( $NAME : name, type == "desert" )
Plate( name == $NAME, $TYPE : type )
then
System.out.println( $NAME + ", " + $TYPE );
end

So I'm puzzled, Drools seems OK, but my translation doesn't work on large cases.

Statistics: rule Count 57, around 100 objects.

At least my rules are not suspect! Because they work, although slowly, with the Euler Prolog engine. But the translation is suspect, and so is Drools ...

What is a systematic of debugging a rule base that doesn't trigger when expected ?

2009-02-08

Drools engine for N3 logic

This weed-end, I continued work on Drools engine for N3 logic.

I thought I needed to reorder results from Drools according to rule order and fact order, but there were other problems.

2009-02-07

Workshop on Controlled Natural Language (CNL) 2009

8–10 June 2009

Marettimo Island, Italy

I would like to attend that. It's free, but would I be admitted? Mmy stuff is quite remote from that now.

EulerGUI project

Drools engine for N3 logic

COMMITED

Drools N3 engine: implemented fn:substring-after, at least so that case "order request" works almost as with Euler engine.

For the big NRI test case now we have a few seconds before getting the GUI, instead of hundreds of seconds with Euler-EYE !

The remaining root problem for the big NRI test case now is still to respect original order of properties in OWL:

Use N3 format ( TODO )

Using Instanciator class, it would not be difficult to read an N3 project file and translate that into n3_project.Project file. But the reverse operation is not so obvious, when one wants to avoid ad-hoc code. Some way of converting a JavaBean into RDF is needed ...

2009-02-06

SQL humour

Astronomy : select * from *

Politics : select idiots from ambitious

Handicraft : create table from_precious_wood

Drools engine for N3 logic applied in "Déductions" GUI generation

Current situation

After some laborious work, I get something working with the Drools engine almost like the Euler-EYE engine. The Actions for text fields and buttons work, because the RDF list in Consequent is correctly implemented. The log:uri built-in is implemented, and the numeric comparison, at least in some call modes.

There is a Drools Working Memory that stores the end-user data, but it's not visible since there is no load / save in the end-user (generated) application.

Missing features and plan

What is missing for "Déductions" GUI generation:

TODO

After upgrading Drools to the level of Euler-EYE, the plan concerning features is still here; the plan concerning internal design and implementation is:

  1. rework the current JavaScript+Java instanciation code, maybe use Drools, as this is second order logic plus default processing, and N3 logic cannot do that;
  2. rework the current hand-made N3-->Drools translation code

There is a common theme in the 2 items above; instead of hand-made procedural code, we should use a declarative rule-based engine, just like in "Déductions" for GUI generation. Point 1 is important because this is the embryo of a multi-language, multi-platform tool. Point 2 is more complex because this is a bootstrap issue: a rule engine is needed to build a rule engine.

NOTE:

With the current Drools-N3 engine, there cannot be more than one value for a subject and a predicate. I don't think this is a severe limitation.

Redesign the JavaScript+Java instanciation code

The current class is Instanciator. When processing RDF triples, we want basically to say:

This looks pretty simple! But it takes 646 low-level Java lines, specialized for a specific naming convention in input, and JavaScript+Java object on output. We must be much more flexible in input and output.

What is an instantiation in most languages ? Well there 2 cases: typed languages and weakly- or non-typed. The ingredients are:

I think of using a RETE engine, but I don't like Drools' syntax. Think of the number of pages it takes to describes the stuff ! They are stuck in an old variable instantiation-variable use scheme. Compare that to the flexibility of Prolog! So I'd like to try another engine, and/or wrap the OO RETE features into an N3 or Prolog-like vocabulary or language.

I'm reading Hammurapi PDF manual. This is interesting, and contrary to Drools:

Hammurapi rules' knowledge base can be held in memory or in persistent storage.

The way Hammurapi expresses rules is interesting: in ordinary in Java language inside Rule.insert() methods. But it's not what I'm lloking for. Reading Hammurapi made me thing of using JSR94 API instead of plain Drools API.

2009-02-05

Drools

Found error in doc., extra parenthesis, line 899 in

drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Rule_Language/Section-Rule.xml

Person( age == ( girlAge + 2) ), sex == 'M' )

2009-02-04

Prolog SWI - Yap compatibility

I wanted to make a SWI compatible source from a Yap source, euler.yap, which is the implementation of Jos De Roo's Euler N3 logic inference engine.

First I replaced numbervars with number_vars everywhere, because this is a predefined predicate on SWI but not on Yap . Then these two conditional blocs do the trick:

:- expects_dialect(yap).
:- if( prolog_flag( dialect, swi )).
:- style_check( -atom ).
:- endif.

% ......

:- if( prolog_flag( dialect, yap )).
% these are not really needed on Yap, but it's more declarative :)
:- use_module(library(regexp)).
:- use_module(library(charsio)).
:- endif.

Now I have something that compiles on both SWI Prolog and Yap, and I can use the superb SWI Prolog IDE. For more complex problems, I advise to read this paragraph in SWI manual;

13.1 Some considerations for writing portable code

2009-02-03

Download SWI Prolog source from new server:

git://prolog.cs.vu.nl/home/pl/git/pl-57x.git

Debugging my rules for GUI construction

COMMITED:

n3/query.n3
n3/java_library.n3
n3/euler_project.xml.n3p
n3/test_order.n3p

And the result on NRI, with expandForms disactivated, and the comprehension limit raised to 600, is :

#ENDS 1542376 msec

euler_gui_nri

With expand sub Forms activated , there was no problems with cycles in the class-property graph, but the CPU time raises now to 1799 seconds!

Note that the form with expand sub Forms is just for demonstration purposes; it has no scroll bars and is larger than the screen.

#ENDS 1798532 msec

euler_gui_nri expand all forms

Further optimisation attempted

I tried yesterday's point 4, by adding this global settings that is false by default:

app:globalSettings app:justGenerateReachableClasses true .

I thought that the app:isReachableFrom relation is expensive to compute. Applying that "enhancement", we go from 7s to 116s on the "order request" case. The reason is probably that we can't eliminate the support classes when doing this:

{
?END_CLASS a owl:Class .
(?SCOPE 1) e:findall (
?X { app:globalSettings app:justGenerateReachableClasses ?X . } () ) .
} => {
?END_CLASS gui:hasForm ?FORM .
} .

2009-02-02

Debugging my rules for GUI construction

Still trying to run the nridb.n3 case. Jos added trace for reasonning steps.

I found some problems and got ideas, but not the root cause yet .

Tests

When watching the run with --debug, I saw that much time is spent on navigating the relation between class and property and the class hierarchy .

Computing the transitive javapr:contains relation , transitive closure of javam:add is useless , as this was added for testing purposes. It's the same for gui:contains . I don't don't why they get computed at all; I thought that the Euler-SEM algorithm was goal directed. Anyway this is probably not the root cause of the infinite loop, but removing the unused stuff may help to find the problem. In fact the CPU on test_person went from 20s to 15s by removing these 2 relations.

At one time I thought that a cyclic relation between class and property was the problem, like this. But this runs fine.

@prefix :        <http://nri.fr/ontologies#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

:toComplic_tec
a owl:ObjectProperty ;
rdfs:domain :seance ;
rdfs:range :complic_tec ;
owl:inverseOf :toSeance_9 .

:toSeance_9
a owl:InverseFunctionalProperty ;
rdfs:domain :complic_tec ;
rdfs:range :seance .

:complic_tec
a owl:Class .

:seance
a owl:Class .

Ideas and remedies

  1. remove the unused stuff (see above)
  2. use a Description Logic engine such as Pellet to compute the class hierarchy
  3. split the inference into 3 steps, storing an N3 file at each step:
    1. compute a "generic" GUI following gui_generic.n3 (high level, no explicit labels, text fields and buttons)
    2. compute a "convergence" GUI (low level, compatible with Swing, RCP, HTML, Qt: explicit labels, text fields and buttons)
    3. compute actual Swing GUI
  4. I made a recursion to generate form and sub-forms starting from the "edited Class", the starting point of the data managed by the application; it is not necessary; I can generate forms for any class, reached or not by the application
  5. also, I need to start using my Drools N3 engine in the generated application, as this is easy to package; it would manage business validation rules, and step 3 or more
  6. simplify query : see below

To implement point 3 (split the inference into steps), I need a way to query the intermediary results. The query used in current Déductions Project is expensive, as it uses inheritance on the set of Java classes used:

{ ?OBJECT a ?CLASS .
?CLASS rdfs:subClassOf java:java_lang_Object .
?OBJECT ?PROP ?VALUE .
} => {
?OBJECT a ?CLASS .
?OBJECT ?PROP ?VALUE .
} .

Another inconvenient is that we get several reponses

?OBJECT a ?CLASS .

for a single ?OBJECT, so we need to filter out the abstract classes manually in the N3 to Java translation, and also rely on these triples to come out of Euler in the right order.

There is a simpler way to query, for the intermediary or final results. Simply add a marker property meaning : "this object belongs to the results" . So the query would be :

{ ?OBJECT a :result .
?OBJECT ?PROP ?VALUE .
} => {
?OBJECT ?PROP ?VALUE .
} .

But this would change too many rules, this is better:

{ ?OBJECT a ?CLASS .
?CLASS a java:ConcreteClass .
?OBJECT ?PROP ?VALUE .
} => {
?OBJECT ?PROP ?VALUE .
} .

I can also make use of scoped computation of most Derived Classes for a given instance.

2009-02-01

Test OWL Inconsistent ontology

I have problem with the NRI SQL model that passed though RDBToOnto converter . The tool chain fails:

SQL ==> N3 ==> my rules for GUI construction with Euler ==> error(comprehension limit exceeded) ! :(

I try W3C's RDF validation service:

http://www.w3.org/RDF/Validator/

And WonderWeb project's OWL validator:

http://www.mygrid.org.uk/OWL/Validator

They say nothing special.

But Pellet (stand-alone or embedded in Protégé) says this:

~/apps/pellet-2.0.0-rc4% ./pellet.sh consistency ~/apps/RDBToOnto_1.2_beta/output/nridb.owl
1 févr. 2009 17:31:12 org.mindswap.pellet.KnowledgeBase consistency
ATTENTION: Inconsistent ontology. Reason: Plain literal "1" does not belong to datatype http://www.w3.org/2001/XMLSchema#int.
Literal value may be missing the rdf:datatype attribute.
Consistent: No
Reason: Plain literal "1" does not belong to datatype http://www.w3.org/2001/XMLSchema#int.
Literal value may be missing the rdf:datatype attribute.

Indeed the original SQL has INSERT INTO declarations, that translate in RDF without datatype indication, e.g. :

:complic_clin_3
a :complic_clin ;
:COMPLIC_CLIN_ID "3" ;
:complic_clin-EN "Intracerebral hematoma" ;
:complic_clin-ENABLED "1" ;
:complic_clin-FR "Hematome intracerabrale" .

Then I run again RDBToOnto converter, this time specifying no instance , and then Pellet says :

~/apps/pellet-2.0.0-rc4% ./pellet.sh consistency ~/apps/RDBToOnto_1.2_beta/output/nridb2.n3
Consistent: Yes

However Euler EYE still says:

** sem error(comprehension limit exceeded)
% YAP execution halted

So I go back to suspect my rules, or rather a combination of my rules plus this 16 classes, 32 objects and 59 data properties OWL model.

Debugging my rules for GUI construction

Jos pointed out that some rules were similar to :

:a :moreInterestingThan :z.
{?X :moreInterestingThan ?Y} =>
{?Y :moreInterestingThan ?Z}.

It must be some longer cyclic implications involving my rules, plus property domains and ranges, as there is no sub-classes at all.

I began to play with queries on the rules themselves, e.g. this rule detects the rules having a triple with property javapr:projection in the consequent :

{ ?SOMETHING => ?CONSEQUENT .
?CONSEQUENT log:includes { ?FORM javapr:projection ?JP . } .
}
=> { ?SOMETHING javapr:creates javapr:projection } .

But this would be difficult to detect vicious circle through such queries.

I could also by dichotomy remove rules until error dispappears. My best hope is to trace reasonning steps.

I wonder what exactly means :

[ e:counterModel true].

and how is it different from an empty answer.

2009-01-31

Tidy EulerGUI

Now that Luc Peuvrier is here, I need to tidy all I can :) !

2009-01-29

Déductions - GUI generation : popup frame for object properties

The trick is to use the forms computed at design time by Euler as prototypes that are cloned at run-time. The ObjectBehavior class maintains a correspondence Map between GUI Container and RDF Object Id , which allows to keep track of the instance edited by the GUI component, without modifying the latter.

This is quite fragile and roughly acceptable for demo. purposes; the right implementation will be to use Drools engine at run-time.

Also submited in Déductions:

Trying a large OWL with Déductions GUI generating rules

I took my former colleague Thomas Cenni's NRI-DB medical database . I passed it though RDBToOnto converter (a very nice tool BTW) , got a 2600 lines N3 - OWL file. Yap Prolog still runs now, after 360 minutes !

Converting my local N3 project (EulerGUI project) into a equivalent project referencing the SF.NET Subversion URL's :

1,$s=file:/home/jmv/src/deductions/n3/=http://deductions.svn.sourceforge.net/viewvc/deductions/n3/=

2009-01-28

Marc Godin is studying fishes :

Only dead fish swim with the stream.

Déductions - GUI generation : data binding

The Java components I create currently for forms are in fact prototype objects. A single form can be instanciated several times simultaneously, for multi-valued fields. They should not be shown inconditionally at startup time. Instead, when user clicks on a button for an Object Property, the forms are instanciated and embedded in current frame or in a popup window. In java Swing, a Component cannot be embeded in two different containers.

At runtime, a form or an input field instance is associated to an edited instance, which corresponds to a triple in RDF. But we are editing a specific instance of triple object in the triple store, and we are modifying it in place.

The simplest would be to have an inference engine at runtime. But we don't have one right now (and also infering a form every time a user clicks a "create" button might be too slow). So a flexible design is needed here.

Euler GUI

Euler GUI: prepare for next release: avoid installing Eluer: fallback: copy euler.yap and codd.properties from classpath to temporary files

http://cs.bath.ac.uk/~pb275/< wbr>CM20019/P/Prolog1.pdf

Orchestration of Ontologies and Rules
for Integration of the DoD Enterprise
http://www.med.univ-rennes1.< wbr>fr/~cgolb/Protege2005/dod.pdf
http://www.w3.org/2004/12/< wbr>rules-ws/paper/28/    (idem)

OWL: A Description Logic Based  Ontology Language
http://www.cs.man.ac.uk/~< wbr>horrocks/Slides/cisa06.ppt

ConceptNet 3: a Flexible, Multilingual Semantic Network for
Common Sense Knowledge

Handbook of Modal Logic
http://www.csc.liv.ac.uk/~< wbr>frank/MLHandbook/

Extensional reasoning
http://people.cs.uchicago.edu/< wbr>~thinrich/talks/er.ppt

Fundamentals of Deductive Program Synthesis
http://theory.stanford.edu/~< wbr>zm/papers/pap-fundamentals92.< wbr>ps.Z

Prolog Programming in Depth
http://web.ncf.ca/andre/< wbr>publications/PPID.pdf

SQL Databases are a Moving Target
http://www.w3.org/2007/03/< wbr>RdfRDB/talks/Sequeda_SQL_< wbr>Moving_Target.ppt
http://www.w3.org/2007/03/< wbr>RdfRDB/papers/sequeda.pdf

SPARQL and OWL:  How to Answer Conjunctive Queries with an Expressive
Ontology Language
http://www.comlab.ox.ac.uk/< wbr>birte.glimm/download/SWIG.ppt

http://www.reddit.com/r/< wbr>programming/comments/797pf/< wbr>building_expert_systems_in_< wbr>prolog_free_online_web/


% First Steps in Prolog

% Read the  rst pages of the online user-manual of Sicstus Prolog.
% Load the following Prolog program:
arc(a,b).
arc(a,c).
arc(b,d).
arc(c,d).
arc(d,e).
path(From,To):- arc(From,To).
path(From,To):- arc(From,Node), path(Node,To).
% Try at least the following goals and trace their execution:
path(a,c).
path(b,Y).
path(f,g).
% Exchange the order of the two clauses for path and try
% the above goals again. What changes?
% Exchange the two goal atoms in the body of the
% recursive clause for path. What changes?

2009-01-25

N3 block comment

A tip from Kos de Roo:

> - is there a multi-line N3 comment ? ( like /* */ )

What I sometimes do is

[ comment """
your_n3_to_be_skipped
""""].

2009-01-23

Déductions - development plan

I take the opportunity to write the development plan as an N3 document.

Development plan for Déductions as an N3 document.

Experimenting with e:findall in Euler

I realize that e:findall (which is a wrapper around the ISO Prolog predicate findall), doesn't work like this:

{ (?SCOPE 1) e:findall (
(?SUBTYPE) { ?SUBTYPE rdfs:subClassOf ?TYPE } () )
} => {
?TYPE gui:mostDerivedClass true
} .

The variable ?TYPE must be bound somehow for this to work (bug or feature?). For instance with gui_generic.n3 from the Déductions ontology I can add this in the antecedent :

  ?TYPE rdfs:subClassOf gui:Widget .

Then I get the expected solutions:

ns1:DatatypeInputWidget ns1:mostDerivedClass {}.
ns1:ObjectInputWidget ns1:mostDerivedClass {}.
ns1:Form ns1:mostDerivedClass {}.

I am surprised by the empty {}, but that is not a problem, I can replace true in the consequent with 1 .

Note that this result depends on rpo-rules.n3 .

Then I try another rule:

{ ?TYPE rdfs:subClassOf gui:Widget .
(?SCOPE 1) e:findall (
(?SUBTYPE) { ?SUBTYPE rdfs:subClassOf ?TYPE } (?SUBTYPES) )
} => {
?TYPE gui:subClasses ?SUBTYPES
} .

But here I get only one solution:

ns1:ContainerWidget ns1:subClasses (ns1:Form).

although I expect another solution :

ns1:InputWidget ns1:subClasses (ns1:DatatypeInputWidget ns1:ObjectInputWidget).

All this works the same with SEM Java and EYE.

Note that this is just an example. In the actual rules of the Déductions ontology I need to find the most derived classes of business (user) classes like purchaseorder.owl; the aim is to make GUI buttons to create instances of the most Derived Classes.

Jos' answer

Why not simply have

{ ?TYPE rdfs:subClassOf gui:Widget . # owl:Thing .
  (?SCOPE 1) e:findall (
  ?SUBTYPE { ?SUBTYPE rdfs:subClassOf ?TYPE } ?SUBTYPES )
} => {
  ?TYPE gui:subClasses ?SUBTYPES
} . 

Using (?SUBTYPES) for the resultset was enforcing that there should only be one result item.

Open an N3 ontology in Protégé 4

I find Protégé convenient for exploring and visualizing an ontology (but not for writing one, were I prefer to write N3 source). First, convert the N3 into RDF:

cwm gui_generic.n3 --rdf > /tmp/gui_generic.rdf

Note that this would be a convenient feature in EulerGUI: adding a button to export an N3 file as RDF. Then the resulting RDF file can be opened in Protégé:

gui_generic ontology in Protégé

2009-01-22

Euler suggestions

Wouldn't it be possible to create a special N3 predicate for debug trace printing that could be added in antecedent or consequent ? Something like :

e:trace "My message" (?OPTIONS).

where options could be empty or "print_all_variables", "print(?MY_VARIABLE)", etc . When empty, it could print a count of times called, and maybe some indication of the current state, like current CPU time, number of predicate called, etc.

In this line of thought , I'd like to have a note on how to debug N3 rule bases; I could write a first draft, and you could add stuff from your vast experience.

I reiterate my suggestion to use the variable name for new blank nodes' Id .

2009-01-21

Customer with existing Access application

I'll visit a customer friday, to enhance a knowledge keeping application based on Access. While thinking on ways to reuse existing VB code, I thought about the Mono project , that could run VB code on Open Software platforms. BTW Mono could be one of the back-end platforms for Déductions. I don't know enough of the Access VB dialect. Does it use standard portable API like ADO.NET ? Well, the answer is that it can use one or more of several API's that Microsoft did over the years : Microsoft Access Object Library, several flavors of DAO (Data Access Object), ADO.NET . See MS database API's, http://en.wikipedia.org/wiki/Visual_Basic_for_Applications

http://www.haslo.ch/blog/whats-wrong-with-vba-13/

2009-01-20

Found through nice Amarok pre-defined Radio fluxes: Radio: 1Club.FM - Blues Classics Channel 65k MP3 - http://78.129.227.106:8028

Déductions - GUI generation : work on subclasses

The specification is here : Manage inheritance :

If the Property type has any subclasses, only the most derived class(es) must be exposed to the user as explained in paragraph "Create or link". If not, the Property type itself is exposed to the user.

It used to work this way in java_projection-rules.n3 revision=23 :

{
javapr:thisApplication app:platform app:Java .
?W a gui:ObjectInputWidget .
?W gui:label ?LABEL .
?W gui:type ?TYPE .
?SUBTYPE rdfs:subClassOf ?TYPE .
?SUBTYPE rdf:label ?TYPE_NAME .
} => { ?W javapr:projection ?JP . ?JP a java:javax_swing_JPanel . ?JP javam:add ?JLABEL . ?JP javam:add ?JBUTTON . ?JBUTTON a java:javax_swing_JButton . ?JBUTTON java:text ?TYPE_NAME .
?JLABEL a java:javax_swing_JLabel ;
java:text ?LABEL .
} .

Waiting for a hint from Jos on how to use e:findall .

EulerGUI - documentation

I updated the documentation with install and usage of latest Euler EYE processor (with 100% Prolog engine replacing old Java N3 to Prolog translator),

so that EulerGUI is about ready for a new release.

Errors in Euler / EYE (new stand-alone Yap engine)

Jos corrected the first error, not the second one. He also corrected the missing object in triple error.

I implemented the strings delimited by """ for Java code generation. So now I can really work with the new EYE engine.

2009-01-19

EulerGUI - integrated new Prolog self sufficient engine

COMMITED:

- add support for EYE (new stand-alone Yap engine)

- Euler installation directory is searched in expected places (EULER_INSTALLDIR)

Works on simple cases, but on deductions/n3/test_order.n3p

we get this error:

# ** main/0 error(instantiation_error,[atom_codes/2|local_sp(142690704,143065392,[],[])])
# ** main/0 Failed to finish

However, it works well with Euler Yap through Codd and test-as option .

I get the same error on deductions/n3/test_person.n3p .

And on deductions/n3/euler_project.xml.n3p , there is a different error : an object part is missing in an triple at third line :

_:sk7 a ns4:javax_swing_JFrame. _:sk7 a ns4:javax_swing_JFrame.
_:sk7 a ns4:javax_swing_JFrame. _:sk7 ns4:title """generated by Deductions framework""".
_:sk7 a ns4:javax_swing_JFrame. _:sk7 ns4:visible .

Déductions - GUI generation : work on subclasses

Classes having subclasses used to work (in example deductions/n3/euler_project.xml.n3p ), but I broke that when working on purchase order. Now I need a way to say : "when a Class has subclasses , do this with the most derived classes, and otherwise do that with the Class itself ".

For this I'm trying to make use of "Scoped negation" in N3, namely log:notIncludes and e:findall with an empty result set.

WORK IN PROGRESS

2009-01-18

Déductions - GUI generation : implement Property details

COMMITED:

This is what I get today with the purchase order test :

purchase order test

Everything is expanded, for instance the "hasCustomer" button is followed by a corresponding "Customer" titled border (sub-form), etc . Soon we will connect the sub-forms to properties instances, and offer a choice of expanding sub-forms or not. And of course the "hasCustomer" button will create a new customer. However in this case "hasCustomer" is a one-valued mandatory property so behavior can be simplified, by expanding the sub-form unconditionally.

2009-01-16

Déductions - GUI generation : purchaseorder.owl

Working on EulerGUI project test_order.n3p , including ontology purchaseorder.owl .

COMMITED

ISSUES

JDK7, FAM

Read the FAQ about openJDK and the Open Source Java .

Also had a look at the JDK7 WatchService class . I don't know whether on Linux the JDK7 WatchService uses FAM (File_alteration_monitor) .

Also searched "file notification java" on sf.net .

Finally, jnotify looks good.

Misc. confguration: NTP, SMTP

The Property - Class graph

domain, range, subClassOf, subPropertyOf

2009-01-15

Déductions - GUI generation : splitting rules

What I did when splitting rules because of non mandatory rdf:label resulted in cleaner design.

Now I must do the same refactoring for Buttons for Object Properties, whose "text" property comes also from rdf:label.

COMMITED

2009-01-14

Déductions - GUI generation driven by logic rules

I had a look back at my Generic JavaBean editor included in ecolosim project . It has goals similar to GUI generation in Déductions project, except that in ecolosim the starting point is a set of Java classes respecting the JavaBean naming conventions, whereas in Déductions it starts from an OWL ontology. An important limitation of GUI generated in ecolosim is that properties of non-primitive types are always considered embedded (there is no way to create a linked data structure). In Déductions accurate GUI's will be inferred from the input ontology, taking in account all constraints (cardinality, linked or embedded, ordered or not, set or not, etc).

2009-01-13

For some reason files on the SVN repository were executable: remedy:

svn propdel svn:executable *.n3
svn commmit

Déductions - graph transform driven by logic rules

I think that what I have been doing for GUI generation is just a particular case of object graph transform. The limitation compared to XSLT or forward chaining rule engines (Drools) is that there is no rule priority, or default reasoning. This is a limitation, but also a cleaner way to do, since rules are both constructive and logical implications.

Using RDF ID when no rdf:label - Generated GUI - déductions

I solved the yesterday's problem , by using the RDF ID when there is no rdf:label (no other way).

{
?FIELD gui:inputWidgetSpecification ?PROP .
?PROP log:uri ?URI .
( ?URI "#" ) fn:substring-after ?PROPLABEL .
} => {
?FIELD gui:label ?PROPLABEL .
} .

But now I have two fields and labels per property ! This rule in the current implementation of the Java projection should be split :

{
javapr:thisApplication app:platform app:Java .
?W a gui:DatatypeInputWidget .
?W gui:label ?LABEL . ?W gui:inputWidgetSpecification ?Property . ?Property rdfs:range ?Type . } => { ?W javapr:projection ?JP . ?JP a java:javax_swing_JPanel . ?JP javam:add ?JLABEL . ?JP javam:add ?JTEXT_FIELD . ?JLABEL a java:javax_swing_JLabel ;
java:text ?LABEL
.
?JTEXT_FIELD a java:javax_swing_JTextField .
?JTEXT_FIELD java:columns 10 .

:GUIHelper javam:addFieldBehavior ( ?JTEXT_FIELD ?Property ?Type ) .
}

Precisely, both elements in red are removed, and this triple is added in the consequent to keep track of the concrete newly created Label widget :

?FIELD gui2:label ?JLABEL .

Then a new rule is added, to replace what was removed :

{
?FIELD a gui:DatatypeInputWidget .
?FIELD gui:label ?LABEL_TEXT .
?FIELD gui2:label ?JLABEL .
} => {
?JLABEL java:text ?LABEL_TEXT .
} .

I found a good enough (for now) way to solve the default values issue. In app_gui-rules.n3 , putting the default rule (use RDF ID) before the specific rule (use rdf:label) , the JavaScript assignments are in the right order, override one another, and the resulting GUI is OK :

sk9_11_.text = "eulerArguments" ;
sk9_11_.text = "euler Arguments" ;

2009-01-11

Generated GUI - déductions

I realise that the Purchase Order exemple doesn't output any form field, just because the rules (app_gui-rules.n3) expect an rdf:label on each property. I should decouple the rules concerning label from the ones concerning input fields, or even better make a rule to enforce that undocumented widgets such as input widgets should be accompanied by a GUI label.

But the most important thing is that somehow I create a label out of the property Id , e.g. "has Customer" from hasCustomer here:

:hasCustomer
a owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:domain :OrderRequest ;
rdfs:range :Customer .

First this is not very clean to use an ID, and second we should avoid default reasonning, which is non monotonic logic. Anyway as far as I know, there is no way to do non monotonic reasoning with N3 logic.

EulerGUI - TODO - new window

A new project window must have an initial directory for file chooser taken from the current window.

When closed, a secondary project window should not close the application.

2009-01-08

Slowly emerging after a cold ...

Deductions architecture

I'm thinking of using Drools engine for non-monotonic stuff, especially generating JavaScript code (see 2008-12-24).

Also to generate XHTML I would need some framework allowing to go from RDF repesentation to XML.

I'm thinking of using JRDF instead of my own simple Triple class . It would be good either to wrap a JRDF implementation so that it also stores on a Drools WorkingMemory , or completely rewrite an implementation of a JRDF interface in terms of a Drools WorkingMemory .

Or I can simply take inspiration on JRDF API, and basically keep my stuff for now. To implemeted my generated GUI, this thread is relevant :

[Jrdf-general] Updating triples

2009-01-05

Looking at RDF Java API : jrdf

They claim to have taken inspiration from Sesame and Jena .

http://jrdf.sourceforge.net/0.5.5.4/doc/javadoc/index.html

2008-12-24

Deductions architecture : generate other GUI's than Swing

We need to refactor java_projection-rules.n3 to create an additional layer with abstract widgets generalizing Swing and HTML.

This layer will be useful also for generating SWT with Wazaabi2 by Olivier Moïses, or generation of GWT, etc.

The straightforward solution in the line of what was done before is to replace strings like this in java_projection-rules.n3 :

java:javax_swing_JXXX ==> widget:XXX

for example :

java:javax_swing_JButton ==> widget:Button

And then rules must be added to translate widget:XXX into the kind of widgets for the plateform considered.

In the Java Swing case, this is particularly simple, since the name of unified widgets are just the Java Swing names with the initial J removed.

So implementing this projection

widget:Button ==> javax.swing.JButton

with a rule engine is maybe like smashing a fly with a hammer.

Such an implication is wasting computing power ;

{ ?WID a widget:Button } => { ?JAVA a java:JButton }

and besides it is not accurate, because for several widget:Button we will get a single java:JButton, unless we add this in the LHS :

?WID javapr:projection ?JAVA

with cardinality restriction 1 on javapr:projection, or describe it as an functional property .

2008-11-11

Translating N3 into Drools language

Here is a test I did with Drools before writing an automated transform for EulerGUI. One can see that N3 is more compact than Drools . An annoying thing is that implicit variable binding is not allowed, which make Drools less declarative than N3 and Prolog, and complicates the translation.

package com.sample
import com.sample.DroolsTestTriples.Triple;

rule "OWL transitive property"
// before writing the generator from N3 to Drools,
// I did a hand translation into Drools of this N3 definition of OWL TransitiveProperty
// in http://eulersharp.svn.sourceforge.net/viewvc/eulersharp/trunk/2003/03swap/rpo-rules.n3
// {?P a owl:TransitiveProperty. ?S ?P ?X. ?X ?P ?O } => {?S ?P ?O}. when // this design works but is not well adapted to automatic translation, // because in Drools there is variable declaration and then variable reference Triple( $P: subject , predicate=="a" , object=="owl:TransitiveProperty" )
Triple( $S: subject , predicate == $P, $X: object )
Triple( subject == $X , predicate == $P, $O: object )
// trying to split variable declaration and variable reference // but Drools doesn't allow yet implicit variable binding // cf chat with Mark Proctor 2008-11-09 :-( /* Triple( $P == subject , predicate=="a" , object=="owl:TransitiveProperty" )
Triple( $S == subject , predicate == $P, $X == object )
Triple( subject == $X , predicate == $P, $O == object )
*/ then insert( new Triple( $S, $P , $O ) ); end

2008-11-06

Dialog on the Drools IRC

<jmv> Is there an API to populate a rule base ?

<jmv> I want to translate rules in N3 into Drools

* |conan| (~conan@87.113.106.171.plusnet.pte-ag2.dyn.plus.net) a rejoint #drools

* conan est parti (Ping timeout)

* |conan| s'appelle maintenant conan

* mfossati est parti ("CGI:IRC (Ping timeout)")

<etirelli> jmv: what do you mean by "populate"?

* mfossati (~be031ba3@docs2.codehaus.org) a rejoint #drools

<jmv> instead of parsing a Drools source, I want to call methods to create rules, much like DOM in XML

<etirelli> jmv: you can use the classes we call Descriptor Model... you just need to be aware that although their are mature and rarely change from version to version, they are not considered public APIs and may have minor changes over time

<jmv> OK

<etirelli> jmv: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/branches/4.0.x/drools-compiler/src/main/java/org/drools/lang/descr/

<etirelli> PackageDescr is the root class

<etirelli> and it is the input to the rules compiler

<jmv> I see it has addRule(final RuleDescr rule) , and so on .

<jmv> No code sample I guess ?

<jmv> calling the rules compiler and run ...

<jmv> Looking the Javadoc, I see PackageBuilder.addPackage( PackageDescr )

<etirelli> yes, PackageBuilder is "the" compiler

<etirelli> and examples are only the integration tests.. since it is not really a public API

<etirelli> to learn how it works, right sample rules in DRL, and use the DrlParser to parse them into descriptors... inspect the descriptors to see the generated result

<jmv> you mean *write* sample rules ?

<jmv> it makes sense

<jmv> time permitting, there might be a Drools engine here : http://sourceforge.net/projects/eulergui/#

<jmv> which would open the possibility to mix RDF, OWL, N3 , with Drools

<etirelli> yes, *write* :)

<etirelli> cool :)

<etirelli> jmv: conan is interested in RDF and OWL support :)

<jmv> i think we talked here 2 years ago about that ...

<jmv> there are several API 's to read RDF , notably Jena

<jmv> I use Jena ; there is Sesame too

<jmv> I use Jena to parse RDF and write N3 , which is a more human-readable RDF

2008-11-02

Deductions project

Advanced JavaScript within JDK

Using plain vanilla Objects:

t = new Object() {
a :"aa" ,
b : 11
};
alert( t.a + " " + t.b + " " );

In fact new Object() is not necessary; it is a plain JavaScript object, i.e. an associative array.

This creates an object graph:

a = new Object();
a.b = new Object();
a.b.c = "vvvv" ;
alert ( a.b.c );

This does not work b ecause Runnable is abstract :

var r = new java.lang.Runnable();
r.run = function() { alert('hello'); } ;
java.lang.Thread(r).start();

Need to do this:

var r = new java.lang.Runnable() {
run : function() { alert('hello'); } };
java.lang.Thread(r).start();

Using JSON in JavaScript it is possible to stringify such an object :

t = new Object() {
a :"aa" ,
b : 11
};
s = JSON.stringify(t);
alert( s + "--- "+ JSON.parse(s).a );

Note that in json2.js the JavaScript incantation to introspect the JavaScript object is :

    for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {

2008-10-19

Deductions project

At last the Deductions project is on Sourceforge ! The Subversion repository is populated with N3 sources and the HTML that are on jmvanel.free.fr . There is a meeting on november 15th, and possible work with Olivier M. on an SWT backend.

The Deductions rule base can generate a crude window; but the multiplicity is not taken in account. And for now there is nothing for runtime behavior and storage in end user application. But it is declarative all the way :-) .

First Application generated by Deductions

One of the goals is to remake the Euler GUI application with the Deduction technology.

2008-10-07

Deductions project

Reading N3 logics specification

Saw interesting features: N3Document, definitiveDocument, definitiveService .

Write non-regression tests

Componentization of software file search feature

Jedit

Google Chrome

Not really much memory saving than Firefox.

Some nice features:

My grips:

My suggestions

2008-08-24

Trying CWM proof checker

% export PYTHONPATH=~/apps/cwm-1.2.1
[jmv@localhost]~/apps/cwm-1.2.1% python swap/check.py

2008-07-07

Euler N3 reasoner

I developed a little Java class, Project, to shortcut the intermediary Web server and reuse the same rules and facts compiled in Prolog for several queries. It's a minimal file based wrapper for Euler SEM reasoning services; a Project owns a Set of N3 sources, N3 queries, and possibly Prolog sources.

On top of Project, I did a small Swing GUI. It's still barely usable, but it already can load several N3 sources and queries and lunch the inference process. I plan to add an RDF reader through CWM and Jython.

SWI Prolog

I used threads to accerate on a 4 core machine. I learn XPCE.

2008-05-19

Un dialogue avec Marc :

marc: je lutte comme beau diable sur un montrueux ERP

va sortir de l'information dans un erp vieux de 30 ans

moi: tu dumpes tout en texte et tu parses :-)

marc: un truc comme ca

moi: garder de l'information fermée sans sans que les utilisateurs puissent y accéder de manière neutre devrait être interdit ....

marc: un truc qui va dénormaliser

moi: je vois

2008-05-08

http://demo.openlinksw.com/rdfbrowser/

Is there an editor for N3 including rules ?

Euler notes

TODO

- update Euler FAQ

- use of induction in Prover9 (see http://en.wikipedia.org/wiki/Structural_induction )

- study N3 and Euler algo.

- self-training on CHR

- study CL and try an implemetation in CHR

- build Protégé and Euler plugin

http://lists.w3.org/Archives/Public/semantic-web/

http://www.w3.org/TR/rdf-sparql-query/

https://dl.kr.org/pipermail/dl/2008/thread.html

http://www.w3.org/Submission/SWRL/

http://en.wikipedia.org/wiki/Bossam

http://www.w3.org/2000/10/swap/

http://protegewiki.stanford.edu/index.php/Protege4DevDocs

http://www.cs.man.ac.uk/~iannonel/eclipseSetup/eclipseSetupBuildPaths.html

http://www.cs.man.ac.uk/~iannonel/eclipseSetup/eclipseBuildAndRun.html

http://protegewiki.stanford.edu/index.php/CompileProtege4InEclipse

http://subclipse.tigris.org/install.html

http://smi-protege.stanford.edu/svn/protege4/

http://www.co-ode.org/downloads/protege-x/plugin-code-example.php

2008-05-04

Building Protégé 4 from SVN

http://www.cs.man.ac.uk/~iannonel/eclipseSetup/eclipseBuildAndRun.html

2008-05-01

overcome limits "description logic"

Transformation d'ontologies basées sur la logique de description : Application dans le commerce électronique

Chan Le Duc1

http://tel.archives-ouvertes.fr/action/open_file.php?url=http://tel.archives-ouvertes.fr/docs/00/21/41/45/PDF/These_LeDuc.pdf&docid=214145

http://tel.archives-ouvertes.fr/tel-00214145/en/

description logic ontology design

Description Logics for Conceptual Design, Information Access, and Ontology Integration: Research Trends (2003) - Enrico Franconi

http://citeseer.ist.psu.edu/641124.html

https://www.inf.unibz.it/~franconi/dl/course/tutorial/description.html

Hybrid Logics and Ontology Languages

general concept inclusion (GCI) DL owl reasoner

http://fr.wikipedia.org/wiki/Logique_de_description

Ian Horrocksa, E-mail The Corresponding Author, Birte Glimma, E-mail The Corresponding Author and Ulrike Sattler

To purchase from

http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B75H1-4NTXG8S-2&_user=10&_rdoc=1&_fmt=&_orig=search&_sort=d&view=c&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=797599863fa17525cb0ea07f88e6b27f

http://prologdoc.sourceforge.net/

Installing Coq on Fedora

sudo yum install ocaml
sudo yum install LablGTK
sudo yum install camlp4
./configure; make world; sudo make install

Workflow for a DL + Prolog framework: trial of Euler

Here is the desired workflow:

designer --> DL Ontology --> Prolog code  }
                designer --> Prolog rules } --> Application

user --> database update --> fire rules --> OK or explaination
user --> query --> answer

The Prolog rules are expressed with the same predicates and reified concepts as those translated from the initial DL (Description Logic) Ontology, and are the part of the knowledge that is too complex to be part of the DL Ontology. An example of a non-DL rule is here:

hasParent(C,P) ¿ hasBrother(P,BP) ¿ hasUncle(C,BP)

If I understand well, the workflow of Euler is :

designer --> DL Ontology --> Prolog code
designer --> N3 rules and queries --> Prolog code

user --> N3 query --> --> Prolog code --> proof including variable binding

How can Euler be wrapped or adapted to fit the above workflow ?

I could shortcut the Codd server and run all in a single Prolog process :

pl -f ./sem.pl -t main. < ./test008.in

A link on Euler paths: ???

Questions on Euler

Notes

This file should not be here :

classes/euler/Support.java

It would be good to include in the distribution a file run_euler.sh :

java -classpath bin/Euler.jar:bin/Euler_Tests.jar:lib/tuprolog.jar euler.EulerRunner $*

and a file run_codd_server.sh :

java -cp bin/Euler.jar:bin/Euler_Tests.jar:lib/tuprolog.jar euler.Codd $*

Questions

I made additions to the Euler FAQ .

Q: The output of Euler is a proof in N3. Is there a way to shortcut that and produce a Prolog output ?

A: ??? DEBUG in progress

Q: What is the ontology for the proof answers of Euler ?

A: One can see that the r: namespace prefix is used; it is declared as

 pfx('r:','<http://www.w3.org/2000/10/swap/reason#>').

just follow http://www.w3.org/2000/10/swap/reason# and that is the ontology; it has comments for all the concepts.

Q: Note that with the latest version of Euler and cwm this gives a parser error in cwm :

pl -f ./sem.pl -t main. < ./test008.in > test008.out.n3
cwm --n3 test008.out.n3 --rdf --pipe
...
AttributeError: 'tuple' object has no attribute 'close'

However this gives no hint:

pl -f ./sem.pl -t main. < ./test008.in

PENDING !!!!!!!!!!!

Q: How would you do to integrate Euler into a Java GUI such as SWOOP or Protégé ?

A: it depends on what one want to achieve: one feature could be to write an N3 rule and display the proof

Q: What is the difference between Euler and classical DL reasonners such as Pellet and FaCT++ ?

A: Euler is an all-purpose logical query engine. Reasonners process the ontology globally, thus achieving much better performances than processing the classes one by one.

Q: How can one use Euler to implement the services of a DL reasonner, i.e. classification and detection of unsatifiable classes?

Q: Before reading more about the Euler path algorithm, I wonder if using a tabling Prolog such as XSB would not achieve a similar effect, that is to avoid infinite loops and memoize the calls already encontered.

A: A We took the option of a reasoner written in Prolog instead of taking Prolog as a reasoner and there are many reasons for that: no need to declare which predicates should be tabled, having a proof output (in N3), supporting Coherent Logic, etc..

Q: What is Coherent Logic ?

A: Look at the last chapter of

http://folli.loria.fr/cds/2006/courses/Bezem.Nivelle.IntroductionToAutomatedReasoning.pdf

(the whole course btw is very good!)

Q: Which crucial feature made you switch from Yap and tuProlog to SWI ? The semweb libraries ?

A: No, performance

Q: Could I run the current SEM (Skolem Euler Machine) on tuProlog ?

A: not yet; I would also consider to use jTrolog (which has better performance) https://jtrolog.dev.java.net/

Q: What are the advantages of the current SEM (Skolem Euler Machine) ? More expressive power or performances ?

A: It has more expressive power in that one can have existentials and disjunctions in the conclusion. This allows to find e:falseModel and e:counterModel but I still have to investigate the proof expression of those. For Horn Logic the engine speed is not degraded which was quite a challenging task :-)

Q: Is it radically new with respect to old Euler proof ?

A: ???

Q: I tried to read the thesis mentioned on the site; it's not easy; also there is a different language ML or haskell .

A: The most relevant paragraphs are mentioned in the FAQ.

Q: do you re-use OWL/RDF ontologies or is all written by you ?

A: there is a lot that we try to reuse esp data sources like

http://bioontology.org/ncbo/faces/index.xhtml

http://esw.w3.org/topic/SemanticWebForLifeSciences

etc

Q: What is the difference with the N3 parser in CWM, apart apart from Euler being in Java ?

A: They are very close wrt to the language that they can parse.

Q: What is the difference with the N3 parser in Jena ?

A: The Jena N3 parser can't cope with {} formulae which is crucial for N3 Full support.

The good servant: example

Example of stupid behavior in a browser (Firefox 3). I saved all tabs in a single bookmark, then I wanted to close the window. The browser, however, asked me to confirm that I really wanted to close the window.

2008-04-20

general concept inclusion (GCI) .

Reading this article:

Description Logics as Ontology Languages for the Semantic Web

Franz Baader1 , Ian Horrocks2 , and Ulrike Sattler1

Trying tabled Prolog: XSB

% infinite loop in standard Prolog :
:- table a/1. % this does the trick in XSB
equiv_a(X) :- a(X).
a(X) :- equiv_a(X).
a(a).

Then no more infinite loop:

?- a(X).
X = a;
no

2008-03-29

Trying Sigma Kif Web application

Wrote file /home/jmv/apps/apache-tomcat-6.0.16/SUMO.pl

KIF ontolingua http://www.linguist.jussieu.fr/~fchaumartin/

http://ontolog.cim3.net/cgi-bin/wiki.pl?OntologySummit2007

http://groups.google.com/group/comp.ai/topics

http://tech.groups.yahoo.com/group/aima-talk/

Programming advice: let the semantic be explicit

Why?

How?

Representing weight in FOL

While I'm practicing on this exercice in AIMA I try to express in first order logic in an elegant way that :

Which amounts to declare that if the parts are disjoint [a bit of MathML] :

weight( bunchOf(S) ) = Σ s S weight ( s )

and to enter enough mathematic knowledge to make Prover9 infer this:

∀s ∈S, weight ( s ) C weight ( bunchOf ( S ) C . card ( S )

and then

weight ( bunchOf ( S ) / C card ( S )

Thinking later, I'm not sure to what extent I can formalize all that in FOL.

So I'm reading about fisrt order axioms for set theory: Set Theory in First-Order Logic: Clauses forG6del¿s Axioms. I's funny that one author of this is W. McCune, the developper of Prover9 !

Upper ontologies

So I feel a need to read again about Upper ontologies: SUMO, Dolce, OpenCYC, BFO, UMBEL, etc.

I found some comparisons on the Web

From the Sumo site one can enter an English word and the corresponding formal term in SUMO for each WordNet sense (synset) will be displayed.

The open source Texai project has released the RDF-compatible content extracted from OpenCyc.

A bad sign: the research.cyc site is down this saturday. It's too bad, because on top of what Opencyc has, it includes, according to Wikipedia, a large lexicon, English parsing and generation tools, and Java based interfaces for knowledge editing and querying.

Dolce has a detailed (349 pages) description.

There is, as everywhere, the Babel effect:

There is at least one exchange format for FOL (first order logic), the one used by the TPTP (Thousands of Problems for Theorem Provers) Problem Library, which is a library of test problems for Automated Theorem Proving (ATP) systems.

The most used format for ontologies including logic rules is KIF; generally an OWL extraction is provided; but OWL doesn't provide rules.

SUMO

In this sigmakee CVS directory, the SUMO file is called Merged.kif.

In the SUMO source I found this axiom about finite sets:

(=> 
 (instance ?SET FiniteSet)
 (exists (?NUMBER)
  (and
   (instance ?NUMBER NonnegativeInteger)
   (equal ?NUMBER
    (CardinalityFn ?SET)))))

2008-03-22

I'm practicing on this interesting exercice in AIMA, using Prover9. I won't put my solution here, thinking of teachers who are using this for home work, although I think that having a corpus of solutions is a good way to learn.

% Yesterday, John went to the North Berkeley Safeway supermarket

% and bought two pounds of tomatoes. and a pound of ground beef.

% http://www.cse.buffalo.edu/~shapiro/Courses/CSE563/2007/Projects/proj2.pdf

% 1. Is John a child or an adult? [Adult]

% 2. Does John now have at least two tomatoes? [Yes]

% 3. Did John buy any meat? [Yes]

% 4. If Mary was buying tomatoes at the same time as John, did he see her? [Yes]

% 5. Are the tomatoes made in the supermarket? [No]

% 6. What is John going to do with the tomatoes? [Eat them]

% 7. Does Safeway sell deodorant? [Yes]

% 8. Did John bring any money to the supermarket? [Yes]

% 9. Does John have less money after going to the supermarket? [Yes]

2008-03-19

knowledge representation substance fruit individual

OCL and First Order Logic

While searching for OCL + FOL, I found Isabelle, which is a kind of generic logic tool (not only FOL, but Higher Order Logic, etc).

This article uses Isabelle: HOL-OCL: Experiences, Consequences and Design Choices.

Prover9 : how to recover the answers

William McCune, the author of Prover9 and Otter, answered me !

Thanks for the feedback. Prover9 has some similarities with Prolog

(language and theorical basis), but it should not be thought of as an

extension of Prolog. The search method is entirely different.

First, there is no backtracking. Prover9 can do a goal-oriented

search, but instead of backtracking, it explores multiple paths

simultaneously (it can do this because it stores intermediate clauses).

Second, Prover9 is designed to prove theorems, not answer queries.

One can recover the variable substitutions by using an "answer attribute".

Below is an example of using Prover9 to simulate a Prolog computation.

This is only an exercise, because it's very inefficient.

W. McCune

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set(prolog_style_variables).

% Simulate back chaining (Prolog search).
clear(auto_inference).
set(neg_binary_resolution).

% Allow multiple proofs of the same goal.
assign(max_proofs, -1). % unlimited
set(reuse_denials).

formulas(assumptions).

% prolog-style definition of append.
% Note list notation uses : instead of |).

append([], X, X).
append([H:T1], X, [H:T2]) <- append(T1,X,T2).

end_of_list.

formulas(assumptions).

% If we include an answer attribute to get the substitutions,
% we cannot use the "goals" list---we have to negate the goal
% ourselves and put it in "assumptions".

% Find the pairs of lists that can be appended to give [a,b,c,d].
% Note in the output that each pair is produced twice. This
% is not a bug. It's just the way Prover9 does its search.
-append(X, Y, [a,b,c,d]) # answer(f(X,Y)).
end_of_list.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

My (JMV) comment: you can't use the answer "attribute" in unrestricted formulas, you have to convert then by hand to clausal form first, otherxwise you get this message:

Fatal error: Answer attributes on non-clausal formulas cannot contain variables


2008-03-09

CHR

I subscribed to the CHR mailing list; there are quick responses to my newbie questions by the bosses themselves, Tom and Thom.

I ordered Tom Schrijvers' 2003 book "Essentials of Constraint Programming".

Blog versus HTML site

I'm testing the Blog feature on Google: http://jmvanel.blogspot.com/

Fedora 8 is arrived!

I updated to Amaya 10.1 on Fedora 7. It's quite convenient to write my Blog this way. Of course there is the hassle of uploading. But on Google JavaScript editor (mail, docs, or Blog) it tends to be quite slow, because of general slowness and memory consumption of Firefox.

2008-03-02

CHR, SQL+ XSB

Discovered Tom Schrijvers' Declarative Languages Blog . Tom is the maintainer of CHR.

Among other news, he started a type checker library in (SWI-)Prolog: type_check.pl. Using this library, you can use Mercury-style type declarations and predicate signatures. It's a migration path to Mercury, and also it's more flexible than Mercury, because typed Prolog code can call and be called by ordinary untyped Prolog code.

Had a look at the ODBC interface in XSB manual 2:

| ?- odbc_import(¿Test¿(¿TId¿,¿TName¿,¿Length¿,¿Price¿),test).
yes

This way the SQL table "Test" is made available as the predicate test.

prover9, the successor of Otter.

http://swig.xmlhack.com/ : Semantic Web Interest Group IRC Scratchpad .

2008-02-17

CHR

I wrote my first CHR rule! I modifed db_family.pl: Family relations (deductive database)

this way :

mother(X,Y) ==> parent(X,Y).

And then this query

parent( jmv, sim ), mother( simone, jmv ).

gave more results.

CHR questions:

CHR answers

2008-02-03

ontology software development:

http://www.ercim.org/publication/Ercim_News/enw58/saeki.html

An interesting ontology project:

http://www.cs.utexas.edu/~mfkb/

To read Guitar Pro .gp4 and .gp3 files:

http://dguitar.sourceforge.net/fr/inldex.html

2008-01-28

Intentional programming; describing libraries formally in term of functionalities

I like the idea of CAD and 2D projections of a more complex 3D world.

I saw the TV interview of Charles Simonyi :

http://www.beet.tv/2007/09/microsoft-forme.html

I also read the Wikipedia page on Intentional Programming . It's clear that Intentional programming has part of the thruth. But also the product that personifies the concept is probably a big fat GUI with a proprietary file format, the triumph of proprietary software. Not what people want in 2007. They want their design efforts to be saved in an open and durable format. Guess what it is, dear reader ? OWL. There is no other. And people in 2007 want flexibility. They want to use today's tools and source code with emerging paradigms.

My solution is :

annotate available existing modules and libraries with more semantic:

  1. features and functionalities (the intention) by aligning with WordNet, OpenCyc, or OWL ontologies;
  2. one or more typical sequences of calls ( e.g. a Protocol State Machine in UML 2 )

With a suitable inference engine and rules, plus a semantic search engine, plus a suitable GUI, this can enable to plug any annotated module to an exiting application. Remember that, like in eclipse, plugins are a composite structure, i.e. a module can have any granularity. So in theory this can solve the application building problem, in a top-down way. Of course, you'll still need develop features that exist nowhere. Also you'll still face the Babel effect on programming languages. But connecting different languages is "just" a matter of correspondance rules and, again, protocol state machines. So connecting different languages is automatizable; it's mainly an issue in performance and global architecture.

TODO complete from my manuscript <<<

http://www.educery.com/papers/rhetoric/road/

http://www.codegeneration.net/

2008-01-27

http://martinfowler.com/dslwip/

My gnuplot tricks

set samples 1000

Table of Contents