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

e-mail: Send your comments - My home page my FOAF URI: http://jmvanel.free.fr/jmv.rdf#me

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 - Latest blog - Years before: blog 2004-2007 ; 2008-2010 .

AI use for software development : the new paradigm

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

Intermediary versions of EulerGUI - EulerGUI Feature requests



2011-12-31

http://www.open.ac.uk/Arts/philos/Nonmonotonic_inference_eprint.pdf

2011-12-30

the latter indirectly linked to the first:

http://www.w3.org/wiki/LargeTripleStores

http://seaborne.blogspot.com/2008/06/tdb-loading-uniprot.html

"add to a project a notion of explicit or implicit SPARQL end points"

http://www.w3.org/TR/Pointers-in-RDF10/

i try to use this for liveurl, can be also used to specify sparql end points

Envoyé vendredi à 11:08

Ruset: second, about content http://www.w3.org/TR/Content-in-RDF10/

and last about transport, http://www.w3.org/TR/HTTP-in-RDF10/

all three are used in earl

http://www.w3.org/WAI/

http://webcache.googleusercontent.com/search?q=cache:1U2lcpsM3rwJ:cogprints.org/418/2/context3.ps+guha+use+itc+true+in+context&cd=4&hl=en&ct=clnk&gl=us&client=safari

[PS]

NOTES ON FORMALIZING CONTEXT

cogprints.org/418/2/context3.ps

File Format: Adobe PostScript - View as HTML

by J McCarthy - 1993 - Cited by 793 - Related articles

Ruset: thank you,

Envoyé vendredi à 12:46

Ruset: guha recomand this http://www-formal.stanford.edu/overview.html

in this mail http://lists.w3.org/Archives/Public/www-rdf-interest/2000May/0131.html

Envoyé vendredi à 12:50

Ruset: there a link 'papers' in first link. it go to page with some papers, postscript

2011-12-28

http://graph.facebook.com/jmvanel http://jmvanel.free.fr/jmv.rdf http://graph.facebook.com/rszeno http://sort-of.strangled.net/foaf.rdf

Ruset: seen with graphviz from eg

Swish Intro

Swish is a framework, written in the purely functional programming language Haskell, for performing deductions in RDF data using a variety of techniques. Swish is conceived as a toolkit for experimenting with RDF inference, and for implementing stand-alone RDF file processors (usable in similar style to CWM , ...).

Rules are not only for business rules (generating SPARQL queries using rules)

In fact business rules are raw material for the building of business applications just like ontologies and structural models. And, because we build business applications using rules (applicative and infrastructure rules), this means having rules manipulating rules.

We already have such rules manipulating rules to :

We need to have more rules manipulating rules to :

  1. transform N3 rules into Drools rules (currently implemented by ad-hoc Java code)
  2. generate SPARQL queries from N3 rule base and a simplified N3 query (an N3 expresion with triples including variables but no braces)

Point 1 will stay like this in the near future, as current implementation is well tested and extensible.

The point 2 is necessary for automating access to Linked Open Data (see Roadmap for EulerGUI 2.1 , and Sketch of a roadmap / The Déductions stuff in my blog).

We need to design and implement a backward engine for querying SPARQL databases; it will generate a big SPARQL query by recursively accumulating criterium terms, substituting bound variables, renaming variables if necessary.

I used to think that for point 2, the capabilities of Euler or CHR to handle unbound variables can be leveraged. But I changed my mind. Since I already have experience with dealing with SWRL, it ' s probably quite easy to first convert the N3 to SWRL. Good thing with SWRL is, it's plain RDF, and as a consequence there's no possible confusion between input rules and transformation rules (this is actually a problem when processing N3 with N3). It's also easier to match rule parts when the rule is expressed as pure RDF graph (SWRL or other). So SWRL just a quite simple RDF rule format, enough well documented (but I din't have to reed the doc. to write the SWRL ==> N3 converter rules ). N3 is suitable for writing rules by hand and proof-reading by developers (and directly interpretation by any of the EulerGUI.

So the roadmap for this SPARQL generation feature could be :

  1. transform N3 rules into SWRL rules
  2. transform one SWRL rule into SPARQL;
    this needs an RDF vocabulary for SPARQL queries, which can be SWRL with some emtemsions
  3. add recursivity by finding SWRL rules matching a simplified N3 query
    substitute suitable variables with their constant value
  4. add recursivity by substituting matching triples in antecedent with their definition from a rule

As an exemple, think of a family relationship rule base (see rules examples - Family relationships ). The intermediary steps are writen below in N3, but keep in mind that the actual inferencing will manipulate SWRL syntax, as explained above (point 1).

Starting from a simplified N3 query :

:John :hasUncle ?U 

By 3, this rule is picked:

{ ?X hasParent ?P .
  ?P hasBrother ?B .
} => {
  ?X hasUncle ?Y }.

By 3, substitute variable ?X with its value :John :

{ :John hasParent ?P .
  ?P hasBrother ?B .
} => {
  :John hasUncle ?Y }.

By 4, the rule for hasBrother is picked, and the antecedent is substituted in preceding rule :

{ :John hasParent ?P .  ?P hasSibling ?B .
  ?B a Male.
} => {
  :John hasUncle ?Y }.

For property hasParent, a background declaration states that the corresponding triples are hosted in some SPARQL endpoint:

hasParent eg:inSPARQL_endpoint <http://mydatasource.org/> .

So, no need to recurse on property hasParent.

Similarly, for class Male, , a background declaration states that the corresponding triples are hosted in some SPARQL endpoint:

Male eg:inSPARQL_endpoint <http://mydatasource.org/> .

Process goes on with expanding hasSibling .

When nothing is left to be expanded, it's time to use point 2 above to generate the final SPARQL query.

2011-12-27

TODO :

Caused by: java.io.IOException: Cannot run program "yap": error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
        at java.lang.Runtime.exec(Runtime.java:593)
        at java.lang.Runtime.exec(Runtime.java:466)
        at euler.Process.run(Process.java:68)
        ... 1 more
Caused by: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
        at java.lang.ProcessImpl.start(ProcessImpl.java:91)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
        ... 4 more
java.lang.RuntimeException: java.lang.InterruptedException: sleep interrupted
        at euler.Process.execute(Process.java:49)
        at euler.ProofEngine.runProofEngine(ProofEngine.java:180)
        at euler.ProofEngine.runProofEngine(ProofEngine.java:199)
        at n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:52)
        at eulergui.project.Project.reasonExternalProlog(Project.java:521)
        at eulergui.tools.SWRLTranslator.runTranslatorProject(SWRLTranslator.java:114)
        at eulergui.tools.SWRLTranslator.n3SourceAdded(SWRLTranslator.java:53)
        at eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:85)
        at eulergui.project.Project.addN3Source(Project.java:306)
        at eulergui.project.Project.addN3Source(Project.java:287)
        at n3_project.SourceFactory.addSource(SourceFactory.java:115)
        at n3_project.DropURLTranferHandler.createN3Source(DropURLTranferHandler.java:120)

2011-12-26

TODO : impossible to create a file on Mac, because there was no way to enter a file name in JFileChooser

Semantic Web Programming

http://semwebprogramming.org/

Programming the Semantic Web

Build Flexible Applications with Graph Data

By Toby Segaran, Colin Evans, Jamie Taylor

http://shop.oreilly.com/product/9780596153823.do


Rules are not only for business rules

Rules are not only for business rules, but also for reasonning on computing infrastructure : GUI, data sources, network protocol, access control and permissions, logs, cloud and IAAS, PAAS .

For instance, with swing3 rule base, we generate in real time Swing input forms from OWL ontology.

Another example (not yet implemented) : knowing details on data sources, their content in terms of properties, classes, ontologies, whether they are trusted, it is possible to manage querying : e.g. generate SPARQL queries on selected sources depending on business rules.

SPARQL parameterized queries

sparql parameterized queries in Andy's blog

This should be used in EulerGUI !

QuerySolutionMap initialSettings = new QuerySolutionMap() ;
initialSettings.add("title", node) ;
// and this is passed to the factory that creates QueryExecution's:
QueryExecution qexec = 
    QueryExecutionFactory.create(query,
                                 model,
                                 initialSettings) ;

2011-12-17

http://mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/

Preparing my trip to New York

Posted on Twitter, FaceBook, LinkedIn .

Subscribed to http://www.meetup.com/

http://www.swnyc.org/index.php?title=New_York_Semantic_Web_Meetup&oldid=1531

http://swnyc.org/index.php?title=New_York_Semantic_Web_Meetup

http://www.meetup.com/semweb-25/

http://semweb.meetup.com/

http://www.meetup.com/semweb-25/messages/boards/

http://www.marconeumann.org/

http://markwatson.com/


Tomorrow I'm flying to New York for the rest of the year !

I'll be in New York (actually Brooklyn) from 18 to January 1rst .

In fact I'm here just mainly to see my oldest daughter.

But I would be happy to have contact with Semantic Web people (and rule engine, and Java).
Another idea is to propose a presentation or a meeting with the EulerGUI FRAMEWORK (SemWeb + rules + Java), with a User Group , or other meeting

I have a latest presentation where I talk about the whole chain:

http://jmvanel.free.fr/presentations/connaissances_DL_CNL_regles.xhtml

Actually , this latest presentation translated from french by Google is not too bad :

I'll correct that by hand, though .

In fact it could be nice, depending on the public to separate at least 3 topics:

- EulerGUI as a tool for exploring the Semantic Web

- EulerGUI as framework to develop poratable applications centered on an expert system

- controlled English as a way to capture ontologies and rules


<danbri> yup there's a pretty active NYC semweb community

<danbri> look around for Marco Neumann's stuff, he organizes meetups etc

TO READ: http://blog.athico.com/2011/06/truth-maintenance-over-directed-graphs.html

Actually , my latest presentation translated from french by Google is not too bad :

http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http://jmvanel.free.fr/presentations/connaissances_DL_CNL_regles.xhtml&act=url

I'll correct that by hand, though .

<jmvanel> reading [SWIPL] Using Boehm GC ; Jan's posts are always interesting

<jmvanel> and , by chance it's Nicolas Pelletier, with whom I alreazdy exchanged mails who answers

<jmvanel> it makes me think that it would be fine to use Jan's SWI-Prolog RDF store with Euler engine

<jmvanel> cf http://eculture.cs.vu.nl/europeana/documentation.html

2011-12-16

EulerGUI

COMMIT

- try to fix { true } => ... , but not complete, and anyway this works:

true => ...

- add example examples/exec_system.n3 : launch a system command

- add class SystemExecution to launch a system command from N3

This works:

eg:execution eg:play "/home/jmv/Musique/The Beatles - Help!/13 - The Beatles - Yesterday.mp3" .

{ eg:execution eg:play ?FILE .
} => {
       ?SystemExecution a java:deductions-runtime-SystemExecution ;
        javam:execute ( "mplayer" ?FILE )
} .

2011-12-15

TODO this crashes :

{ true } => {
java:Runtime javam:getRuntime ?RT .
?RT javam:exec ( "ls" ) .
} .

with stack:

N3Source.parseResult(): parseResult (file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui/examples/exec_system.n3) was null ==> re-parse (and possibly re-read N3 source)
java.lang.NullPointerException
at eulergui.n3model.impl.StatementImpl.toString(StatementImpl.java:158)
at eulergui.n3model.impl.FormulaMutableImpl.toString(FormulaMutableImpl.java:57)
at eulergui.drools_engine.ParserLink.extractRDFList2(ParserLink.java:314)
at eulergui.drools_engine.StatementListHelper.setParserLink(StatementListHelper.java:30)
at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:639)

Actually this is not implemented.

For now, better add an ad-hoc class deductions.runtime.SystemExecution , with methods :

void execute( String... arguments);
Process getProcess();

The dot notation in Euler

<rszeno> try this:

 :george :mother :ana .
 :ana :friend :bob .
 :george.:mother.:friend :have :hair .

<jmvanel> note that Euler says :

 :george :mother :ana.
 :ana :friend :bob. 
 :friend :have :hair.

<jmvanel> my conclusion ( maybe too quick ) for now is that the dot notation in N3 is not really usable , because not enough defined

Where does Java Preferences API store stuff?

I know that Protégé stores its preferences using the Java Preferences API .

To see things more clearly, I ran the code from here :

http://www.vogella.de/articles/JavaPreferences/article.html#preferenceusage

And here is where data ended :

 % grep --recursive Europa  ~/.java/.userPrefs/
/home/jmv/.java/.userPrefs/_!(@!a!"y!'8!dw"f!'%!dw"h!(k!.g"@!()!~@"m!'`!cg"l!'4!}w"l!&@!~@"z!(@=/prefs.xml:   <entry key="Test2" value="Hello Europa"/>

So , we have completely cryptic storage location, OS dependent and in XML .

On the other hand, we have N-Triples, a nice format for objects graphs, such that concatenation of files is possible.

The use case that is not covered by the Java Preferences API is : I want to export my settings on another machine .

This is typical of how computer guys are thinking that they can manage the user data their way. And this time it's not exactly the typical case of the commercial software vendor who tries to lock in its users. It's an Open Source library.

<rszeno> we need to be strong and fight against evil. :)

Troubles starting Protégé from another OS

I had to manually remove the Fact++ jar from plugins/ directory.

Error 1 Logged at Thu Dec 15 14:44:10 CET 2011
OWLRuntimeException: java.lang.UnsatisfiedLinkError: /tmp/ProtegeCache-89db9e98-1848-4772-8f87-73a56fbc2218/bundle13/version0.0/bundle.jar-lib/0/lib/native/64bit/libFaCTPlusPlusJNI.so: /usr/lib/libstdc++.so.6:
  version `GLIBCXX_3.4.14' not found (required by  
  /tmp/ProtegeCache-89db9e98-1848-4772-8f87-73a56fbc2218/bundle13/version0.0/bundle.jar-lib/0/lib/native/64bit/libFaCTPlusPlusJNI.so)
    uk.ac.manchester.cs.factplusplus.protege.FaCTPlusPlusFactory.getReasonerFactory(Unknown Source)
    org.protege.editor.owl.model.inference.ReasonerInfoComparator.compare(ReasonerInfoComparator.java:9)
    org.protege.editor.owl.model.inference.ReasonerInfoComparator.compare(ReasonerInfoComparator.java:5)
    java.util.TimSort.countRunAndMakeAscending(TimSort.java:329)
    java.util.TimSort.sort(TimSort.java:189)
    java.util.TimSort.sort(TimSort.java:173)
    java.util.Arrays.sort(Arrays.java:659)
    java.util.Collections.sort(Collections.java:217)
    org.protege.editor.owl.model.OWLWorkspace.rebuildReasonerMenu(OWLWorkspace.java:500)

2011-12-14

My RythmBox radio stations, etc , are in :

$HOME/.local/share/rhythmbox/rhythmdb.xml

EulerGUI: misc

TODO

MPEG7.owl cached here : tmp rule file is present but the button is grey ; no OWL tree

http://swoogle.umbc.edu/index.php?option=com_frontpage&service=search&queryType=search_swd_ontology&searchString=melody&searchStart=11&searchSortField=

mvn versions:display-plugin-updates
 ...
[INFO] The following plugin updates are available:
[INFO]   maven-surefire-plugin .................................. 2.10 -> 2.11
[INFO]   maven-surefire-report-plugin ........................... 2.10 -> 2.11
[INFO] 
[WARNING] The following plugins do not have their version specified:
[WARNING]   emma:maven-emma-plugin ................................. (unknown)

mvn versions:display-dependency-updates
 ...
[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   commons-logging:commons-logging ......... 1.0.4 -> 99.0-does-not-exist
[INFO]   jline:jline ............................................ 0.9.94 -> 1.0
[INFO]   junit:junit ............................................ 4.8.2 -> 4.10
[INFO]   org.drools:drools-compiler ................ 5.3.0.Final -> 5.3.1.Final

COMMITS:

notation "@" + language was lost when populating Triple objects :

previous commit was bad, the language information has to be kept apart from the string.

TODO test builtin log:dtlit ; probably field Triple.object is not used anymore

- implement static method calls in N3 / Drools engine ; tested in BasicRuntimeTest with this triple in consequent :

java:java-lang-System javam:setProperty ( "JimiHendrix" "guitar virtuoso" ) .

missing N3 prefixes are now added in N3 shell (through prefix.cc)

tested with

:a doap:foo "bla" .

2011-12-13

COMMIT: notation "@" + language was lost when populating Triple objects

TODO :add datatype for numbers, booleans

TODO: missing prefix are corrected in N3 shell

2011-12-12

COMMIT : better error message ( and app. not blocking ) when opening from command line a file.owl actually containing some N3 .

Notes after visiting Drools users

In Lyon.

The use case is to check each patient record (in batch) for errors. Currently they have a pure Java implementation.

They consider using Drools for the next version.

Using EulerGUI framework allows to directly state rules in ATTEMPTO.

What remains to develop by hand is to populate each patient record in RDF triples, preferably using one of the often used patient record vocabularies (TODO search patient record vocabularies).

Then use one of the examples in EG (TODO link).

Sent :

The main presentation:

http://jmvanel.free.fr/presentations/connaissances_DL_CNL_regles.xhtml

The source code for Jemmy based applicative tests:

https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/test/java/eulergui/gui

The presentation about using ATTEMPTO for entering OWL ontologies:

http://jmvanel.free.fr/presentations/pres-owl-anglais-controle.odp

The EulerGUI user manual:

http://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/html/documentation.html

The EulerGUI 1.9 snapshot ( recommended ) :

http://eulergui.sourceforge.net/tmp/

2011-12-11

TODO in EulerGUI before release 1.9

See TODO in EulerGUI before release 1.9

remove insertlogical for project main query

All these test errors are not reproduced in eclipse :(

Tests in error: 
  testProjectFromURL(eulergui.project.TestProject)
  test_foaf_import2(eulergui.gui.TestGenericGuiGenerationInsertLogical): Wait JLabel with text "gender" loaded
  testAddNewSPARQL(eulergui.gui.TestSPARQLInGUI)

Tests run: 177, Failures: 1, Errors: 3, Skipped: 0

[ERROR] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16:02.343s

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549429

2011-12-08

TODO: why does this fail ? Calling a Java method though N3 consequent when expected Java argument is a String , but provided argument is a resource is probably not implemented.

{       ?L :alert "true"
        # ; log:uri ?LL .
} => {  :application :displayAlert ?L . }.

{ :application :displayAlert ?LL .
} => { 
  ?F a java:eulergui-gui-TemporaryFrame
  ; javap:localizedMessage ?LL .
}.

EulerGUI: regressions introduced by N-Triples parser

FIX most of the test suite, after regressions introduced by N-Triples parser

With N-Triples files, or any big N3, EG does not use the triples kept in a List to feed the Drools KB.

TODO fix: Tests in error:

testRemoteImportSwrlWithDrools(eulergui.gui.TestImportSwrl): Frame Title Component Chooser "jEdit.*.as.rules.n3.*"

==> not reproduced in eclipse

testAddNewSPARQL(eulergui.gui.TestSPARQLInGUI): Frame Title Component Chooser ".*new_source.rq.*"

==> test uncomplete

testOWLReasoner(eulergui.gui.TestGenericGuiGeneration): Wait next node loaded under parent [eulergui.tools.FilteredTreeNode@325ea79c] when requested was [ http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Animal ]

==> new error, seems unrelated to recent changes

[INFO] Total time: 16:25.403s

Loading musicbrainz in Jena TDB

After Andy's response, I raised the memory.

With 2.9Mb heap space :

Add: 41 500 000 Data (Batch: 125 / Avg: 3 050)
  Elapsed: 13 602,71 seconds [2011/12/08 02:13:07 CET]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.nio.DirectByteBuffer.asIntBuffer(DirectByteBuffer.java:720)

2011-12-07

hg clone http://dig.csail.mit.edu/hg/tabulator/

TempWeb 2012 : 2nd Temporal Web Analytics Workshop

http://www.wikicfp.com/cfp/servlet/event.showcfp?eventid=19844&copyownerid=2

Getting started on making iTunes plugins?

http://forums.ilounge.com/third-party-software-mac-pc/247656-getting-started-making-itunes-plugins.html

http://drobilla.net/software/serd/

Serd is a lightweight C library for RDF syntax which supports reading and writing Turtle and NTriples. Serd is not intended to be a swiss-army knife of RDF syntax, but rather is suited to resource limited or performance critical applications, or situations where a simple reader/writer with minimal dependencies is ideal

http://www.ldodds.com/foaf/foaf-a-matic

http://presbrey.mit.edu/

-------------------------------

Subscribed to the new (Apache) mailing list:

http://incubator.apache.org/jena/help_and_support/index.html

whose archive is here : http://mail-archives.apache.org/mod_mbox/incubator-jena-users/

[jena-dev] tdbloader2 OutOfMemoryException with large files

GdMap (Graphical Disk Map)

not bad, useful and showy : GdMap (Graphical Disk Map)

SYNOPSIS

[-f dir|--folder=dir]

DESCRIPTION

GdMap is a tool to display disk space using tree maps.

And , guess what ? the largest part is tdb_data : 8Gb .

2011-12-06

http://www.linuxjournal.com/users/dave-phillips?page=6

http://www.wikicfp.com/cfp/servlet/event.showcfp?eventid=19844&copyownerid=2

Edit MP3 metadata

http://www.id3.org/Implementations indeed interesting; there are 3 Java libs , but are they 100% Java ? not sure ...

<jmvanel> http://www.id3.org/Implementations indeed interesting; there are 3 Java libs , but are they 100% Java ? not sure ...

<jmvanel> https://github.com/mpatric/mp3agic#readme this one is 100% Java

<jmvanel> http://java.net/projects/jaudiotagger/ : has many Tags: tagger, mp3, mp4, id3, flac, ogg, music

<jmvanel> since it comes from Oracle :( , it should be 100% Java , but there is no doc. on the site .

<rszeno> this is new wave, if is hard to write it must be also hard to use it, :)

<jmvanel> :)

<jmvanel> This one has a GUI, and even a doc in French : http://entagged.sourceforge.net/index.php#news , BUT last release is 2008

searched "edit MP3 metadata linux"

http://tldp.org/HOWTO/MP3-HOWTO-13.html

sudo apt-get install mp3info id3

Work with DOAP

<jmvanel> Some DOAP wiki stuff is roten with spam : http://trac.usefulinc.com/doap/wiki/Generators

http://crschmidt.net/semweb/doapamatic/ : alas this creates an XML file that is not RDF:

<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:admin="http://webns.net/mvcb/">
 <name>EulerGUI</name>
 <shortname>Lecteur musical sémantique</shortname>
 <description>Lecteur musical avec de fonctionalités avancées, utilisant les technologies du Web Sémantique</description>
 <programming-language>Java</programming-language>
 <programming-language>N3</programming-language>
 <maintainer>
  <foaf:Person>
     <foaf:name>Jean-Marc Vanel</foaf:name>
     <foaf:homepage rdf:resource="http://jmvanel.free.fr/"/>
     <foaf:mbox_sha1sum>47554e5293b708f607dbdba7eb4f8017a4b298e9</foaf:mbox_sha1sum>
  </foaf:Person>
 </maintainer>
</Project>

http://crschmidt.net/semweb/doapamatic/?name=Lecteur+musical+s%C3%A9mantique+de+Taxochronos&shortname=Lecteur+musical+s%C3%A9mantique&description=Lecteur+musical+avec+de+fonctionalit%C3%A9s+avanc%C3%A9es%2C+utilisant+les+technologies+du+Web+S%C3%A9mantique&shortdesc=&homepage=&wiki=&download-page=&download-mirror=&bug-database=&category=&langs=Java%2C+HTML5%2C+Ada%2C+OWL%2C+SWRL%2C+N3&os=&maint_name=Jean-Marc+Vanel&maint_homepage=http%3A%2F%2Fjmvanel.free.fr%2F&maint_mbox=jeanmarc.vanel%40gmail.com&dev_name=&dev_homepage=&dev_mbox=&helper_name=&helper_homepage=&helper_mbox=&repos=&repos_browse=&repos_location=&repos_module=&repos_anon=

Problems with EulerGUI

TODO : 2 problems with foaf_import2.n3p : generated form has no datatype properties; message "not all is saved"

cd src/deductions/n3_nojs/ ; eg person-app.n3p 
 ...
ParserLink.parse(): n3ParseResult.isInError: file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/deductions/n3_nojs/person-app.n3
ParserLink.parse(): LineNumber: 14 : 1
Exception in thread "doN3SourceAdded: person-events.n3" java.lang.RuntimeException: Erreur pendant  re-parsing N3 source "person-events.n3"
        at eulergui.project.N3Source.manageParseN3(N3Source.java:430)
        at eulergui.project.N3Source.update(N3Source.java:378)
        at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:121)
        at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)
Caused by: java.lang.NullPointerException
        at net.sf.parser4j.parser.service.Parser.shiftByToken(Parser.java:797)
        at net.sf.parser4j.parser.service.Parser.parse(Parser.java:397)
        at eulergui.parser.n3.impl.parser4j.service.N3Parser.parseN3(N3Parser.java:177)
        at eulergui.drools_engine.ParserLink.doParse(ParserLink.java:150)
        at eulergui.drools_engine.ParserLink.parse(ParserLink.java:113)
        at eulergui.project.N3Source.doParseN3(N3Source.java:477)
        at eulergui.project.N3Source.manageParseN3(N3Source.java:418)
        ... 3 more
Exception in thread "doN3SourceAdded: person-data.n3" java.lang.RuntimeException: Erreur pendant  re-parsing N3 source "person-data.n3"
        at eulergui.project.N3Source.manageParseN3(N3Source.java:430)
        at eulergui.project.N3Source.update(N3Source.java:378)
        at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:121)
        at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)
Caused by: net.sf.parser4j.parser.service.ParserException: java.io.IOException: Stream closed
        at net.sf.parser4j.parser.service.Parser.readTerminalValue(Parser.java:861)
        at net.sf.parser4j.parser.service.Parser.readTerminalValueAndParse(Parser.java:642)
        at net.sf.parser4j.parser.service.Parser.parse(Parser.java:387)
        at eulergui.parser.n3.impl.parser4j.service.N3Parser.parseN3(N3Parser.java:177)
        at eulergui.drools_engine.ParserLink.doParse(ParserLink.java:150)
        at eulergui.drools_engine.ParserLink.parse(ParserLink.java:113)
        at eulergui.project.N3Source.doParseN3(N3Source.java:477)
        at eulergui.project.N3Source.manageParseN3(N3Source.java:418)
        ... 3 more
Caused by: java.io.IOException: Stream closed
        at java.io.BufferedReader.ensureOpen(BufferedReader.java:115)
        at java.io.BufferedReader.read(BufferedReader.java:172)
        at net.sf.parser4j.parser.service.ParserFileReader.read(ParserFileReader.java:111)
        at net.sf.parser4j.parser.service.ParserInput.read(ParserInput.java:60)
        at net.sf.parser4j.parser.service.Parser.readTerminalValue(Parser.java:859)
        ... 10 more

Dialog on foaf IRC

<nevali> (specifically, it's a URI to the agent as a *thing*, not the document describing the agent)

<jmvanel> I use this : http://jmvanel.free.fr/jmv.rdf#me

<jmvanel> I guess it's classical

<nevali> I'd steer clear of having e.g., '.rdf' or '.html' or similar if you can possibly avoid it; it won't always preclude content negotiation, but it will make it more difficult

<nevali> remember that 'cool URIs don't change' still applies, so hiding technology choices = good

<jmvanel> nevali ; agree

<jmvanel> I use a stadard PHP + Apache free hosting , but I never took the time to learn how to do content negotiation on this server

<jmvanel> ( I could also use an XSLT stylesheet )

<jmvanel> so on content nego necessary

<jmvanel> so NO content nego necessary

* duck1123 est parti (Ping timeout: 240 seconds)

<nevali> not ever?

* nevali goes back to the "don't change" bit

<nevali> on Apache it's "Options MultiViews" in your .htaccess, at a pinch

<nevali> (or Options +MultiViews, even)

<nevali> jmvanel: some background, in the event that it's helpful -- http://httpd.apache.org/docs/2.0/content-negotiation.html

Loading musicbrainz in TDB

musicbrainz dump in N-Triples is BIG !!!

 % ls -l  musicbrainz_ngs_dump.rdf.ttl 
-rw-r--r-- 1 jmv jmv 25719386678 16 juin  14:58 musicbrainz_ngs_dump.rdf.ttl

 % time wc musicbrainz_ngs_dump.rdf.ttl
  178995221   829703178 25719386678 musicbrainz_ngs_dump.rdf.ttl
wc musicbrainz_ngs_dump.rdf.ttl  710,46s user 20,37s system 94% cpu 12:50,43 total

Add: 36 000 000 triples (Batch: 204 / Avg: 4 740)
  Elapsed: 7 594,09 seconds [2011/12/05 23:16:31 CET]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space 
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNodeMgr.overlay(BPTreeNodeMgr.java:194)
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNodeMgr.access$100(BPTreeNodeMgr.java:22)
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNodeMgr$Block2BPTreeNode.fromByteBuffer(BPTreeNodeMgr.java:141)
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNodeMgr.get(BPTreeNodeMgr.java:84)
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.get(BPTreeNode.java:127)
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:379)
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:399)
        at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.insert(BPTreeNode.java:167)
        at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.addAndReturnOld(BPlusTree.java:297)
        at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.add(BPlusTree.java:289)
        at com.hp.hpl.jena.tdb.nodetable.NodeTableNative.accessIndex(NodeTableNative.java:133)
        at com.hp.hpl.jena.tdb.nodetable.NodeTableNative._idForNode(NodeTableNative.java:98)
        at com.hp.hpl.jena.tdb.nodetable.NodeTableNative.getAllocateNodeId(NodeTableNative.java:67)
        at com.hp.hpl.jena.tdb.nodetable.NodeTableCache._idForNode(NodeTableCache.java:108)
        at com.hp.hpl.jena.tdb.nodetable.NodeTableCache.getAllocateNodeId(NodeTableCache.java:67)
        at com.hp.hpl.jena.tdb.nodetable.NodeTableWrapper.getAllocateNodeId(NodeTableWrapper.java:32)
        at com.hp.hpl.jena.tdb.nodetable.NodeTableInline.getAllocateNodeId(NodeTableInline.java:39)
        at com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:72)
        at com.hp.hpl.jena.tdb.store.bulkloader.LoaderNodeTupleTable.load(LoaderNodeTupleTable.java:112)
        at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader$1.send(BulkLoader.java:203)
        at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader$1.send(BulkLoader.java:186)
        at org.openjena.riot.lang.LangTurtle.emit(LangTurtle.java:52)
        at org.openjena.riot.lang.LangTurtleBase.checkEmitTriple(LangTurtleBase.java:475)
        at org.openjena.riot.lang.LangTurtleBase.objectList(LangTurtleBase.java:341)
        at org.openjena.riot.lang.LangTurtleBase.predicateObjectItem(LangTurtleBase.java:273)
        at org.openjena.riot.lang.LangTurtleBase.predicateObjectList(LangTurtleBase.java:254)
        at org.openjena.riot.lang.LangTurtleBase.triples(LangTurtleBase.java:245)
        at org.openjena.riot.lang.LangTurtleBase.triplesSameSubject(LangTurtleBase.java:206)
        at org.openjena.riot.lang.LangTurtle.oneTopLevelElement(LangTurtle.java:34)
        at org.openjena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:132)
        at org.openjena.riot.lang.LangBase.parse(LangBase.java:71)
        at org.openjena.riot.RiotReader.parseTriples(RiotReader.java:85)

tdbloader --loc ~/tdb_data musicbrainz_ngs_dump.rdf.ttl  4380,35s user 111,88s system 47% cpu 2:39:01,08 total

<jmvanel> Of course I can reload with more memory , but I need to understand better what TDB does while loading

<jmvanel> apparently it populates a bplustree in memory while loading .

<jmvanel> Does it also happen in normal functionning ?

<jmvanel> I mean for querying ?

<jmvanel> I have to read the doc.

<jmvanel> If it's just a matter of splitting before loading, the tool should do it itself .

Thread on Jena list "tdbloader2 OutOfMemoryException with large files" :

http://mail-archives.apache.org/mod_mbox/incubator-jena-users/201101.mbox/%3C09B0A458D613784BBE4D6B174404BCF22149C4@008-AM1MPN1-023.mgdnok.nokia.com%3E

musicbrainz_ngs_dump.rdf.ttl has a lot of redundancy :

_:AmapX3aXTrackX40XX40X9563759 <http://purl.org/dc/terms/title> "Head Like a Hole" .
_:AmapX3aXTrackX40XX40X9563759 <http://www.w3.org/2000/01/rdf-schema#label> "Head Like a Hole" .
_:AmapX3aXTrackX40XX40X9563783 <http://purl.org/dc/terms/title> "Head Like a Hole" .
_:AmapX3aXTrackX40XX40X9563783 <http://www.w3.org/2000/01/rdf-schema#label> "Head Like a Hole" .
_:AmapX3aXTrackX40XX40X9563856 <http://purl.org/dc/terms/title> "Head Like a Hole" .
_:AmapX3aXTrackX40XX40X9563856 <http://www.w3.org/2000/01/rdf-schema#label> "Head Like a Hole" .

2011-12-05

musicbrainz links

http://musicbrainz.org/doc/LinkedBrainz

http://musicbrainz.org/doc/MusicBrainz_Database#Data_Overview

http://musicbrainz.org/doc/Development

http://musicbrainz.org/doc/Projects

http://linkedbrainz.c4dmpresents.org/content/rdf-dump

http://musicbrainz.org/doc/Database_Schema

wget http://linkedbrainz.c4dmpresents.org/data/musicbrainz_ngs_dump.rdf.ttl.g 12,13s user 69,82s system 3% cpu 41:53,27 total

Indexing dbPedia stuff with TDB

<jmvanel> trying TDB for future integration in EulerGUI

<jmvanel> again using most iof downloaded dbPedia

<jmvanel> querying 300 triples about dbpedia-owl:MusicalWork takes 2 seconds

<jmvanel> however the bulk loading took 10mn :( .

<jmvanel> for a total of 9276183 triples

<jmvanel> these 2s are without doing any configuration

<jmvanel> and this includes some overhead and writing on the console, that we would NOT have in a real application .

time tdbquery --loc ~/tdb_data  --query=dbpedia-large-query2.sparql 
 ...
1,92s user 0,08s system 135% cpu 1,469 total

% cat dbpedia-large-query2.sparql 
PREFIX dbpedia: <http://dbpedia.org/resource/>
prefix dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
CONSTRUCT {
  ?SONG ?p ?v .
}
WHERE {
  # ?SONG a dbpedia-owl:Song
  ?SONG a dbpedia-owl:MusicalWork
        ;?p ?v .
} LIMIT 300

For just 10 triples:

tdbquery --loc ~/tdb_data --query=dbpedia-large-query2.sparql 1,96s user 0,11s system 131% cpu 1,574 total

For just 10 triples with SELCT :

tdbquery --loc ~/tdb_data --query=dbpedia-large-query2-select.sparql  1,96s user 0,14s system 128% cpu 1,632 total

This was on Debian with java version "1.7.0" :

Load: /home/jmv/ontologies/dbpedia/images_en.nt -- 2011/12/05 16:32:32 CET
 ...
Add: 1 950 000 Data (Batch: 34 940 / Avg: 29 776)
ERROR [line: 1999931, col: 76] illegal escape sequence value: L (0x4C)
Exception in thread "main" org.openjena.riot.RiotException: [line: 1999931, col: 76] illegal escape sequence value: L (0x4C)
        at org.openjena.riot.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:110)
        at org.openjena.riot.lang.LangBase.raiseException(LangBase.java:201)
        at org.openjena.riot.lang.LangBase.nextToken(LangBase.java:148)
        at org.openjena.riot.lang.LangNTriples.parseOne(LangNTriples.java:57)
        at org.openjena.riot.lang.LangNTriples.parseOne(LangNTriples.java:21)
        at org.openjena.riot.lang.LangNTuple.runParser(LangNTuple.java:58)
        at org.openjena.riot.lang.LangBase.parse(LangBase.java:71)
        at org.openjena.riot.RiotLoader.readTriples(RiotLoader.java:196)
        at com.hp.hpl.jena.tdb.store.bulkloader2.CmdNodeTableBuilder.exec(CmdNodeTableBuilder.java:151)
        at arq.cmdline.CmdMain.mainMethod(CmdMain.java:85)
        at arq.cmdline.CmdMain.mainRun(CmdMain.java:47)
        at arq.cmdline.CmdMain.mainRun(CmdMain.java:34)
        at com.hp.hpl.jena.tdb.store.bulkloader2.CmdNodeTableBuilder.main(CmdNodeTableBuilder.java:67)

It seems that this file is indeed wrong. Restarted without this file :

 17:21:41 -- TDB Bulk Loader Finish
 17:21:41 -- 657 seconds
bin/tdbloader2 --loc ~/tdb_data ~/ontologies/dbpedia/*.nt  597,65s user 17,78s system 93% cpu 10:56,63 total

This was on Ubuntu 11.10 :

cd ~/src/TDB-0.8.10
time bin/tdbloader2 --loc ~/tdb_data ~/ontologies/dbpedia/*.nt
...
Total: 2 700 909 tuples : 145,36 seconds : 18 581,34 tuples/sec [2011/12/03 19:47:35 CET]
19:47:35 Index phase
19:ent47:35 Index SPO
19:48:56 Build SPO
19:49:08 Index POS
19:52:34 Build POS
19:52:46 Index OSP
19:55:04 Build OSP
19:55:20 Index phase end
19:55:20 -- TDB Bulk Loader Finish
19:55:20 -- 617 seconds

real10m16.407s
user10m4.298s
sys0m15.457s

2011-12-01

Discussion with conan

<conan> jmvanel: did you mean to use insertLogical?

<jmvanel> yes

<conan> this seems like an ugly way to do queries

<jmvanel> I could avoid it for such large files

<jmvanel> once you said that insertLogical is quick as insert ....

* jgraham (~jgraham@c-98-229-161-190.hsd1.ma.comcast.net) a rejoint #drools

<jmvanel> but I guess the memory is higher

* ge0ffrey est parti ("http://blog.athico.com/search/label/planner")

* bdavis1 (~bdavis@75.103.6.58) a rejoint #drools

* ualtin est parti (Client closed connection)

* bdavis est parti (Ping timeout: 20 seconds)

<conan> jmvanel: few mins, in a call.

* wilmoore (~wilmoore@70-89-165-49-ISTS-co.hfc.comcastbusiness.net) a rejoint #drools

<conan> jmvanel: also I think there are better ways to do these queries

<jmvanel> eager to know more

<jmvanel> conan :)

* sotty (~sotty@dida132.deis.unibo.it) a rejoint #drools

<conan> jmvanel: gonna be a while longer

<conan> jmvanel: but in sort we now do prolog style derivation queries

<jmvanel> ok ; an article to read about ?

<jmvanel> or a code sample

<conan> http://pastebin.com/xiPsSukV

<conan> oops

<conan> http://drools.46999.n3.nabble.com/Call-query-from-other-query-td3542082.html

<conan> better

<conan> some relevant links in there

<conan> to my reply to someone asking same hting

<conan> I don't think you need materialised views for your stuff

<conan> so just use ?

<conan> jmvanel: prolog doesn't haev materialised views

<conan> jmvanel: materialised view is turning a query such htat it is effectively a long lived table

<conan> any changes to the underlying ground terms

<conan> is incrementally reflected inthe materialised view results

<jmvanel> ok , thynaks

<conan> if you use ?

<conan> its a lighter wait query

<jmvanel> that is an alternative to queries, but more powerful

<conan> and works like prolog

<conan> materialised views are obviously heavier

<conan> not an alternative

<conan> it's just a normal query

<conan> if you leave off the ?

<conan> it materialises

<jmvanel> reading the mailing list you gave the link ...

<conan> docs are still ab it shallow

<conan> http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html/ch05.html#d0e6233

<conan> hmm the formatting looks screwed too

<conan> "As previously mentioned you can use live "open" queries to reactively receive changes over time from the query results, as the underlying data it queries against changes. Notice the "look" rule calls the query without using '?'."

<conan> is in the docs

<conan> we callled it "live open query"

<conan> I'll update it to say materialised views too

* jgraham est parti (Client closed connection)

<jmvanel> so, "live open query" == "materialised views" in newer denomination ?

<conan> yes

<conan> but might go back to using materialised view

<conan> or just use both :)

<conan> jmvanel: if you look at the isContainedIn example

<conan> that shows a traditional prolog transitive closure over a graph

<conan> and it shows it used in two ways

<conan> one normal and one materialised

<conan> jmvanel: tbh I'm not ensure sure what that rule you ahve is doing

<conan> so it finds all Triples and binds to th $SONG to the subject

<conan> so it's finding all song's for the MusicalWork

<conan> oh hang on

<conan> oh hang on

<conan> yes I get what you are doing now

<conan> sotty: he adds the rule

<conan> and the rule inserts all results as an object itself

<conan> he does it logically

<conan> such that when the rule is removed

<conan> the results are removed

<conan> jmvanel: no wonder that was so bad

<conan> jmvanel: your example there could have been done with a simple query

<conan> you never needed a rule

<conan> jmvanel: doesn't even need the new deriviation tree stuff

<conan> jmvanel: http://pastebin.com/9giU1iz4

<conan> that's all you needed

<sotty> yes

<sotty> what worries me

<sotty> is that if he had a rule such as

<sotty> ( X, "type", "MusicalObject" ) ---> ( X, "type", "SomeMoreGeneralEntity" )

<sotty> i.e. a triple inference rule

<sotty> would the performance issues have been the same?

<jmvanel> conan, I knew that a simple query would fit ; this rule I showed you is a remnant of the very begining of the project .

<conan> jmvanel: ok I'm confused

<conan> jmvanel: what's the problem

<jmvanel> I have to test this of course

<conan> why would you not want to use a query?

<conan> inserting stuff like you did with logical insertions for all results

<conan> is going to be painfully heavy

<jmvanel> it's fine with me , using query

<conan> ok

<conan> jmvanel: you should find this order of magnitudes lighter :)

<conan> sotty: no tsure of the issue you mean

<jmvanel> my initial question is this thread was : can I enhance the CPU and mem consumption ?

<conan> no

<conan> jmvanel:just please don't publish stuff showing "how bad drools is" using the example you pasted, compard to a standard prolog query.

<conan> wouldn't be fair

<jmvanel> no, don't worry :) I suspect that using insertLogical take more memory , no ?

<conan> yes

<conan> jmvanel: its a little more efficient in 5.2

<conan> but you are still like tripling the number of objects

<sotty> jmvanel: using drools to do massive triple processing might not be the best of ideas

<conan> because it needs to setup bi-direction and multi-dimensional lists.

<sotty> especially if massive triple processing is the ONLY thing you need to do

<conan> sotty: I believe he's just trying to get his EULER tool to translate to different engines

<conan> sotty: not solve anythign specific

<conan> so it's a "best effort"

<sotty> I see

<conan> sotty: he has his own languaeg and ide, that should be able to target multiple engines for execution

<conan> drools is just one of many

<jmvanel> of course it's not the ONLY thing ; but trying to fix simple case first

<conan> jmvanel: tbh I'm very keen to see how far behind we are other engines

<conan> for triple based stuff

<conan> I'm not expecting ot compete with dedicated triple engines

<conan> but would be interesting to know how far behind we are

<conan> when doing a more apples to apples test

<conan> jmvanel: queries are in general ligher than rules too

<conan> while it's the same rete network

<conan> asl ong s you aren't using materialised views

<conan> we don't bother making a lot of data structures

<conan> we skip all left memory references etc

<jmvanel> "drools is just one of many engines" right, but it's very important for the project , because or stateful nature truth maintenance and Java integration :)

* jvanzyl (~jvanzyl@204.14.239.222) a rejoint #drools

<conan> jmvanel: btw we are looking into improving our TMS

<conan> jmvanel: read the book "building problem solvers"

<jmvanel> no

<conan> jmvanel: good summary here http://www.cis.temple.edu/~ingargio/cis587/readings/tms.html

<conan> jmvanel: anyway prd system TMS is actually only a partial TMS

<conan> jmvanel: it can only do "IN" it can't do "OUT" labelling

<conan> jmvanel: further more sotty wants multi value

<conan> whre IN and OUT become TRUE, FALSE and UNKOWN

<conan> at the moment we can only say TRUE

<conan> but the same si true for all PRD systems

<conan> jmvanel: eventually we'd like to look into be able to do not just JTMS, but also ATMS

<conan> ATMS is much more complex though, due to "multiple worlds"

<conan> jmvanel: but it's interesting stuff

<conan> jmvanel: so you are using drools in a real project?

<conan> http://books.google.co.uk/books/about/Building_problem_solvers.html?id=MraVKw_5g28C&redir_esc=y

<conan> jmvanel: can read a lot of the book from google

<jmvanel> ok

<jmvanel> ATMS == ?

<conan> assumption based truth maintenance system

<jmvanel> ok

<jmvanel> I'll have a look

<conan> jmvanel: all inserted onjects that are not logical justified are called "assumptions"

* ualtin (~ualtin@s15231105.onlinehome-server.info) a rejoint #drools

<conan> jmvanel: a set of assumptions is called an environment or a world

<jmvanel> ok

<conan> jmvanel: ATMS allows you to setup multiple sets of assumptions

<conan> it's sorta like having 1...n ksessions each with an initial different set of assumptions (stated insertions)

<conan> the TMS (logical based and justified insertions) is then shared across those environments/worlds

<conan> jmvanel: the basic idea is you use TMS to help drive your search

<conan> but if you have to keep undoing/reseting your current environemtn

<conan> to try different search paths, it gets expensive

<conan> so why not do those in paralle

<conan> parallel

<conan> jmvanel: http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.84.2778

<jmvanel> you mean at the app level managing several KB in parallel ?

<conan> jmvanel: this was the sort of thing they built into the CM over at Thinking Machines

<conan> back in te early 90s

<conan> jmvanel: not several KBs

<conan> several ksessions

<conan> jmvanel: imagine you have different data sets, you aren't sure which data gives you the result. you have to in turn create a derivation tree for one configuration of data. then you do it for another configuration

<conan> the peformance would kill

<conan> so TMS is a way to incrementally search through your derivation tree

<conan> ATMS is a way to do that in parallel

<conan> and in a way that one world can learn from the other wrold

<conan> to avoid doing wasted work, subsumption etc

<conan> jmvanel: but, tbh, i'm still learning this stuff

<conan> jmvanel: I don't explain it hat well. a lot of ATMS still escapes me, especially about exactly how to do the directed back trackking.

<jmvanel> anyway , I now have a costumer with a concrete app to develop , a semantic media player

<conan> awesome

<conan> jmvanel: if you are using drools

<conan> jmvanel: don't hesitate to ask for our help

<conan> especially if you can give back performance information and issues

<conan> so we can better focus our efforts

<jmvanel> yeah , Drools in my best option , I hope to manage about 100 000 songs, each with about 10 properties .

<conan> jmvanel: out of interest, why dorols and not say pellet?

<conan> you need reactiveness?

<jmvanel> hopefully in memory

<jmvanel> yes

<conan> jmvanel: what are your plans for high availabilty

<conan> that is something we don't really help with "out of the box"

<conan> there are things you can cook yourself, for redundancy

<conan> and actually it wouldn't be too hard to tweak the engine to make that cleaner

<conan> but depends on ho much time you have and your requirements

<jmvanel> pellet has a bas reputaiton for scalability , and we have 2 ways to reuse OWL ontos as rules

<conan> jmvanel: how much of what you do is under NDA?

<conan> jmvanel: I would suggest you use our latest trait stuff too

<conan> jmvanel: if you can share, atleast privately with davide and I.

<conan> jmvanel: we'll try and direct you

<conan> specially if you could write up the results in a case study

<jmvanel> yeah , you're right I should not sayy too publicly

<jmvanel> too muxh

<sotty> jmvanel : yup, we're trying to build better support to ontologies, in many ways

<conan> jmvanel: ok maybe skype?

<conan> jmvanel: we can setup a skype IM and you davide and I can discuss there.

<jmvanel> anyway the genric parts are and will be in EulerGUI on sf.net

<conan> jmvanel: we are really keen to start getting some real world applicatino of our new Trait/Tiple capabiliity.

<jmvanel> I'm jmvanel1 on skype

<conan> ok sent

<sotty> gtg, I'll be back in 1hr

<conan> sotty: ok

<conan> jmvanel: for instance your triples

<conan> I assume they map to Things?

* sotty est parti ("Ex-Chat")

<conan> jmvanel: lets continue this on IM

<jmvanel> I 've read the article Trait/Triple capabiliity , but my point is that I don't need the OO stuff at all , because the data are semweb data

<jmvanel> ok

<conan> jmvanel: Trait/Triple is for workign with semweb

[19:33:20 CEST] Mark Proctor: so I'm really keen to help you here

[19:33:29 CEST] Mark Proctor: so we can figure out exactly what we can do to improve drools

[19:33:34 CEST] Mark Proctor: for triple based problems

[19:33:52 CEST] Mark Proctor: so looking at data sets, at models and some of the basic query/rules you need

[19:33:54 CEST] Mark Proctor: would really hepl

[19:33:55 CEST] Mark Proctor: hepl

[19:33:57 CEST] Mark Proctor: help

[19:33:59 CEST] Mark Proctor: :)

[19:35:27 CEST] Jean-Marc Vanel: i m here

[19:37:21 CEST] Jean-Marc Vanel: one question I have , when many triples share a same subject string , could Drools store a single instance of the String ?

[19:39:28 CEST] Mark Proctor: good point

[19:39:31 CEST] Mark Proctor: it doesn't now

[19:39:37 CEST] Mark Proctor: but it is something I've thought about

[19:39:45 CEST] Mark Proctor: basically string internalisation

[19:39:51 CEST] Mark Proctor: for large systems, it can make a difference

[19:40:13 CEST] Mark Proctor: tbh, at hte moment hte best way to do this is some interceptor

[19:40:24 CEST] Mark Proctor: you will basically making a hashmap of strings

[19:40:40 CEST] Mark Proctor: and a listener will swap the string for the internalised one

[19:40:46 CEST] Jean-Marc Vanel: some interceptor , OK

[19:40:50 CEST] Mark Proctor: you can either do that your side

[19:40:53 CEST] Mark Proctor: before it goes into the engine

[19:40:58 CEST] Jean-Marc Vanel: :)

[19:41:00 CEST] Mark Proctor: or you can write a working memory listener

[19:41:06 CEST] Mark Proctor: and go to the on insert method

[19:41:09 CEST] Mark Proctor: caste

[19:41:10 CEST] Mark Proctor: and set the field

[19:41:15 CEST] Mark Proctor: as long as the field is the same value

[19:41:22 CEST] Mark Proctor: you won't break the integrity of the engine

[19:41:22 CEST] Jean-Marc Vanel: that's one of the things Prolog engine do

[19:41:47 CEST] Mark Proctor: we could do this for objects created or inserted inside of the engine itself

[19:41:55 CEST] Mark Proctor: but it's hard for objects provided to us

[19:42:02 CEST] Mark Proctor: would be expensive

[19:42:08 CEST] Mark Proctor: as we would have to introspect

[19:42:17 CEST] Mark Proctor: and we don't konw if it's worth it or not

[19:42:19 CEST] Mark Proctor: but thinking about it

[19:42:22 CEST] Mark Proctor: we could do this as a type declaration

[19:42:31 CEST] Mark Proctor: you could declare that some field to be internalised

[19:42:35 CEST] Mark Proctor: as long as it's directed

[19:42:39 CEST] Mark Proctor: we could then handle that ourselves

[19:42:41 CEST] Mark Proctor: good idea

[19:42:53 CEST] Jean-Marc Vanel: anyway the POJO for Drools are suppose to have no side effects if I understoofd well

[19:43:20 CEST] Mark Proctor: so we'd allow some @internalise attribute for a property

[19:43:29 CEST] Mark Proctor: we'd maintain a hashmap of all possible values

[19:43:49 CEST] Mark Proctor: and then on any insert/modify of that object type, make sure we only ever stored the same instance

[19:43:51 CEST] Mark Proctor: I like it :)

[19:43:58 CEST] Mark Proctor: quick to do too

[19:44:04 CEST] Jean-Marc Vanel: sounds good; I sure not the only user that could benefit of this

[19:44:12 CEST] Mark Proctor: no, definitely not

[19:44:16 CEST] Mark Proctor: we can do this for any value type

[19:44:23 CEST] Mark Proctor: that impelments equals/hashcode too

[19:44:26 CEST] Mark Proctor: no it's a great idea

[19:44:27 CEST] Jean-Marc Vanel: I hope to come in London in junuary ;

[19:44:38 CEST] Mark Proctor: I wouldn't want ot internalise all fields by default

[19:44:42 CEST] Mark Proctor: or it would be espensive

[19:44:45 CEST] Mark Proctor: but the user konws their data

[19:44:47 CEST] Jean-Marc Vanel: I could show you what I do with Drools :)

[19:44:49 CEST] Mark Proctor: and they'll konw if the cost is worth it

[19:44:59 CEST] Mark Proctor: I may be in india for january.....

[19:45:11 CEST] Mark Proctor: but hopefully we'll overlap

[19:45:15 CEST] Jean-Marc Vanel: w<hole january

[19:45:17 CEST] Jean-Marc Vanel: ?

[19:45:21 CEST] Mark Proctor: http://www.jboss.org/events/JUDCon/2012/india

[19:45:32 CEST] Mark Proctor: probably last two weeks

[19:46:16 CEST] Jean-Marc Vanel: : January 24-25, 2012

[19:46:31 CEST] Mark Proctor: yes

[19:46:37 CEST] Mark Proctor: so I'll leave around the 20th

[19:46:45 CEST] Jean-Marc Vanel: ok

[19:46:59 CEST] Jean-Marc Vanel: I'll adjust my plans and tell you :)

[19:47:16 CEST] Jean-Marc Vanel: my daughter is in London

[19:50:42 CEST] Mark Proctor: ok

[19:50:53 CEST] Mark Proctor: as i said, i'm very keen to see the type of queries you have and data.

[19:51:00 CEST] Mark Proctor: so if you can show anythign before then, if there is anything public, let me know.

[19:51:15 CEST] Jean-Marc Vanel: ok

[19:51:27 CEST] Mark Proctor: you seen the music example in tinkergraph?

[19:51:38 CEST] Jean-Marc Vanel: tinkergraph? no

[19:51:52 CEST] Mark Proctor: gemlin stuff

[19:52:02 CEST] Mark Proctor: it uses a large music data graph for it's examples

[19:52:08 CEST] Mark Proctor: concerts I think

[19:52:10 CEST] Mark Proctor: let me get it

[19:55:02 CEST] Jean-Marc Vanel: are you thinking of https://github.com/tinkerpop/rexster/wiki/Getting-Started/c4744ab524c447952dad1b122f10e75f6004b8a7

[19:55:05 CEST] Jean-Marc Vanel: ?

[19:55:28 CEST] Mark Proctor: yes

[19:55:45 CEST] Mark Proctor: http://www.slideshare.net/slidarko/gremlin-a-graphbased-programming-language-3876581

[19:55:57 CEST] Mark Proctor: so it uses a large public database for concerts

[19:56:00 CEST] Mark Proctor: to show off their language

[19:56:12 CEST] Mark Proctor: we are looking at how to better support the use cases of gremlin in drools

[19:56:16 CEST] Mark Proctor: like you can do all of that in drools now

[19:56:23 CEST] Mark Proctor: just the syntax is vebrose

[19:56:24 CEST] Mark Proctor: verbose

[19:56:36 CEST] Mark Proctor: so we need to better support graph traversal syntaxes, in a more succinct way.

[19:57:02 CEST] Mark Proctor: maybe do a blueprints implemetnation for drools too

[19:57:04 CEST] Mark Proctor: ok have to go

[19:57:31 CEST] Jean-Marc Vanel: thankls for sharing :)

[19:57:41 CEST] Mark Proctor: slide 40 onwards

[19:57:48 CEST] Mark Proctor: "grateful dead dataset"

[19:57:56 CEST] Jean-Marc Vanel: ok

[19:58:17 CEST] Mark Proctor: I think what gremlin does is an important area

[19:58:22 CEST] Mark Proctor: so we want to do it better

[19:58:30 CEST] Mark Proctor: make it easier for people to get intelligence out of their large datasets

[19:58:39 CEST] Mark Proctor: you can't always structure your data sets

[19:58:42 CEST] Mark Proctor: into nice class models

[19:58:47 CEST] Jean-Marc Vanel: sure

[19:58:48 CEST] Mark Proctor: and graphs are good for that

EulerGUI

GREAT NEWS! The EG framework, and its RETE Drools engine will be used for a semantic music player :) .

TODO in EulerGUI before release 1.9

Queries in memory with EulerGUI framework

COMMIT

FIX: N-Triples parser integration:

- fix running Drools engine using button (if there is one (or more) N-Triple in project, the Drools Working Memory is kept)

* introduce field N3SourcetoDrools.allFactSaved and overriden method N3Source.keepsParseResult()

- tested with test/n-triples.n3p

oem-laptop: ~/ontologies/dbpedia/ % wc *.nt
   6810605   27243025 1411607712 images_en.nt
   1393530    5574120  202144251 instance_types_fr.nt
    714810    3867894   86010767 labels_fr.nt
    678141   46994264  391474696 long_abstracts_fr.nt
   1290160    5720463  176762861 mappingbased_properties_fr.nt
   4504182   19447923  534018987 persondata_en.nt
    678141   29405251  268941781 short_abstracts_fr.nt
     17219      68876    2571593 specific_mappingbased_properties_fr.nt
  16086788  138321816 3073532648 total

Test project dbpedia-instance_types_fr.nt.n3p with instance_types_fr.nt ; opened in 3mn ( no feedback during loading ).

That's a milestone in the project !!!!!!!!!!!!!!!!!!!!!

 org.drools.reteoo.ReteooStatefulSession@5dfc35a6 1 392 525 objets sont actuellement dans la WorkingMemory.

It took 3 mn to load the N-Triples file, and about 1mn to run a simple query :

?SONG a dbpedia-owl:MusicalWork .

The total memory is 2.5 Gb :( .

The result size is 14448 triples .

Using instance_types_fr.nt from dbpedia downloads .

This is not wonderful , but it's the first time that EG is tested with such a large Knowledge Base *in memory* .

<rszeno> you can't make a test only with nxparser to see where it spend so much time?

<jmvanel> Sure, I can with one of the eclipse plugins like TPTP .

<jmvanel> However, I'm rather confident with NxParser ; during loading I suspect the calls to WorkingMemory.insert()

<rszeno> is better to be sure, :)

<rszeno> plus this could help to choose another strategy, to use nxparser in another way

<jmvanel> Yes. In fact I already have a test with triples created by program + Drools

<jmvanel> ( class N3DroolsEngineStressTest )

<rszeno> an example, is adding triples to kb one by one is slower then adding a group of triples, you can use a temporary array, smaller to collet the triples then to push the temp array content to kb

<rszeno> usualy adding is O(n), spliting the size could help

<jmvanel> I don't think so, from what know about Drools

<rszeno> :), as i said, is better to see, :)

<rszeno> if you have good profiling tool could be better

<rszeno> i mean if you can use a good profiler

<rszeno> internals things are always tricky, even for the one who write the code, drools, nxparser authors

<jmvanel> yes , you're right;

<jmvanel> but right now it would be quisker to ask Mark Proctor advices ; he knows enough of what we do with Drools

<jmvanel> quicker

<jmvanel> and he 's present :)

<rszeno> :)

<jmvanel> indeed there are methods like public Future asyncInsert(final Collection collection) {

<jmvanel> ( currently I use plain insert() )

<jmvanel> I also have to ask about possible settings to save memory .

<jmvanel> One thing to check is also if the memory depends strongly on the rules base , which I suspect

<jmvanel> because with class N3DroolsEngineStressTest , 1 000 000 triples and no rule is 500Mb , and with whole EG ( maybe memory lost somehere ? ) and dbpedia file , 1 400 000 triples and a single simple rule == 2.5 Gb , 5 times more .

<jmvanel> lots of stuff to check !

--------------------------

<conan> jmvanel: hi

<jmvanel> I tested a 1400 000 triples from dbPedia , with a single rule; my Triple clas is just 3 Strings , with equals retrun equals on all 3 ;

<jmvanel> It took 3 mn to load the N-Triples file, and about 1mn to run a simple query :

<jmvanel> ?SONG a dbpedia-owl:MusicalWork .

<jmvanel> The total memory is 2.5 Gb :( .

<jmvanel> The result size is 14448 triples .

<jmvanel> it's new tests and some new code, so it's possible that my code is wasting memory ;

<jmvanel> anyway I'd like to know about possible setting to enhance memory and CPU usage ; also would it be quicker to use asyncInsert(final Collection collection) instead of the plain insert() currently

2011-11-30

EulerGUI, the most popular Semantic Web rule engine GUI and fw ;) !!!!

http://www.jibble.org/pircbot.php - PircBot Java IRC Bot - The most popular Java IRC API

Had a look at http://code.google.com/p/rdfstores/ New directions for RDFStores

Said Zeno:

aho and ulman, theorem: is not posible to build a parser for a chomsky type 0 language

but anothothe theorem say that any chomsky type 0 language can be decompose in 2 chomsky type 2 languages and one isomorphism

that mean we can't build a parser but we can build 2,

on the other hand for any formal system can be in some condition build a production system for each axiom of the fs

that means a grammar for each

since translator is universal, the focus will be on grammars

EulerGUI: ontosem.owl bug, ...

EG is supposed to be robust enough to handle tiny machines

robust and smart through rules

TODO EulerGUI : provide a feedback when loading an N3 source; when querying with SPARQL

COMMIT : added N-triples parser , TODO test

<jmvanel> I have un bug unexplained : when dragging'drop http://morpheus.cs.umbc.edu/aks1/ontosem.owl from http://swoogle.umbc.edu/index.php?option=com_frontpage&service=search&queryType=search_swd_ontology&searchString=botany&searchStart=1

<jmvanel> I get the warning about memory insufficient ,

<jmvanel> but -Xmx is 2g , and using the same OWL donloaded manually , it works !

<jmvanel> strange and looks like a bug :(

2011-11-29

musicbrainz.org ==> download database

2011-11-28

http://webchat.freenode.net/

An interesting Euler test with large data and simple query

This is with instance_types_fr.nt, an N-Triples file downloaded from dbPedia here:

http://wiki.dbpedia.org/Downloads37

( look for "Ontology Infobox Types" )

The memory, measured with Ubuntu System Monitor, is, after "networking ..." message, 908Mb, and stays so. 100% of 1 CPU is consumed.

The first query has a 0 triple result:

@prefix dbpedia-owl: <http://dbpedia.org/ontology/> .
{
  ?SONG a dbpedia-owl:SONG
  ;?p ?v .
} => {
  ?SONG ?p ?v .
} .

And the output is :

oem-laptop: ~/ontologies/ % time eye instance_types_fr.nt --query dbpedia-large-query2.n3 > dbpedia-large-query2-result.n3
Id: euler.yap 4726 2011-11-17 16:55:18Z josd
YAP 6.2.2 (i686-linux): Wed Nov  2 01:09:06 CET 2011
starting 48 [msec cputime] 158 [msec walltime]
GET instance_types_fr.nt
GET dbpedia-large-query2.n3
networking 99510 [msec cputime] 158734 [msec walltime]
TC=0 TP=0 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0
reasoning 1288 [msec cputime] 1294 [msec walltime]

eye instance_types_fr.nt --query dbpedia-large-query2.n3 >   156,84s user 2,53s system 98% cpu 2:41,61 total

The second query brings real results, and lasts much longer (already 50 mn at the time of writing, and I let it run ) :

@prefix dbpedia-owl: <http://dbpedia.org/ontology/> .
{
  ?SONG a dbpedia-owl:MusicalWork
  ;?p ?v .
} => {
  ?SONG ?p ?v .
} .

And the output is :

eye instance_types_fr.nt --query dbpedia-large-query2.n3 >   156,84s user 2,53s system 98% cpu 2:41,61 total
oem-laptop: ~/ontologies/ % time eye instance_types_fr.nt --query dbpedia-large-query2.n3 > dbpedia-large-query2-result.n3
Id: euler.yap 4726 2011-11-17 16:55:18Z josd
YAP 6.2.2 (i686-linux): Wed Nov  2 01:09:06 CET 2011
starting 36 [msec cputime] 48 [msec walltime]
GET instance_types_fr.nt
GET dbpedia-large-query2.n3
networking 99919 [msec cputime] 157977 [msec walltime] 
TC=86326 TP=260103 BC=0 BP=86702 PM=0 CM=0 FM=0 AM=0
reasoning 13714357 [msec cputime] 13796663 [msec walltime]

Some remarks:

Trying downloaded dbPedia files with EulerGUI

% wc instance_types_fr.nt
  1393530   5574120 202144251 instance_types_fr.nt

First, there a message saying that parsing and KB are deactivated, then jEdit stays a long time with message in bottom: "I/O: one operation in progress" , and 100% CPU consumption :( . Vim is much less greedy ! It only consumes 225Mb and opens in < 1s . EG should choose gvim when the file is large !

EulerGUI commits

COMMIT

FIX: EulerGUI was blocking and not showing GUI when no network and remote SPARQL query in project

also fixes the default directory for file chooser in this case and others

SPARQL issue: getting feedback in case of error

% bin/riot ~/src/eulergui/examples/BloodPressure.n3
ERROR [line: 8, col: 1 ] Not implemented

http://docs.openlinksw.com/virtuoso/rdfsparql.html

http://www.w3.org/TR/rdf-sparql-protocol/#SparqlQuery

http://www.w3.org/TR/sparql11-service-description/

My use case now is commenting out ?ARTIST ?p ?v , to try to get a meaningful message, like the Virtuoso web interface does .

prefix dbpedia-owl: <http://dbpedia.org/ontology/>
CONSTRUCT {
  ?ARTIST ?p ?v .
}
WHERE {
  ?ARTIST a dbpedia-owl:MusicalArtist . 
  # commented out to get an erroneous query (alas not flagged by ARQ)
  # ?ARTIST ?p ?v .
} LIMIT 50

http://dbpedia.org/sparql?query=PREFIX++dbpedia-owl%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0A%0ACONSTRUCT+%0A++%7B+%3FARTIST+%3Fp+%3Fv+.%7D%0AWHERE%0A++%7B+%3FARTIST+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type%3E+dbpedia-owl%3AMusicalArtist+%7D%0ALIMIT+++30%0A

http://jena.sourceforge.net/ARQ/arq-query-eval.html

Uncommenting ?ARTIST ?p ?v , and using the http://sparql.org/query-validator.html , it seems that Jena ARQ algebra does not take in account the CONSTRUCT part :

Algebra structure:

  1 (base <http://example/base/>
  2   (prefix ((dbpedia-owl: <http://dbpedia.org/ontology/>))
  3     (slice _ 50
  4       (bgp
  5         (triple ?ARTIST <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> dbpedia-owl:MusicalArtist)
  6         (triple ?ARTIST ?p ?v)
  7       ))))

2011-11-27

SPARQL in EulerGUI : no feedback that the query has run; no error messages when the query is wrong .

http://www.w3.org/TR/sparql11-query/

18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.ClassCastException: eulergui.tools.FilteredTreeNode cannot be cast to javax.swing.tree.DefaultMutableTreeNode
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.OwlClassHierarchyBuilder.editedClassURI(OwlClassHierarchyBuilder.java:438)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.OwlClassHierarchyBuilder.editedClassURI(OwlClassHierarchyBuilder.java:406)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.OwlClassHierarchyBuilder.classInfo(OwlClassHierarchyBuilder.java:387)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.OwlClassHierarchyBuilder.getToolTipText(OwlClassHierarchyBuilder.java:672)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.ComboTreeView$1.getToolTipText(ComboTreeView.java:33)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.ToolTipManager.checkForTipChange(ToolTipManager.java:589)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.ToolTipManager.mouseMoved(ToolTipManager.java:561)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:330)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Component.processMouseMotionEvent(Component.java:6549)
18:39:07 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3339)

Drools : trigger some Java code when an object is retracted

<jmvanel> is there a way to trigger some Java code when an object is retracted ?

<jmvanel> the answer to my previous question is in 4.3.5. Event Model :) http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html#d0e2003

<conan> jmvanel: we do want a better way to do that, rule based.

<conan> jmvanel: I want to start to expose the life cycle of rules, as listeners

<conan> so when a rule rematches, or unmatches you can execute code

<conan> jmvanel: I might put that into the next 5.4 release.

<conan> jmvanel: will only work for java though, as mvel does not support any type of anonymous block, or functions.

http://blog.datagraph.org/2010/03/rdf-for-ruby

TODO

2011-11-26

Fixing SPARQL feature

This stack is wrong !!!!

Thread [AWT-EventQueue-0] (Suspended)
N3SourceFromSPARQLSource(N3Source).fileName() line: 782
EditorManagement.fileToOpen(N3Source) line: 87
TextEditor.displayEditor(ProjectGUI, N3Source) line: 322
EditorManagement.openJavaEditor(N3Source) line: 157
EditorManagement.doOpenEditor(N3Source) line: 124
SPARQLServiceInputAction.actionPerformed(ActionEvent) line: 82
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) line: 2018
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2341
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 402
DefaultButtonModel.setPressed(boolean) line: 259
BasicButtonListener.mouseReleased(MouseEvent) line: 252
AWTEventMulticaster.mouseReleased(MouseEvent) line: 289
JToolBar$1(Component).processMouseEvent(MouseEvent) line: 6504
JToolBar$1(JComponent).processMouseEvent(MouseEvent) line: 3321
JToolBar$1(Component).processEvent(AWTEvent) line: 6269
JToolBar$1(Container).processEvent(AWTEvent) line: 2229
JToolBar$1(Component).dispatchEventImpl(AWTEvent) line: 4860
JToolBar$1(Container).dispatchEventImpl(AWTEvent) line: 2287
JToolBar$1(Component).dispatchEvent(AWTEvent) line: 4686
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4832
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4492
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4422
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2273
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2713
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4686
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 707
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 101
EventQueue$3.run() line: 666
EventQueue$3.run() line: 664
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 87
EventQueue$4.run() line: 680
EventQueue$4.run() line: 678
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
EventQueue.dispatchEvent(AWTEvent) line: 677
EventDispatchThread.pumpOneEventForFilters(int) line: 211
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 128
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 117
EventDispatchThread.pumpEvents(int, Conditional) line: 113
EventDispatchThread.pumpEvents(Conditional) line: 105
EventDispatchThread.run() line: 90

2011-11-25

from dbpedia mail list: http://www4.wiwiss.fu-berlin.de/bizer/ldif/ : looks good and very recent , by a quick look

cf roadmap : ng4j / semweb client http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/

TestSPARQL

a nice tutorial on SPARQL

<jmvanel> http://www.cambridgesemantics.com/2008/09/sparql-by-example/#%281%29

2011-11-24

headers in EulerGUI:

wget --header='Accept: text/n3, application/n3, text/rdf+n3, text/turtle, application/rdf+xml, text/xml,  text/plain, text/xhtml, text/html' http://purl.org/ontology/similarity/

The default headers in Jena ( when one does not define a stream by hand ) :

conn.setRequestProperty("accept", "application/rdf+xml, application/xml; q=0.8, text/xml; q=0.7, application/rss+xml; q=0.3, */*; q=0.2");

wget --header='Accept: application/rdf+xml, application/xml; q=0.8, text/xml; q=0.7, application/rss+xml; q=0.3, */*; q=0.2'  http://purl.org/ontology/similarity/

Problems with Music Ontology

After removing the "naked prefixes" in musicontology.n3 , somehow http://purl.org/ontology/similarity/ is still loaded :

loading Anonymous-33 from file:/home/jmv/ontologies/musicontology.n3
Using OWL API version 3.2.3.1824
Rebuilding entity indices...
 ... rebuilt in 1 ms
loading Anonymous-36 from file:/home/jmv/ontologies/musicontology.n3
loading <http://purl.org/vocab/bio/0.1/> from http://purl.org/vocab/bio/0.1/
loading <http://purl.org/NET/c4dm/event.owl> from http://purl.org/NET/c4dm/event.owl
loading <http://www.w3.org/2006/time> from http://www.w3.org/2006/time
loading <http://purl.org/ontology/ao/core> from http://purl.org/ontology/ao/core
loading <http://purl.org/dc/elements/1.1/> from http://purl.org/dc/elements/1.1/
loading <http://purl.org/dc/terms/> from http://purl.org/dc/terms/
loading <http://purl.org/ontology/similarity/> from http://purl.org/ontology/similarity/

And the culprit is :

http://purl.org/ontology/ao/core#

which has this metadata :

ao:   a       owl:Ontology ;
      dc:creator <http://tobyinkster.co.uk/#i> , <http://foaf.me/zazi#me> ;
      dc:date "2010-09-13T13:59:52+01:00"^^xsd:dateTime ;
      dc:description """The Association Ontology specification provides basic properties 
for describing specific associations to something, e.g. a context, an occasion, a genre or a mood, and enables furthermore, a mechanism to 
like/rate and feedback these associations in context to something on/ for the Semantic Web. This document contains a RDF description 
of the Association Ontology."""@en ;
      dc:title "The Association Ontology"@en ;
      owl:imports <http://www.w3.org/2003/06/sw-vocab-status/ns> , sim: , <http://purl.org/stuff/rev> , foaf: , dc: , dcterms: , <http://purl.org/NET/c4dm/event.owl> ;
      owl:versionInfo 0.4 .

For debugging music ontology, I used EG , which is is not too bad for that , but the killer weapon was a grep in ~/.eulergui/n3_cache/ , preceded by "add refered ontologies" .

------------------------------------------------------------

mainly technical questions about Music Ontology

- status : is it still maintained ? Are you still in charge ?

- the RDF version seems very different from the Turtle one

- problem with http://purl.org/ontology/similarity/ : redirects to an HTML page :

http://kakapo.dcs.qmul.ac.uk/ontology/musim/0.2/musim.html

but apparently for accept-content header == RDF or turtle it keeps the connection alive without producing anything

( the real ontology is at http://kakapo.dcs.qmul.ac.uk/ontology/musim/0.2/musim.n3 , or http://kakapo.dcs.qmul.ac.uk/ontology/musim/0.2/musim.owl )

FRBR : This vocabulary is an expression in RDF of the concepts and relations described in the IFLA report on the Functional Requirements for Bibliographic Records (FRBR).

---------------------------------------------

Opening Music Ontology with Protégé

Opening Music Ontology in RDF with Protégé:

loading ...
 ...
loading <http://purl.org/ontology/similarity/> from http://purl.org/ontology/similarity/
 ...
org.semanticweb.owlapi.rdf.syntax.RDFParserException: [line=6:column=2] Expecting rdf:RDF element.

Opening http://purl.org/ontology/similarity/ with Protégé:

the message ( after maybe 1 hour ) is :

org.semanticweb.owlapi.rdf.syntax.RDFParserException: [line=6:column=2] Expecting rdf:RDF element.

TODO

2011-11-23

-Dsun.net.client.defaultConnectTimeout=3000
-Dsun.net.client.defaultReadTimeout=3000

Troubles with Music Ontology, Pellet and Jena integration in EulerGUI

Trying with Protégé:

Music Ontology imports this , and we get into trouble :

http://purl.org/ontology/similarity/

redirects to an HTML page (HTML no matter what the accept-content header says) :

http://kakapo.dcs.qmul.ac.uk/ontology/musim/0.2/musim.html

and the trouble is that the reading freezes forever . And it's the same with EulerGUI when called in command line:

eg --pass  http://purl.org/ontology/similarity/

However , when adding the URI with the button, EG says in a popup :

Could not load N3 source from URL http://purl.org/ontology/similarity/
N3SourceFromXML_Gloze.extractXMLNamespaces():
Could not load from URL http://purl.org/ontology/similarity/
 reason: Read timed out
 cause: null
Cause:
java.net.SocketTimeoutException: Read timed out

Thread [LaunchOWLReasoner: http://motools.sourceforge.net/doc/musicontology.n3] (Suspended)
OntDocumentManager.read(Model, String, boolean) line: 1081
OntDocumentManager$1.readModel(Model, String) line: 1034
ModelMakerImpl.getModel(String, ModelReader) line: 78
OntDocumentManager.fetchLoadedImportModel(OntModelSpec, String) line: 1031
OntDocumentManager.fetchPossiblyCachedImportModel(OntModel, String) line: 1004
OntDocumentManager.loadImport(OntModel, String, List<String>) line: 977
OntDocumentManager.loadImports(OntModel, List<String>) line: 771
OntDocumentManager.loadImports(OntModel) line: 709
OntModelImpl.loadImports() line: 1887
OntModelImpl.read(InputStream, String, String) line: 2150
OntModelImpl(ModelCom).read(String, String, String) line: 211
OntModelImpl.readDelegate(String, String, String) line: 3024
OntModelImpl.read(String, String, String) line: 2106
OntModelImpl.read(String, String) line: 2064
OwlClassHierarchyBuilder.processTreeWithPellet(String, String) line: 123
OwlClassHierarchyBuilder.<init>(String, String) line: 93
LaunchOWLReasonerAction$1.run() line: 70
Thread.run() line: 722

This one is referenced in Music Ontology, but even with request headers, it returns HTML :

http://purl.org/NET/c4dm/event.owl

Remedies:

Thread [AWT-EventQueue-0] (Suspended)
SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method]
SocketInputStream.read(byte[], int, int, int) line: 150
SocketInputStream.read(byte[], int, int) line: 121
BufferedInputStream.fill() line: 235
BufferedInputStream.read1(byte[], int, int) line: 275
BufferedInputStream.read(byte[], int, int) line: 334
HttpClient.parseHTTPHeader(MessageHeader, ProgressSource, HttpURLConnection) line: 641
HttpClient.parseHTTP(MessageHeader, ProgressSource, HttpURLConnection) line: 589
HttpURLConnection.getInputStream() line: 1319
HttpURLConnection.getHeaderField(String) line: 2594
HttpURLConnection(URLConnection).getContentEncoding() line: 533
JenaReader.read(Model, String) line: 82
ModelCom.read(String) line: 187
FileManager.readModelWorker(Model, String, String, String) line: 367
FileManager.readModel(Model, String, String) line: 335
FileManager.readModel(Model, String) line: 319
OntDocumentManager.read(Model, String, boolean) line: 1064
OntDocumentManager$1.readModel(Model, String) line: 1034
ModelMakerImpl.getModel(String, ModelReader) line: 78
OntDocumentManager.fetchLoadedImportModel(OntModelSpec, String) line: 1031
OntDocumentManager.fetchPossiblyCachedImportModel(OntModel, String) line: 1004
OntDocumentManager.loadImport(OntModel, String, List<String>) line: 977
OntDocumentManager.loadImports(OntModel, List<String>) line: 771
OntDocumentManager.loadImports(OntModel) line: 709
OntModelImpl.loadImports() line: 1887
OntModelImpl.read(InputStream, String, String) line: 2150
OntModelImpl(ModelCom).read(String, String, String) line: 211
OntModelImpl.readDelegate(String, String, String) line: 3024
OntModelImpl.read(String, String, String) line: 2106
OntModelImpl.read(String, String) line: 2064
OwlClassHierarchyBuilder.processTreeWithPellet(String, String) line: 118
OwlClassHierarchyBuilder.<init>(String, String) line: 90
LaunchOWLReasonerAction.actionPerformed(ActionEvent) line: 65
JCheckBoxMenuItem(AbstractButton).fireActionPerformed(ActionEvent) line: 2018
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2341
JToggleButton$ToggleButtonModel(DefaultButtonModel).fireActionPerformed(ActionEvent) line: 402
JToggleButton$ToggleButtonModel.setPressed(boolean) line: 308
JCheckBoxMenuItem(AbstractButton).doClick(int) line: 376
BasicCheckBoxMenuItemUI(BasicMenuItemUI).doClick(MenuSelectionManager) line: 833
BasicMenuItemUI$Handler.mouseReleased(MouseEvent) line: 877
AWTEventMulticaster.mouseReleased(MouseEvent) line: 289
JCheckBoxMenuItem(Component).processMouseEvent(MouseEvent) line: 6504
JCheckBoxMenuItem(JComponent).processMouseEvent(MouseEvent) line: 3321
JCheckBoxMenuItem(Component).processEvent(AWTEvent) line: 6269
JCheckBoxMenuItem(Container).processEvent(AWTEvent) line: 2229
JCheckBoxMenuItem(Component).dispatchEventImpl(AWTEvent) line: 4860
JCheckBoxMenuItem(Container).dispatchEventImpl(AWTEvent) line: 2287
JCheckBoxMenuItem(Component).dispatchEvent(AWTEvent) line: 4686
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4832
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4492
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4422
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2273
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2713
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4686
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 707
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 101
EventQueue$3.run() line: 666
EventQueue$3.run() line: 664
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 87
EventQueue$4.run() line: 680
EventQueue$4.run() line: 678
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
EventQueue.dispatchEvent(AWTEvent) line: 677
EventDispatchThread.pumpOneEventForFilters(int) line: 211
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 128
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 117
EventDispatchThread.pumpEvents(int, Conditional) line: 113
EventDispatchThread.pumpEvents(Conditional) line: 105
EventDispatchThread.run() line: 90

------------------------------------

<jmvanel> are there some figures or rough ideas of the ratio size(WM) / size(asserted objects) ?

<jmvanel> i guess it can depend widely of the rules

<jmvanel> Hi any idea of a plotter or statistical analysis tool that can be plugged to RDF, N3 or SPARQL data sources ?

http://java.sun.com/docs/books/performance/1st_edition/html/JPRAMFootprint.fm.html

triple

count

bytes
after fireAllRules
and gc
bytes when
adding in a Set

1000

14569592 13112400
10000 18639560 18766176
100000 68961720 16708448
1000000 528742920 15022208

printMemory(): total=108331008, free=91935456, used=16395552

10 000

printMemory(): max=902299648, free=162924528, used=739375120

100 000

printMemory(): max=902299648, free=322118568, used=580181080

1 000 000

printMemory(): max=902299648, free=358850536, used=543449112

2011-11-21

http://www.vogella.de/articles/Logging/article.html#general_formatter

work directly on USB

and type sync in shell 12:21:24

Ruset Zeno 12:21:37

doesn't work,

must be

sync; echo 3 > /proc/sys/vm/drop_caches' 

everything is cached today to make user to think is a king, but cheaper

Roadmap for EulerGUI

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html#L3298

EulerGUI 2.0

EulerGUI 2.1

2011-11-20

My favorite (!) OWL API bugs

Alas they stay a long time around.

2011-11-19

EulerGUI unresponsive with a large local N3 file

The default max heap size : 1Gb on my machine ( 3Gb , 64 bits Linux ) :

% java -XX:+PrintFlagsFinal -version 2>&1 | grep -i heap
 ...          
    uintx MaxHeapSize                              := 1015021568      {product} 

I'm glad because I just added 8 simple lines in N3Source.manageParseN3(), and now any big file can be opened in EG and editor !

    private void manageParseN3() {
      try {
        long localN3Length = getLocalN3().length();
        long freeMemory = Runtime.getRuntime().freeMemory();
        long necessaryMemory = 80 * localN3Length;        if( freeMemory < necessaryMemory ) {
          parseResult = null;
          Runtime.getRuntime().gc();
          return; //<<<<
        }

2011-11-18

EulerGUI unresponsive with a large local N3 file

moved addURIModificationChecker away from the EventDispatchThread

Thread [AWT-EventQueue-0] (Suspended)
Object.wait(long) line: not available [native method]
UpdateN3Thread(Thread).join(long) line: 1258
UpdateN3Thread(Thread).join() line: 1332
N3DroolsEngineFacade.waitUpdateThreads() line: 290
ProjectFileManagement.addURIModificationChecker(ProjectGUI, Project) line: 686
ProjectGUI$1.run() line: 313
InvocationEvent.dispatch() line: 251
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 705
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 101
EventQueue$3.run() line: 666
EventQueue$3.run() line: 664
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
EventQueue.dispatchEvent(AWTEvent) line: 675
EventDispatchThread.pumpOneEventForFilters(int) line: 211
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 128
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 117
EventDispatchThread.pumpEvents(int, Conditional) line: 113
EventDispatchThread.pumpEvents(Conditional) line: 105
EventDispatchThread.run() line: 90

2011-11-17

TODO EulerGUI editor feature : apply a new N3 prefix ; suggest a new N3 prefix.

N3Source.parseResult(): parseResult (http://deductions.svn.sourceforge.net/svnroot/deductions/n3_new/swrl-n3-rules.n3p#EyeHelper.reasonExternalProlog) was null ==> re-parse (and possibly re-read N3 source)
ProjectGUI_Updater.n3SourceAdded(): nanoTime 7550505561384
ParserLink.parse(): n3ParseResult.isInError: file:/home/jmv/.eulergui/n3_cache/wordnet-synset.rdf_3737954450101966515.n3
ParserLink.parse(): LineNumber: 163584 : 38
[ERROR] - 2011-11-17 16:01:20,008 [doN3SourceAdded: file:/home/jmv/ontologies/wordnet-synset.rdf] eulergui.gui.TemporaryFrame (TemporaryFrame.java:<init>:47) 
 TemporaryFrame.TemporaryFrame(): update N3; PARSE ERROR in file:/home/jmv/ontologies/wordnet-synset.rdf
 ( /home/jmv/.eulergui/n3_cache/wordnet-synset.rdf_3737954450101966515.n3 ) 
Erreur pendant  re-parsing N3 source "wordnet-synset.rdf"
Cause:
file:/home/jmv/ontologies/wordnet-synset.rdf
n3_project.exceptions.parser.ParsingException: Last character read : "@" on line 163584
Expecting one of these :
Expecting one of these :
        -> !
        -> ,
        -> .
        -> ;
        -> ^
        -> caret (LEXICAL_STRING)
        -> exclam (LEXICAL_STRING)
        -> terminal#79 ';' (LEXICAL_STRING)
        -> terminal#80 ';' (LEXICAL_STRING)
        -> terminal#81 ',' (LEXICAL_STRING)
        -> terminal#85 '.' (LEXICAL_STRING)

ParserLink.parse(): n3ParseResult.isInError: file:/home/jmv/.eulergui_preferences.n3
ParserLink.parse(): LineNumber: 1 : 9
Thread Name: mainException in thread "doN3SourceAdded: file:/home/jmv/src/eulergui/test/wordnet-synset.rdf.n3" java.lang.RuntimeException: Erreur pendant  re-parsing N3 source "file:/home/jmv/src/eulergui/test/wordnet-synset.rdf.n3"
        at eulergui.project.N3Source.manageParseN3(N3Source.java:415)
        at eulergui.project.N3Source.update(N3Source.java:378)
        at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:121)
        at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)
Caused by: net.sf.parser4j.parser.service.ParserException: java.io.IOException: closed
        at net.sf.parser4j.parser.service.Parser.readTerminalValue(Parser.java:861)
        at net.sf.parser4j.parser.service.Parser.readTerminalValueAndParse(Parser.java:642)
        at net.sf.parser4j.parser.service.Parser.parse(Parser.java:387)
        at eulergui.parser.n3.impl.parser4j.service.N3Parser.parseN3(N3Parser.java:177)
        at eulergui.drools_engine.ParserLink.doParse(ParserLink.java:150)
        at eulergui.drools_engine.ParserLink.parse(ParserLink.java:113)
        at eulergui.project.N3Source.doParseN3(N3Source.java:458)
        at eulergui.project.N3Source.manageParseN3(N3Source.java:402)
        ... 3 more
Caused by: java.io.IOException: closed
        at net.sf.parser4j.parser.service.ParserInput.read(ParserInput.java:56)
        at net.sf.parser4j.parser.service.Parser.readTerminalValue(Parser.java:859)
        ... 10 more

java.lang.Thread.getStackTrace(Thread.java:1567)
eulergui.util.StackHelper.printStackTrace(StackHelper.java:13)
eulergui.gui.actions.OpenPreferencesAction.applyUserPreferences(OpenPreferencesAction.java:81)
n3_project.ProjectGUI.newWindow(ProjectGUI.java:274)
N3ConversionRefesher.N3ConversionRefesher(): nanoTime 8269221164134
N3DroolsEngineFacade.waitUpdateThreads() FINISHED

2011-11-16

http://groups.google.com/group/warszawa-jug

http://www.google.fr/search?aq=f&sourceid=chrome&ie=UTF-8&q=new+york+semantic+web

2011-11-15

Scala : futures , scalafx

http://blog.tackley.net/2010/01/scala-futures.html

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

Deprecating the Observer Pattern

EPFL-REPORT-148043

Ingo Maier Tiark Rompf Martin Odersky

http://lamp.epfl.ch/~imaier/pub/DeprecatingObserversTR2010.pdf

discussion about Swing 2

http://jonathangiles.net/blog/?p=207

2011-11-14

on ##nlp IRC

anybody having experience at the intersection of 2 sets : NLP of french , and Java tools ?

<jmvanel> I need to extract keyphrases from text documents with a controlled vocabulary , like http://www.nzdl.org/Kea/ is supposed to do ( but the software crashes and bug report are not answered :( )

Trying Lucene demo

Apache Lucene - Getting Started Guide

java -cp lucene-core-3.4.0.jar:contrib/demo/lucene-demo-3.4.0.jar \
     org.apache.lucene.demo.IndexFiles \
     -docs ~/nltk_data/corpora/europarl_raw/french/
java -cp lucene-core-3.4.0.jar:contrib/demo/lucene-demo-3.4.0.jar \
     org.apache.lucene.demo.SearchFiles 

2011-11-13

Installing UIMA

Cannot complete the install because one or more required items could not be
found.Software being installed: UIMA tools (includes Runtime) 2.3.1
(org.apache.uima.tools.feature.group 2.3.1)Missing requirement: UIMA tools (includes Runtime) 2.3.1
(org.apache.uima.tools.feature.group 2.3.1) requires 'org.eclipse.emf.codegen
0.0.0' but it could not be found

2011-11-12

Trying Kea 5

Opening the SKOS VOCABULARIES shipped with Kea, 34Mb together :

% ls -l VOCABULARIES
total 33816
-rw-r--r-- 1 jmv jmv 11409511 2007-10-29 01:25 agrovoc_es.rdf
-rw-r--r-- 1 jmv jmv 11222892 2007-10-29 01:25 agrovoc_fr.rdf
-rw-r--r-- 1 jmv jmv 11992250 2007-10-29 01:25 agrovoc.rdf

Opened with EulerGUI, this takes 1.7Gb ! :( .

I opened the Kea directory with eclipse, the .project etc are here. From there , I ran the tests in TestKea.java. It says :

Creating the model... 
-- Loading the Index...
-- Building the Vocabulary index from SKOS file
-- Reading the Documents... 
Extracting keyphrases from test documents... 
-- Loading the Index...
-- Building the Vocabulary index from SKOS file
-- Extracting Keyphrases... 
Avg. number of matching keyphrases compared to existing ones : 9.2 +/- 0.45
Based on 5 documents
Look into testdocs/en/test to see the results
and compare them to testdocs/en/test/manual_keyphrases/.

Looking for french texts in NLTK :

 ~/nltk_data/corpora/ % grep --recursive -l  économie .
europarl_raw/french/ep-00-02-16.fr
europarl_raw/french/ep-00-02-03.fr
europarl_raw/french/ep-00-01-17.fr
europarl_raw/french/ep-00-01-18.fr
europarl_raw/french/ep-00-02-15.fr
europarl_raw/french/ep-00-02-02.fr
europarl_raw/french/ep-00-01-19.fr
europarl_raw/french/ep-00-01-20.fr
europarl_raw/french/ep-00-02-14.fr

I found a suitable thesaurus from http://www.archivesdefrance.culture.gouv.fr/thesaurus/page/Matiere ( click on Téléchargement ).

I'll try to use Kea on these french texts in NLTK.

After reading in Kea readme file the paragrah 2. Getting started / Building a keyphrase extraction model , I tried this :

./run.sh kea.main.KEAModelBuilder -l ~/nltk_data/corpora/europarl_raw/french/ \
    -m europarl -i fr \
    -v archivesdefrance.culture.gouv.fr_thesaurus_Matiere -f skos

where run.sh is :

for f in lib/*.jar
do
  cp=$cp:$f
done
echo java -cp $cp $*
java -cp $cp $*

In fact, Kea accepts only files with .txt suffix, so I do this :

cd ~/nltk_data/corpora/europarl_raw/french/
for f in *.fr
do
 textfile=`basename $f .fr`.txt
 ln -s $f $textfile 
done

The first run is not the right one:

java -cp :lib/commons-logging.jar:lib/icu4j_3_4.jar:lib/iri.jar:lib/jena.jar:lib/kea-5.0.jar:lib/snowball.jar:lib/weka.jar:lib/xercesImpl.jar kea.main.KEAModelBuilder -l /home/jmv/nltk_data/corpora/europarl_raw/french/ -m europarl -v archivesdefrance.culture.gouv.fr_thesaurus_Matiere -f skos
Building model with options: -l /home/jmv/nltk_data/corpora/europarl_raw/french/ -m europarl -v archivesdefrance.culture.gouv.fr_thesaurus_Matiere -f skos -e default -i en -x 5 -y 1 -o 2 -s kea.stopwords.StopwordsEnglish -t kea.stemmers.SremovalStemmer -n    
-- Loading the Index...
-- Building the Vocabulary index from SKOS file
nov. 12, 2011 6:59:20 PM com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler warning
Avertissement: file:///home/jmv/src/kea-5.0_full/(line 19 column 12): {W113} rdf:date is not a recognized RDF property or type.
-- Reading the Documents... 
Killed
[1]  + exit 137   eulergui agrovoc_es.rdf.n3p

java.lang.ArrayIndexOutOfBoundsException: 0
        at weka.core.FastVector.elementAt(Unknown Source)
        at weka.core.Attribute.value(Unknown Source)
        at weka.core.Instance.stringValue(Unknown Source)
        at weka.core.Instance.stringValue(Unknown Source)
        at kea.filters.KEAFilter.buildClassifier(KEAFilter.java:917)
        at kea.filters.KEAFilter.batchFinished(KEAFilter.java:808)
        at kea.main.KEAModelBuilder.buildModel(KEAModelBuilder.java:805)
        at kea.main.KEAModelBuilder.main(KEAModelBuilder.java:837)
0

I restart in eclipse debug with -Xmx2500M . But this is right in weka.jar (no source) , the machine learning tool.

My bug report :

http://code.google.com/p/kea-algorithm/issues/detail?id=1&thanks=1&ts=1321128962

I'll try now sulci.

Trying sulci

I'll try to reproduce with sulci what I tried in Kea.

First Yohann advises me to use virtualenvwrapper :

http://www.doughellmann.com/articles/pythonmagazine/completely-different/2008-05-virtualenvwrapper/index.html

bash
apt-get install python-pip virtualenvwrapper python-virtualenv python-dev

mkdir ~/.virtualenvs
cd ~/.virtualenvs; virtualenv sulci
export WORKON_HOME=~/.virtualenvs

mkvirtualenv sulcitest
workon sulcitest
pip install git+git://github.com/yohanboniface/sulci.git
sudo apt-get build-dep python-psycopg2
pip install psycopg2==2.4.1

django-admin.py startproject sulcisite
sudo -u postgres createuser jmv
sudo -u postgres createdb sulci -O jmv

cd /tmp
mkdir w ; cd w ; unzip ~/src/sulci/sulci/fixtures/fixtures-alpha.zip
echo "apply 1,$s/ybon/jmv/"
gvim  sulci_descriptor.sql sulci_trigger.sql sulci_triggertodescriptor.sql
psql -U jmv sulci < sulci_descriptor.sql
psql -U jmv sulci < sulci_trigger.sql 
psql -U jmv sulci < sulci_triggertodescriptor.sql

django-admin.py startproject sulcisite
sudoedit /etc/postgresql/9.1/main/pg_hba.conf
gvim settings.py
# just for verifications:
python manage.py validate
python manage.py dbshell
python manage.py shell
echo "add : from sulci.views import demo as sulci_demo
urlpatterns = patterns('',
     url(r'^sulci/demo$', sulci_demo, name='sulci_demo'),
"
gvim urls.py
python manage.py runserverr

Tried SKOS plugin for Protégé

Made a bug report

http://code.google.com/p/skoseditor/issues/detail?id=11&thanks=11&ts=1321088843

2011-11-11

A concurrent to eXist XML database , but in C++ : http://www.sedna.org/

EulerGUI tests

Testing Jos' OWL rule base with Drools

 ~/src/eulergui/examples/ % java -cp ../target/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar  eulergui.inference.drools.impl.DroolsRunExportedProject

Even with no data , it crashes :

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

cat ~/src/eulersharp/trunk/2003/03swap/owl-*.n3  > owl-rules.n3

Commits

COMMIT in EulerGUI

- Drools N3 engine:

* Integrity Constraint were broken

* FIX crash with rdf:nil rdf:rest ?X . ( occurs in Jos' OWL rules )

- give names to threads in SPARQLServiceInputAction

- clean code in ParserDataIO

COMMIT in Déductions

SWRL --> N3 translator: a literal in consequent was treated as a variable; tested with :

a1(?x), c1(?y), r1(?x, ?y) -> dp1(?x, 10)

added project test_swrl_to_n3.n3p to run the SWRL to N3 translator manually

thanks to Pascal van Hille for the example

2011-11-10

cwm --rdf  swrl_rule_owl.owl --n3==dilpqst

2011-11-09

Error in Protégé's Turtle parser

I found an error in Protégé's Turtle parser ( P 4.2.0 build 249). The error message is :

uk.ac.manchester.cs.owl.owlapi.turtle.parser.ParseException: Encountered "" at line 10, column 24.
Was expecting one of:

The cause is using a prefix with no suffix. Indeed changing foaf: at line 10 with:

<http://xmlns.com/foaf/0.1/>

removes the problem.

The complete N3 file:

@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf:    <http://xmlns.com/foaf/0.1/> .

foaf:fundedBy
      a       rdf:Property , owl:ObjectProperty ;
      rdfs:comment "An organization funding a project or person." ;
      rdfs:domain owl:Thing ;
      rdfs:isDefinedBy foaf: ;
      rdfs:label "funded by" ;
      rdfs:range owl:Thing ;
      vs:term_status "archaic" .

2011-11-08

read-write-web

Fix eclipse with Subversion ( JavaHL)

Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /usr/lib/jni

According to http://subclipse.tigris.org/wiki/JavaHL#head-3a1d2d3c54791d2d751794e5d6645f1d77d95b32

I added this in ~/.subversion/config :

password-stores = 

Installing WebProtege

WebProtege

WebProtegeDevelopersGuide

svn co http://smi-protege.stanford.edu/repos/protege/web-protege/branches/who/ web-protege 

Enter this in "package"

edu.stanford.bmir.protege.web

check "Create project in" :

/home/jmv/src/web-protege

uncheck "Use Google Web Toolkit"

uncheck "Sample code"

Looking for testers on SWIG IRC

looking for testers for EulerGUI 1.9 beta: Semantic Web + N3/Turtle syntax GUI and framework: new snapshot ; only minor bugs known :)

join us on #eulergui

Set the channel on #eulergui :

/topic  http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html#L7256

Snapshot updated

Just one test failing, and it succeeds in eclipse :

Failed tests: testLocalFacebookSearch(eulergui.gui.TestFacebookSearch)

Tests run: 174, Failures: 1, Errors: 0, Skipped: 0

COMMIT r2797

FIX : N3 Drools engine:

- Fix test cases in math.n3 involving a Number in object position in consequent

- fix e:findall when antecedent is a blank node

- does fix examples/acceleration.n3p

- no more tests deactivated in TestReasonning

Fix this test case in math.n3 :

:Everest:height 8848 ; :name "Everest" .
:Mont_blanc:height 4800 .
:McKinley:height 6194 .
:Mauna_Kea:height 4205 .

{ _:d e:findall ( ?H {
    ?M :height ?H } ?LIST ).
  ?LIST e:max ?MAX .
  # ?MAX log:equalTo 8848 . # TODO : Drools : output is 8848.0
 } => {
  :test :pass_max true .
  :test :res ?MAX .
 } .

2011-11-07

http://4store.org/

COMMIT

FIX : N3 Drools engine:

- math functions tests were deactivated since revision 2349 of sat. 09 april 2011

- type was String not Double in DroolsTripleHandler.addThen()

TODO:

- does not fix examples/acceleration.n3p , although the rule is correctly executed

- still some test deactivated in TestReasonning

TODO: when saving as Drools:

WorkingMemory.java.lang.InstantiationException: eulergui.n3model.LinesAndCols

Thread [main] (Suspended (exception RuntimeException))
XMLEncoder(Encoder).getValue(Expression) line: 109
XMLEncoder(Encoder).get(Object) line: 246
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 112
XMLEncoder(Encoder).writeObject(Object) line: 74
XMLEncoder.writeObject(Object) line: 327
XMLEncoder(Encoder).writeExpression(Expression) line: 324
XMLEncoder.writeExpression(Expression) line: 454
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 115
XMLEncoder(Encoder).writeObject(Object) line: 74
XMLEncoder.writeObject(Object) line: 327
XMLEncoder(Encoder).writeExpression(Expression) line: 324
XMLEncoder.writeExpression(Expression) line: 454
DefaultPersistenceDelegate.initBean(Class, Object, Object, Encoder) line: 232
DefaultPersistenceDelegate.initialize(Class<?>, Object, Object, Encoder) line: 400
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 118
XMLEncoder(Encoder).writeObject(Object) line: 74
XMLEncoder.writeObject(Object) line: 327
XMLEncoder(Encoder).writeExpression(Expression) line: 324
XMLEncoder.writeExpression(Expression) line: 454
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 115
XMLEncoder(Encoder).writeObject(Object) line: 74
XMLEncoder.writeObject(Object) line: 327
XMLEncoder(Encoder).writeObject1(Object) line: 252
XMLEncoder(Encoder).cloneStatement(Statement) line: 265
XMLEncoder(Encoder).writeStatement(Statement) line: 295
XMLEncoder.writeStatement(Statement) line: 400
DefaultPersistenceDelegate.invokeStatement(Object, String, Object[], Encoder) line: 217
java_util_AbstractList_PersistenceDelegate(java_util_List_PersistenceDelegate).initialize(Class<?>, Object, Object, Encoder) line: 649
DefaultPersistenceDelegate(PersistenceDelegate).initialize(Class<?>, Object, Object, Encoder) line: 212
DefaultPersistenceDelegate.initialize(Class<?>, Object, Object, Encoder) line: 398
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 118
XMLEncoder(Encoder).writeObject(Object) line: 74
XMLEncoder.writeObject(Object) line: 327
XMLEncoder(Encoder).writeExpression(Expression) line: 324
XMLEncoder.writeExpression(Expression) line: 454
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 115
XMLEncoder(Encoder).writeObject(Object) line: 74
XMLEncoder.writeObject(Object) line: 327
XMLEncoder(Encoder).writeObject1(Object) line: 252
XMLEncoder(Encoder).cloneStatement(Statement) line: 265
XMLEncoder(Encoder).writeStatement(Statement) line: 295
XMLEncoder.writeStatement(Statement) line: 400
XMLEncoder.writeObject(Object) line: 330
DroolsFactsLoadStore.saveFactsOnFile(List<ITriple>) line: 47
N3SourcetoDrools.saveFactsOnFile() line: 727
N3SourcetoDrools.launchDrools() line: 609
N3DroolsEngineFacade.launchDrools() line: 65
Project.doRunDrools(boolean) line: 823
Project.runDroolsTriples(boolean) line: 769
Project.runDroolsTriples() line: 791
TestReasonning.processProjectWithDrools(TestReasonning$TestSpecification) line: 370
TestReasonning.testRunDrools() line: 359
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 601
TestReasonning(TestCase).runTest() line: 168
TestReasonning(TestCase).runBare() line: 134
TestResult$1.protect() line: 110
TestResult.runProtected(Test, Protectable) line: 128
TestResult.run(TestCase) line: 113
TestReasonning(TestCase).run(TestResult) line: 124
TestSuite.runTest(Test, TestResult) line: 243
TestSuite.run(TestResult) line: 238
JUnit38ClassRunner.run(RunNotifier) line: 83
JUnit4TestClassReference(JUnit4TestReference).run(TestExecution) line: 50
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197

2011-11-05

r2349 | jmvanel | 2011-04-09 19:20:52 +0200 (sam. 09 avril 2011) | 5 lignes

WIP : simplifying the N3 - Java mapping (working on updating the KB on focus lost events) : large commit

Needed to deactivate some tests in :

- TestGenericGuiGenerationInsertLogical : pending_test_foaf_import2 , pending_test_uml2

- TestReasonning : 2 math tests

- BasicRuntimeTest : pending_testJavaMappingAntecedentVariable , pending_testJavaMappingAntecedentVariableString2 , etc

------------------------------------------------------------------------

r2345 | jmvanel | 2011-04-09 12:48:08 +0200 (sam. 09 avril 2011) | 2 lignes


Drools Error: Rule Compilation error Type mismatch: cannot convert from Double to String

ErrorLines: - 45

rule "acceleration.n3 0"
when
  $Triple_1 : Triple( $M : subject, predicate == "<http://eulergui.sf.net/example#hasXAcceleration>", $G : object )
  $Triple_2 : Triple( subject == $M, predicate == "<http://eulergui.sf.net/example#hasElapsedTime>", $T : object )
then
  String $X =  new Double( 0.5 * Double.parseDouble( Triple.n3ValueToNumeric($G )) * Double.parseDouble( Triple.n3ValueToNumeric($T )) * Double.parseDouble( Triple.n3ValueToNumeric($T )) );

{
  ?M :hasXAcceleration ?G.
  ?M :hasElapsedTime ?T.
  ( 0.5 ?G ?T ?T ) math:product ?X.
} => {
  # :d kb:retract ( ?M :hasX ?OLD_VALUE ).
  ?M :hasX ?X. } .

EulerGUI Application frozen

Solved ?

Thread [N3 sources modification Checker] (Suspended)
Object.wait(long) line: not available [native method]
N3Source(Object).wait() line: 503 [local variables unavailable]
N3Source.waitCurrentlyUpdating(String) line: 805
URIModificationChecker.checkN3Source(N3Source) line: 88
URIModificationChecker.run() line: 62
Thread.run() line: 722

Thread [AWT-EventQueue-0] (Suspended)
Object.wait(long) line: not available [native method]
UpdateN3Thread(Thread).join(long) line: 1258
UpdateN3Thread(Thread).join() line: 1332
N3ConversionRefesher.n3SourceAdded(Project, N3Source) line: 60
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 85
Project.addN3Source(N3Source, boolean) line: 309
Project.addN3Source(N3Source) line: 290
SourceFilesManagement$AddN3Action.actualAction(N3Source) line: 260
SourceFilesManagement$AddN3Action.actionPerformed(ActionEvent) line: 234
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) line: 2018
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2341
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 402
DefaultButtonModel.setPressed(boolean) line: 259
BasicButtonListener.mouseReleased(MouseEvent) line: 252
AWTEventMulticaster.mouseReleased(MouseEvent) line: 289
JToolBar$1(Component).processMouseEvent(MouseEvent) line: 6504
JToolBar$1(JComponent).processMouseEvent(MouseEvent) line: 3321
JToolBar$1(Component).processEvent(AWTEvent) line: 6269
JToolBar$1(Container).processEvent(AWTEvent) line: 2229
JToolBar$1(Component).dispatchEventImpl(AWTEvent) line: 4860
JToolBar$1(Container).dispatchEventImpl(AWTEvent) line: 2287
JToolBar$1(Component).dispatchEvent(AWTEvent) line: 4686
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4832
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4492
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4422
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2273
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2713
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4686
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 707
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 101
EventQueue$3.run() line: 666
EventQueue$3.run() line: 664
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 87
EventQueue$4.run() line: 680
EventQueue$4.run() line: 678
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
EventQueue.dispatchEvent(AWTEvent) line: 677
EventDispatchThread.pumpOneEventForFilters(int) line: 211
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 128
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 117
EventDispatchThread.pumpEvents(int, Conditional) line: 113
EventDispatchThread.pumpEvents(Conditional) line: 105
EventDispatchThread.run() line: 90

After some modifications:

Tests in error: 
  testLocalImportSwrlWithDrools(eulergui.gui.TestImportSwrl): Component enabled: class javax.swing.JButton
  testRemoteImportSwrlWithDrools(eulergui.gui.TestImportSwrl): Component enabled: class javax.swing.JButton
  testLocalImportSwrlWithEuler(eulergui.gui.TestImportSwrl): Component enabled: class javax.swing.JButton
  testRemoteImportSwrlWithEuler(eulergui.gui.TestImportSwrl): Component enabled: class javax.swing.JButton
  testTooltip(eulergui.gui.TestEulerGUITooltip): Component enabled: class javax.swing.JButton
  testURLProjectOWL(eulergui.gui.TestJavaEditor): Component enabled: class javax.swing.JButton
  testSimpleURLProject(eulergui.gui.TestJavaEditor): Component enabled: class javax.swing.JButton
  testURLProject(eulergui.gui.TestJavaEditor): Component enabled: class javax.swing.JButton
  testSimpleURLProjectLocal(eulergui.gui.TestJavaEditor): Component enabled: class javax.swing.JButton
  testAddNewN3Source(eulergui.gui.TestN3SourceInGUI): Component enabled: class javax.swing.JButton
  testInferenceListInAntecedent(deductions.runtime.BasicRuntimeTest)
  testInferenceNonEmptyListInAntecedent(deductions.runtime.BasicRuntimeTest)
  testInferenceString(deductions.runtime.BasicRuntimeTest)
  testSearchString(deductions.runtime.BasicRuntimeTest)
  testJavaMappingPlainTripleExecuteLine(deductions.runtime.BasicRuntimeTest)
  testJavaMappingPlainTripleInstanciationDeferredxecuteLine(deductions.runtime.BasicRuntimeTest)
  testJavaMappingConsequentVariable(deductions.runtime.BasicRuntimeTest)
  testJavaMappingConsequentVariable2(deductions.runtime.BasicRuntimeTest)
  testJavaMappingConsequentVariable3(deductions.runtime.BasicRuntimeTest)
  testJavaMappingAccesFieldAsN3Variable(deductions.runtime.BasicRuntimeTest)
  testJavaMappingAccessFieldAsN3Variable2(deductions.runtime.BasicRuntimeTest)
  testJavaMappingAccessFieldAsN3VariableConsequent(deductions.runtime.BasicRuntimeTest)
  testJavaMappingAntecedentVariableString(deductions.runtime.BasicRuntimeTest)
  testJavaMappingAntecedentVariableString2(deductions.runtime.BasicRuntimeTest)
  testJavaMappingAntecedentVariableString3(deductions.runtime.BasicRuntimeTest)
  testJavaMappingAntecedentVariableString4(deductions.runtime.BasicRuntimeTest)
  testJavaMappingPlainTripleInstanciationDeferred(deductions.runtime.BasicRuntimeTest)
  testJavaMappingConsequentNewVariable(deductions.runtime.BasicRuntimeTest)
  testSimpleInference(deductions.runtime.BasicRuntimeTest)

Tests run: 177, Failures: 0, Errors: 29, Skipped: 0

COMMIT

FIX one cause of dead lock :

UpdateN3Thread(Thread).join() line: 1332

N3ConversionRefesher.n3SourceAdded(Project, N3Source) line: 60

and

N3Source.waitCurrentlyUpdating(String) line: 805

URIModificationChecker.checkN3Source(N3Source) line: 88

REMEDY: now N3ConversionRefesher does NOT call join anymore

pom.xml : maven-surefire-plugin, maven-surefire-report-plugin : version : 2.10-SNAPSHOT ==> 2.10 , so that tests can pass without checking Internet

Still one Test in error:

test_uml2(eulergui.gui.TestGenericGuiGenerationInsertLogical): Wait AbstractButton with text "Employee" loaded

TODO EulerGUI

2011-11-04

possible test scenarios : look in manual "getting started" ;

or http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/explore_semweb.html

or : http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/configure-eulergui-in-n3.html

http://developer.android.com/resources/articles/speech-input.html

TODO EulerGUI :

17:05:45 [AWT-EventQueue-0] [error] AWT-EventQueue-0: com.hp.hpl.jena.n3.turtle.TurtleParseException: Line 8, column 16: com.hp.hpl.jena.iri.impl.IRIImplException: <http:deductions.sf.net/ontologies/business.owl.n3#> Code: 57/REQUIRED_COMPONENT_MISSING in HOST: A component that is required by the scheme is missing.

2011-11-03

COMMIT

FIX TestJavaEditor

- remove all Thread.sleep

- clean code

- fix frame title criteria: confusion bet main frame and editor frame


Problem when reading doap.n3 with Protégé 4.2

uk.ac.manchester.cs.owl.owlapi.turtle.parser.ParseException: Encountered "" at line 13, column 24.

Was expecting one of:

p4-feedback] Protégé 4.1 startup fails under Java 7...here is a workaround.

Indeed it works! Sent mail to the list.

TODO

new property verboseMode in class EulerGUI ( also controls logging) : should be under control of user preferences in N3

COMMIT

- CHANGELOG : update for release 1.9

- documentation.html : add search engine http://swse.deri.org/

2011-11-02

Application frozen when no network:

ResultManagement.displayOriginalSourceWithErrors(): 18:6 - 18:17 no prefix for "skos:"
java.net.UnknownHostException: prefix.cc
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:176)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:483)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:213)
        at sun.net.www.http.HttpClient.New(HttpClient.java:300)
        at sun.net.www.http.HttpClient.New(HttpClient.java:316)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:992)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296)
        at eulergui.parser.n3.service.MissingPrefixesCompletion.makePrefixDeclarationsWithPrefix_cc(MissingPrefixesCompletion.java:111)
        at eulergui.parser.n3.service.MissingPrefixesCompletion.makePrefixDeclarationsWithPrefix_cc(MissingPrefixesCompletion.java:41)
        at eulergui.gui.controller.N3ParsingExceptionProcessor.process(N3ParsingExceptionProcessor.java:27)
        at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:144)
        at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)

Trying Semantic Web Client Library (semwebquery)

% cd ~/src/ng4j/
% ant jar
% bin/semwebquery
exec java -cpSemantic Web Client Library bin/../build:bin/../lib/antlr-2.7.7.jar:bin/../lib/arq-2.8.8.jar:bin/../lib/axis-1.4.jar:bin/../lib/bcpg-jdk15-146.jar:bin/../lib/bcprov-jdk15-146.jar:bin/../lib/commons-codec-1.3.jar:bin/../lib/commons-logging-1.1.1.jar:bin/../lib/hsqldb-1.8.0.7.jar:bin/../lib/icu4j-3.4.4.jar:bin/../lib/iri-0.8.jar:bin/../lib/jena-2.6.4.jar:bin/../lib/jena-2.6.4-tests.jar:bin/../lib/junit-3.8.2.jar:bin/../lib/log4j-1.2.14.jar:bin/../lib/lucene-core-2.3.1.jar:bin/../lib/nekohtml-0.9.5.jar:bin/../lib/ng4j-0.9.4-SNAPSHOT.jar:bin/../lib/slf4j-api-1.6.1.jar:bin/../lib/slf4j-log4j12-1.6.1.jar:bin/../lib/stax-api-1.0.1.jar:bin/../lib/wstx-asl-3.2.9.jar:bin/../lib/xercesImpl-2.7.1.jar semweb.query
usage: semwebquery [parameters]

    -sparql <query>        Execute a SPARQL query
    -sparqlfile <file>     Execute a SPARQL query loaded from a file
    -find "s p o"          Execute a find query with an N-Triple style pattern;
                           use ANY as a wildcard
    -maxsteps <steps>      Set maximal depth of link following. Default: 3
    -maxfilesize <size>    Set maximal filesize in bytes of URIs to retrieve. Default: 100000000
    -maxthreads <threads>  Set number of threads for loading URIs. Default: 10
    -timeout <seconds>     Set query timeout. Default: 60 seconds
    -load <URL>            Load seed graph from the Web
    -NoRDFa                Disables RDFa support
    -sindice               Enables Sindice-based URI search during query execution
    -loadtrig <file>       Load seed graphs from a TriG file before starting
    -savetrig <file>       Save loaded graphs to a TriG file after finishing
    -retrieveduris         Output a list of all successfully retrieved URIs
    -faileduris            Output a list of URIs that could not be retrieved
    -redirecteduris        Output a mapping of URIs that have been redirected
    -resultfmt <format>    Specifies the output format for the result of a SPARQL query:
                           - for SELECT and ASK queries use TXT, XML, or JSON
                             (default: TXT);
                           - for CONSTRUCT or DESCRIBE queries use RDF/XML,
                             N-TRIPLE, TURTLE, or N3 (default: RDF/XML)
    -verbose               Show additional progress information

bin/semwebquery -load 'http://richard.cyganiak.de/foaf.rdf#cygri'  -find "ANY <http://xmlns.com/foaf/0.1/knows> ANY"

2011-10-31

pave the way to check that everything is saved before starting any processing:

add method EditorManagement.getUnsavedN3Sources()

show a Dialog When there Unsaved N3 Sources, before launching AddReferredOntologies Action

EditorManagement.showDialogWhenUnsavedN3Sources()

TODO call the methos also for inference engines, and other tools

2011-10-29

http://www.rene-witte.net/

test a REST query on Swoogle

http://swoogle.umbc.edu/index.php?option=com_swoogle_manual

http://sparql.cs.umbc.edu/swoogle31/q?queryType=search_swd_ontology&searchString=service&key=demo

<rdf:RDF
    xmlns:swoogle="http://daml.umbc.edu/ontologies/webofbelief/1.4/swoogle.owl#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:wob="http://daml.umbc.edu/ontologies/webofbelief/1.4/wob.owl#"> 
  <swoogle:QueryResponse> 
    <swoogle:hasSearchString>service</swoogle:hasSearchString> 
    <swoogle:hasQueryType rdf:resource="http://daml.umbc.edu/ontologies/webofbelief/1.4/swoogle.owl#search_swd_ontology"/> 
    <swoogle:hasSearchStart>1</swoogle:hasSearchStart> 
    <rdfs:comment>This RDF/XML document is dynamically generated by Swoogle (v3.1) . This service serves the research community under Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. It is in beta testing status as on Jan 24,2006, and changes may be made without notification. Service description is included in Swoogle manual, which can be found at Swoogle website at http://swoogle.umbc.edu/. Please contact (swoogle-developers AT cs.umbc.edu) or (Li Ding at UMBC) for further question.</rdfs:comment> 
    <swoogle:hasSearchTotalResults>8961</swoogle:hasSearchTotalResults> 
    <swoogle:hasResult> 
      <rdf:Seq> 
        <rdf:li> 
          <wob:SemanticWebDocument rdf:about="http://xmlns.com/foaf/0.1/index.rdf"> 
            <swoogle:hasCntInstance>1</swoogle:hasCntInstance> 
            <swoogle:hasOntoRank>145978.099522396</swoogle:hasOntoRank> 
            <wob:isEmbedded>false</wob:isEmbedded> 
            <swoogle:hasDescRef>, Project, &lt;B>Service&lt;/B>, Spatial, SpatialThing, Thing, Topic, account, accountName, accountServiceHomepage</swoogle:hasDescRef> 
            <swoogle:hasDescDef>, Profile, Project, Property, &lt;B>Service&lt;/B>, Spatial, SpatialThing, Thing, Topic, account, accountName</swoogle:hasDescDef> 
            <swoogle:hasDateDiscovered>2005-01-17</swoogle:hasDateDiscovered> 
            <swoogle:hasDateLastmodified>2010-08-08</swoogle:hasDateLastmodified> 
            <swoogle:hasOntoRatio>1</swoogle:hasOntoRatio> 
            <swoogle:hasMd5sum>3a5d4778240b986a35566dd0f0619ce8</swoogle:hasMd5sum> 
            <swoogle:hasParseState rdf:resource="http://daml.umbc.edu/ontologies/webofbelief/1.4/swoogle.owl#ParseSuccess"/> 
            <swoogle:hasDatePing>2010-08-12</swoogle:hasDatePing> 
            <swoogle:hasFiletype>rdf</swoogle:hasFiletype> 
            <swoogle:hasLength>44038</swoogle:hasLength> 
            <swoogle:hasPingState rdf:resource="http://daml.umbc.edu/ontologies/webofbelief/1.4/swoogle.owl#PingModified"/> 
            <swoogle:hasCntSwtDef>90</swoogle:hasCntSwtDef> 
            <swoogle:hasEncoding>iso-8859-1</swoogle:hasEncoding> 
            <swoogle:hasCntSwt>109</swoogle:hasCntSwt> 
            <wob:hasGrammar rdf:resource="http://daml.umbc.edu/ontologies/webofbelief/1.4/wob.owl#RDFXML"/> 
            <swoogle:hasDateCache>2010-08-12</swoogle:hasDateCache> 
            <swoogle:hasCntTriple>630</swoogle:hasCntTriple> 
          </wob:SemanticWebDocument> 
        </rdf:li> 

Fixing EulerGUI before release

Thanks to Cyril

Jena Turtle parser does *not* add default prefix :

15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0: com.hp.hpl.jena.n3.turtle.TurtleParseException: Line 5, column 10: Unresolved prefixed name: :x
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.ParserBase.throwParseException(ParserBase.java:274)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.ParserBase.resolvePName(ParserBase.java:195)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.PrefixedName(TurtleParser.java:680)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.IRIref(TurtleParser.java:664)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.Verb(TurtleParser.java:226)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.PropertyListNotEmpty(TurtleParser.java:164)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.TriplesSameSubject(TurtleParser.java:130)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.Statement(TurtleParser.java:76)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.parse(TurtleParser.java:46)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.ParserTurtle.parse(ParserTurtle.java:37)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.TurtleReader.readWorker(TurtleReader.java:21)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.JenaReaderBase.readImpl(JenaReaderBase.java:101)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.JenaReaderBase.read(JenaReaderBase.java:68)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:226)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2148)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:211)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.ontology.impl.OntModelImpl.readDelegate(OntModelImpl.java:3024)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2106)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2064)
15:26:56 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.OwlClassHierarchyBuilder.processTreeWithPellet(OwlClassHierarchyBuilder.java:115)

COMMITS

TemporaryFrame JDialog :

- move down and right by (50 , 50) wrt the mainframe;

- a Click removes this popup (and a ToolTip says "Click to remove this popup."


FIX this NPE (when adding a file with syntax errors, EG was trying to update the non existing editor:

ProjectGUI_Updater.n3SourceUpdated(): file:/home/jmv/src/eulergui/w/euler_project.xml.0.n3
#TRACE ( "addN3Source" <file:/home/jmv/src/eulergui/w/euler_project.xml.n3p> _:sk_N3S_0 "?IMPORT_URI" "euler_project.xml.0.n3" )
ProjectGUI_Updater.n3SourceAdded(): nanoTime 141367862397541
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.gjt.sp.jedit.jEdit._getBuffer(jEdit.java:2193)
        at org.gjt.sp.jedit.jEdit.getBuffer(jEdit.java:2213)
        at n3_project.EditorManagement$3.run(EditorManagement.java:216)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
        at java.awt.EventQueue.access$000(EventQueue.java:101)
        at java.awt.EventQueue$3.run(EventQueue.java:666)
        at java.awt.EventQueue$3.run(EventQueue.java:664)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

r2773 | jmvanel | 2011-10-29 12:00:12 +0200 (sam. 29 oct. 2011) | 8 lignes

- all messages in TemporaryFrame now under control of new property verboseMode in class EulerGUI

* (default==false)

* in this case no stack trace is shown

- N3ConversionRefesher: enhance message "update N3; PARSE ERROR"

TODO: new property verboseMode in class EulerGUI:

- should also control logging

- should be under control of user preferences in N3


- all messages in TemporaryFrame now under control of new property verboseMode in class EulerGUI (default==false)

- N3ConversionRefesher: enhance message "update N3; PARSE ERROR"

TODO: new property verboseMode in class EulerGUI:

- should also control logging

- should be under control of user preferences in N3

2011-10-28

Fixing EulerGUI before release

COMMIT:

- OWL tree view : now take in account application language or "en"

- AddReferredOntologies : catch loading errors with a TemporaryFrame

Semantic Software Engineering

I coined the expression "Semantic Software Engineering".

At the first level, this means : writing configuration files in N3 instead instead of XML, Java properties, JSON, or ad-hoc formats.

Over the years, the RDF community has developped a bunch of tools to translate back and forth between RDF and other formats. But there is little available for software engineering data. This data includes, but not limited: SQL schemas and queries, Hibernate and other ORM, Spring and other injection frameworks configuration, Maven and other build tools, firewall configuration, web server (Tomcat, Apache , .. ), eclipse, OsGi, and other plugin architectures. ...

Why SSE ?

How to do?

Of course , I'm aware that semantics of software configuration items is often complex, with a narrow meaning related to one piece of software. There is no silver bullet, but much stuff can be reused with minimal inference.

At a higher level, "Semantic Software Engineering" can mean also express declarative objects closer to programming in N3. The most obvious domain is Graphical User Interface. Indeed the semantics brought by Swing, GWT, HTML, Flew, and others are close. For one thing because they borrowed from an older system: TCL/Tk .

2011-10-27

r2747 | jmvanel | 2011-10-20 21:26:32 +0200 (jeu. 20 oct. 2011) | 3 lignes

Branching https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui

to .../eulergui/trunk/eulerscala

# ??? svn merge -r 2747:HEAD https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/main/java src/main/java

diff -bw --brief --recursive --exclude entries --exclude all-wcprops --exclude tmp --exclude '*.svn-base' src/main/java ~/src/eulergui/src/main/java

POM: Scala version is a property; remove pom_scala.xml

Tests in error:

testCreateProjectInGUI2(eulergui.gui.TestFacebookSearch): JFileChooser's window

Tests run: 176, Failures: 1, Errors: 1, Skipped: 0

java.lang.ClassCastException: java.lang.Integer cannot be cast to scala.runtime.Nothing$
        at eulergui.gui.inference.InferenceSwingWorker$$anon$1.propertyChange(InferenceSwingWorker.scala:29)
        at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
        at javax.swing.SwingWorker$SwingWorkerPropertyChangeSupport.firePropertyChange(SwingWorker.java:854)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
        at javax.swing.SwingWorker.firePropertyChange(SwingWorker.java:676)

http://www.bertails.org/blog/scala_sbt_emacs

COMMIT

Drools 5.3.0.Final ; added Jena tdb and joseki for tests

Tests PASS: run: 173, Failures: 0, Errors: 0, Skipped: 0

new snapshot at Revision : 2765

<jmvanel> we are very near a release; just issue with scrollbar in N3 shell

COMMIT

FIXED : issue with scrollbar in N3 shell: call setPreferredSize() after painting the String

TODO : I don't know why horizontal scroll does not work.

A case where scroll works:

Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 1047 in JViewport))
JViewport.setViewPosition(Point) line: 1047
JViewport.scrollRectToVisible(Rectangle) line: 433
JTextPane(JComponent).scrollRectToVisible(Rectangle) line: 3108
BasicTextUI$BasicCaret(DefaultCaret).adjustVisibility(Rectangle) line: 285
BasicTextUI$BasicCaret(DefaultCaret).repaintNewCaret() line: 1312
DefaultCaret$1.run() line: 1286
InvocationEvent.dispatch() line: 251
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 705
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 101
EventQueue$3.run() line: 666
EventQueue$3.run() line: 664
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
EventQueue.dispatchEvent(AWTEvent) line: 675
EventDispatchThread.pumpOneEventForFilters(int) line: 211
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 128
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 117
EventDispatchThread.pumpEvents(int, Conditional) line: 113
EventDispatchThread.pumpEvents(Conditional) line: 105
EventDispatchThread.run() line: 90

Thread [AWT-Shutdown] (Running)
N3ShellPane.paintComponent(Graphics) line: 107
N3ShellPane(JComponent).paint(Graphics) line: 1054
JViewport(JComponent).paintChildren(Graphics) line: 887
JViewport(JComponent).paint(Graphics) line: 1063
JViewport.paint(Graphics) line: 725
JScrollPane(JComponent).paintChildren(Graphics) line: 887
JScrollPane(JComponent).paint(Graphics) line: 1063
JPanel(JComponent).paintChildren(Graphics) line: 887
JPanel(JComponent).paint(Graphics) line: 1063
JLayeredPane(JComponent).paintChildren(Graphics) line: 887
JLayeredPane(JComponent).paint(Graphics) line: 1063
JLayeredPane.paint(Graphics) line: 585
JRootPane(JComponent).paintChildren(Graphics) line: 887
JRootPane(JComponent).paintToOffscreen(Graphics, int, int, int, int, int, int) line: 5228
BufferStrategyPaintManager.paint(JComponent, JComponent, Graphics, int, int, int, int) line: 295
RepaintManager.paint(JComponent, JComponent, Graphics, int, int, int, int) line: 1206
JRootPane(JComponent).paint(Graphics) line: 1040
GraphicsCallback$PaintCallback.run(Component, Graphics) line: 39
GraphicsCallback$PaintCallback(SunGraphicsCallback).runOneComponent(Component, Rectangle, Graphics, Shape, int) line: 78
GraphicsCallback$PaintCallback(SunGraphicsCallback).runComponents(Component[], Graphics, int) line: 115
JFrame(Container).paint(Graphics) line: 1967
JFrame(Window).paint(Graphics) line: 3867
RepaintManager.paintDirtyRegions(Map<Component,Rectangle>) line: 781
RepaintManager.paintDirtyRegions() line: 728
RepaintManager.prePaintDirtyRegions() line: 677

Building EulerGUI with Scala sources

I discovered that externalPom() and libraryDependencies are *not* working together; alas mharrah said on SBT list

http://groups.google.com/group/simple-build-tool/browse_thread/thread/d7944762322b4362

I found a nice code sample by a Korean guy to translate a pom.xml into SBT style of dependencies.

https://gist.github.com/388334

But it does not do the transitive (recursive) dependencies.

object mavenToSBT extends Application {

val xml =         <dependencies>
            <dependency>                
                <groupId>org.scalanlp</groupId>
                <artifactId>scalala_${scala.version}</artifactId>
                <version>0.3.1</version>
            </dependency>
// ....
val data: Seq[(String, String, String)] = (xml \ "dependency") map { d =>
  val groupId = d \ "groupId" text
  val artifactId = d \ "artifactId" text
  val versionNum = d \ "version" text

  (groupId, artifactId, versionNum)
}

val CrossBuildArtifact = """([\w-]+)_\$SCALA_VERSION\$""".r

def dep(a: String, g: String, v: String, cross: Boolean) = {
  val sep = if (cross) "%%" else "%"
  val ident = a.split("-").map(_.capitalize).mkString
  """val %s = "%s" %s "%s" %% "%s" """ format (ident, g, sep, a, v)
}

val m = data map { 
case (g, CrossBuildArtifact(a), v) => dep(a, g, v, true)
case (g, a, v) => dep(a, g, v, false)
} mkString("\n")
println(m)
}

and , since externalPom() is not managing transitive dependencies, I'm trying to use my POM translated in Ivy ...

http://stefan222devel.blogspot.com/2010/01/how-to-convert-maven-pomxml-into-ivy.html

ant -f pom_to_ivy.ant.xml convert

and , now yet another issue : the sbt run in waiting forever ; it is not consuming CPU :(

I could try the STB from source code , as ArmyOfBruce advised

I got it "working" , but with Ivy the transitive dependencies are *not* managed either

Is there a utility to generate a pom with transitive dependencies included ?

Scala: using mavenToSBT.scala to translate the pom dependencies into stb format,

and putting this into built.sbt

plus added manually indirect dependencies ==> it compiles !!!

TODO run the tests in src/test/java

https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulerscala/mavenToSBT.scala

https://github.com/harrah/xsbt/wiki/Getting-Started-Library-Dependencies

https://github.com/harrah/xsbt/wiki/Library-Management

Using Maven (exec plugin?) as a class loader for my application

http://mojo.codehaus.org/exec-maven-plugin/project-summary.html

https://cwiki.apache.org/MAVEN/maven-3x-class-loading.html

2011-10-26

externalPom() in SBT

show compile:dependency-classpath

/home/jmv/src/eulerscala/src/main/java/eulergui/gui/inference/RunActionGeneric.java:80: error: no suitable constructor found for InferenceSwingWorker(RunActionGeneric,InferenceEngine)
[error]             InferenceSwingWorker worker = new InferenceSwingWorker(this, engine);
[error]                                           ^
[error]     constructor InferenceSwingWorker.InferenceSwingWorker(Nothing$,Nothing$) is not applicable
[error]       (actual argument RunActionGeneric cannot be converted to Nothing$ by method invocation conversion)
[error]     constructor InferenceSwingWorker.InferenceSwingWorker() is not applicable
[error]       (actual and formal argument lists differ in length)

[WARNING] The artifact xstream:xstream:jar:1.2 has been relocated to com.thoughtworks.xstream:xstream:jar:1.2

~/src/eulerscala/ % mvn -f pom_scala.xml clean  compile
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project eulergui: Compilation failure: Compilation failure:
[ERROR] /home/jmv/src/eulerscala/src/main/parser4j/java/eulergui/parser/n3/impl/parser4j/gen/MainGenerateParserDataForN3.java:[3,53] error: package eulergui.parser.n3.impl.parser4j.service.match does not exist
[ERROR] /home/jmv/src/eulerscala/src/main/parser4j/java/eulergui/parser/n3/impl/parser4j/gen/MainGenerateParserDataForN3.java:[77,38] error: cannot find symbol

<jmvanel> ArmyOfBruce, this works (I forgot alias in front ) :

<jmvanel> alias sbt='java -Xms1600m -XX:MaxPermSize=512M -XX:+CMSClassUnloadingEnabled -jar ~/src/read-write-web/sbt-launch-0.11.0.jar'

<jmvanel> and for my other trouble with Maven project, I'll try to give directly to stb the big classpath obtained from mvn dependency:build-classpath

<ArmyOfBruce> I've needed -Xss2M for sbt 0.11 to work for me.

<ArmyOfBruce> and at times, have appeared to need -XX:ReservedCodeCacheSize=256M

<ArmyOfBruce> jmvanel: if you have a big codebase, you may run into what I did with memory usage (which is fixed in current snapshots)

<jmvanel> the [success] was for goal compile ; now goal progard has trouble , but it first DID packaging into launcher-0.11.1-SNAPSHOT.jar ;

<jmvanel> but after when Reading library jar [/home/jmv/apps/jdk1.7.0/jre/lib/rt.jar , it complained :

<jmvanel> Error: Can't read [proguard.ClassPathEntry@186458c2] (Can't process class [com/oracle/net/Sdp$1.class] (Unsupported version number [51.0] for class format))

<jmvanel> but maybe what progard does is not indispensable

<jmvanel> ArmyOfBruce, dunno if it's a big codebase :) :

<jmvanel> wc src/**/*.java src/**/*.scala

<jmvanel> 59175 178164 1869225 total

<jmvanel> actually just 2 scala for now :(

/home/jmv/src/xsbt/launch/target/launcher-0.11.1-SNAPSHOT.jar

eclipse same-targets

http://ant.apache.org/ivy/


http://www.techdrivein.com/2011/05/10-useful-application-indicators-for.html

sudo apt-get install indicator-weather

https://secure.wikimedia.org/wikipedia/en/wiki/Comparison_of_FTP_client_software#Operating_system_support

When running 2 EG on same project with OWL model:

N3SourcetoDrools.translate(): java.lang.NullPointerException
java.lang.RuntimeException: translate(IRDFIterator iterator, ... file:/tmp/index.rdf.as.rules.n3
at eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:325)
at eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:260)
at eulergui.inference.drools.impl.N3DroolsEngineFacade.translate(N3DroolsEngineFacade.java:91)
at eulergui.project.Project.translateToDrools(Project.java:973)
at eulergui.gui.controller.N3ConversionRefesher.updateKB(N3ConversionRefesher.java:170)
at eulergui.gui.controller.N3ConversionRefesher.n3SourceChanged(N3ConversionRefesher.java:49)
at eulergui.project.ProjectChangeSupport.fireN3SourceChanged(ProjectChangeSupport.java:152)
at eulergui.project.Project.fireN3SourceChanged(Project.java:1413)
at eulergui.infrastructure.URIModificationChecker.checkN3Source(URIModificationChecker.java:91)
at eulergui.infrastructure.URIModificationChecker.run(URIModificationChecker.java:62)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at org.drools.rule.builder.PackageBuildContext.init(PackageBuildContext.java:101)
at org.drools.rule.builder.RuleBuildContext.<init>(RuleBuildContext.java:77)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2284)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:822)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:380)
at eulergui.inference.drools.impl.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:407)
at eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:318)
 ... 10 more

web.sourceforge.net is still unavailable for sftp , as was the case for all weekend :(

http://sourceforge.net/apps/trac/sourceforge/wiki/SSH%20key%20fingerprints

@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @

<ctsai-sf> I'm surprised that you're getting this now, the ssh key fingerprint on that host was last changed Late Jan/Early Feb.

<burley-sf> yep

<jmvanel> ctsai-sf, it's probably that I spent months on Debian, and recently went back on Ubuntu

<jmvanel> double boot

GET /home/jmv/index.rdf.n3p-shell-history.n3

java.lang.RuntimeException: ** ERROR ** /home/jmv/index.rdf.n3p-shell-history.n3 ** error(existence_error(source_sink,/home/jmv/index.rdf.n3p-shell-history.n3),[open/3|local_sp(269060340,269059464,[],[])])

SCM-Revision: 2754

<gribble> Sourceforge.net business hours are approximately 12:00 to 21:00 UTC, excluding weekends and holidays.

2011-10-24

Protégé 4.1 not launching with Java 7

% protege41
Core Bundle 1 failed to start.
Fatal Exception Caught trying to start Protege
org.osgi.framework.BundleException: Unresolved constraint in bundle org.protege.common [1]: package; (&(package=javax.swing.text)(version>=0.0.0))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3295)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1653)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
        at org.protege.osgi.framework.Launcher.start(Launcher.java:125)
        at org.protege.osgi.framework.Launcher.main(Launcher.java:143)

 % java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

2011-10-23

http://www.w3.org/2003/01/21-RDF-RDB-access/#Implementations

Idea for Attempto: the parser should output the lexicon from the sentences, be it guessed or declared.

http://www.javabeat.net/articles/29-introduction-to-google-guice-1.html

New article : configure-eulergui-in-n3

TODO before EulerGUI release

TODO :

- new example ckan_explore.n3p should also show metadata about the data sources discovered

- new endpoints found in EG project should be added in the combo box

 % scala
Welcome to Scala version 2.9.0.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.

scala>  List(1,2,2,3).groupBy({ i:Int => i }).values.filter(_.size > 1).isEmpty
res0: Boolean = false

scala>  List(1,2,2,3).groupBy({ i:Int => i }).values.filter(_.size > 1)
res1: Iterable[List[Int]] = List(List(2, 2))

scala>  List(1,2,2,3).groupBy({ i:Int => i })
res2: scala.collection.immutable.Map[Int,List[Int]] = Map(3 -> List(3), 1 -> List(1), 2 -> List(2, 2))

2011-10-22

{ ?C owl:maxCardinality ?MAX. ?C owl:onProperty ?P.
  _:d eu:findall ( ?IND {
    _:e eu:findall ( ?V
      { ?IND ?P ?V . ?IND a ?C . }
      ?LIST ).
    ?LIST math:memberCount ?COUNT.
    ?COUNT math:greaterThan MAX.
  } ?LIST2 ).
  ?LIST2 math:memberCount ?COUNT2.
  ?COUNT2 math:greaterThan 0 .
} => {
  ?P :violatesMaxCardinalityOnIndividuals ?LIST2 .
}.

% cat 2003/03swap/owl-maxCardinality.n3

@prefix log: <http://www.w3.org/2000/10/swap/log#>.

@prefix owl: <http://www.w3.org/2002/07/owl#>.

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

{?C owl:maxCardinality 1. ?C owl:onProperty ?P. ?U a ?C. ?U ?P ?Y. ?U ?P ?Z} => {?Y owl:sameAs ?Z}.

{?C owl:maxCardinality 0. ?C owl:onProperty ?P. ?X ?P ?Y. ?X a ?C} => false.

{?C owl:maxCardinality 1. ?C owl:onProperty ?P. ?X ?P ?Y. ?X ?P ?Z. ?X a ?C. ?Z owl:differentFrom ?Y} => false.

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

https://github.com/harrah/xsbt/wiki

EulerGUI error when loading an OWL from Web

HTTP HEAD is returning 401 (unauthorized) for HTTPS protocol :

URICacheImpl.getURITimeStamp(): https://subversion.assembla.com/svn/itsmo/tags/itsmo/1.1/v1/itsmo.owl : java.io.IOException: Server returned HTTP response code: 401 for URL: https://subversion.assembla.com/svn/itsmo/tags/itsmo/1.1/v1/itsmo.owl

Let's try:

http://subversion.assembla.com/svn/itsmo/tags/itsmo/1.1/v1/itsmo.owl

Works fine !

In fact it's a random error caused by URI checker thread.

COMMIT

- FIX (hopefullly) random error when launching https://subversion.assembla.com/svn/itsmo/tags/itsmo/1.1/v1/itsmo.owl

* EYE was being given an OWL RDF file

* now ctor N3SourceFromRDF(URL url, Project project) is setting currentlyUpdating = true;

and URIModificationChecker.checkN3Source() is calling n3Source.waitCurrentlyUpdating()

- FIX NPE in tooltips in OwlClassHierarchyBuilder.printPropertiesWithMatchingDomain()

* also found in itsmo.owl

Tests in error:

test_cv2(eulergui.gui.TestGenericGuiGenerationInsertLogical): Wait AbstractButton with text "Skill" loaded

testLocalImportSwrlWithDrools(eulergui.gui.TestImportSwrl): Frame Title Component Chooser "jEdit.*.as.rules.n3.*"

2011-10-21

skos: <http://www.w3.org/2004/02/skos/core>

Starting at 18:56

http://protegewiki.stanford.edu/wiki/WebProtegeDevelopersGuide

svn ls --verbose http://smi-protege.stanford.edu/repos/protege/web-protege/branches/who/
  23878 vendetti              14 oct., 00:51 ./
  21200 tudorach        17873 07 janv. 2011 build.xml
  19163 tudorach              17 juin 2010 etc/
  22820 tudorach         2590 04 juin, 01:46 local.properties.template
  22779 tudorach         1021 18 mai, 03:16 readme.txt
  23878 vendetti              14 oct., 00:51 src/
  20783 elliott               11 nov. 2010 test/
  20783 elliott               11 nov. 2010 test-lib/
  23877 vendetti              14 oct., 00:50 war/

% svn ls --verbose http://smi-protege.stanford.edu/repos/protege/web-protege/trunk/
  22780 tudorach              18 mai, 04:01 ./
  18293 vendetti         9484 07 avril 2010 build-internal.xml
  17778 tredmond        11484 11 mars 2010 build.xml
  14928 tredmond              31 juil. 2009 etc/
  15124 tredmond         1042 25 août 2009 local.properties
  22780 tudorach         1021 18 mai, 04:01 readme.txt
  19884 elliott               26 août 2010 src/
  15558 vendetti              02 oct. 2009 war/

svn co http://smi-protege.stanford.edu/repos/protege/web-protege/branches/who/ web-protege

Install GWT plugin for eclipse from update site http://dl.google.com/eclipse/plugin/3.7 (need to install both the plugin and the GWT SDK)

Create Web Application Project (in the Google folder)

edu.stanford.bmir.protege.web

http://127.0.0.1:8888/Web_protege.html

GWT module 'web_protege' may need to be (re)compiled

EulerGUI error when loading an OWL from Web

In case of error, the ORIGINAL button should always be available.

This is obviously a programming error, EYE is being given an OWL file.

When pasting itsmo.owl directly :

Could not load N3 source from URL https://subversion.assembla.com/svn/itsmo/tags/itsmo/1.1/v1/itsmo.owl
ERROR in reasoning with External Prolog

n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:59)
eulergui.project.Project.reasonExternalProlog(Project.java:515)
eulergui.tools.SWRLTranslator.runTranslatorProject(SWRLTranslator.java:114)
eulergui.tools.SWRLTranslator.n3SourceAdded(SWRLTranslator.java:53)
eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:85)

Cause:
java.lang.RuntimeException: ** ERROR ** /tmp/eg-1982166131313413215.n3 ** illegal_token(char_code(/,47),after_line(5))
euler.Process.execute(Process.java:57)
euler.ProofEngine.runProofEngine(ProofEngine.java:180)
euler.ProofEngine.runProofEngine(ProofEngine.java:199)
n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:52)
eulergui.project.Project.reasonExternalProlog(Project.java:515)

When pasting itsmo.owl from Google search

http://www.google.com/search?q=ontology+business+contract+service+delivarable&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:fr:unofficial&client=iceweasel-a#sclient=psy-ab&hl=fr&client=iceweasel-a&rls=org.mozilla:fr%3Aunofficial&source=hp&q=ontology+business+contract+service+deliverable+filetype:owl&pbx=1&oq=ontology+business+contract+service+deliverable+filetype:owl&aq=f&aqi=&aql=1&gs_sm=e&gs_upl=45784l48111l3l49084l8l8l0l0l0l1l216l1377l1.3.4l8l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=c79451bebafe8677&biw=1229&bih=518

PROBLEM when managing N3 Cache for N3 source http://www.google.com/url?sa=t&rct=j&q=ontology%20business%20contract%20service%20deliverable%20filetype%3Aowl&source=web&cd=2&ved=0CCAQFjAB&url=https%3A%2F%2Fsubversion.assembla.com%2Fsvn%2Fitsmo%2Ftags%2Fitsmo%2F1.1%2Fv1%2Fitsmo.owl&ei=2E6hTvOfKcvRsgaV3M3fAg&usg=AFQjCNH3lwmt_a5rEaPVkZRtodDo7dthug&cad=rja
N3SourceFromXML_Gloze.extractXMLNamespaces():
Could not load from URI http://www.google.com/url?sa=t&rct=j&q=ontology%20business%20contract%20service%20deliverable%20filetype%3Aowl&source=web&cd=2&ved=0CCAQFjAB&url=https%3A%2F%2Fsubversion.assembla.com%2Fsvn%2Fitsmo%2Ftags%2Fitsmo%2F1.1%2Fv1%2Fitsmo.owl&ei=2E6hTvOfKcvRsgaV3M3fAg&usg=AFQjCNH3lwmt_a5rEaPVkZRtodDo7dthug&cad=rja
 reason: The markup in the document following the root element must be well-formed.
 cause: null

eulergui.inputs.N3SourceFromXML_Gloze.extractXMLNamespaces(N3SourceFromXML_Gloze.java:126)
eulergui.inputs.N3SourceFromXML_Gloze.convertToN3(N3SourceFromXML_Gloze.java:68)
eulergui.project.N3Source.manageN3Cache(N3Source.java:558)
eulergui.project.N3Source.doUpdate(N3Source.java:389)
eulergui.inputs.N3SourceFromXML_Gloze.prepare(N3SourceFromXML_Gloze.java:47)

Cause:
org.xml.sax.SAXParseException; systemId: http://www.google.com/url?sa=t&rct=j&q=ontology%20business%20contract%20service%20deliverable%20filetype%3Aowl&source=web&cd=2&ved=0CCAQFjAB&url=https%3A%2F%2Fsubversion.assembla.com%2Fsvn%2Fitsmo%2Ftags%2Fitsmo%2F1.1%2Fv1%2Fitsmo.owl&ei=2E6hTvOfKcvRsgaV3M3fAg&usg=AFQjCNH3lwmt_a5rEaPVkZRtodDo7dthug&cad=rja; lineNumber: 1; columnNumber: 52; The markup in the document following the root element must be well-formed.
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
eulergui.inputs.N3SourceFromXML_Gloze.extractXMLNamespaces(N3SourceFromXML_Gloze.java:123)
eulergui.inputs.N3SourceFromXML_Gloze.convertToN3(N3SourceFromXML_Gloze.java:68)
eulergui.project.N3Source.manageN3Cache(N3Source.java:558)
eulergui.project.N3Source.doUpdate(N3Source.java:389)
 , caused by The markup in the document following the root element must be well-formed.

externalPom() in SBT

Hi externalPom() does not seem to add *recursive* dependencies to the classpath

<jmvanel> known bug ?

<jmvanel> mharrah, ping; I noticed similar bug 59 ; can it be that this extra feature is missing ?

externalPom() doesn't set classpaths correctly

https://github.com/harrah/xsbt/issues/59

Scala readings and test

http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html

Scala seems to hit the perfect sweet spot between the consise feel of a dynamic language, while actually being completely statically typed.

Another one :

The thing which most impresses me is the core language syntax is pretty small and simple (the spec is about a quarter the size of Java's); but its way more powerful and flexible and is very easy to extend in libraries to add new semantics and features. For example see the Scala Actors. So its ideal for creating either embedded DSLs or external DSLs. There's really no need to have Java , XPath, XSLT, XQuery, JSP, JSTL, EL and SQL - you can just use Scala with some DSLs here and there (examples of this later...).

Along this line of thought, why nobody ever did an N3 DSL in Scala ?

Quoted by Strachan above:

http://james-iry.blogspot.com/2009/04/java-has-type-inference-and-refinement.html

scala> object ComprehensionTest2 extends Application {
     |   def foo(n: Int, v: Int) =
     |     for (i <- 0 until n;
     |          j <- i + 1 until n if i + j == v) yield
     |       Pair(i, j);
     |   foo(20, 32) foreach {
     |     case (i, j) =>
     |       println("(" + i + ", " + j + ")")
     |   }
     | }
warning: there were 1 deprecation warnings; re-run with -deprecation for details
defined module ComprehensionTest2

scala> ComprehensionTest2
(13, 19)
(14, 18)
(15, 17)
res0: ComprehensionTest2.type = ComprehensionTest2$@11ad1541

Scala CHEAT SHEET v.0.1 }

http://en.wikipedia.org/wiki/Closure_(computer_science)

2011-10-20

Branching

http://nedbatchelder.com/text/quicksvnbranch.html

% svn ls https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/
eulergui/
eulergui_server/
% svn copy https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui \
           https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulerscala
Révision 2747 propagée.   

new snapshot at 15:25

on #sbt

hi

<jmvanel> new to scala ...

<jmvanel> just made a build.sbt to reuse my Maven POM , with help of #scala ...

<jmvanel> I have the impression that stb cannot manage a -SNAPSHOT dependency of Maven .

on #scala

Hi all

I'm trying to migrate my app to Scala; it compile perfectly with Maven enad eclipse, BUT using sbt-launch-0.11.0.jar , there is this strange message on a Java import statement :

... ParsingException.java:3: ParserException is not a member of _root_.net.sf.parser4j.parser.service

set logLevel := Level.Debug

http://macstrac.blogspot.com/2010/01/using-sbt-on-your-scala-maven-project.html

oem-laptop: /media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/ % sbt compile 
[info] Set current project to default-69b272 (in build file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/)
[info] Compiling 2 Scala sources and 396 Java sources to /media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/target/scala-2.9.1/classes...
[error] /media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/src/main/java/n3_project/exceptions/parser/ParsingException.java:3: ParserException is not a member of _root_.net.sf.parser4j.parser.service
[error] import net.sf.parser4j.parser.service.ParserException;
[error]        ^
[error] /media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/src/main/java/n3_project/exceptions/parser/ParsingException.java:10: not found: type ParserException
[error] public class ParsingException extends ParserException {
[error]                                       ^
[error] two errors found
[error] {file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/}default-69b272/compile:compile: Compilation failed

COMMITS

FIX using return value of the property call in a subsequent method call in a rule consequent *with parenthesis*

- add TEST BasicRuntimeTest.testJavaMappingAccessFieldAsN3VariableConsequent()

- Still usual random tests in error: testLocalImportSwrlWithDrools(eulergui.gui.TestImportSwrl): Frame Title Component Chooser "jEdit.*.as.rules.n3.*"

2011-10-19

COMMITS

architecture.html : update parag. "N3 - Java mapping (embedded Java objects)" from a rule designer point of view.

FIX using return value of the property call in a subsequent method call *with parentheses*

add TEST BasicRuntimeTest.testJavaMappingAccesFieldAsN3Variable2()

_:obj a java:javax-swing-JFrame ." );

_:obj javam:getContentPane _:PANE ." );

_:LAB a java:javax-swing-JLabel ; javam:setText \"Papilio\" ." );

_:PANE javam:add ( _:LAB ) ." );

2011-10-18

http://www.w3.org/TR/sparql11-update/

interesting dialog on swig IRC

<tktiddle> So ive found that python rdflib allows you to store triples in a mysql database, whats the difference between doing this and using a "triple store" like 4store?

* swh est parti (Quit: swh)

<mischat> 4store uses its own backend, it holds everything in RAM

<mischat> not all triple stores do that, so it depends on the triplestore you are using i guess

* mischat note that I work on 4store, disclosure and all

<mischat> and yeah, so quite a few of the triplestore implementation store the triples to a SQL backed relational database

<shellac> tktiddle: rdf-specific stores have certain advantages over relational databases. they act in ways that are a bit alien to typical relational databases (e.g. value comparisons, self-joins)

<timbl> Lots of stuff happening in read-write linked data -- with data.fm and read-write-web projects both getting more solid

* egonw (~egonw@m77-219-198-199.cust.tele2.se) a rejoint #swig

<mischat> this is the new community project right, /me hasn't been following it at all, i guess i should

* mhausenblas (~mhausenbl@wlan-nat.fwgal01.deri.ie) a rejoint #swig

<timbl> data.fm was started by Joe Presbrey, read-write-web by Alexandre Bertails.

<mischat> is this where the work is taking place : http://www.w3.org/community/rww/ ?

* mischat recalls data.fm

<mischat> joe implemented the webid stuff very early on iirc

<timbl> Yes, python.

<timbl> Alex looked at getting a supported implementation running in W3C space, and ed=nded up writing one in Scala based on Jena and unfiltered.

* egonw_ (~egonw@109.58.90.82.bredband.tre.se) a rejoint #swig

<mischat> ms8 at stanford has implemented ACLs for 4store, which is pretty neat, i wonder whether he has thought about supporting webid's for identity

* ldodds (~ldodds@212.36.55.94) a rejoint #swig

<mischat> so that you can have a given identity the ability to update/query a collection of graphs in the sparql-store

* egonw est parti (Read error: Connection reset by peer)

* chimezie est parti (Quit: chimezie)

<timbl> The read-write-web model is that a graph corresponds to a (virtual) web document which is the granularity of access control

* timbl gtg

<gromgull> This just says "Bad Request" :( http://data.fm/rp_auth?provider=Gmail

Looking for testers on SWIG IRC

Good morning

I'm looking for testers for EulerGUI 1.9 beta: Semantic Web + N3/Turtle syntax GUI and framework:

SemWeb explorer( download, visualize and navigate through ontologies ), rules engines, mixing business rules and Java

Features (Fact Sheet) : http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html#Features

join us at #eulergui .

Configure EulerGUI through N3 preference file

Currently this does work; generated Drools is OK, LocalAction is not abstract anymore, and ProjectGUI constructor does not start internal KB (ApplicationKB) anymore.

{ ?P a java:n3_project-ProjectGUI .
} => {
  _:d eg:trace ( "addInToolbarAndMenu" ?P ).
  ?P javap:sourceFilesManagement ?SFM .
  _:ACTION a java:n3_project-LocalAction .
  _:ACTION javam:setProperties ( _:ACTION "bla" "internet.png" "bla bli" "" ) .
  ?SFM javam:addInToolbarAndMenu ( _:ACTION ) .
}.

HowTo :

Just paste the above rule in in the preference file ( from menu File / preferences ).

Works too ( no parentheses ) :

{ ?P a java:n3_project-ProjectGUI .
} => {
  _:d eg:trace ( "addInToolbarAndMenu" ?P ).
  ?P javap:sourceFilesManagement ?SFM .
  _:ACTION a java:n3_project-LocalAction .
  _:ACTION javam:setProperties ( _:ACTION "bla" "internet.png" "bla bli" "" ) .
  ?SFM javam:addInToolbarAndMenu _:ACTION .
}.

Does not work with question mark variables and parenthesis :

Grave: Drools Error in file:/home/jmv/.eulergui/preferences.n3 , Error: Rule Compilation error $SFM cannot be resolved

FIXED on oct 19

{ ?P a java:n3_project-ProjectGUI .
} => {
  _:d eg:trace ( "addInToolbarAndMenu" ?P ).
  ?P javap:sourceFilesManagement ?SFM .
  ?ACTION a java:n3_project-LocalAction .
  ?ACTION javam:setProperties ( ?ACTION "bla" "internet.png" "bla bli" "blu" ) .
  ?SFM javam:addInToolbarAndMenu ( ?ACTION ) .
}.

2011-10-17

sourceMenu

Drools bug reports

Such expressions in LHS do not compile anymore :

C( f == "a" || f == "b" )

==> compiler says : Predicate ' f == "a" || f == "b" ' must be a Boolean expression

Note that this does not work any more :

C( ( f == "a" ) || ( f == "b" ) )

Run this code :

https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/test/java/samples/DroolsSample.java

and look at tripleTestDisjunction(), tripleTestDisjunction2()

with this library :

http://eulergui.sourceforge.net/maven2/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-20110824.171234-1.jar

If needed , auxiliary sources are also here :

http://eulergui.sourceforge.net/maven2/eulergui/eulergui/1.9-SNAPSHOT/


JBRULES-3255

<jmvanel> I finally found a case that fails with Drools 5.4.0-SNAPSHOT:

<jmvanel> inserting fact before populating rule base => rule does not fire, because of eval()

<jmvanel> https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/test/java/samples/DroolsSample.java

<jmvanel> look at testEval()

rm -r /home/jmv/.m2/repository/org/drools/*/5.4.0-SNAPSHOT

rm -r /home/jmv/.m2/repository/org/mvel/mvel2/*

Configure EulerGUI trough N3 preference file

Currently this does not work; generated Drools is OK, but

{ ?P a java:n3_project-ProjectGUI .
} => {
  _:d eg:trace ( "addInToolbarAndMenu" ?P ).
  ?P javap:sourceFilesManagement ?SFM .
  _:ACTION a java:n3_project-LocalAction .
  _:ACTION javam:setProperties ( _:ACTION "bla" "icon1" "bla bli" "" ) .
  ?SFM javam:addInToolbarAndMenu ( _:ACTION ) .
}.

runtime error :

Exception executing consequence for rule "preferences.n3 0" in preferences_n3_0: java.lang.NullPointerException
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1101)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1029)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1251)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:708)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:672)
at unif.TripleStoreDrools.fireAllRules(TripleStoreDrools.java:330)
at eulergui.gui.controller.ApplicationKB.fireAllRules(ApplicationKB.java:205)
at eulergui.gui.actions.OpenPreferencesAction.applyUserPreferences(OpenPreferencesAction.java:77)
at n3_project.ProjectGUI.<init>(ProjectGUI.java:160)
at n3_project.ProjectGUI.newWindow(ProjectGUI.java:257)
at n3_project.ProjectGUI.main(ProjectGUI.java:216)
Caused by: java.lang.NullPointerException
at n3_project.SourceFilesManagement.addInToolbarAndMenu(SourceFilesManagement.java:109)
at preferences_n3_0.Rule_preferences_n3_0.defaultConsequence(Rule_preferences_n3_0.java:25)
at preferences_n3_0.Rule_preferences_n3_0DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1091)

Actually, there are 2 issues here:

  1. configuring a ProjectGUI object while constructor is not finished is not clean;
  2. class n3_project-LocalAction is actually abstract

2011-10-16

Semantic web training

analogy between RDF graphs and graphs of pointers (references) in C / Java / etc

natural translation between XML and RDF

Drools engine : associate an URI to the return value of a property call (in a rule)

COMMIT

- Drools engine : associate an URI to the return value of a property call (in a rule) : now this works : test/javaMappingAccessFieldAsN3Variable.n3

* initialize correctly the KB in N3SourcetoDrools.launchDrools()

- DroolsSample: add test for recent regression:

C( f == "a" || f == "b" )

compiler says : Predicate '...' must be a Boolean expression

TODO still failures:

Failed tests: testTooltip(eulergui.gui.TestEulerGUITooltip): "<HTML><http://exampleS#waza>:<BR><b>"Label for waza"</b><br/></HTML>" does not match pattern: .*Comment for waza in the ex: namespace.*

Tests in error:

testSimpleURLProject(eulergui.gui.TestJavaEditor): Wait for "getText() Component Chooser "PhilipKDick"

2011-10-15

N3Source.parseResult(): parseResult (gui_generic.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (java_event-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (software_applications.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (generic_gui_projection-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (rpo-rules-small.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (java_library-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (form-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (generic_to_java-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (java_library.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (app_gui-rules2.n3) was null ==> re-parse (and possibly re-read N3 source)
Drools Error: Predicate 'predicate == "<http://www.w3.org/2000/01/rdf-schema#label>" || predicate == "<http://www.w3.org/2000/01/rdf-schema#comment>" || predicate == "<http://www.w3.org/2000/01/rdf-schema#domain>" || predicate == "<http://www.w3.org/2000/01/rdf-schema#range>" || predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>"' must be a Boolean expression
[Line: 57, Column: 6]
ErrorLines:  - 57

"src/main/resources/eulergui/inference/drools/impl/infrastructure-rules.drl" 111 lignes

query "document_owl" ( String $RESOURCE )
  //  "rdfs:label", "rdfs:comment",  "rdfs:domain", "rdfs:range"
  triple : Triple( subject == $RESOURCE,
      predicate == "<http://www.w3.org/2000/01/rdf-schema#label>"
    // || predicate == "<http://www.w3.org/2000/01/rdf-schema#comment>"
    // || predicate == "<http://www.w3.org/2000/01/rdf-schema#domain>"
    // || predicate == "<http://www.w3.org/2000/01/rdf-schema#range>"
    // || predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>"
  )
end

EulerGUI : trying to keep facts when populating rule base

See EulerGUI dev

updated DroolsSample with a case that fails with Drools 5.4.0-SNAPSHOT:

inserting fact before populating rule base ==> rule does not fire, because of eval()

https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/test/java/samples/DroolsSample.java

look at testEval()

Either:

COMMIT

clean code in N3Source, N3SourcetoDrools, RETETest

ProjectGUI : set log level to SEVERE

2011-10-14

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

Using svn-bisect with Maven

svn-bisect start 2721 2725
svn-bisect run 'DISPLAY=:1 LANG=en mvn test \
  --no-plugin-updates --offline \
  -Dtest="eulergui.gui.TestGenericGuiGenerationInsertLogical#test_uml2"'
 ...

Regression found!
Last good revision: r2721
First bad revision:
------------------------------------------------------------------------
r2722 | jmvanel | 2011-10-12 11:09:49 +0200 (mer. 12 oct. 2011) | 3 lignes

Drools engine : associate an URI to the return value of a property call (in a rule), WIP
tests PASS, except random known errors ( not in eclipse ) :
test_person_import3(eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules): Wait AbstractButton with text "address" loaded , etc ...

I actually found the bug this way !

Now only 1 test in error: testSimpleURLProject(eulergui.gui.TestJavaEditor): Wait for "getText() Component Chooser "PhilipKDick"

This corresponds to a hack to change the title of the jEdit frame (tolerable) .

EulerGUI : fighting with regressions: UML ,etc

Bad scenario :

  1. run cv2.n3p
  2. File / quit ==> message "all is not saved"
  3. click on window red cross ==> app. is srill running

Tests in error:
test_uml2(eulergui.gui.TestGenericGuiGenerationInsertLogical)
test_uml2(eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules)

Logger.getLogger("eulergui.cache")

FIXED this:

Thread [doN3SourceAdded: ./uml_owl-rules.n3] (Suspended (exception RuntimeException))
N3Source.manageParseN3() line: 408
N3Source.update() line: 377
N3ConversionRefesher.updateN3(N3Source) line: 120
UpdateN3Thread.run() line: 40

COMMITED

- Drools engine : associate an URI to the return value of a property call (in a rule), WIP; now that Drools generated DRL is correct, still need to initialize correctly the KB in Project.launchDrools()

* pave the way for reusing Working memory when launching Drools ( flag useNewWorkingMemory )

- simplify class /ProjectFileManagement.OpenProjectAction: call projectGUI.populateWindow( project, ...

- name Drools packages after N3 file (class N3SourcetoDrools)

- EulerGUI.java :

* introduce globalLevel ; comment out System.exit(0); (?? re-enable ? )

* call rethrowEventsExceptListener(guiUpdater) through SwingUtilities.invokeLater()

2011-10-13

New Ubuntu today! I'll check if my mouse and keyboard is not slowing down anymore ...

EulerGUI : fighting with regressions

REGRESSIONS:

- re-activating the main query with the checkbox does not work

- sometimes the inference buttons are not activated when the N3 sources pre-processing is finished

- changing project from File menu closes the application

- FuXi should be deactivated

Asked on Drools IRC:

I populate a working memory while the rule base is empty; then I populate the rule base ; then I fire rules ==> just one rule actually fired.

Is this normal ? ( using 5.4.0-SNAPSHOT )

<etirelli> jmvanel: assuming they should fire, looks like a regression

When launching rule base for the second time:

Daemon Thread [SwingWorker-pool-3-thread-2] (Suspended (breakpoint at line 972 in N3SourcetoDrools))
N3SourcetoDrools.setRuleBase(RuleBase) line: 972
N3DroolsEngineFacade.setRuleBase(RuleBase) line: 175
Project.compiledRulebaseLoadedFromCache(String) line: 734
Project.translateN32Drools(boolean) line: 881
Project.prepareDrools(boolean) line: 860
Project.doRunDrools(boolean) line: 814
Project.runDroolsTriples(boolean) line: 765
DroolsInferenceEngine.launch() line: 30
InferenceSwingWorker.doInBackground() line: 48
InferenceSwingWorker.doInBackground() line: 1
SwingWorker$1.call() line: 296
FutureTask$Sync.innerRun() line: 334
SwingWorker$2(FutureTask<V>).run() line: 166
InferenceSwingWorker(SwingWorker<T,V>).run() line: 335
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1110
ThreadPoolExecutor$Worker.run() line: 603
Thread.run() line: 722

2011-10-12


Daemon Thread [SwingWorker-pool-3-thread-1] (Suspended (access of field workingMemory in N3SourcetoDrools))
N3SourcetoDrools.removeRecordedFacts(N3Source) line: 857
N3DroolsEngineFacade.translate(N3Source, boolean, boolean, boolean) line: 90
Project.doTranslateN32Drools(boolean, boolean) line: 931
Project.translateN32Drools(boolean) line: 882
Project.prepareDrools(boolean) line: 860
Project.doRunDrools(boolean) line: 814
Project.runDroolsTriples(boolean) line: 765
DroolsInferenceEngine.launch() line: 30
InferenceSwingWorker.doInBackground() line: 48
InferenceSwingWorker.doInBackground() line: 1
SwingWorker$1.call() line: 296
FutureTask$Sync.innerRun() line: 334
SwingWorker$2(FutureTask<V>).run() line: 166
InferenceSwingWorker(SwingWorker<T,V>).run() line: 335
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1110
ThreadPoolExecutor$Worker.run() line: 603
Thread.run() line: 722

Thread [doN3SourceAdded: BloodPressure.n3] (Suspended)
N3SourcetoDrools.copyN3factsToDrools(List<ITriple>) line: 630
N3DroolsEngineFacade.copyN3factsToDrools(List<ITriple>) line: 231
Project.translateToDrools(N3Source, boolean, boolean) line: 975
N3ConversionRefesher.updateKB(Project, N3Source) line: 170
UpdateN3Thread.run() line: 41

Drools engine : associate an URI to the return value of a property call (in a rule), WIP

tests PASS, except random known errors ( not in eclipse ) :

test_person_import3(eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules): Wait AbstractButton with text "address" loaded , etc ...

2011-10-11

16:16:53 [SwingWorker-pool-3-thread-1] [error] SwingWorker-pool-3-thread-1: Drools Error: Rule Compilation error $P.contentPane cannot be resolved or is not a field

16:16:53 [SwingWorker-pool-3-thread-1] [error] SwingWorker-pool-3-thread-1: $PANE cannot be resolved

16:16:53 [SwingWorker-pool-3-thread-1] [error] SwingWorker-pool-3-thread-1: ErrorLines:

16:16:53 [SwingWorker-pool-3-thread-1] [error] SwingWorker-pool-3-thread-1: - 33

-----------------------------------------

INTERNAL ERROR when initializing internal rule engine

null

eulergui.inference.drools.impl.N3JavaMappingBuiltin.acceptConsequent(N3JavaMappingBuiltin.java:658)

eulergui.inference.drools.impl.DroolsTripleHandler.acceptConsequent(DroolsTripleHandler.java:248)

eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:778)

eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:285)

eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:257)

Cause:

-------------------------------------

INTERNAL ERROR when initializing internal rule engine

null

java.lang.Class.forName0(Native Method)

java.lang.Class.forName(Class.java:186)

eulergui.util.ReflectionHelper.findMethodWithSameNameAndArgumentsLength(ReflectionHelper.java:153)

eulergui.inference.drools.impl.N3JavaMappingBuiltin.acceptConsequent(N3JavaMappingBuiltin.java:653)

eulergui.inference.drools.impl.DroolsTripleHandler.acceptConsequent(DroolsTripleHandler.java:248)

Cause:

2011-10-10

RDFa parser in EulerGUI

The cruftiest RDFa parser in the world ! ( self admitedly :) )

https://github.com/shellac/java-rdfa#readme

It has a Maven repo ! http://www.rootdev.net/maven/repo/

<jmvanel> Hi shellac

<jmvanel> just discovered your RDFA parser !

<jmvanel> I'll probably add it in EulerGUI

<shellac> hi there

<shellac> oh, please do

<shellac> I will implement 1.1 soon! they keep changing it :-(

RDF Meets JPA

Articles

Empire: RDF & SPARQL Meet JPA

http://semanticweb.com/empire-rdf-sparql-meet-jpa_b15617

http://semanticweb.com/binding-java-objects-to-rdf_b10682

2011-10-06

- try to fix randon errors in TestJemmy subsclasse : call waitUpdateThreads in launch*

TODO: in TestJavaEditor random errors in finding editor content

Still 1 Test in error: test_person_import3(eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules)

Waiting for "getText() Component Chooser "name="subordonate""
" subcomponent
Trace:
Start to wait action "Wait for "getText() Component Chooser "name="subordonate""
" subcomponent to be displayed"
11:40:19 [main] [error] main: >> InvocationTargetException in GetTextComponentChooser

2011-10-05

- wait N3 sources preprocessing before activating inference engines ,

- and modify also the test : TestJemmy.generateAndLaunch(), but TODO: Failures: 1, Errors: 6

- the exit in EulerGUI stops the test suite (!?) , so add a test ProjectGUI.isTestMode()

Tests run: 174, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] <<< maven-surefire-report-plugin:2.8.1:report (default-cli) @ eulergui <<<
[INFO] 
[INFO] --- maven-surefire-report-plugin:2.8.1:report (default-cli) @ eulergui ---
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20:41.762s
[INFO] Finished at: Wed Oct 05 17:13:15 CEST 2011

Try to fix the no exit issue when the last remaining frame is the generated frame:

- added a call to StatefulSession.dispose() , but that does not solve my issue

- call exit when the last remaining frame is the EulerGUI

NOTES:

- DefaultCloseOperation is always DISPOSE_ON_CLOSE , cf http://download.oracle.com/javase/6/docs/api/java/awt/doc-files/AWTThreadIssues.html

- the issue does not seem to be the preferences thread (?)

FIXED:

Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
        at java.awt.EventQueue.invokeAndWait(EventQueue.java:1223)
        at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1346)
        at n3_project.ProjectGUI.newWindow(ProjectGUI.java:266)
        at n3_project.ProjectGUI.newWindow(ProjectGUI.java:251)
        at n3_project.ProjectFileManagement$1.actionPerformed(ProjectFileManagement.java:628)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)

COMMIT: upgrade Maven plugins :

maven-jar-plugin ..................................... 2.3.1 -> 2.3.2

[INFO] maven-javadoc-plugin ..................................... 2.7 -> 2.8

[INFO] maven-release-plugin ................................... 2.1 -> 2.2.1

[INFO] org.codehaus.mojo:build-helper-maven-plugin .............. 1.5 -> 1.7

[INFO] org.codehaus.mojo:buildnumber-maven-plugin ........ 1.0-beta-4 -> 1.0

[INFO] org.codehaus.mojo:exec-maven-plugin .................... 1.2 -> 1.2.1

2011-10-04

field InferenceEngineSupport engineSupport moved to class InferenceSwingWorker

~/jmv_ubuntu_11.4/src/eulergui_scala/ % mvn -f pom_scala.xml clean compile
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project eulergui: Compilation failure: Compilation failure:
[ERROR] /media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/
src/main/parser4j/java/eulergui/parser/n3/impl/parser4j/gen/MainGenerateParserDataForN3.java:[3,53] error: package eulergui.parser.n3.impl.parser4j.service.match does not exist
[ERROR] /media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui_scala/
src/main/parser4j/java/eulergui/parser/n3/impl/parser4j/gen/MainGenerateParserDataForN3.java:[77,38] error: cannot find symbol

[INFO] --- maven-scala-plugin:2.15.2:compile (default) @ eulergui ---

[WARNING] you don't define org.scala-lang:scala-library as a dependency of the project

[INFO] Checking for multiple versions of scala

[INFO] The following plugin updates are available:
[INFO]   maven-checkstyle-plugin .................................. 2.6 -> 2.7
[INFO]   maven-jar-plugin ..................................... 2.3.1 -> 2.3.2
[INFO]   maven-javadoc-plugin ..................................... 2.7 -> 2.8
[INFO]   maven-release-plugin ................................... 2.1 -> 2.2.1
[INFO]   org.codehaus.mojo:build-helper-maven-plugin .............. 1.5 -> 1.7
[INFO]   org.codehaus.mojo:buildnumber-maven-plugin ........ 1.0-beta-4 -> 1.0
[INFO]   org.codehaus.mojo:exec-maven-plugin .................... 1.2 -> 1.2.1
[INFO]   org.codehaus.mojo.webstart:webstart-maven-plugin  1.0-beta-1 -> 1.0-beta-2
[INFO] 
[WARNING] The following plugins do not have their version specified:
[WARNING]   emma:maven-emma-plugin ................................. (unknown)
[WARNING]   org.apache.felix:maven-bundle-plugin ................... (unknown)

cd eulergui_scala
mvn -f pom_scala.xml eclipse:eclipse

Michel Daviot a écrit:

J'ai bossé sous Eclipse Helios avec Scala 2.9.1, sans Maven ni SBT ...

Pour migrer, j'ai d'abord identifié les sources avec le moins de dépendances, renommé le fichier scala en java et fait toutes les modifs à la main.

J'ai trouvé le compilo d'Eclipse moyen sur un projet mixte, je devais systématiquement faire un clean du projet sinon j'avais des erreurs de compilation loufoques.

Une fois tous les fichiers sources au format scala, j'ai progressivement retiré les dépendances vers les bilbiothèques java, en particulier les collections, et commencé à "scalaiser" certaines parties du code.

ttp://download.scala-ide.org/releases-29/2.0.0-beta

<jmvanel> Manual : http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html

<jmvanel> Beta : http://eulergui.sourceforge.net/tmp/

<jmvanel> now runs on Java 7

You might be interested in the SPARQL queries; don't know a better tool for that

which tools do you use to explore the semweb ? for data and for vocabs ?

2011-10-03

http://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse?

scala eclipse plugin : http://download.scala-ide.org/releases/2.0.0-beta

./ape.exe -guess -text 'p:Paul has a car.' -solo owlfsspp

TODO before EulerGUI release

https://gist.github.com/1259259

http://community.jboss.org/wiki/DroolsLanguageEnhancements#Casting_Nested_Objects

Traits, Duck Typing and Dynamic Semantic Learning

http://blog.athico.com/2011/07/traits-duck-typing-and-dynamic-semantic.html

https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/resources/org/drools/factmodel/traits/testTraitDon.drl

https://issues.jboss.org/browse/JBRULES-3215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631832#comment-12631832

To disable compile time type checking for the Assignment class you can use a declare statement:

declare Assignment @typesafe( false ) end

Good evening

I need testers again for EulerGUI, this time it is the features for exploration of SW that I put forward, see http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/explore_semweb.html

For SPARQL queries also, I know of no better GUI tool .

Snapshot here: http://eulergui.sourceforge.net/tmp/ - IRC here : # eulergui

eg test/true_antecedent_java2.n3
 ...
Exception in thread "main" java.lang.NullPointerException
        at eulergui.gui.controller.ApplicationKB.registerProject(ApplicationKB.java:538)
        at eulergui.project.Project.setApplicationKB(Project.java:1431)
        at eulergui.project.Project.prepare(Project.java:1182)
        at eulergui.project.ProjectFactory.prepareProject(ProjectFactory.java:313)
        at n3_project.ProjectGUI.newWindow(ProjectGUI.java:262)
        at n3_project.ProjectGUI.main(ProjectGUI.java:214)

New test : test/javaMappingAccessFieldAntecedent.n3

:f a java:javax-swing-JFrame .

{ ?P a java:javax-swing-JFrame .
  # ?P javap:contentPane ?PANE .
} => {
  ?P javap:contentPane ?PANE .
  _:LAB a java:javax-swing-JLabel ; javam:setText "Papilio" .
  ?PANE javam:add _:LAB .
  ?P javam:pack ()
    ; javam:setVisible ( true ).
}.

COMMIT

Drools engine : now possible to associate an URI to the return value of a method or property call (as fact , not in a rule), e.g.:

_:obj a java:javax-swing-JFrame .
_:obj javam:getContentPane _:PANE . #<<<<
_:LAB a java:javax-swing-JLabel ; javam:setText "Papilio" .
_:PANE javam:add _:LAB .

TESTED in BasicRuntimeTest.testJavaMappingAntecedentVariableObject

2011-10-02

This morning

COMMIT

- Add call to Namespaces.declareImportantPrefixes() in OpenPreferencesAction.java .

- make methods public to enable N3 Java triples to access it :

ProjectGUI.getSourceFilesManagement()

SourceFilesManagement.addInToolbarAndMenu()

2011-10-01

Add features in EG through the preferences.n3 file

I try to add features in EG through the preferences.n3 file; conceptually this is a combination of Spring framework configuration and eclipse extension points .

I think of adding an ACE import in EG ; this would be added by the preferences file .

Currently this does not work in EulerGUI :

java:eulergui-EulerGUI javam:instance _:instance .

EulerGUI.instance () is a (singleton) method without argument that returns an EulerGUI object.

It does not fit well with the current Java-N3 mapping , where this would be interpreted as the call to method instance with one argument bound to name instance in the KB .

I could add this feature : at runtime, when the object in a Java N3 triple is not bound, it is interpreted as a new binding to the return value of the method corresponding to the N3 predicate.

Currently this does not work, Drools says: $SFM cannot be resolved

{ ?P a java:n3_project-ProjectGUI .
} => {
  ?P javap:sourceFilesManagement ?SFM .
  ?ACTION a java:n3_project-LocalAction .
  ?ACTION javam:setProperties ( ?ACTION "bla" "icon1" "bla bli" "" ) .
  ?SFM javam:addInToolbarAndMenu ?ACTION .
}.

because this is generated:

  DeferredPropertyAssignment dpa_P2 = new DeferredPropertyAssignment();
  dpa_P2.setSubject($P.toString() );
  dpa_P2.setPredicate( "<http://java.sun.com/predicate#sourceFilesManagement>" );
  dpa_P2.setObject($SFM.toString() );
  insert( dpa_P2 );

2011-09-30

EulerGUI TODO

TODO

search join in src

inference buttons are activated after all the N3 source buttons : use setReaderThread ???

test ng4j

example with TDB : store biz data on SPARQL instead of file

EulerGUI dev : accelerate GUI startup

Fixed non thread safe stuff in manipulating listeners list in ProjectGUI and ProjectChangeSupport

<jmvanel> soon today there will be a GUI quickly shown, and after in another thread the downloads, conversions to N3 , parsing, and feeding the KB takes places ;

<rszeno> :)

<jmvanel> when it's finished the inference buttons are activated

<jmvanel> after all the N3 source buttons are activated ;

<jmvanel> so what happens is visible :)

Working with threads like I do forces me to read my code and make it more robust ; it's like exercise that make a person more robust .

In N3ConversionRefesher.doN3SourceAdded() , a new thread is started for each N3Source, to process each ones in parallel. It's even better on multi-core machines, but even on single core, the download from Internet can occur in parallel.

svn commit src/main/java/eulergui/gui/view/ButtonsPanel.java src/main/java/eulergui/gui/controller/ProjectGUI_Updater.java

Accelerate GUI startup by postponing listeners until after reading input and GUI creation (WIP)

- now in class ButtonsPanel,add N3Source Panel of buttons only if not already there

2011-09-29

Start ATTEMPTO servers locally

% cat ~/bin/start_ace_servers.sh
cd ~/src/ape/ ; swipl -x ape.exe -- -httpserver -port 8000 &
cd  ~/src/owlverbalizer/
swipl -x owl_to_ace.exe -- -httpserver -port 5123 -workers 2 -timelimit 30 &

Changed the Protégé plugins location to

http://smi-protege.stanford.edu/protege4/plugins/4.1/

was:

http://smi-protege.stanford.edu/protege4/plugins/4.1-plugins-2011-03-28.repository

EulerGUI dev : accelerate GUI startup

Accelerate GUI startup by postponing listeners until after reading input (WIP)

Accelerate GUI startup by postponing listeners until after reading input (WIP)

- now calling app.rethrowEventsForListener(guiUpdater) , waiting in AWT event thread,

then app.rethrowEventsExceptListener(guiUpdater) in a new thread , to have all downloads and processings in background

java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:384)
at eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:76)
at eulergui.project.Project.rethrowEventsPlease(Project.java:1359)
at n3_project.ProjectGUI.rethrowEventsExceptListener(ProjectGUI.java:293)
at n3_project.ProjectGUI.access$1(ProjectGUI.java:291)
at n3_project.ProjectGUI$2.run(ProjectGUI.java:283)
at java.lang.Thread.run(Thread.java:662)

2011-09-28

TODO add "Sketch of a roadmap" to projects

Wrong !!!!!!!!!

{ ?P a java:eulergui-project-Project .
} => {
  ?P javam:addN3Source <jar://eulergui/rules/project-stats.n3> .
}.

Right !!!!

{ ?P a java:eulergui-project-Project .
} => {
  ?P owl:import <jar://eulergui/rules/project-stats.n3> .
}.

src/main/resource//eulergui/rules/project-stats.n3

{ ?D void:endPoint ?EP .
} => {
  ?EG java:addEnPoint ?EP .
}.

rszeno> btw, one trick, type in the address bar about:about then you have access to the inner side of the browser . some things are usefull some are not

move class TemporaryFrame to package eulergui.gui;

N3 rules triggering Java actions

Posted on

http://sourceforge.net/mailarchive/forum.php?thread_name=CANwvFKATX1LedgDm582AVDesg-ACBL5zzK4mr6fEYaoPPzN-XQ%40mail.gmail.com&forum_name=deductions-user

and

http://sourceforge.net/mailarchive/forum.php?thread_name=CANwvFKATX1LedgDm582AVDesg-ACBL5zzK4mr6fEYaoPPzN-XQ%40mail.gmail.com&forum_name=eulergui-user

<jmvanel> BTW uploaded a snapshot yesterday , so that you can load http://graph.facebook.com/jmvanel into EG :)

I'm having fun with N3 rules triggering Java actions; look at examples/BloodPressure.n3p . This works nicely :

{       ?L :alert "true"
        ; log:uri ?LL .
} => {  ?F a java:javax-swing-JFrame
        ; javap:title ?LL
        ; javam:setSize ( 200 200 )
        ; javap:visible true .
}.

However from a software engineering point of view, this is mixing too much N3 and Java. On the right handside, one has to know too much of Java. And EulerGUI does not have the facilities of eclipse for Java code completion.

For EulerGUI framework, the recommended practice is to encapsulate the Java action in a class . Then this class itself will be encapulated in a pure N3 action:

{       ?L :alert "true"
        ; log:uri ?LL .
} => {  :application :displayAlert ?LL . }.

{ :application :displayAlert ?LL .
} => { 
  ?F a java:eulergui-gui-TemporaryFrame
  ; javap:localizedMessage ?LL .
}.

In this article, I showed how one can add features to the current project, which becomes thus a kind of application.

In a next article, I'll show how one can add features to EulerGUI itself, expressed by rules, Java classes, or a mixture of both.

The snapshots are here :

http://eulergui.sourceforge.net/tmp/

11:52:45 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.InstantiationException: java.net.URL
11:52:45 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Continuing ...
11:52:45 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.RuntimeException: failed to evaluate: <unbound>=Class.new();
11:52:45 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Continuing ...

2011-09-27

https://github.com/daveray/seesaw#readme

FIX : can now add N3 URL source that has JSON as default; need to control the Accept header not only in SourceFactory, but in IOManager.downloadN3ToLocalCache() ; also need to open in the editor the local N3

TESTED with http://graph.facebook.com/jmvanel

glad of this post in public-lod@w3.org "Facebook Linked Data"

PROBLEM when managing N3 Cache for N3 source http://www.facebook.com/jmvanel
N3SourceFromXML_Gloze.extractXMLNamespaces():
Could not load from URI http://www.facebook.com/jmvanel
 reason: The entity name must immediately follow the '&' in the entity reference.
 cause: null

eulergui.inputs.N3SourceFromXML_Gloze.extractXMLNamespaces(N3SourceFromXML_Gloze.java:126)
eulergui.inputs.N3SourceFromXML_Gloze.convertToN3(N3SourceFromXML_Gloze.java:68)
eulergui.project.N3Source.manageN3Cache(N3Source.java:553)
eulergui.project.N3Source.doUpdate(N3Source.java:389)
eulergui.inputs.N3SourceFromXML_Gloze.prepare(N3SourceFromXML_Gloze.java:47)

Cause:
org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
eulergui.inputs.N3SourceFromXML_Gloze.extractXMLNamespaces(N3SourceFromXML_Gloze.java:123)
eulergui.inputs.N3SourceFromXML_Gloze.convertToN3(N3SourceFromXML_Gloze.java:68)
eulergui.project.N3Source.manageN3Cache(N3Source.java:553)
eulergui.project.N3Source.doUpdate(N3Source.java:389)
 , caused by The entity name must immediately follow the '&' in the entity reference.

http://notes.3kbo.com/scala

<rszeno> apt-get install redland-utils

<rszeno> rapper is in redland-utils

<rszeno> if you have apt-file installed, after each upgrade you must do 'apt-file update'

<rszeno> then 'apt-file find rapper' or whatever you want to find

<rszeno> i use apt-get, apt-cache, debtags, apt-file and apt-show-versions

<rszeno> apt-get for install/remove/purge packages

<rszeno> apt-cache, debtags, apt-file to find things about packages

<rszeno> apt-show-versions when i use mixed repository, stable+testing+backports or such combinations

<rszeno> sorry, is my fault, :)

<rszeno> rapper is in raptor2-utils or in raptor-utils, rdfproc is in redland-utils

<rszeno> and roqet is in rasqal-utils

<rszeno> what i can't find is the device for my cd/dvd writer, :)

<jmvanel> merci

<jmvanel> I actually did it for my Ubuntu partition, need to redo it for Debian .

EulerGUI dev

FIX eclipse warnings , except in ParserDataIO TODO dead code !? says eclipse 3.7

FIX person-app.n3p : secondary form "address" now appears when clicking button

2 changed n3_nojs/java_event-rules.n3

Tests in error: 
  test_cv2(eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules): Wait AbstractButton with text "Skill" loaded
Tests run: 173, Failures: 0, Errors: 1, Skipped: 0
[INFO] --- maven-surefire-report-plugin:2.8.1:report (default-cli) @ eulergui ---
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14:31.417s

Thread Name: N3 sources modification Checker
java.lang.Thread.getStackTrace(Thread.java:1479)
eulergui.util.StackHelper.printStackTrace(StackHelper.java:13)
eulergui.gui.view.ButtonsPanel.findButtonsForN3Source(ButtonsPanel.java:53)
eulergui.gui.view.ButtonsPanel.n3SourceEnablement(ButtonsPanel.java:87)
eulergui.gui.view.ButtonsPanel.enableN3Source(ButtonsPanel.java:77)
eulergui.gui.controller.ProjectGUI_Updater.editN3ButtonEnabled(ProjectGUI_Updater.java:130)
eulergui.gui.controller.ProjectGUI_Updater.n3SourceUpdated(ProjectGUI_Updater.java:123)
eulergui.project.ProjectChangeSupport.fireN3SourceUpdated(ProjectChangeSupport.java:167)
eulergui.project.Project.fireN3SourceUpdated(Project.java:1421)
eulergui.gui.controller.N3ConversionRefesher.n3SourceChanged(N3ConversionRefesher.java:50)
ProjectGUI_Updater.n3SourceUpdated(): could not be updated: file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/deductions/n3_nojs/bbjava_event-rules.n3
Thread Name: N3 sources modification Checker
java.lang.Thread.getStackTrace(Thread.java:1479)
eulergui.util.StackHelper.printStackTrace(StackHelper.java:13)
eulergui.gui.view.ButtonsPanel.n3SourceEnablement(ButtonsPanel.java:92)
eulergui.gui.view.ButtonsPanel.enableN3Source(ButtonsPanel.java:77)
eulergui.gui.controller.ProjectGUI_Updater.editN3ButtonEnabled(ProjectGUI_Updater.java:130)
eulergui.gui.controller.ProjectGUI_Updater.n3SourceUpdated(ProjectGUI_Updater.java:123)
eulergui.project.ProjectChangeSupport.fireN3SourceUpdated(ProjectChangeSupport.java:167)
eulergui.project.Project.fireN3SourceUpdated(Project.java:1421)
eulergui.gui.controller.N3ConversionRefesher.n3SourceChanged(N3ConversionRefesher.java:50)
eulergui.project.ProjectChangeSupport.fireN3SourceChanged(ProjectChangeSupport.java:144)
eulergui.project.Project.fireN3SourceChanged(Project.java:1407)
eulergui.infrastructure.URIModificationChecker.checkN3Source(URIModificationChecker.java:90)

2011-09-26

AIR Web Rule Language

http://dig.csail.mit.edu/2009/AIR/

EulerGUI : SocketException: Connection reset

COMMIT

N3Source. convertToN3() : avoid SocketException: Connection reset

==> TEST suite passes

tests on Windows 7:

Running deductions.runtime.TestRulesForUserEvents
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1,516,610.732 sec <<< FAILURE!
Running eulergui.gui.TestFacebookSearch
Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 85.103 sec <<< FAILURE!
Running eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules
Tests run: 6, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 192.406 sec <<< FAILURE!
Running eulergui.gui.TestN3Source
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.163 sec
Exception while removing reference: java.lang.InterruptedException
java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
        at sun.java2d.Disposer.run(Disposer.java:127)
        at java.lang.Thread.run(Thread.java:662
Running eulergui.gui.TestN3SourceInGUI
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.303 sec
Exception while removing reference: java.lang.InterruptedException
java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
        at sun.java2d.Disposer.run(Disposer.java:127)
        at java.lang.Thread.run(Thread.java:662)

2011-09-25

I have a trouble with eclipse : it exits during the test run; never had this; tried to uninstall several plugins ...

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2672)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.Reader.read(Reader.java:123)
at eulergui.util.ReaderUtils.copyReader(ReaderUtils.java:55)
at eulergui.util.ReaderUtils.copyReader(ReaderUtils.java:24)
at n3_project.IOManager.downloadURLToLocalCache(IOManager.java:190)
at n3_project.IOManager.downloadN3ToLocalCache(IOManager.java:184)
at eulergui.project.N3Source.convertToN3(N3Source.java:469)
at eulergui.project.N3Source.manageN3Cache(N3Source.java:545)
at eulergui.project.N3Source.doUpdate(N3Source.java:388)
at eulergui.project.N3Source.update(N3Source.java:375)
at eulergui.project.N3Source.parseResult(N3Source.java:432)
at eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:252)
at eulergui.inference.drools.impl.N3DroolsEngineFacade.translate(N3DroolsEngineFacade.java:91)
at eulergui.project.Project.doTranslateN32Drools(Project.java:931)
at eulergui.project.Project.translateN32Drools(Project.java:882)
at eulergui.project.Project.prepareDrools(Project.java:860)
at eulergui.project.Project.doRunDrools(Project.java:814)
at eulergui.project.Project.runDroolsTriples(Project.java:765)
at eulergui.inference.drools.DroolsInferenceEngine.launch(DroolsInferenceEngine.java:30)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:117)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:92)
at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:316)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

2011-09-23

back links

echelon renamed to FaceBook

http://stackoverflow.com/questions/4121567/embedded-scala-repl-inherits-parent-classpath

Ran rooscaloo, Scala RETE engine

https://github.com/daveray/rooscaloo

I'm glad, because I Ran rooscaloo.

Switching to latest REPL interpreter, and also setting the classpath to tha parent classpath.

2011-09-21

Trying to run rooscaloo, Scala RETE engine

http://darevay.com/

Dave Ray http://blog.darevay.com/about/

How do I add scala-compiler.jar to my eclipse project ?

Hi Dave

I'm learning Scala, and I develop an IDE called EulerGUI about rules

and Semantic Web that uses Drools.

These are good reasons to get interested in rooscaloo (and I like your

blog too ).

I guess the Scala language has slightly changed since you made

rooscaloo (what wezre the version at the time ? ).

I had to add imports in a few classes (I can send a patch ).

But now I'm blocked, because I don't know a good way to satisfy this

import with eclipse :

import scala.tools.nsc.InterpreterResults._


http://jonaquino.blogspot.com/2007/08/why-jedit-text-editor-rocks.html

http://wiki.habariproject.org/en/Creating_and_Applying_Patches_for_Subversion#Testing_patches_that_are_not_yet_released

I found the howto for Maven + Scala here http://stuq.nl/weblog/2008-11-26/4-steps-to-add-scala-to-your-maven-java-projects

( the plugin site itself is outdated and incomplete :

http://scala-tools.org/mvnsites/maven-scala-plugin/ )

2011-09-19

Are there migration tools / translation (possibly partial translation ) to Java (or other) to Scala?

http://scala-tools.org/mvnsites/maven-scala-plugin/usage.html

From ScalaByExample.pdf :

Using averageDamp, we can reformulate the square root function as follows.

def sqrt(x: Double) = fixedPoint(averageDamp(y => x/y))(1.0)

This expresses the elements of the algorithm as clearly as possible.

2011-09-18

Drools bug report : NPE in Drools 5.3.0

For Drools bug report:

http://eulergui.sourceforge.net/maven2/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-20110824.171234-1.jar

http://eulergui.sourceforge.net/maven2/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-20110824.171234-1-sources.jar

etirelli, the BUG is reported at https://issues.jboss.org/browse/JBRULES-3215

http://deductions.svn.sourceforge.net/svnroot/deductions/n3_nojs/form-rules.n3

rule "form-rules.n3 9"
when
  $Triple_1 : Triple( $EVENT : subject, predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>", object == "<http://jmvanel.free.fr/ontology/gui_generic.owl#FocusLostEvent>" )
  $Triple_2 : Triple( subject == $EVENT, predicate == "<http://jmvanel.free.fr/ontology/gui_generic.owl#eventSource>", $FIELD : object )
  $Triple_3 : Triple( subject == $EVENT, predicate == "<http://jmvanel.free.fr/ontology/gui_generic.owl#newValue>", $VALUE : object )
  Assignment( name == $EVENT, $EVENT_reference : reference, $JTEXT_FIELD : reference.source )
  $Triple_4 : Triple( subject == $FIELD, predicate == "<http://jmvanel.free.fr/ontology/gui_generic.owl#inputWidgetSpecification>", $PREDICATE : object )
then
  Triple newTriple;
  TripleResult newTripleResult;
  newTriple = new Triple(  );
  newTriple.setSubject( $EVENT );
  newTriple.setPredicate( "<http://jmvanel.free.fr/ontology/gui_generic.owl#consumed>".toString() );
  newTriple.setObject( "true" );  insertLogical( newTriple );
  String $RESOURCE = Triple.resource("RESOURCE") ;
  newTriple = new Triple(  );
  newTriple.setSubject( $RESOURCE );
  newTriple.setPredicate( $PREDICATE.toString() );
  newTriple.setObject( $VALUE );  insertLogical( newTriple );
  newTriple = new Triple(  );
  newTriple.setSubject( $RESOURCE );
  newTriple.setPredicate( "<http://jmvanel.free.fr/ontology/software_applications.owl#status>".toString() );
  newTriple.setObject( "<http://jmvanel.free.fr/ontology/software_applications.owl#userData>" );  insertLogical( newTriple );
  newTriple = new Triple(  );
  newTriple.setSubject( $FIELD );
  newTriple.setPredicate( "<http://jmvanel.free.fr/ontology/gui_generic.owl#fieldSubject>".toString() );
  newTriple.setObject( $RESOURCE );  insertLogical( newTriple );
  System.out.println( "#TRACE ( " + "\"gui:FocusLostEvent new_value\"" + " " + $EVENT + " " + $FIELD + " " + "\" ?RESOURCE ?PREDICATE ?VALUE\"" + " " + "\"    \"" + " " + $RESOURCE + " " + $PREDICATE + " " + $VALUE + " " +  ")" );
  DeferredPropertyAssignment dpa_GUIKBAdapter11 = new DeferredPropertyAssignment();
  dpa_GUIKBAdapter11.setSubject("<http://jmvanel.free.fr/ontology/gui_generic.owl#GUIKBAdapter>".toString() );
  dpa_GUIKBAdapter11.setPredicate( "<http://java.sun.com/method#setBoldFont>" );
  dpa_GUIKBAdapter11.setObject($JTEXT_FIELD.toString() );
  insert( dpa_GUIKBAdapter11 );

end

[Rule name='form-rules.n3 9']

declaration

identifier : $JTEXT_FIELD

Pattern type='[ClassObjectType class=eulergui.inference.drools.impl.Assignment]', index='3', offset='0', identifer=''

Triple newTriple;
  TripleResult newTripleResult;
  newTriple = new Triple(  );
  newTriple.setSubject( $EVENT );
  newTriple.setPredicate( "<http://jmvanel.free.fr/ontology/gui_generic.owl#consumed>".toString() );
  newTriple.setObject( "true" );  drools.insertLogical( newTriple );
  String $RESOURCE = Triple.resource("RESOURCE") ;
  newTriple = new Triple(  );
  newTriple.setSubject( $RESOURCE );
  newTriple.setPredicate( $PREDICATE.toString() );
  newTriple.setObject( $VALUE );  drools.insertLogical( newTriple );
  newTriple = new Triple(  );
  newTriple.setSubject( $RESOURCE );
  newTriple.setPredicate( "<http://jmvanel.free.fr/ontology/software_applications.owl#status>".toString() );
  newTriple.setObject( "<http://jmvanel.free.fr/ontology/software_applications.owl#userData>" );  drools.insertLogical( newTriple );
  newTriple = new Triple(  );
  newTriple.setSubject( $FIELD );
  newTriple.setPredicate( "<http://jmvanel.free.fr/ontology/gui_generic.owl#fieldSubject>".toString() );
  newTriple.setObject( $RESOURCE );  drools.insertLogical( newTriple );
  System.out.println( "#TRACE ( " + "\"gui:FocusLostEvent new_value\"" + " " + $EVENT + " " + $FIELD + " " + "\" ?RESOURCE ?PREDICATE ?VALUE\"" + " " + "\"    \"" + " " + $RESOURCE + " " + $PREDICATE + " " + $VALUE + " " +  ")" );
  DeferredPropertyAssignment dpa_GUIKBAdapter11 = new DeferredPropertyAssignment();
  dpa_GUIKBAdapter11.setSubject("<http://jmvanel.free.fr/ontology/gui_generic.owl#GUIKBAdapter>".toString() );
  dpa_GUIKBAdapter11.setPredicate( "<http://java.sun.com/method#setBoldFont>" );
  dpa_GUIKBAdapter11.setObject($JTEXT_FIELD.toString() );
  drools.insert( dpa_GUIKBAdapter11 );

Daemon Thread [SwingWorker-pool-3-thread-1] (Suspended (breakpoint at line 89 in ClassUtils))
ClassUtils.canonicalName(Class) line: 89
DeclarationTypeFixer.fix(Declaration) line: 11
JavaRuleBuilderHelper.createVariableContext(String, String, RuleBuildContext, Declaration[], Declaration[], Map<String,Class<?>>) line: 158
JavaRuleBuilderHelper.createConsequenceContext(RuleBuildContext, String, String, String, Map<String,Declaration>, BoundIdentifiers) line: 94
ASMConsequenceStubBuilder(AbstractASMConsequenceBuilder).consequenceContext(RuleBuildContext, String) line: 47
ASMConsequenceStubBuilder(AbstractASMConsequenceBuilder).build(RuleBuildContext, String) line: 17
RuleBuilder.build(RuleBuildContext) line: 99
PackageBuilder.addRule(RuleDescr) line: 1993
PackageBuilder.addPackage(PackageDescr) line: 793
PackageBuilder.addPackageFromDrl(Reader) line: 355
N3SourcetoDrools.droolsCompile(String, String) line: 396
N3SourcetoDrools.translate(IRDFIterator, String, boolean, boolean, boolean) line: 315
N3SourcetoDrools.translate(N3Source, boolean, boolean, boolean) line: 257
N3DroolsEngineFacade.translate(N3Source, boolean, boolean, boolean) line: 91
Project.doTranslateN32Drools(boolean, boolean) line: 931
Project.translateN32Drools(boolean) line: 882
Project.prepareDrools(boolean) line: 860
Project.doRunDrools(boolean) line: 814
Project.runDroolsTriples(boolean) line: 765
DroolsInferenceEngine.launch() line: 30
RunActionGeneric$EngineSwingWorker.doInBackground() line: 117
RunActionGeneric$EngineSwingWorker.doInBackground() line: 1
SwingWorker$1.call() line: 296
FutureTask$Sync.innerRun() line: 334
SwingWorker$2(FutureTask<V>).run() line: 166
RunActionGeneric$EngineSwingWorker(SwingWorker<T,V>).run() line: 335
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1110
ThreadPoolExecutor$Worker.run() line: 603
Thread.run() line: 722

Running n3_project.helpers.TestDroolsQuery
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 9.231 sec <<< FAILURE!

Running n3_project.TestReasonning
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.195 sec <<< FAILURE!
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Running n3_project.helpers.TestSimplifiedURI
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 sec
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Running n3_project.helpers.TestDroolsQuery
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.495 sec <<< FAILURE!
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Running n3_project.TestProject
Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.994 sec <<< FAILURE!
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Running n3_project.TestProjectSequence
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 2.669 sec <<< FAILURE!
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false

2011-09-17

                                                           
def exists[T](xs: Array[T], p: T => boolean) = {                                           
  var i: int = 0
  while (i < xs.length && !p(xs(i))) i = i + 1
i < xs.length

def sqrts(xs: List[double]): List[double] =
  xs filter (0 <=) map Math.sqrt

2011-09-16

new snapshot ( tests pass:

Révision : 2665

Tests run: 175, Failures: 0, Errors: 0, Skipped: 0

[INFO] BUILD SUCCESS

[INFO] Total time: 13:59.522s

[INFO] Finished at: Fri Sep 16 16:49:23 CEST 2011

[INFO] Final Memory: 22M/148M

N3SourceFromSPARQLSource.doUpdate()

/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui/bbeuler_project.xml.n3p.n3 (Aucun fichier ou dossier de ce type)Thread Name: AWT-EventQueue-0

java.lang.Thread.getStackTrace(Thread.java:1479)

eulergui.gui.controller.ProjectGUI_Updater.printStackTrace(ProjectGUI_Updater.java:141)

eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:69)

eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:57)

eulergui.inputs.N3SourceFromSPARQLSource.prepare(N3SourceFromSPARQLSource.java:51)

eulergui.project.N3Source.setProject(N3Source.java:318)

n3_project.SPARQLServiceInputAction.actionPerformed(SPARQLServiceInputAction.java:58)

[ERROR] - 2011-09-16 12:47:27,340 [AWT-EventQueue-0] unif.TemporaryFrame (TemporaryFrame.java:<init>:66)

TemporaryFrame.TemporaryFrame(): SPARQL source not found at file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui/bbeuler_project.xml.n3p.n3

/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui/bbeuler_project.xml.n3p.n3 (Aucun fichier ou dossier de ce type)

java.io.FileInputStream.open(Native Method)

java.io.FileInputStream.<init>(FileInputStream.java:106)

java.io.FileInputStream.<init>(FileInputStream.java:66)

sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)

sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)

projectGUI.getEditorManagement().doOpenEditor(n3);


sudo route del -net 192.168.1.0 netmask 255.255.255.0 dev eth0

/sbin/route -n

Table de routage IP du noyau

Destination Passerelle Genmask Indic Metric Ref Use Iface

192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0

169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0

0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

2011-09-15

sudo /sbin/ifconfig eth0 192.168.1.80
sudo /sbin/route add default gw 192.168.1.1
sudo ifconfig wlan0 up

If you want code for which people can get an overview, you could check out Dan Connolly Scala project started a year and a half ago

http://code.google.com/p/swap-scala/

<rszeno> i just finish to install trang

<rszeno> a good book, http://books.xmlschemata.org/relaxng/page2.html

2011-09-14

REFACTOR: extract DroolsHelper.workingMemoryDump() ; call it in both applicationKB and user KB dump

<Utopiah> jmvanel: you might be interested in the Software Design aspect of http://www.rci.rutgers.edu/~mleyton/ISMA.htm

<hivemind-sb`> Title: International Society for Mathematical and Computational Aesthetics (at www.rci.rutgers.edu)

Installed subclise for eclipse 3.7 on Debian

http://subclipse.tigris.org/update_1.6.x

Added this in eclipse/eclipse.ini after -vmargs , as explained on http://subclipse.tigris.org/wiki/JavaHL :

-Djava.library.path=/usr/lib/jni

A Rosetta stone : N3 rules - Prolog

N3

{ :BloodPressure :val ?x.
  ?x math:greaterThan 70
} => { :Service112 :alert "true" } .

Prolog

alert('Service112', "true") :-
  val(BloodPressure, X),
  X > 70 .

Sulci

https://github.com/yohanboniface/sulci

2011-09-13

mvn project-info-reports:dependencies

Uploading a snapshot ; with the correction for multithreading ( probably only making a difference for tests , but who knows )

WebId, etc

<jmvanel> any URL about webid for dummies ?

<rszeno> maven libraries http://www.w3.org/wiki/Foaf%2Bssl#Libraries

<rszeno> http://www.w3.org/wiki/WebID#WebIDs_and_the_WebID_Protocol

<rszeno> better is to try yourself but some things are broken now

<rszeno> section 1.2

Subscribed to mailing list foaf-protocols

2011-09-12

the names for generated rule file from OWL were not informative

Upgrade Surefire to 2.10-SNAPSHOT; reverted to forkMode>pertest , from forkMode>never

I have clearer ideas about my ClassNotFoundException troubles ...

<jmvanel> thrown by at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) ,

<jmvanel> for one project source class ;

<jmvanel> in fact it works fine with SureFire 2.10-SNAPSHOT , but ...

<jmvanel> but, even for one test, the problem appears when I set forkMode == never

<krosenv> forkMode never is quite constrained

<krosenv> that just means you can't use never

http://stackoverflow.com/questions/499634/how-to-detect-and-debug-multi-threading-problems

TODO ATTEMPTO lexicon

2011-09-10

11:10:46 PM [main] [error] main: java.lang.IllegalArgumentException: URI scheme is not "file"

11:10:46 PM [main] [error] main: at java.io.File.<init>(File.java:366)

11:10:46 PM [main] [error] main: at n3_project.IOManager.getInputStream(IOManager.java:39)

11:10:46 PM [main] [error] main: at eulergui.parser.n3.impl.parser4j.service.TestForJos.doTheTestForOneFile(TestForJos.java:89)

1

all tests in src test java
eulergui.gui.TestGenericGuiGeneration
testOWLReasoner(eulergui.gui.TestGenericGuiGeneration)
org.netbeans.jemmy.TimeoutExpiredException: Frame with title "Ontology Hierarchy"
at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:147)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:412)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:202)
at org.netbeans.jemmy.FrameWaiter.waitFrame(FrameWaiter.java:221)
at org.netbeans.jemmy.operators.JFrameOperator.waitJFrame(JFrameOperator.java:248)
at org.netbeans.jemmy.operators.JFrameOperator.waitJFrame(JFrameOperator.java:268)
at eulergui.gui.TestJemmy.checkOWLReasoner(TestJemmy.java:362)
at eulergui.gui.TestGenericGuiGeneration.testOWLReasoner(TestGenericGuiGeneration.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules
test_foaf_import2(eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules)
org.netbeans.jemmy.TimeoutExpiredException: Wait AbstractButton with text "Image" loaded
at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:147)
at org.netbeans.jemmy.operators.ComponentOperator.waitComponent(ComponentOperator.java:337)
at org.netbeans.jemmy.operators.ComponentOperator.waitComponent(ComponentOperator.java:302)
at org.netbeans.jemmy.operators.JButtonOperator.<init>(JButtonOperator.java:100)
at org.netbeans.jemmy.operators.JButtonOperator.<init>(JButtonOperator.java:119)
at eulergui.gui.TestJemmy.checkObjectProperty(TestJemmy.java:341)
at eulergui.gui.TestGenericGuiGenerationInsertLogical.test_foaf_import2(TestGenericGuiGenerationInsertLogical.java:50)
at eulergui.gui.TestGenericGuiGenerationInsertLogicalRefactorRules.test_foaf_import2(TestGenericGuiGenerationInsertLogicalRefactorRules.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

eulergui.gui.TestEulerGUIInputs
testXMLInputGloze(eulergui.gui.TestEulerGUIInputs)
org.netbeans.jemmy.TimeoutExpiredException: JFileChooser's window
at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:147)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:412)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:202)
at org.netbeans.jemmy.DialogWaiter.waitDialog(DialogWaiter.java:315)
at org.netbeans.jemmy.operators.JDialogOperator.waitJDialog(JDialogOperator.java:591)
at org.netbeans.jemmy.operators.JFileChooserOperator.<init>(JFileChooserOperator.java:101)
at org.netbeans.jemmy.operators.JFileChooserOperator.<init>(JFileChooserOperator.java:119)
at eulergui.gui.TestEulerGUIInputs.testXMLInputGloze(TestEulerGUIInputs.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

InErrorTests
eulergui.gui.TestImportSwrl
testLocalImportSwrlWithDrools(eulergui.gui.TestImportSwrl)
org.netbeans.jemmy.TimeoutExpiredException: Frame Title Component Chooser "jEdit.*.as.rules.n3.*"
at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:147)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:412)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:202)
at org.netbeans.jemmy.FrameWaiter.waitFrame(FrameWaiter.java:221)
at org.netbeans.jemmy.operators.FrameOperator.waitFrame(FrameOperator.java:411)
at org.netbeans.jemmy.operators.JFrameOperator.<init>(JFrameOperator.java:72)
at org.netbeans.jemmy.operators.JFrameOperator.<init>(JFrameOperator.java:85)
at org.netbeans.jemmy.operators.JFrameOperator.<init>(JFrameOperator.java:93)
at eulergui.gui.TestImportSwrl.checkTranslatedRule(TestImportSwrl.java:81)
at eulergui.gui.TestImportSwrl.testLocalImportSwrlWithDrools(TestImportSwrl.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

eulergui.gui.TestGenericGuiGeneration
testOWLReasoner(eulergui.gui.TestGenericGuiGeneration)
org.netbeans.jemmy.TimeoutExpiredException: Frame with title "Ontology Hierarchy"
at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:147)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:412)
at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:202)
at org.netbeans.jemmy.FrameWaiter.waitFrame(FrameWaiter.java:221)
at org.netbeans.jemmy.operators.JFrameOperator.waitJFrame(JFrameOperator.java:248)
at org.netbeans.jemmy.operators.JFrameOperator.waitJFrame(JFrameOperator.java:268)
at eulergui.gui.TestJemmy.checkOWLReasoner(TestJemmy.java:362)
at eulergui.gui.TestGenericGuiGeneration.testOWLReasoner(TestGenericGuiGeneration.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

eulergui.gui.TestEulerGUITooltip
testTooltip(eulergui.gui.TestEulerGUITooltip)
junit.framework.AssertionFailedError: "<HTML><http://exampleS#waza>:<BR></HTML>" does not match pattern: .*Comment for waza in the ex: namespace.*
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at eulergui.gui.TestEulerGUITooltip.checkString(TestEulerGUITooltip.java:69)
at eulergui.gui.TestEulerGUITooltip.checkTooltipAfterIndexing(TestEulerGUITooltip.java:55)
at eulergui.gui.TestEulerGUITooltip.testTooltip(TestEulerGUITooltip.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

<jmvanel> CONCLUSION : fom my pov : 1) the names for generated rule file from OWL are not informative

<jmvanel> 2) Drools N3 engine can't understand @forAll :x .

<jmvanel> { [] a :x } => { [ :usedClass :x ] . }

Sep 10, 2011 2:42:00 PM eulergui.gui.TestJemmy setUp
INFO: TestJemmy.setUp(): testAddNewN3Source
Using org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer
java.lang.ClassNotFoundException: eulergui.project.ProjectLegacy
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.beans.ObjectHandler.classForName(ObjectHandler.java:68)
at com.sun.beans.ObjectHandler.classForName(ObjectHandler.java:55)
at com.sun.beans.ObjectHandler.classForName2(ObjectHandler.java:159)
at com.sun.beans.ObjectHandler.startElement(ObjectHandler.java:194)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:453)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:364)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:142)
at java.beans.XMLDecoder.getHandler(XMLDecoder.java:238)
at java.beans.XMLDecoder.readObject(XMLDecoder.java:201)
at eulergui.project.ProjectFactory.normalizeAndReadXMLEncoderStream(ProjectFactory.java:188)

- FIX TestCreateProjectInGUI : pushSaveProject() should block until operation finishes

- FIX RETETest: java.lang.IllegalArgumentException: parser4j/n3-parser.data resource does not exist

in ParserDataIO : changed ligne 66,

Thread.currentThread().getContextClassLoader()

into

getClass().getClassLoader()

TODO : remove the class when next release in parser4j

2011-09-09

<jmvanel>

mvn versions:display-plugin-updates says:

[INFO] All plugins with a version specified are using the latest versions.

BUT maven-surefire-plugin is at version>2.8.1 ( not 2.9 )

Is this a know problem ?

Guided tour of Pelorus

<rszeno> imagine something based on the same principle where exploring, inference and everything else can start from a data set specified by user, a url for example

<rszeno> a static interface doesn't fit in this landscape

<rszeno> i would split this in two subsystem, one for ajusting the interface and another for navigation

<rszeno> navigation like in pelorus

<rszeno> this involve a classification mechanism

<rszeno> something similar would be nice for Flora

<jmvanel> sorry , don't understand http://nasa.clarkparsia.com/

<rszeno> you didn't open the link?

<jmvanel> yes

<rszeno> and?

<rszeno> did you click on Saturn 1B for example?

<rszeno> or better, Saturn 5

<rszeno> in the first list box

<jmvanel> i just did

<jmvanel> noithing shows that it's clickable :(

<rszeno> now select something from the second list box

<jmvanel> i did

<rszeno> at each selection, it add data to the next listbox

<rszeno> under each listbox are some operators, and, or not,

<jmvanel> but how do I interporet that in terls of RDF ?

<rszeno> are enabled only after selection

<jmvanel> interpret

<rszeno> each listbox represent a property of a class

<rszeno> or a class in this case

<rszeno> the connection with next listbox is based on the relation

<rszeno> Launch is a property of Lounch Vehicle

<rszeno> building a general, non specific interface, will start from ontologies involved

<rszeno> http://www.thefreelibrary.com/The+Role+of+Classification+in+Knowledge+Representation+and...-a057046525

<rszeno> there is a section for facet

<rszeno> http://www.miskatonic.org/library/facet-web-howto.html

<jmvanel> that for the guided tour

<jmvanel> thanks for the guided tour

<rszeno> :)

<rszeno> you are welcome

<jmvanel> I'll see the other link later; now I struggle with the test suite ;

<rszeno> probably is complicate to build such a thing, :)


a matter of costs

<rszeno> taguchi lose curve, :)

<rszeno> http://elsmar.com/Taguchi.html

EulerGUI dev

Now I have a tedious programming task : I have a stack of depth 4 , were I pass a Project argument , and I should now pass a list , because of the N3 project format :

Thread [main] (Suspended)
ProjectFactory.restoreN3P(URI) line: 271
ProjectFactory.restoreAny(URI, boolean) line: 371
CommandLineArguments.makeProjectFromUserArgument(String[]) line: 44
ProjectGUI.main(String[]) line: 195

Thread [AWT-EventQueue-0] (Suspended)
ApplicationKB.recoverProjectObjectFromKB(URL, URI) line: 469
ApplicationKB.loadN3Project(URI) line: 457
ProjectFactory.restoreN3P(URI) line: 270
ProjectFactory.restoreAny(URI, boolean) line: 371
ProjectFileManagement$OpenProjectAction.actionPerformed(ActionEvent) line: 529
JMenu$1(AbstractButton).fireActionPerformed(ActionEvent) line: 1995ventDispatchThread.run() line: 122

When reading an N3 project file , a new (empty) project with URI made after the project file (ending in .n3). But the project contained in the file is ignored.

<file:/home/jmv/src/eulergui_new/euler_project.xml.n3p.n3>

Question asked on #java without answer :

I use a library class writing on a OutputStream or Writer; I want to interpose a string replacement on lines, before writing to a file;

so I need a class that will buffer all output up to an end of line, and call a user method to transform it

library class --> ForwardingOutputStream --> CorrectorBufferedInputStream --> FileOuputStream

2011-09-08

webmarker link

Logic programming and knowledge representation. Chitta Baral and Michael Gelfond. Journal of Logic Programming 19:73–148, 1994.

2011-09-07

the spec gives the translation of OWL RL in a neutral rule language : http://www.w3.org/TR/owl2-profiles/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules

Degugging : saving the N3 project file:

uriForSubject
 (java.lang.String) <file:/home/jmv/src/eulergui_new/euler_project.xml.n3p>
triple.getSubject()
 (java.lang.String) <file:///home/jmv/src/eulergui_new/euler_project.xml.n3p>

It's NOT caused by URLHelper.normalizeURL() : just 1 reference in addN3SourceToEulerArguments()

Here is NOT the root cause :

Thread [doN3SourceAdded: file:/tmp/eg-3944119603762958536.n3] (Suspended (breakpoint at line 45 in Triple))
LineTrackingTriple(Triple).<init>(String, String, String) line: 45
LineTrackingTriple.<init>(String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, LinesAndCols) line: 33
DroolsTripleHandler.acceptTriple(String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String, LinesAndCols) line: 174
ParserLink.visitAllURI(LineTrackingTripleHandler) line: 629
N3SourcetoDrools.translate(IRDFIterator, String, boolean, boolean, boolean) line: 285
N3SourcetoDrools.translate(N3Source, boolean, boolean, boolean) line: 257
N3DroolsEngineFacade.translate(N3Source, boolean, boolean, boolean) line: 91
Project.translateToDrools(N3Source, boolean, boolean) line: 973
N3ConversionRefesher.updateKB(Project, N3Source) line: 161
UpdateN3Thread.run() line: 41

This is the root cause :

model.getWriter( "N3" ).write( model, tmpOutputStream, null);

Jena 's writer transforms <file:/XXX into <file:///XXX .

2011-09-06

for f in www.coplfr.org/**/*.html
do
  echo "==== $f ===="
  xmllint --noout --html --postvalid --dtdvalid  http://www.w3.org/TR/html4/strict.dtd $f
done

for f in www.coplfr.org/**/*.html
do
  echo "==== $f ====" 
  tidy -errors -quiet --show-errors 1 --show-warnings no $f
done

2011-09-05

http://www.agrozoo.net/

Exploration capabilities in EulerGUI

Starting from a plain RDF data URI

About "discover capabilities" , do you want to try what already exists ? Type

eg --pass http://jmvanel.free.fr/hypervert/images_le_clos/vue_est.rdf

Now click on Tools -> add referred ontologies.

These "referred ontologies" (coming from prefix declarations) are added to the project, in an deactivated state. You can then open them in the N3 editor just like any N3 source.

Now click on Tools -> launch OWL reasoner.

You get multiple new windows docked, each showing a tree of OWL classes. There is one frame per N3 source , if it really has ontology information; and the frame titles indicate the N3 source.

Now open the FOAF frame; type Person in the upper field ; it filters the tree to show only classes having this string.

This filtering feature is useful to explore large ontologies. I reckon that Protégé has much the same features, but Protégé does not have the filtered tree.

Starting from the name of an ontology

An even smarter way of getting started, when you only have the name of an ontology is this. Suppose you heard about FOAF (actually the most well-know ontology) , but you don't know where it is .

You just write in the editor :

foaf:bla :x :x .

then save. EulerGUI , leveraging on prefix.cc , will add missing prefix declaration;

then you can do Tools -> add referred ontologies like above (and remove the dummy triple foaf:bla :x :x. ) .

It works in the editor, and in the N3 shell too.

RDF image annotation with Kanzaki tool

I completed RDF image annotation of the view towards east of the arboretum , with the nice Kanzaki tool : http://jmvanel.free.fr/hypervert/images_le_clos/vue_est.rdf

Technically it is interesting as an example of RDF usage . The RDF is used by an XSLT transform that generates the image map..

http://www.w3.org/2003/07/Annotea/BookmarkSchema-20030707

2011-09-04

<rszeno> lynx -dump -display-charset=utf-8 URL > textfile

<rszeno> is a excellent way to get pages as text

<rszeno> http://www.deepspace6.net/projects/netcat6.html

<rszeno> this is the tool but there is no docs on site

<rszeno> is package in debian anyway

<rszeno> http://linux.die.net/man/1/nc6

<rszeno> look to the "File transfer" section

<jmvanel> i heard about nc, it's a swiss knife with network stuff

<jmvanel> While checking my garden inventory , I found this nice page in RDf with an XSLT style :

<jmvanel> http://www.ipni.org/ipni/plantNameByVersion.do?id=322338-1&version=1.3&output_format=lsid-metadata&show_history=true

<jmvanel> alas, the XSLT is not generic

<jmvanel> maybe some rules would add intelligence to the display ?

I try the URI with eg --pass , but there is a stupid bug :

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: URI has a query component
        at java.io.File.<init>(File.java:372)
        at n3_project.ProjectGUI.setLastFile(ProjectGUI.java:814)
        at n3_project.ProjectGUI.<init>(ProjectGUI.java:181)
        at n3_project.ProjectGUI.newWindow(ProjectGUI.java:245)
        at n3_project.ProjectGUI$1.run(ProjectGUI.java:205)

http://www.ipni.org/link_to_ipni.html

2011-09-03

EulerGUI

Project URI and save as N3

Thoughts: naturalist's observations site, etc

add to FAQ:

2011-09-02

date -u +"%G-%m-%dT%TZ"
<rszeno> this output the date in w3c date format

http://metacog.org/doc.html

JavaMail, mstor, etc

http://wiki.modularity.net.au/mstor/index.php?title=Main_Page

http://www.velocityreviews.com/forums/t390522-javamail-and-mbox.html

http://wiki.modularity.net.au/mstor/index.php?title=Maven2

http://linux.die.net/man/5/mbox

<jmvanel> hi what is the incantation to show the classpath ?

<mart> mvn dependency:build-classpat

2011-08-31

metacog.org

<Utopiah> jmvanel: have you read http://metacog.org/doc.html ?

Title: metacog.org - Moshe Looks, PhD - dissertation (at metacog.org)

maybe it could be a way to move forward once the process has been boostrapped via your EulerGUI?

http://www.idsia.ch/~juergen/agi10yi.pdf

2011-08-30

Edit the Project N3 in the N3 editor

DESIGN NOTE: there is a duplication of information, for historical reasons :

Combine open internal KB in editor, open project from N3 , OpenPreferencesAction, save project in N3 ?

Need to watch modification of N3 file file created in LaunchApplicationKBN3Editor "open internal KB in editor" ; similar to watching of user preference file in OpenPreferencesAction;

but fileSnapshot in class LaunchApplicationKBN3Editor is not updated with the KB; could use Drools mechanism to do that.

11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0: com.hp.hpl.jena.n3.turtle.TurtleParseException: Line 6, column 84: Unresolved prefixed name: xs:long
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.ParserBase.throwParseException(ParserBase.java:274)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.ParserBase.resolvePName(ParserBase.java:195)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.PrefixedName(TurtleParser.java:680)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.IRIref(TurtleParser.java:664)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.RDFLiteral(TurtleParser.java:555)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.GraphTerm(TurtleParser.java:482)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.VarOrTerm(TurtleParser.java:399)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.GraphNode(TurtleParser.java:362)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.Object(TurtleParser.java:215)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.ObjectList(TurtleParser.java:197)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.PropertyListNotEmpty(TurtleParser.java:165)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.TriplesSameSubject(TurtleParser.java:130)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.Statement(TurtleParser.java:76)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.parser.TurtleParser.parse(TurtleParser.java:46)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.ParserTurtle.parse(ParserTurtle.java:37)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.turtle.TurtleReader.readWorker(TurtleReader.java:21)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.JenaReaderBase.readImpl(JenaReaderBase.java:101)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at com.hp.hpl.jena.n3.JenaReaderBase.read(JenaReaderBase.java:35)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.ResultEditorN3Action.convertReaderIntoN3(ResultEditorN3Action.java:99)
11:45:58 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.LaunchApplicationKBN3Editor.actionPerformed(LaunchApplicationKBN3Editor.java:53)

2011-08-29

EulerGUI

An HTTP server that is not a SPARQL server

Stack obtained with an HTTP server that is not a SPARQL server ( e.g. http://vivo-onto.slis.indiana.edu/SPARQL/ )

Now the ResultSetException is caught and TemporaryFrame shown with "Does not seem to be a SPARQL endpoint."

N3SourceFromSPARQLSource.doUpdate(): file:/home/jmv/src/eulergui_new/examples/find_properties.sparql ; http://vivo-onto.slis.indiana.edu/SPARQL
eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:95)
eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:55)
eulergui.project.N3Source.update(N3Source.java:369)
eulergui.gui.view.ButtonsForN3Source$1.actionPerformed(ButtonsForN3Source.java:308)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

Cause:
com.hp.hpl.jena.sparql.resultset.ResultSetException: Not an ResultSet result
com.hp.hpl.jena.sparql.resultset.SPARQLResult.getResultSet(SPARQLResult.java:68)
com.hp.hpl.jena.sparql.resultset.XMLInput.fromXML(XMLInput.java:30)
com.hp.hpl.jena.sparql.resultset.XMLInput.fromXML(XMLInput.java:25)
com.hp.hpl.jena.query.ResultSetFactory.fromXML(ResultSetFactory.java:278)
com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:151)
n3_project.SPARQLToN3Converter.doSelectQuery(SPARQLToN3Converter.java:137)
eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:72)
eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:55)
eulergui.project.N3Source.update(N3Source.java:369)
eulergui.gui.view.ButtonsForN3Source$1.actionPerformed(ButtonsForN3Source.java:308)

2011-08-26

http://www.iconarchive.com/show/simplistica-icons-by-dryicons/info-icon.html

This exception should be caught with a popup:

java.io.FileNotFoundException: https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/examples/ckan_explore.rq
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
at java.net.URLConnection.getContent(URLConnection.java:688)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContent(HttpsURLConnectionImpl.java:406)
at java.net.URL.getContent(URL.java:1024)
at n3_project.SPARQLToN3Converter.getQueryString(SPARQLToN3Converter.java:171)
at eulergui.inputs.N3SourceFromSPARQLSource.getQueryString(N3SourceFromSPARQLSource.java:121)
at eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:64)
at eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:55)
at eulergui.inputs.N3SourceFromSPARQLSource.prepare(N3SourceFromSPARQLSource.java:49)
at eulergui.project.N3Source.setProject(N3Source.java:312)
at eulergui.project.Project.addN3Source(Project.java:277)

011-08-25

Thread [doN3SourceAdded: ./errors-in-editor.n3] (Suspended)
N3Source.manageParseN3() line: 405
N3Source.update() line: 370
N3Source.parseResult() line: 426
ParsingException.getResult() line: 27
N3ParsingExceptionProcessor.process(Throwable, ProjectGUI, TemporaryFrame) line: 38
N3ConversionRefesher.updateN3(N3Source) line: 135
UpdateN3Thread.run() line: 40

2011-08-24

http://maven.apache.org/plugins/maven-site-plugin/examples/site-deploy-to-sourceforge.net.html

[jmvanel@shell-23002]~% sf-help

Your interactive shell was created with a default project of: eulergui.
If you login without a project specified, that is the project you will be
able to modify.  You can also login with these projects:

    ssh jmvanel,ecolosim@shell.sourceforge.net
    ssh jmvanel,exist@shell.sourceforge.net
    ssh jmvanel,wwbota@shell.sourceforge.net
    ssh jmvanel,xmlpub@shell.sourceforge.net
    ssh jmvanel,eulergui@shell.sourceforge.net
    ssh jmvanel,deductions@shell.sourceforge.net
    ssh jmvanel,jmvanel.u@shell.sourceforge.net

Refactoring : moving a field to a delegate class : is it possible ?

I have a a field f , several methods using f, says m1 and m2, and another field deleg of type C1 . I'd like to move together f, m1 , m2 to class C1 .

2011-08-23

Building Drools from sources

Developing Drools and jBPM

https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/blob/master/README.md

ProjectGUI_Updater.n3SourceAdded(): nanoTime 279151242225728
ProjectGUI_Updater.n3SourceUpdated(): file:/home/jmv/src/eulergui_new/testEG/new.n3
ProjectGUI_Updater.findButtonsForN3Source(): eulergui.project.ProjectState@2a9df354
ProjectGUI_Updater.findButtonsForN3Source(): eulergui.tools.SWRLTranslator@39e87719
ProjectGUI_Updater.findButtonsForN3Source(): eulergui.gui.controller.ApplicationKB@60223be4
ProjectGUI_Updater.findButtonsForN3Source(): eulergui.gui.controller.ProjectGUI_Updater@5c68b20
ProjectGUI_Updater.findButtonsForN3Source(): eulergui.gui.controller.N3ConversionRefesher@397af435
ProjectGUI_Updater.n3SourceUpdated(): Thread Name: AWT-EventQueue-1

java.lang.AssertionError: findButtonsForN3Source: buttonsFound != null
        at eulergui.gui.controller.ProjectGUI_Updater.findButtonsForN3Source(ProjectGUI_Updater.java:137)
        at eulergui.gui.controller.ProjectGUI_Updater.n3SourceUpdated(ProjectGUI_Updater.java:235)
        at eulergui.project.ProjectChangeSupport.fireN3SourceUpdated(ProjectChangeSupport.java:167)
        at eulergui.project.Project.fireN3SourceUpdated(Project.java:1401)
        at eulergui.gui.controller.N3ConversionRefesher.n3SourceAdded(N3ConversionRefesher.java:56)
        at eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:77)
        at eulergui.project.Project.addN3Source(Project.java:289)
        at eulergui.project.Project.addN3Source(Project.java:272)
        at n3_project.SourceFilesManagement$AddN3Action.actualAction(SourceFilesManagement.java:236)
        at n3_project.SourceFilesManagement$AddN3Action.actionPerformed(SourceFilesManagement.java:213)

    public void setProject(Project project) {
    this.project = project;
    project.addProjectListener(new N3ConversionRefesher(this));
    project.addProjectListener(new ProjectGUI_Updater(this));

2011-08-20

EulerGUI TODO

- do not check timestamp of N3 source web location when the current timestamp is too recent, e.g. 500 ms.

- error highlighting and caret placement in editor broken

- run SPARQL in a thread

- before running SPARQL, the left button should be grey, and after running be activated (same for translations from other non N3 sources)

- new example ckan_explore.n3p should also show metadata about the data sources discovered

- SPARQL endpoints should have a tooltip with a short description

- new endpoints found in EG project should be added in the combo box

what are the properties used in data source directories for SPARQL endpoints ? For example in http://semantic.ckan.net/sparql/ it is http://rdfs.org/ns/void#sparqlEndpoint

- new endpoint added by user should be added in the combo box

- http://semantic.ckan.net/sparql/ should be added in the combo box

- RDFToN3Converter : stream were not closed :( TODO : check closing in other places

- TODO: have to fix the GUI's list management in EulerGUI singleton (cf Revision 2576)

- REGRESSION FIXED: adding a new SPARQL query to a project ( cause: field uri_ in N3SourceFromSPARQLSource was not set ) TODO: probably a more general fix is to fix N3Source.setProject(Project) , so that fileds uri_ , location and project are in sync (cf Revision 2566)

- TODO bad behavior on GUI events in deductions/n3_nojs/person-app.n3p

DONE

removed these useless declarations ( and changed the defaults in eclipse compiler ) :

private static final long serialVersionUID = 1L;

Idea for a non -trivial and useful graph transform : N3 <==> SPARQL

for N3 ==> SPARQL : reify N3 rules ; add FILTER and other SPARQL stuff, generate SPARQL string

2011-08-19

COMMIT

now N3 URI sources are added in a thread ! GUI much more reactive !

e.g. when loading http://purl.org/dc/terms/ , you see first the button for DC terms , then 1 sec after you see the button for the rules in it

Thread when adding an RDF remote URI to the project :

Thread [AWT-EventQueue-0] (Suspended)
Thread.sleep(long) line: not available [native method]
Process.execute(long) line: 44
ProofEngine.runProofEngine(String[], PrintStream, PrintStream) line: 180
ProofEngine.runProofEngine(String[]) line: 199
EyeHelper.reasonExternalProlog(Project) line: 52
Project.reasonExternalProlog() line: 499
SWRLTranslator.runTranslatorProject(N3Source) line: 115
SWRLTranslator.n3SourceAdded(Project, N3Source) line: 51
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 78
Project.addN3Source(N3Source, boolean) line: 289
Project.addN3Source(N3Source) line: 272
SourceFactory.addSource(URL, Project) line: 121
ProjectGUI$ActionChooseURL_N3.actionPerformed(ActionEvent) line: 675
JButton(AbstractButton).fireActionPerformed(ActionEvent) line: 1995
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 387
DefaultButtonModel.setPressed(boolean) line: 242
BasicButtonListener.mouseReleased(MouseEvent) line: 236
JButton(Component).processMouseEvent(MouseEvent) line: 6288
JButton(JComponent).processMouseEvent(MouseEvent) line: 3267
JButton(Component).processEvent(AWTEvent) line: 6053
JButton(Container).processEvent(AWTEvent) line: 2041
JButton(Component).dispatchEventImpl(AWTEvent) line: 4651
JButton(Container).dispatchEventImpl(AWTEvent) line: 2099
JButton(Component).dispatchEvent(AWTEvent) line: 4481
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4577
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4238
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4168
ProjectGUI$URLDialog(Container).dispatchEventImpl(AWTEvent) line: 2085
ProjectGUI$URLDialog(Window).dispatchEventImpl(AWTEvent) line: 2478
ProjectGUI$URLDialog(Component).dispatchEvent(AWTEvent) line: 4481
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 643
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84
EventQueue$1.run() line: 602
EventQueue$1.run() line: 600
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 98
EventQueue$2.run() line: 616
EventQueue$2.run() line: 614
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
EventQueue.dispatchEvent(AWTEvent) line: 613
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForFilter(Conditional, EventFilter) line: 178
Dialog$1.run() line: 1046
Dialog$3.run() line: 1098
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
ProjectGUI$URLDialog(Dialog).show() line: 1096
ProjectGUI$URLDialog(Component).show(boolean) line: 1584
ProjectGUI$URLDialog(Component).setVisible(boolean) line: 1536
ProjectGUI$URLDialog(Window).setVisible(boolean) line: 842
ProjectGUI$URLDialog(Dialog).setVisible(boolean) line: 986
ProjectGUI.popupURLChooser() line: 648
SourceFilesManagement$AddN3URLAction.actionPerformed(ActionEvent) line: 242
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) line: 1995
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 387
DefaultButtonModel.setPressed(boolean) line: 242
BasicButtonListener.mouseReleased(MouseEvent) line: 236
AWTEventMulticaster.mouseReleased(MouseEvent) line: 272
JToolBar$1(Component).processMouseEvent(MouseEvent) line: 6288
JToolBar$1(JComponent).processMouseEvent(MouseEvent) line: 3267
JToolBar$1(Component).processEvent(AWTEvent) line: 6053
JToolBar$1(Container).processEvent(AWTEvent) line: 2041
JToolBar$1(Component).dispatchEventImpl(AWTEvent) line: 4651
JToolBar$1(Container).dispatchEventImpl(AWTEvent) line: 2099
JToolBar$1(Component).dispatchEvent(AWTEvent) line: 4481
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4577
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4238
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4168
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2085
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2478
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4481
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 643
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84
EventQueue$1.run() line: 602
EventQueue$1.run() line: 600
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 98
EventQueue$2.run() line: 616
EventQueue$2.run() line: 614
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
EventQueue.dispatchEvent(AWTEvent) line: 613
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174
EventDispatchThread.pumpEvents(int, Conditional) line: 169
EventDispatchThread.pumpEvents(Conditional) line: 161
EventDispatchThread.run() line: 122

EulerGUI ideas TODO :

COMMIT:

ProjectGUI :

- if no context ( project or file opened before ) use user.dir ( startup dir ) for file choosers

- if given file for lastFile is a temporary file , or in the eulergui cache , do not change lastFile

- prefixes beginning with / like http://purl.org/dc/terms/ , gave a bad name for associated rules : /tmp/.as.rules.n3

- use get/set lastFile in most places

http://www.w3.org/2001/sw/wiki/Tools

EulerGUI DONE : bug : changing endpoint URI and saving project : EG is blocked, and moreover the .n3p is empty !!!

this was happening when the SPARQL server is taking a long time.

Stack when blocked when changing endpoint URI and saving project :

Thread [AWT-EventQueue-0] (Suspended)
SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method]
SocketInputStream.read(byte[], int, int) line: 129
BufferedInputStream.fill() line: 218
BufferedInputStream.read1(byte[], int, int) line: 258
BufferedInputStream.read(byte[], int, int) line: 317
ChunkedInputStream.readAheadBlocking() line: 525
ChunkedInputStream.readAhead(boolean) line: 582
ChunkedInputStream.read(byte[], int, int) line: 669
HttpURLConnection$HttpInputStream(FilterInputStream).read(byte[], int, int) line: 116
HttpURLConnection$HttpInputStream.read(byte[], int, int) line: 2676
HttpURLConnection$HttpInputStream.read(byte[]) line: 2671
UTF8Reader.loadMore(int) line: 365
UTF8Reader.read(char[], int, int) line: 110
BranchingReaderSource(ReaderSource).readInto(WstxInputData) line: 84
BranchingReaderSource.readInto(WstxInputData) line: 57
ValidatingStreamReader(StreamScanner).loadMore() line: 992
ValidatingStreamReader(StreamScanner).getNext() line: 763
ValidatingStreamReader(BasicStreamReader).skipToken() line: 3342
ValidatingStreamReader(BasicStreamReader).nextFromTree() line: 2622
ValidatingStreamReader(BasicStreamReader).next() line: 1019
XMLInputStAX$ResultSetStAX.getOneSolution() line: 410
XMLInputStAX$ResultSetStAX.hasNext() line: 217
SPARQLToN3Converter.doSelectQuery(Query, URL, String) line: 146
N3SourceFromSPARQLSource.doUpdate() line: 67
N3SourceFromSPARQLSource.getLocalN3() line: 91
N3SourceFromSPARQLSource(N3Source).getFileName() line: 734
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
Trampoline.invoke(Method, Object, Object[]) line: 37
GeneratedMethodAccessor11.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
MethodUtil.invoke(Method, Object, Object[]) line: 244
Expression(Statement).invokeInternal() line: 239
Statement.access$000(Statement) line: 39
Statement$2.run() line: 140
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
Expression(Statement).invoke() line: 137
Expression.getValue() line: 98
DefaultPersistenceDelegate.doProperty(Class, PropertyDescriptor, Object, Object, Encoder) line: 210
DefaultPersistenceDelegate.initBean(Class, Object, Object, Encoder) line: 247
DefaultPersistenceDelegate.initialize(Class<?>, Object, Object, Encoder) line: 395
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 100
XMLEncoder(Encoder).writeObject(Object) line: 54
XMLEncoder.writeObject(Object) line: 257
XMLEncoder(Encoder).writeExpression(Expression) line: 279
XMLEncoder.writeExpression(Expression) line: 372
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 97
XMLEncoder(Encoder).writeObject(Object) line: 54
XMLEncoder.writeObject(Object) line: 257
XMLEncoder(Encoder).writeExpression(Expression) line: 279
XMLEncoder.writeExpression(Expression) line: 372
java_util_AbstractMap_PersistenceDelegate(java_util_Map_PersistenceDelegate).initialize(Class<?>, Object, Object, Encoder) line: 523
DefaultPersistenceDelegate(PersistenceDelegate).initialize(Class<?>, Object, Object, Encoder) line: 190
DefaultPersistenceDelegate.initialize(Class<?>, Object, Object, Encoder) line: 393
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 100
XMLEncoder(Encoder).writeObject(Object) line: 54
XMLEncoder.writeObject(Object) line: 257
XMLEncoder(Encoder).writeExpression(Expression) line: 279
XMLEncoder.writeExpression(Expression) line: 372
DefaultPersistenceDelegate.doProperty(Class, PropertyDescriptor, Object, Object, Encoder) line: 212
DefaultPersistenceDelegate.initBean(Class, Object, Object, Encoder) line: 247
DefaultPersistenceDelegate.initialize(Class<?>, Object, Object, Encoder) line: 395
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 100
XMLEncoder(Encoder).writeObject(Object) line: 54
XMLEncoder.writeObject(Object) line: 257
XMLEncoder(Encoder).writeExpression(Expression) line: 279
XMLEncoder.writeExpression(Expression) line: 372
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 97
XMLEncoder(Encoder).writeObject(Object) line: 54
XMLEncoder.writeObject(Object) line: 257
XMLEncoder(Encoder).writeObject1(Object) line: 206
XMLEncoder(Encoder).cloneStatement(Statement) line: 219
XMLEncoder(Encoder).writeStatement(Statement) line: 250
XMLEncoder.writeStatement(Statement) line: 331
XMLEncoder.writeObject(Object) line: 260
Project.save(Project) line: 1116
Project.save() line: 1139
ProjectFileManagement$SaveProjectLocalAction.actionPerformed(ActionEvent) line: 439
JMenu$1(AbstractButton).fireActionPerformed(ActionEvent) line: 1995
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 387
DefaultButtonModel.setPressed(boolean) line: 242
JMenu$1(AbstractButton).doClick(int) line: 357
BasicMenuItemUI.doClick(MenuSelectionManager) line: 809
BasicMenuItemUI$Handler.mouseReleased(MouseEvent) line: 850
JMenu$1(Component).processMouseEvent(MouseEvent) line: 6288
JMenu$1(JComponent).processMouseEvent(MouseEvent) line: 3267
JMenu$1(Component).processEvent(AWTEvent) line: 6053
JMenu$1(Container).processEvent(AWTEvent) line: 2041
JMenu$1(Component).dispatchEventImpl(AWTEvent) line: 4651
JMenu$1(Container).dispatchEventImpl(AWTEvent) line: 2099
JMenu$1(Component).dispatchEvent(AWTEvent) line: 4481
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4577
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4238
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4168
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2085
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2478
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4481
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 643
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84
EventQueue$1.run() line: 602
EventQueue$1.run() line: 600
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 98
EventQueue$2.run() line: 616
EventQueue$2.run() line: 614
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
EventQueue.dispatchEvent(AWTEvent) line: 613
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174
EventDispatchThread.pumpEvents(int, Conditional) line: 169
EventDispatchThread.pumpEvents(Conditional) line: 161
EventDispatchThread.run() line: 122

2011-08-18

Tried to get N3 out of ckan, but it only speaks JSON :( :

wget –header="Content-Type: application/n3" http://ckan.net/api/rest/package

EulerGUI TODO : bug : changing endpoint URI and saving project : EG is blocked, and moreover the .n3p is empty !!!

EulerGUI idea (TODO?): add a new EG engine that starts "eye" by a system call like FuXi and CWM ; this would be OK for Jos

<rszeno> lcpvrr1 try 'select distinct ?l where { [] rdfs:label ?l . }'

<rszeno> for 15 labels i would not use dbpedia, :)

<jmvanel_> back ; now 28°

<rszeno> ?s rdfs:label ?l will ask for a cartezian product, that means will search for 'number of ?s' * 'number of ?l' but [] will tell virtuoso to ignore ?s wich mean a size of 'number of ?l'

<rszeno> that is first reason

<rszeno> second, passing all results over the net, duplicates is slow, so let virtuoso to remove duplicates using distinct

<jmvanel_> should add this in EG manual

2011-08-17

Exploring CKAN, a portal of Open Data

Looking in CKAN things, we find information here : http://wiki.ckan.net/RDF_and_CKAN ( CKAN is not natively RDF ). From this we intuited the CKAN SPARQL Endpoint: http://semantic.ckan.net/sparql/ .

It is using mainly the VOID vocabulary ( Vocabulary of Interlinked Datasets) : http://vocab.deri.ie/void .

The quite generic steps for exploring a data source are :

1. Getting the properties and classes used

find_properties.sparql SELECT DISTINCT ?p WHERE {?s ?p ?o}

find_classes.sparql SELECT DISTINCT ?Concept WHERE {?x a ?Concept}

2. Looking at values of the most interesting property

By asking all properties, I discovered that the property for sparql Endpoint is http://rdfs.org/ns/void#sparqlEndpoint ; not http://vocab.deri.ie/void#sparqlEndpoint as indicated in the doc.

# NOTE : http://vocab.deri.ie/void#sparqlEndpoint does not exist in CKAN data !! 
CONSTRUCT {
  ?D <http://rdfs.org/ns/void#sparqlEndpoint> ?EP.
}
WHERE {
  ?D <http://rdfs.org/ns/void#sparqlEndpoint> ?EP.
}

3. Focusing on an interesting URI

Looking for "ecology" in previous result, there is one SPARQL database : <http://ckan.net/package/linked-open-data-of-ecology>

So the apropriate query is :

CONSTRUCT {
  <http://ckan.net/package/linked-open-data-of-ecology> ?P ?O .
}
WHERE {
  <http://ckan.net/package/linked-open-data-of-ecology> ?P ?O .
}

whose result is ( abridged ) :

<http://ckan.net/package/linked-open-data-of-ecology>
      <http://purl.org/dc/terms/description>
              """<p>Linked Open Data of Ecology (<a href=\"http://ecowlim.tfri.gov.tw/lode\">LODE</a>) is a prototype to integrate the data of ecology by linked data approach. So far the subjects include most of <a href=\"http://ecowlim.tfri.gov.tw/lode/resource/firedb/ForestFireEvent\">wildfire</a>, <a href=\"http://ecowlim.tfri.gov.tw/lode/page/taibnet/Species\">taxonomy</a>, biodiversity data of <a href=\"http://ecowlim.tfri.gov.tw/lode/page/taif/Species\">plants</a> and <a href=\"http://ecowlim.tfri.gov.tw/lode/page/flyhorse/Species\">insects</a> in Taiwan. 
</p>
<p>2011/07/20: Recently we added a new dataset about measurements of DBH(diameters breast height) of tree entities in Nansi forest dynamics plot (<a href=\"http://ecowlim.tfri.gov.tw/lode/resource/fdp/NansiForestDynamicsPlotCensus/01\">FDP-NS</a>).
</p>""" ;
      <http://purl.org/dc/terms/isPartOf>
              <http://ckan.net/group/lodcloud> ;
      <http://purl.org/dc/terms/title>
              "Linked Open Data of Ecology" ;
      <http://rdfs.org/ns/void#exampleResource>
              <http://ecowlim.tfri.gov.tw/lode/data/taibnet/Species/Callyodon_laxtoni?output=xml> , <http://ecowlim.tfri.gov.tw/lode/data/firedb/ForestFireEvent/1065?output=xml> , <http://ecowlim.tfri.gov.tw/lode/data/taif/Specimen/TAIF-PLANT-1-1-10026-187900?output=n3> , <http://ecowlim.tfri.gov.tw/lode/data/flyhorse/CollectingEvent/10015?output=xml> ;
      <http://rdfs.org/ns/void#sparqlEndpoint>
              <http://ecowlim.tfri.gov.tw/sparql/query> ;
      <http://xmlns.com/foaf/0.1/homepage>
              <http://ecowlim.tfri.gov.tw/lode> .

NOTE: no prefix was found on prefix.cc for CKAN !?! This would have simplified the above listing .

The EulerGUI project gathering the step 1,2,3 is : ckan_explore.n3p .

Now that I found this data source, ckan:linked-open-data-of-ecology , I can start again the same steps : Getting the properties and classes used; ??????? WIP ?????????

BAD NEWS ! running this on data source ckan:linked-open-data-of-ecology :

find_properties.sparql SELECT DISTINCT ?p WHERE {?s ?p ?o}

runs a long time, and EulerGUI is not responsive during querying :(((

The EulerGUI project gathering the step 1,2,3 is : ecology_explore.n3p .

EulerGUI TODO listed in commits

- TODO : prefixes beginning with / like http://purl.org/dc/terms/ , give a bad name for associated rules : /tmp/.as.rules.n3

TODO: have to fix the GUI's list management in EulerGUI singleton.

Revision 2567 - Modified Sat Jul 30 13:58:24 2011 UTC (2 weeks, 3 days ago) by jmvanel

FIX LaunchOWLReasonerAction : making class tree from a SPARQL query was not working

TODO : less ad-hoc fix, so that making class tree from any N3Source is sure to work

Always close streams

http://stackoverflow.com/questions/4072878/i-o-concept-flush-vs-sync

http://www.javapractices.com/topic/TopicAction.do?Id=8

http://stackoverflow.com/questions/2732260/in-java-when-i-call-outputstream-close-i-always-need-to-call-outputstream-flus

Could not load N3 source from URL http://purl.org/net/opmv/ns#
ERROR in reasoning with External Prolog
n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:59)
eulergui.project.Project.reasonExternalProlog(Project.java:499)
eulergui.tools.SWRLTranslator.runTranslatorProject(SWRLTranslator.java:114)
eulergui.tools.SWRLTranslator.n3SourceAdded(SWRLTranslator.java:50)
eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:78)
eulergui.project.Project.addN3Source(Project.java:289)
eulergui.project.Project.addN3Source(Project.java:272)
n3_project.SourceFactory.addSource(SourceFactory.java:121)
n3_project.ProjectGUI$ActionChooseURL_N3.actionPerformed(ProjectGUI.java:670)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

Cause:
java.lang.NullPointerException
n3_project.helpers.EyeHelper.addN3SourceToEulerArguments(EyeHelper.java:192)
n3_project.helpers.EyeHelper.getEulerArguments(EyeHelper.java:148)
n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:50)
eulergui.project.Project.reasonExternalProlog(Project.java:499)
eulergui.tools.SWRLTranslator.runTranslatorProject(SWRLTranslator.java:114)
eulergui.tools.SWRLTranslator.n3SourceAdded(SWRLTranslator.java:50)
eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:78)
eulergui.project.Project.addN3Source(Project.java:289)
eulergui.project.Project.addN3Source(Project.java:272)
n3_project.SourceFactory.addSource(SourceFactory.java:121)

http://purl.org/net/opmv/ns#

http://semantic.ckan.net/

file:/tmp/.as.rules.n3

Thread [doN3SourceAdded: http://purl.org/dc/terms/] (Suspended (exception ParsingException))
ParserLink.parse(N3Source) line: 117
N3SourceFromRDF(N3Source).doParseN3() line: 444
N3SourceFromRDF(N3Source).manageParseN3() line: 392
N3SourceFromRDF(N3Source).update() line: 370
N3ConversionRefesher.updateN3(N3Source) line: 102
UpdateN3Thread.run() line: 40

2011-08-15

Trouble reading dc terms

On IRC chat #eulergui

EG has trouble reading http://purl.org/dc/terms/ ; probably some content-type that was not foressen

no, it works and returns appplication/rdf+xml , one of the types requested ;

<jmvanel_> the bug is after and mine

<jmvanel_> somewhere in project.addN3Source(n3);

<jmvanel_> somehow RDF/XMl is sent to Euler , which dislikes this :(

<jmvanel_> FYI Euler is used when adding an N3/RDF source to create rules for OWL patterns like rdfs:subclassOf , etc

==> the root cause was that there is a missing feature in N3 Java parser :

"string"@en-US

about language tag :

<jmvanel_> the answer is simple for me : if CWM and Euler accept it , then accept it too ...

<jmvanel_> however ...

<jmvanel_> I discovered the issue in DC terms , and it might be a problem with the RDF ==> N3 translation in Jane

<jmvanel_> indeed , DC terms has lots of xml:lang="en-US"

<jmvanel_> gotten directly by :

<jmvanel_> wget –header="Content-Type: application/rdf+xml" http://purl.org/dc/terms/

Thread [AWT-EventQueue-0] (Suspended)
N3Source.manageN3Cache(N3Source) line: 510
IOManager.getLocalCache(N3Source) line: 143
N3SourceFromRDF(N3Source).getLocalCache() line: 675
N3SourceFromRDF(N3Source).getLocalN3() line: 671
SWRLTranslator.runTranslatorProject(N3Source) line: 107
SWRLTranslator.n3SourceAdded(Project, N3Source) line: 50
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 78
Project.addN3Source(N3Source, boolean) line: 289
Project.addN3Source(N3Source) line: 272
SourceFactory.addSource(URL, Project) line: 121
ProjectGUI$ActionChooseURL_N3.actionPerformed(ActionEvent) line: 670
JButton(AbstractButton).fireActionPerformed(ActionEvent) line: 1995
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 387
DefaultButtonModel.setPressed(boolean) line: 242
BasicButtonListener.mouseReleased(MouseEvent) line: 236
JButton(Component).processMouseEvent(MouseEvent) line: 6288
JButton(JComponent).processMouseEvent(MouseEvent) line: 3267
JButton(Component).processEvent(AWTEvent) line: 6053
JButton(Container).processEvent(AWTEvent) line: 2041
JButton(Component).dispatchEventImpl(AWTEvent) line: 4651
JButton(Container).dispatchEventImpl(AWTEvent) line: 2099
JButton(Component).dispatchEvent(AWTEvent) line: 4481
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4577
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4238
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4168
ProjectGUI$URLDialog(Container).dispatchEventImpl(AWTEvent) line: 2085
ProjectGUI$URLDialog(Window).dispatchEventImpl(AWTEvent) line: 2478
ProjectGUI$URLDialog(Component).dispatchEvent(AWTEvent) line: 4481
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 643
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84
EventQueue$1.run() line: 602
EventQueue$1.run() line: 600
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 98
EventQueue$2.run() line: 616
EventQueue$2.run() line: 614
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
EventQueue.dispatchEvent(AWTEvent) line: 613
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForFilter(Conditional, EventFilter) line: 178
Dialog$1.run() line: 1046
Dialog$3.run() line: 1098
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
ProjectGUI$URLDialog(Dialog).show() line: 1096
ProjectGUI$URLDialog(Component).show(boolean) line: 1584
ProjectGUI$URLDialog(Component).setVisible(boolean) line: 1536
ProjectGUI$URLDialog(Window).setVisible(boolean) line: 842
ProjectGUI$URLDialog(Dialog).setVisible(boolean) line: 986
ProjectGUI.popupURLChooser() line: 643
SourceFilesManagement$AddN3URLAction.actionPerformed(ActionEvent) line: 242
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) line: 1995
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 387
DefaultButtonModel.setPressed(boolean) line: 242
BasicButtonListener.mouseReleased(MouseEvent) line: 236
AWTEventMulticaster.mouseReleased(MouseEvent) line: 272
JToolBar$1(Component).processMouseEvent(MouseEvent) line: 6288
JToolBar$1(JComponent).processMouseEvent(MouseEvent) line: 3267
JToolBar$1(Component).processEvent(AWTEvent) line: 6053
JToolBar$1(Container).processEvent(AWTEvent) line: 2041
JToolBar$1(Component).dispatchEventImpl(AWTEvent) line: 4651
JToolBar$1(Container).dispatchEventImpl(AWTEvent) line: 2099
JToolBar$1(Component).dispatchEvent(AWTEvent) line: 4481
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4577
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4238
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4168
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2085
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2478
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4481
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 643
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84
EventQueue$1.run() line: 602
EventQueue$1.run() line: 600
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 98
EventQueue$2.run() line: 616
EventQueue$2.run() line: 614
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
EventQueue.dispatchEvent(AWTEvent) line: 613
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174
EventDispatchThread.pumpEvents(int, Conditional) line: 169
EventDispatchThread.pumpEvents(Conditional) line: 161
EventDispatchThread.run() line: 122

Trying ckan.net with EulerGUI

http://ckan.net/package?q=plants : 17 responses , but not all botany, because of words synonymy

<jmvanel__> there is an API :) to ckan

btw that's the kind of test you could do with EG ; EG is also a general purpose semweb tool ( I should avertise this more )(

back to kcan )

<jmvanel__> I tried to open one linked data in EG : http://ckan.net/package/taxonconcept ; this is view as web page in the Web browser ;

<jmvanel__> and I hoped that with EG accept-content headers I would get N3 / RDF

<jmvanel__> ok , that also what EG does

<jmvanel__> and IT WORKS !!

( started grahpviz on http://ckan.net/package/taxonconcept in EG ; run since minutes :(( )

( EG use with LOD : tried "add refered ontologies to current project", but to visible effect , and no log :(( )

( EG use with LOD : the interesting triple in http://ckan.net/package/taxonconcept is : <http://ckan.net/package/taxonconcept> void:sparqlEndpoint <http://lsd.taxonconcept.org/sparql>

Could be a nice feature for EG to record all void:sparqlEndpoint triples , and reuse them endpoints in the SPARQRL feature

( EG use with LOD : tried in the editor : control A ; edit / text / format paragraph ==> it adds eol's after column 80 , and it DOES touch strings :(((

another irritating bug in EG : the default dir for saving is ..

Analysis of the proof vocabulary

The proof vocabulary is in http://www.w3.org/2000/10/swap/reason# .

The EulerGUI project eulergui/examples/proofVerbalization.n3p is an example of both proof explanation and XHTML generation.

Structure of the RDF graph of a proof explanation

A r:Proof has r:component's ; and r:gives some triples.

The r:component's typically are r:Inference; which r:gives some triples for conclusion; and has r:evidence's.

The r:evidence's is rdf:List whose elements are either r:Extraction (i.e. simple extraction from the facts and rules), or r:Inference, or r:binding

, or r:rule .

An r:Extraction has a property r:because which is a r:Parsing , having a r:source which is the URI of the N3 source.

A r:binding has a r:variable, that has an n3:uri ( a string like "http://localhost/var#x3" ), a r:boundTo property which represents the value , and has an n3:uri .

An r:rule is an r:Extraction , that has an r:gives property (the rule N3 text), etc.

Here is the proof explanation in the above project ; to obtain it, uncheck the box near the post-processing project button. The output of the original project is an XHTML document as a string.

[ a r:Proof, r:Conjunction;
 r:component [ a r:Inference; r:gives {:Davis :connected :Hancock}; r:evidence (
  [ a r:Extraction; r:gives {:Davis :connected :Hancock}; r:because [ a r:Parsing; r:source </media/bd003f3b-ff18-4655-91dc-e014b/home/jmv/src/eulergui/examples/transitiveProp.n3>]]);
  r:binding [ r:variable [ n3:uri "http://localhost/var#x0"]; r:boundTo [ n3:uri "http://example.com#Davis"]];
  r:rule [ a r:Extraction; r:gives {@forAll var:x0. {var:x0 :connected :Hancock} => {var:x0 :connected :Hancock}}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp-query.n3>]]];

 r:component [ a r:Inference; r:gives {:Parker :connected :Hancock}; r:evidence (
  [ a r:Inference; r:gives {:Parker :connected :Hancock}; r:evidence (
   [ a r:Extraction; r:gives {:connected a owl:TransitiveProperty}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]
   [ a r:Extraction; r:gives {:Parker :connected :Davis}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]
   [ a r:Extraction; r:gives {:Davis :connected :Hancock}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]);
   r:binding [ r:variable [ n3:uri "http://localhost/var#x0"]; r:boundTo [ n3:uri "http://example.com#connected"]];
   r:binding [ r:variable [ n3:uri "http://localhost/var#x1"]; r:boundTo [ n3:uri "http://example.com#Parker"]];
   r:binding [ r:variable [ n3:uri "http://localhost/var#x2"]; r:boundTo [ n3:uri "http://example.com#Davis"]];
   r:binding [ r:variable [ n3:uri "http://localhost/var#x3"]; r:boundTo [ n3:uri "http://example.com#Hancock"]];
   r:rule [ a r:Extraction; r:gives {@forAll var:x0, var:x1, var:x2, var:x3. {var:x0 a owl:TransitiveProperty.
    var:x1 var:x0 var:x2.
    var:x2 var:x0 var:x3} => {var:x1 var:x0 var:x3}}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]]);
  r:binding [ r:variable [ n3:uri "http://localhost/var#x0"]; r:boundTo [ n3:uri "http://example.com#Parker"]];
  r:rule [ a r:Extraction; r:gives {@forAll var:x0. {var:x0 :connected :Hancock} => {var:x0 :connected :Hancock}}; r:because [ a r:Parsing; r:source </media/bd003f3b-/home/jmv/src/eulergui/examples/transitiveProp-query.n3>]]];

 r:gives {
  :Davis :connected :Hancock.
  :Parker :connected :Hancock.
 }].

2011-08-14

EulerGUI : NullPointerException on N3 query

ATTENTION: RulebaseStatistics: Packages: 1, Rules: 6
Exception in thread "doN3SourceAdded: transitiveProp-query.n3" java.lang.RuntimeException: Erreur pendant re-parsing N3 source "transitiveProp-query.n3"
        at eulergui.project.N3Source.manageParseN3(N3Source.java:401)
        at eulergui.project.N3Source.update(N3Source.java:370)
        at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:102)
        at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)
Caused by: java.lang.NullPointerException
        at net.sf.parser4j.parser.service.ParseStackAction.reduce(ParseStackAction.java:226)
        at net.sf.parser4j.parser.service.Parser.matchManagement(Parser.java:1033)
        at net.sf.parser4j.parser.service.Parser.checkForMatch(Parser.java:926)
        at net.sf.parser4j.parser.service.Parser.parse(Parser.java:286)
        at eulergui.parser.n3.impl.parser4j.service.N3Parser.parseN3(N3Parser.java:177)
        at eulergui.drools_engine.ParserLink.doParse(ParserLink.java:131)
        at eulergui.drools_engine.ParserLink.parse(ParserLink.java:109)
        at eulergui.project.N3Source.doParseN3(N3Source.java:444)
        at eulergui.project.N3Source.manageParseN3(N3Source.java:392)
        ... 3 more

UPDATED eulergui/examples/proofVerbalization.n3p , as an example of both proof explanation and XHTML generation

uploaded EulerGUI snapshot

--strings Dump :s to stdout ordered by :k whereever { :k log:outputString :s }

<rszeno> euler have problem with n3 sets notation

<rszeno> i guess cwm have a minor problem too, a bug

    @prefix : <#> . 
    # :a :b ($ :c :d :c $) .
    # cwm bug?, must be $) instead of )
    :a :b ($ :c :d :c ) .
    :e :f {$ :g, :h, :g $} .     
    # euler fail for both

<jmvanel_> my plans for today : 1) update string generation example since Jos implemented --strings CWM argument ;

<jmvanel_> 2) fix form generator customized example deductions/n3_nojs/person-app.n3p

<jmvanel_> 3) read KADS hidden in the middle of the park , to get a chance to also see birds

<jmvanel_> tomorrow : read some of ward and tqm , redefine std* in EG , mail to ACE list about lexicons

Martin Ward and fme ( FermaT Maintenance Environment)

<rszeno> short story, :)

<rszeno> my problem with wsl: in order to use it i need to do one of:

<rszeno> 1. convert existing soft manualy to wsl

<rszeno> 2. build a parser and logic to extract and convert soft to wsl

<rszeno> both are unpractical

<rszeno> martin ward extend Hoare, Hoare extend Floyd, best reading in reverse order

<jmvanel_> thanks for the 3 downloads

<rszeno> you probably need, if you want, all ward thesis

<jmvanel_> it's strange that ward does not provide some tools to convert one of the well know languages ( or subset ) to WSL .

<jmvanel_> wsl looks like assemby language

<rszeno> he generate software wsl to scheme

<jmvanel_> ( opened fme )

<rszeno> are control structure only

<rszeno> the 4 from floyd, start, halt, branch ( if) and join control

<rszeno> but with extended syntax for while ....

<rszeno> look ugly because of upper case letters, :)

<rszeno> this is the thesis page http://www.cse.dmu.ac.uk/~mward/martin/thesis/index.html

jdk1.7.0 is NOT compatible with EG, because of Drools.

And I should upgrade Drools from 5.1.1 to 5.2.0FINAL, but there are undefined problems :(

I read the page where Oracle tries to reassure open source guys http://openjdk.java.net/faq/

Openjdk 7 will be available in Ubuntu 11.10

Now I donwload Java SE 7 JDK from Oracle

2011-08-12

<rszeno> i think i found something interesting, yesterday when i search for Meta II

<rszeno> http://www.bayfronttechnologies.com/l02draco.htm

<rszeno> http://www.cse.dmu.ac.uk/~mward/martin/papers/

<rszeno> both, Neighbors James and Martin Ward have interesting Phd thesis

<rszeno> there are some pdf on both pages

<rszeno> Martin Ward have some tools, fermat3 and fme

<rszeno> fme is in java, fermat in perl+scheme, scm

<rszeno> i tried the demos for fermat3 and fme

http://nltk.googlecode.com/svn/trunk/doc/book/ch02.html

##nlp

<jmvanel> Is there an english linguistic resource to get these word categories : non-human, human, masculine, feminine ?

( preferably within nltk )

2011-08-11

Search DBPedia for algorithms

TODO

2011-08-10

http://www.upriss.org.uk/fca/fcademo.html

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

<jmvanel> Anyway , if you like the idea of writing some domain analysis in english, I volunteer to translate your prose in ACE :)

<rszeno> i will try, :)

<jmvanel> that can be the start of new intelligent behiavor in your applications , and on my side that's a way of testing my services to customers.

Professor George F. Luger

http://www.cs.unm.edu/~luger/

With this command I can start at once the program, provided the debugger has been started in eclipse (which has connection type = socket listen ) :

java -Xdebug -Xrunjdwp:transport=dt_socket,address="8000" -jar $HOME/.m2/repository/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar examples/BloodPressure.n3p

--- pom.xml     (révision 2103)
+++ pom.xml     (révision 2096)
@@ -508,7 +508,7 @@
       <!-- artifactId>parser</artifactId -->
       <artifactId>all</artifactId>
       <!--version>beta4</version-->
-      <version>trunk2</version>
+      <version>trunk</version>
     </dependency>

2011-08-09

update N3; PARSE ERROR in file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui/examples/catch_allQ.n3 ( /media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui/examples/catch_allQ.n3 ) 
Erreur pendant re-parsing N3 source "catch_allQ.n3"
eulergui.project.N3Source.manageParseN3(N3Source.java:401)
eulergui.project.N3Source.update(N3Source.java:370)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:102)
eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)

Cause:
file:/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/eulergui/examples/catch_allQ.n3
n3_project.exceptions.parser.ParsingException: Last character read : " " on line 1
Expecting one of these :

eulergui.drools_engine.ParserLink.parse(ParserLink.java:117)
eulergui.project.N3Source.doParseN3(N3Source.java:444)
eulergui.project.N3Source.manageParseN3(N3Source.java:392)
eulergui.project.N3Source.update(N3Source.java:370)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:102)
eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)

alias cwm=/media/bd003f3b-ff18-4655-91dc-e014ba1af42e/home/jmv/src/swap/2000/10/swap//cwm.py

if( ! inferenceEngineFactory.isInstalled() ) setEnabled(false);

Euler : working on formatting with rules: proof explanation

COMMIT: examples : update proofVerbalization.n3p ( generation of XHTML from Euler proof explanation )

# TODO somehow we need to output a pure string out of Euler : send a mail to Jos to ask for --strings options of CWM

[ a r:Proof, r:Conjunction;
 r:component [ a r:Inference; r:gives {:Davis :connected :Hancock}; r:evidence (
  [ a r:Extraction; r:gives {:Davis :connected :Hancock}; r:because [ a r:Parsing; r:source </media/bd003f3b-ff18-4655-91dc-e014b/home/jmv/src/eulergui/examples/transitiveProp.n3>]]);
  r:binding [ r:variable [ n3:uri "http://localhost/var#x0"]; r:boundTo [ n3:uri "http://example.com#Davis"]];
  r:rule [ a r:Extraction; r:gives {@forAll var:x0. {var:x0 :connected :Hancock} => {var:x0 :connected :Hancock}}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp-query.n3>]]];

 r:component [ a r:Inference; r:gives {:Parker :connected :Hancock}; r:evidence (
  [ a r:Inference; r:gives {:Parker :connected :Hancock}; r:evidence (
   [ a r:Extraction; r:gives {:connected a owl:TransitiveProperty}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]
   [ a r:Extraction; r:gives {:Parker :connected :Davis}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]
   [ a r:Extraction; r:gives {:Davis :connected :Hancock}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]);
   r:binding [ r:variable [ n3:uri "http://localhost/var#x0"]; r:boundTo [ n3:uri "http://example.com#connected"]];
   r:binding [ r:variable [ n3:uri "http://localhost/var#x1"]; r:boundTo [ n3:uri "http://example.com#Parker"]];
   r:binding [ r:variable [ n3:uri "http://localhost/var#x2"]; r:boundTo [ n3:uri "http://example.com#Davis"]];
   r:binding [ r:variable [ n3:uri "http://localhost/var#x3"]; r:boundTo [ n3:uri "http://example.com#Hancock"]];
   r:rule [ a r:Extraction; r:gives {@forAll var:x0, var:x1, var:x2, var:x3. {var:x0 a owl:TransitiveProperty.
    var:x1 var:x0 var:x2.
    var:x2 var:x0 var:x3} => {var:x1 var:x0 var:x3}}; r:because [ a r:Parsing; r:source </home/jmv/src/eulergui/examples/transitiveProp.n3>]]]);
  r:binding [ r:variable [ n3:uri "http://localhost/var#x0"]; r:boundTo [ n3:uri "http://example.com#Parker"]];
  r:rule [ a r:Extraction; r:gives {@forAll var:x0. {var:x0 :connected :Hancock} => {var:x0 :connected :Hancock}}; r:because [ a r:Parsing; r:source </media/bd003f3b-/home/jmv/src/eulergui/examples/transitiveProp-query.n3>]]];

 r:gives {
  :Davis :connected :Hancock.
  :Parker :connected :Hancock.
 }].

2011-08-07

ACE was started as a pure logical and linguistic framework. Then a bridge to OWL+rules was added. But the core of Semantic Web is not OWL!

Its is RDF.

In fact there are many people who work in the field of Semantic Web for exploiting or leveraging data; and these data are RDF, often queryable in SPARQL.

movement called Linked Open Data, trying tp bring every valuable data on earth into RDF.

ACE core is stiil not

propose an N3 format for ACE lexica, leveraging on RDFS/OWL; there will be importers for plain RDFS/OWL ontologies that will

How to add datatype properties to ACE ?

Ask on ##nlp : Are there RDF vocabularies for NLP ?

Wordnet stuff

The french wordnet from INRIA is not in the Global Wordnet Grid

http://www.globalwordnet.org/gwa/gwa_grid.htm

Saw this in WordNet new:

At long last, WordNet 3.1 is up on the web interface. Updated database files will be coming soon. Watch this space! (6/11)

WordNet lexicon for Attempto

How to get verb transitivity from WordNet frames ?

NLTK WordNet HOWTO

NLTK book chapter 2 ""

http://nltk.googlecode.com/svn/trunk/doc/book/ch02.html

##nlp IRC

<jmvanel> Is there an english linguistic resource to get these word categories : non-human, human, masculine, feminine ?

( preferably within nltk )

2011-08-06

2011-08-05

Working with formal english:

0) just think out loud and write it

1) get the syntax right

2) ensure with paraphrase that the semantics is what is intented

3) check vocabulary coherence and check for synomyms, generalisations

4) try to align properties and classes with a well known ontology (FOAF, DC, etc)

5) write a test with EulerGUI to check the desired inferences

6) design the applicative architecture (choose inference engine, populate the user RDF graph, extract inferences or set callback/listeners, ...)

7) write applicative test

8) implement the bridges between rule base and platform services ( database, GUI, network, etc )

Remarks

genenerally, you would separe business logic and applicative logic ( what to show and ask to user and when )

WordNet lexicon for Attempto

limitations

2011-08-03

http://text-processing.com/demo/tokenize/

2011-08-02

http://gate.ac.uk/overview.html

Overview of noun water

The noun water has 6 senses (first 4 from tagged texts)

1. (136) water, H2O -- (binary compound that occurs at room temperature as a clear colorless odorless tasteless liquid; freezes into ice below 0 degrees centigrade and boils above 100 degrees centigrade; widely used as a solvent)

2. (41) body of water, water -- (the part of the earth's surface covered with water (such as a river or lake or ocean); "they invaded our territorial waters"; "they were sitting by the water's edge")

3. (2) water -- (once thought to be one of four elements composing the universe (Empedocles))

4. (2) water system, water supply, water -- (a facility that provides a source of water; "the town debated the purification of the water supply"; "first you have to cut off the water")

5. urine, piss, pee, piddle, weewee, water -- (liquid excretory product; "there was blood in his urine"; "the child had to make water")

6. water -- (a liquid necessary for the life of most animals and plants; "he asked for a drink of water")

So the first sense is not the one most "important"; it is the sixth sense in my opinion.

Now let's look at the "inheritance" structure of the sixth sense :

% wn water -hypen -n6 

Synonyms/Hypernyms (Ordered by Estimated Frequency) of noun water

Sense 6
water
       => liquid
           => fluid
               => substance
                   => matter
                       => physical entity
                           => entity
                   => part, portion, component part, component, constituent
                       => relation
                           => abstraction, abstract entity
                               => entity
       => food, nutrient
           => substance
               => matter
                   => physical entity
                       => entity
       => nutrient
           => substance
               => matter
                   => physical entity
                       => entity

I hope that this synset corresponds (enough !) the Attempto notions of mass noun:

In [78]: wn.synset('matter.n.03').definition
Out[78]: 'that which has mass and occupies space'

Why is it so ? bug or feature ?

In [92]: wn.synset('topic.n.02') == wn.synset('matter.n.03')
Out[92]: False

Understanding Python's "with" statement

<jmvanel_> I'm hoping to make something usable for people like you

<jmvanel_> it's just a matter of having the critic mass ( users providing feedback ==> enhancement ==> more users )

* danbri suggests a super-quick-start guide showing simplest useful use case

<danbri> and have sensible defaults everywhere! the app offers lots of choice ( = complexity)

<danbri> if it can't find "Cwm", ... it shouldn't offer a Cwm option, etc

<jmvanel_> sure

<jmvanel_> I added the "piping" screenshot in the doc : http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html#L1200

2011-08-01

NelleV kindly did a bug report for me on ipython: https://github.com/ipython/ipython/issues/651

WordNet lexicon for Attempto

Installed PyDev in eclipse

noun_mass

http://www.nltk.org/getting-started

nltk howto/wordnet

http://attempto.ifi.uzh.ch/site/docs/ace_lexicon.html

2011-07-31

Error when refreshing or opening examples/dbpedia_classes.sparql
N3SourceFromSPARQLSource.doUpdate(): file:/home/jmv/src/eulergui_new/examples/dbpedia_classes.sparql ; http://dbpedia.org/sparql
eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:81)
eulergui.inputs.N3SourceFromSPARQLSource.getLocalN3(N3SourceFromSPARQLSource.java:91)
eulergui.project.N3Source.getFileName(N3Source.java:736)
n3_project.EditorManagement.fileToOpen(EditorManagement.java:79)
n3_project.EditorManagement.doOpenEditor(EditorManagement.java:98)
n3_project.EditorManagement.reallyDoOpenEditor(EditorManagement.java:72)
n3_project.EditorManagement$1.actionPerformed(EditorManagement.java:41)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

Cause:
HttpException: HttpException: 500 SPARQL Request Failed: HttpException: 500 SPARQL Request Failed
com.hp.hpl.jena.sparql.engine.http.HttpQuery.execCommon(HttpQuery.java:350)
com.hp.hpl.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:189)
com.hp.hpl.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:144)
com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execModel(QueryEngineHTTP.java:168)
com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execConstruct(QueryEngineHTTP.java:158)
com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execConstruct(QueryEngineHTTP.java:156)
n3_project.SPARQLToN3Converter.doQuery(SPARQLToN3Converter.java:72)
eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:73)
eulergui.inputs.N3SourceFromSPARQLSource.getLocalN3(N3SourceFromSPARQLSource.java:91)
eulergui.project.N3Source.getFileName(N3Source.java:736)

Querying DBPedia with EulerGUI

Reference: SPARQL queries as N3 sources in EulerGUI Manual

Work on classes

At first I tried the default query on the DBPedia URI (http://dbpedia.org/sparql) , with a web browser :

select distinct ?Concept where {[] a ?Concept}

Then I wrote the equivalent CONSTRUCT query :

CONSTRUCT {
  ?C a ?Concept 
} where {
  ?C a ?Concept
}

Alas, this does not work :

Virtuoso S1T00 Error SR171: Transaction timed out

I retried with an extended query and 300 000 ms timeout :

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
CONSTRUCT {
  ?C rdfs:subClassOf ?SUPER.
} where {
  ?C a ?Concept.
  ?C rdfs:subClassOf ?SUPER.
}

... and ... IT WORKS ! in one second . So it appears that the original query was too general for Virtuoso to optimize it. This is not the subject matter, so let me return to the original subject of exploring DBPedia with EulerGUI.

Note that this query does not bring the top level classes. An elegant way to do that is, assuming that each class has at least one label or other documentation property:

CONSTRUCT {
  ?Concept ?P ?O.
} where {
  ?C a ?Concept.
  ?Concept ?P ?O.
}

However, Virtuoso does not like this elegance and (on the web interface) says:

Virtuoso 37000 Error SP031: SPARQL compiler: Variable 'Concept' is used in the query result set but not assigned

Unchecking "Rigorous check of the query" does not bring an answer with the web interface, because of timeout.

Anyway, these queries allows to build the class tree in EulerGUI (click on "launch OWL reasonner" in tools menu). One can see that the Wikipedia ontology has 2837 classes. The classes are taken from OpenCyc, Sumo, Umbel, and certainly others. The level of generality (granularity) varies greatly. It's obviously an ontology made of bits and pieces ( "faite de bric et de broc"@fr ).

This variant brings labels and comments if present, but still does not give the top level classes:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
CONSTRUCT {
  ?C rdfs:subClassOf ?SUPER;
     rdfs:label ?L;
     rdfs:comment ?COM.
} where {
  ?C a ?Concept.
  ?C rdfs:subClassOf ?SUPER # cannot be OPTIONAL
  OPTIONAL { ?C rdfs:label ?L }
  OPTIONAL { ?C rdfs:comment ?COM }
}

This variant supposes that all classes are declared as OWL classes, which may not be the case on some serveurs:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
CONSTRUCT {
  ?C rdfs:subClassOf ?SUPER;
     rdfs:label ?L;
     rdfs:comment ?COM.
} where {
  ?Concept a owl:Class.
  ?C rdfs:subClassOf ?SUPER # cannot be OPTIONAL
  OPTIONAL { ?C rdfs:label ?L }
  OPTIONAL { ?C rdfs:comment ?COM }
}

Work on properties

Get list of all properties in DBPedia

with SPARQL select query :

SELECT DISTINCT ?P WHERE {?S ?P ?O}

with N3 query:

:d eu:findall ( ?P {?S ?P ?O} ?PLIST ).

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
CONSTRUCT {
  ?P a rdfs:Property.
} where {
  ?P a rdfs:Property.
}

empty result !

PREFIX owl: <http://www.w3.org/2002/07/owl#>
CONSTRUCT {
  ?P a owl:DatatypeProperty.
} where {
  ?P a owl:DatatypeProperty.
}

736 lines

PREFIX owl: <http://www.w3.org/2002/07/owl#>
CONSTRUCT {
  ?P a owl:ObjectProperty.
} where {
  ?P a owl:ObjectProperty.
}

632 lines

How to do logical or with SPARQL ? With UNION or OPTIONAL . So here is a way to combine the two preceding queries :

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
CONSTRUCT {
  ?P a rdfs:Property.
} where {
  { ?P a owl:ObjectProperty } UNION
  { ?P a owl:DatatypeProperty }
}

1365 lines.

Work on individuals

Get list of all properties for a specific individual; this SPARQL query outputs all triples about an URI (DBpedia: Buddy_Guy) and the rdfs:label on properties used:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbpedia: <http://dbpedia.org/resource/>

CONSTRUCT {
  dbpedia:Buddy_Guy ?p ?v .
  ?p rdfs:label ?pname .
  ?p rdfs:comment ?pcomment .
}
WHERE {
  dbpedia:Buddy_Guy ?p ?v .
  OPTIONAL { ?p rdfs:label ?pname }
  OPTIONAL { ?p rdfs:comment ?pcomment }
}

--------------------------------------------------------------------------------------

WIP

2011-07-30

EulerGUI bug: adding a new SPARQL query to a project

Exception that should be caught, when a SPARQL source is created, but no endpoint yet :

30 juil. 2011 15:30:42 n3_project.SPARQLToN3Converter doQuery
INFO: 
No dataset description for query
Exception in thread "doN3SourceAdded: file:/home/jmv/src/eulergui_new/examples/dbpedia_classes.sparql" java.lang.RuntimeException: N3SourceFromSPARQLSource.doUpdate(): file:/home/jmv/src/eulergui_new/examples/dbpedia_classes.sparql ; 
at eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:81)
at eulergui.project.N3Source.update(N3Source.java:369)
at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:102)
at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:40)
Caused by: com.hp.hpl.jena.query.QueryExecException: No dataset description for query
at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.prepareDataset(QueryExecutionBase.java:471)
at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionBase.java:416)
at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(QueryExecutionBase.java:400)
at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execConstruct(QueryExecutionBase.java:151)
at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execConstruct(QueryExecutionBase.java:141)
at n3_project.SPARQLToN3Converter.doQuery(SPARQLToN3Converter.java:72)
at eulergui.inputs.N3SourceFromSPARQLSource.doUpdate(N3SourceFromSPARQLSource.java:73)

Stack when adding a new SPARQL query to a project:

Thread [doN3SourceAdded: null] (Suspended (exception NullPointerException))
StringTokenizer.<init>(String, String, boolean) line: 182
StringTokenizer.<init>(String, String) line: 204
StringHelper.subStringAfterLastSlash(String) line: 145
N3SourceFromSPARQLSource(N3Source).makeLocalN3File() line: 683
N3SourceFromSPARQLSource(N3Source).convertToN3() line: 461
N3Source.manageN3Cache(N3Source) line: 538
IOManager.getLocalCache(N3Source) line: 143
N3SourceFromSPARQLSource(N3Source).getLocalCache() line: 675
N3SourceFromSPARQLSource(N3Source).getLocalN3() line: 671
N3SourceFromSPARQLSource.doUpdate() line: 73
N3SourceFromSPARQLSource(N3Source).update() line: 369
N3ConversionRefesher.updateN3(N3Source) line: 102
UpdateN3Thread.run() line: 40

Root cause: field uri_ in N3SourceFromSPARQLSource was not set.

------------------------------

Thread [AWT-EventQueue-0] (Suspended (exception RuntimeException))
YearDV(AbstractDateTimeDV).getTimeZone(String, AbstractDateTimeDV$DateTimeData, int, int) line: not available
YearDV.parse(String) line: not available
YearDV.getActualValue(String, ValidationContext) line: not available
XSSimpleTypeDecl.getActualValue(Object, ValidationContext, ValidatedInfo, boolean) line: not available
XSSimpleTypeDecl.validate(String, ValidationContext, ValidatedInfo) line: not available
XSDYearType(XSDDatatype).parse(String) line: 249
LiteralLabelImpl.setValue(String) line: 201
LiteralLabelImpl.setLiteralLabel_1(String, String, RDFDatatype) line: 95
LiteralLabelImpl.<init>(String, String, RDFDatatype) line: 84
LiteralLabelFactory.createLiteralLabel(String, String, RDFDatatype) line: 16
Node.createLiteral(String, String, RDFDatatype) line: 91
XMLInputStAX$ResultSetStAX.getOneSolution() line: 470
XMLInputStAX$ResultSetStAX.hasNext() line: 217
SPARQLToN3Converter.doSelectQuery(Query, URL, String) line: 146
N3SourceFromSPARQLSource.doUpdate() line: 67
N3SourceFromSPARQLSource.getLocalN3() line: 91
N3SourceFromSPARQLSource(N3Source).getFileName() line: 736
ProjectGUI.manageLastFile() line: 783
ProjectGUI.setProject(Project) line: 777
ProjectFileManagement$OpenProjectAction.actionPerformed(ActionEvent) line: 535
JMenu$1(AbstractButton).fireActionPerformed(ActionEvent) line: 1995
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 387
DefaultButtonModel.setPressed(boolean) line: 242
JMenu$1(AbstractButton).doClick(int) line: 357
BasicMenuItemUI.doClick(MenuSelectionManager) line: 809
BasicPopupMenuUI$Actions.doReturn() line: 429
BasicPopupMenuUI$Actions.actionPerformed(ActionEvent) line: 403
SwingUtilities.notifyAction(Action, KeyStroke, KeyEvent, Object, int) line: 1639
JRootPane(JComponent).processKeyBinding(KeyStroke, KeyEvent, int, boolean) line: 2851
KeyboardManager.fireBinding(JComponent, KeyStroke, KeyEvent, boolean) line: 267
KeyboardManager.fireKeyboardAction(KeyEvent, boolean, Container) line: 216
JComponent.processKeyBindingsForAllComponents(KeyEvent, Container, boolean) line: 2928
JRootPane(JComponent).processKeyBindings(KeyEvent, boolean) line: 2920
JRootPane(JComponent).processKeyEvent(KeyEvent) line: 2814
JRootPane(Component).processEvent(AWTEvent) line: 6065
JRootPane(Container).processEvent(AWTEvent) line: 2041
JRootPane(Component).dispatchEventImpl(AWTEvent) line: 4651
JRootPane(Container).dispatchEventImpl(AWTEvent) line: 2099
JRootPane(Component).dispatchEvent(AWTEvent) line: 4481
DefaultKeyboardFocusManager(KeyboardFocusManager).redispatchEvent(Component, AWTEvent) line: 1850
DefaultKeyboardFocusManager.dispatchKeyEvent(KeyEvent) line: 712
DefaultKeyboardFocusManager.preDispatchKeyEvent(KeyEvent) line: 990
DefaultKeyboardFocusManager.typeAheadAssertions(Component, AWTEvent) line: 855
DefaultKeyboardFocusManager.dispatchEvent(AWTEvent) line: 676
ProjectGUI(Component).dispatchEventImpl(AWTEvent) line: 4523
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2099
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2478
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4481
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 643
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84
EventQueue$1.run() line: 602
EventQueue$1.run() line: 600
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 98
EventQueue$2.run() line: 616
EventQueue$2.run() line: 614
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87
EventQueue.dispatchEvent(AWTEvent) line: 613
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174
EventDispatchThread.pumpEvents(int, Conditional) line: 169
EventDispatchThread.pumpEvents(Conditional) line: 161
EventDispatchThread.run() line: 122

After saving a SPARQL query just created:

null
eulergui.gui.controller.ProjectGUI_Updater.findButtonsForN3Source(ProjectGUI_Updater.java:124)
eulergui.gui.controller.ProjectGUI_Updater.n3SourceChanged(ProjectGUI_Updater.java:204)
eulergui.project.ProjectChangeSupport.fireN3SourceChanged(ProjectChangeSupport.java:145)
eulergui.project.Project.fireN3SourceChanged(Project.java:1387)
eulergui.infrastructure.URIModificationChecker.checkN3Source(URIModificationChecker.java:90)
eulergui.infrastructure.URIModificationChecker.run(URIModificationChecker.java:62)
java.lang.Thread.run(Thread.java:662)

Cause:

2011-07-20

Now watching this parser in OCAML for ACE Attempto : https://github.com/ontologiae/DRS-Analysis-Tool

GIT self training on sulci

After reading http://cworth.org/hgbook-git/tour/ , I cleaned my bad merge this way :

cd ~/src/sulci_jmvanel/
git fetch origin
git reset --hard origin

( following this advice : http://stackoverflow.com/questions/101752/aborting-a-merge-in-git )

Now , after reading this http://stackoverflow.com/questions/4169832/update-my-github-repo-which-is-forked-out-from-another-project, I did:

cd ../sulci
git pull
cd ../sulci_jmvanel
git pull ../sulci

So , I know that ../sulci is the "parent" from which sulci_jmvanel has been cloned, but it's not the origin that git knows; the origin is

the github remote depot of it .

2011-07-19

To restrict the discussion, it's about the ACE core, not the User Input projects (ACE View, ACEWiki, etc).

"attempto" <attempto@lists.ifi.uzh.ch>, jean.philippe.fauconnier@gmail.com, "Pierre-Alexandre Voye" <ontologiae@gmail.com>, "Olivier Cayrol" <Olivier.Cayrol@logilab.fr>,

Attempto lexicons

I think that the most important missing features in ACE are related to lexicons. There are several issues. The first is that there are several formats for ACE lexicons : one on core ACE, one in ACEWiki, another within OWL files in ACEView.

The second is that currently available lexicons are quite small.

I have 2 proposals for that.

I can start from this word list available on Linux (Ubuntu) :

/usr/share/dict/american-english

It's a plain word list with 1 word per line. For example it has both "studies" and "study" .

Then, for each word, I can use WordNet Lemmatizer in NLTK [1] to lemmatize it (that is, associate "studies" to "study" ). Each such pair will be added to an associative array. After processing the file this way, it's esay to output the lexixon formats for ACE tools. The WordNet API in NLTK will also be used to find out if it's a noun or a verb.

Example of using NLTK for lemmatization

import nltk
nltk.download()
wordnet
from nltk.stem.wordnet import WordNetLemmatizer
lmtzr = WordNetLemmatizer()
lmtzr.lemmatize('cars')


The 2nd proposal is to reuse OWL ontologies to obtain ACE lexicons. That will be in another mail ...

[1] NLTK Natural Language Toolkit - http://www.nltk.org/

Attempto and Semantic Web 1 - lexixons and OWL ontologies

ontologies in the broad sense should be reusable with Attempto. The motivation is that today a knowledge is not built in isolation anymore. Rather, for interoperability and ease of development, well established and good quality domain ontologies are used as starting point.

These

The passive can be the regular form, e.g. :

Attempto foaf-fundedBy EEC .

Even NL sentences have to refer to non-ambiguous word senses .

This is what I try to explain here ( in french :( ) :

http://jmvanel.free.fr/ai/comprehension-sans-protocole.html

Attempto is not enough, the word senses must be disambiguated as I said above.

This can be added quite easily to Attempto by RDF/N3 prefixed URI 's like foaf:Agent in this example :

Every foaf:Person is a foaf:Agent .

which is not accepted today by Attempto . But this is correct Attempto :

Every foaf-Person is a foaf-Agent .

foaf:Agent is a concept well defined by an ontology ( http://xmlns.com/foaf/spec/ ) , and moreover this FOAF ontology is widely used, which is good for interoperability, even without prior protocols or conventions.

Attempto and Semantic Web 2 - lexixons and OWL ontologies

templates

"man" has-plural "men".

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

Attempto and building software applications

2011-07-18

http://www.ibm.com/developerworks/aix/library/au-lsof.html

<sseehh_> https://twitter.com/#!/iamhelpingu my twitter bot

<jmvanel_> seen ; didn't know it's possible to do a twitter bot :)

2011-07-17

EulerGUI

Working on "Too many open files" issue

to run with remote debugger:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="8000" \
     -jar target/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar

So there are 2 errors : first a Jar URL should not be checked for modifications, second the stream is not closed :

Thread [modification Checker for user preferences] (Suspended (breakpoint at line 110 in FileInputStream))
FileInputStream.<init>(File) line: 110
FileInputStream.<init>(String) line: 79
FileURLConnection.connect() line: 70
FileURLConnection.initializeHeaders() line: 90
FileURLConnection.getHeaderField(String) line: 126
JarURLConnection.getHeaderField(String) line: 203
JarURLConnection(URLConnection).getHeaderFieldDate(String, long) line: 603
JarURLConnection(URLConnection).getLastModified() line: 532
URICacheImpl.getURITimeStamp(String, boolean) line: 97
URICacheImpl.getURITimeStamp(String) line: 76
N3Source.isURITimeStampUptodate() line: 490
URIModificationChecker.checkN3Source(N3Source) line: 88
URIModificationChecker.run() line: 62
Thread.run() line: 662

REMEDY :

URICacheImpl.getURITimeStamp(String uri) : when scheme equals "jar" , return 0 , as the jars are not supposed to change

TODO EulerGUI

in http://searchFromString40 at 5,50 thru 5,69: DefaultParseNodeInErrorStatus: no prefix for "owl:"
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: ParserLink.parse(): n3ParseResult.isInError: file:/tmp/eg-4829451876663415317.n3
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: ParserLink.parse(): LineNumber: -1
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception in thread "AWT-EventQueue-0" 
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.RuntimeException: ParsingException: N3 source:17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: @prefix : <http://jmvanel.free.fr/ontology/examples/person#>.
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: @prefix ded: <http://deductions.sf.net/owl/events#>.
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0: { owl:DatatypeProperty rdfs:label ?DETAIL } => { owl:DatatypeProperty rdfs:label ?DETAIL}.
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.project.Project.searchFromString(Project.java:1098)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.RDFTooltipsInEditor.getDetailsForResource(RDFTooltipsInEditor.java:105)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.RDFTooltipsInEditor.getLabelForResource(RDFTooltipsInEditor.java:126)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.RDFTooltipsInEditor.getFormattedDetailsForResource_old(RDFTooltipsInEditor.java:39)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor$5.getToolTipText_KB(TextEditor.java:582)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor$5.getToolTipText(TextEditor.java:550)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.gjt.sp.jedit.textarea.ExtensionManager.getToolTipText(ExtensionManager.java:135)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.gjt.sp.jedit.textarea.TextAreaPainter.getToolTipText(TextAreaPainter.java:663)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.ToolTipManager$insideTimerAction.actionPerformed(ToolTipManager.java:662)
17:08:54 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.Timer.fireActionPerformed(Timer.java:291)

Maven

Create a plain vanilla Maven project

jmvanel_> is there a command to create a plain vanilla Maven project ?

<whaley> jmvanel_: i always use `mvn archetype:generate`... the default value for archetype will give you a "vanilla" java project

Maven bug report (assembly)

bug report : jar-with-dependencies: class from the source in project does NOT override the class in jar dependency

When running plugin maven-assembly-plugin 2.2.1 with jar-with-dependencies, and there is a class C1 in src/main/java/ that overrides a class in some dependency, in the resulting XXX-jar-with-dependencies.jar the C1.class comes from the dependency, not from the source in project.

I would except the class from the source in project to override the corresponding class in jar dependency,

So the executable jar is not built correctly. This is particularly annoying, because the tests pass , but the executable jar is not correct.

You can see this in the test project attached, where I override class TestCase of JUnit , adding a main , and setting this overriden class as the main class :

% java -jar target/maven_bug_build_override_class-1.0-SNAPSHOT-jar-with-dependencies.jar
Exception in thread "main" java.lang.NoSuchMethodError: main

( the original class TestCase of JUnit has no main ).

Hack for EulerGUI snapshot (Maven issue)

The executable jar was corrupted at the stage of building, so the tests passed , but with the executable jar it was impossible to open the N3 editor .

A snapshot is uploading at the usual place : http://eulergui.sourceforge.net/tmp/

I had to apply this hack after mvn package :

cd target/classes
zip -r ../eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar .
cp ../eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar \
   ~/.m2/repository/eulergui/eulergui/1.9-SNAPSHOT/
cd ../..

2011-07-16

http://en.wikipedia.org/wiki/Unsolved_problems_in_artificial_intelligence redirects to AI-complete

<hivemind-sb> Title: AI-complete - Wikipedia, the free encyclopedia (at en.wikipedia.org)

<RandIter> there is also http://en.wikipedia.org/wiki/List_of_open_problems_in_computer_science

<hivemind-sb> Title: List of unsolved problems in computer science - Wikipedia, the free encyclopedia (at en.wikipedia.org)

<jmvanel_> Hi when running plugin maven-assembly-plugin 2.2.1 with jar-with-dependencies, there is a class in src/main/java/ that does NOT override the corresponding class in jar dependency,

jmv-desktop: ~/src/eulergui_new/ % egrep 'Adding archived file-set|jEdit.class' ~/Documents/bbkonsole_maven_build.txt
 ...
[DEBUG] Adding archived file-set in: /home/jmv/.m2/repository/org/jedit/jedit/4.3.1/jedit-4.3.1.jar to archive location: 
 ...
[DEBUG] Adding archived file-set in: /home/jmv/src/eulergui_new/target/eulergui-1.9-SNAPSHOT.jar to archive location: 
 ...
[INFO] org/gjt/sp/jedit/jEdit.class already added, skipping
[DEBUG] adding entry org/gjt/sp/jedit/jEdit.class
[INFO] org/gjt/sp/jedit/jEdit.class already added, skipping

16:56:33 [AWT-EventQueue-0] [message] Log: java.class.path=/home/jmv/.m2/repository/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception in thread "AWT-EventQueue-0" 
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.NoSuchMethodError: org.gjt.sp.jedit.jEdit.getView()Lorg/gjt/sp/jedit/View;
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor.displayEditor(TextEditor.java:293)
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement.openJavaEditor(EditorManagement.java:135)
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement.doOpenEditor(EditorManagement.java:104)
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement.reallyDoOpenEditor(EditorManagement.java:72)
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement$1.actionPerformed(EditorManagement.java:41)
16:56:33 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

Trying RatPoison

* #ratpoison :http://ratpoison.sourceforge.net

<jmvanel__> cthuluh, X: user not authorized to run the X server, aborting.

<cthuluh> 8)

<cthuluh> wait, are you trying this from within your current X session?

<jmvanel__> yes :( ; i shoulld use the functions keys to get a console

<cthuluh> perhaps startx -- :1 # would be enough

<jmvanel__> no, not enough

<cthuluh> ok then try it from a tty :)

<jmvanel> yeah !!!

<jmvanel> it works ; I did Control Alt F3 :) first

<cthuluh> cool. now you can enjoy the (almost too) rich interface of ratpoison!

<jmvanel> but It's not what I expected ... opened a terminal by control t c ; then in gnome terminal, I did File / open terminal ; but there is no tiling by ratpoison :( ; the original terminal still ocupies the whole screen

<jmvanel> also started xchat ; again it ocupies the whole screen

<cthuluh> sure

* necrodearia est parti (Ping timeout: 276 seconds)

<cthuluh> just split your screen

<jmvanel> how ?

<cthuluh> C-t ?

<jmvanel> thanks ; after typing several control alt FX , I lost every X server :(

<cthuluh> huhu

<cthuluh> your primary one is probably on tty7. the newest one is probably on tty8

<jmvanel> with Control Alt F8 I get my regular gnome environment ;

<jmvanel> but I lost ratpoison :(

<jmvanel> following your advice , I started ratp with startx -- :1

<cthuluh> hmmm. on debian, or on ubuntu?

<jmvanel> on ubuntu I try ratp ; on debian I chat with you on my laptop

<jmvanel> with Control Alt F7 I get OS start messages

<cthuluh> ah. beware of the great ubuntu gremlin

<jmvanel> :)

* necrodearia (~mizery@unaffiliated/necrodearia) a rejoint #ratpoison

<cthuluh> try ps aux | grep X

<cthuluh> it should give you the consoles on with X servers are running

<jmvanel> I 'm afraid I can't tame the gremlin

<cthuluh> then shred it ;)

<cthuluh> there's no reason for your ratpoison instance to disappear

<jmvanel> with Control Alt F3 I get the startx messages for ratp , but no graphical environment

<cthuluh> and with F9 ?

<jmvanel> yeah , fine !!!!!!!

<jmvanel> F9

<jmvanel> I'm reallly dumb with these keys

<cthuluh> 8)

<jmvanel> so, now I try control t 1 , 2 etc to switch windows

<jmvanel> it works , but NOT with the numbers in the number keys on ther right :(

<jmvanel> looks like a bug somewhere ...

<cthuluh> hmmm

<jmvanel> and how to tile my windows ?

<cthuluh> read again the topic: no handholding ;)

<cthuluh> I don't get your first question

<jmvanel> about the number keys ?

<cthuluh> the numeric keypad doesn't work?

<jmvanel> right

<cthuluh> is the led turned on, when you're in ratpoison?

<jmvanel> yes , and I use it always

<cthuluh> then I have no idea

<jmvanel> works fine in gnome

<cthuluh> well

<cthuluh> can you type numbers using it, in ratpoison?

<cthuluh> (start an xterm, type 123)

<jmvanel> the numeric keypad does work within rp , inside a terminal or xchat, but NOT with control t

<jmvanel> ( it' possible that ubuntu has an old version of rp )

<jmvanel> expreimented control t s :))

<jmvanel> How can I rremove Command

<jmvanel> Kill the current frame. This is a no-op if there is only one frame.un this :

<jmvanel> How can I run the remove Command ?

<jmvanel> I did Cntrl t cntrl k ; it closed the current frame , BUT its space is still occupied by a black zone that is unused by any remaining frame :(((

2011-07-15

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:12.267s
[INFO] Finished at: Fri Jul 15 19:44:33 CEST 2011

Upgrade Maven plugins to latest versions: maven-assembly-plugin 2.2.1 , maven-surefire-plugin 2.8.1

URIModificationChecker : avoid useless call to fireN3SourceChanged() when no N3 Source is Changed

This was doubling the number of widgets at each user event in project deductions/n3_nojs/person-app.n3p

2011-07-11

/ape.exe -guess -text 'If a user U has-as-friend a person X, and has-as-friend a person Y, and X is not Y, and X has-as-friend Z, and Y has-as-friend Z, and Z is not U then Z is-a-proposed-friend-for U.' -solo paraphrase

Every user X1 that v:has-as-friend a person X2 and that v:has-as-friend a person X3 that v:has-as-friend something X4 that is not the user X1 and that is v:has-as-friend by the person X2 that is not the person X3 is v:is-a-proposed-friend-for by X4.

too many open files

null

n3_project.ResultManagement.displayOriginalSourceWithErrors(ResultManagement.java:249)
eulergui.gui.controller.N3ParsingExceptionProcessor.process(N3ParsingExceptionProcessor.java:36)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:127)
eulergui.gui.controller.N3ConversionRefesher.n3SourceChanged(N3ConversionRefesher.java:46)
eulergui.project.ProjectChangeSupport.fireN3SourceChanged(ProjectChangeSupport.java:145)
eulergui.project.Project.fireN3SourceChanged(Project.java:1384)
eulergui.infrastructure.URIModificationChecker.checkN3Source(URIModificationChecker.java:90)
eulergui.infrastructure.URIModificationChecker.run(URIModificationChecker.java:62)
java.lang.Thread.run(Thread.java:662)

quand j'aurai un peu de temps , je voudrais essayer sulci , et // réfléchir sur les bonnes pratiques existantes sur le mélange harmonieux d'ontologies, thésaurus, et indexation ;

<jmvanel_> et bien sûr partager ça avec l'équipe sulci

----------------------------------------

Web sémantique : donner un nom aux choses;

et établir des relations entre elles.

pas nécessairement des grosses bases: messages entre applications et / ou humain ; navigation de proche en proche

mail + RDF ?

--------------------------------------------------------

Are there some central "yellow pages" directories of data sources , where I can query for public data sources about a subject, domain or concept?

La sémantique : le livre est sur le meuble .

-----------------------------------------------------------

2011-07-10

Thread [main] (Suspended (breakpoint at line 960 in N3SourcetoDrools))
N3SourcetoDrools.setRuleBase(RuleBase) line: 960
N3DroolsEngineFacade.setRuleBase(RuleBase) line: 174
Project.compiledRulebaseLoadedFromCache(String) line: 717
Project.translateN32Drools(boolean) line: 864
Project.prepareDrools(boolean) line: 843
ApplicationKB.<init>() line: 98
ApplicationKB.instance() line: 76
Project.prepare() line: 1162
ProjectFactory.prepareProject(Project, URL, boolean) line: 328
CommandLineArguments.makeProjectFromEulerCommandLine(String[]) line: 107
CommandLineArguments.makeProjectFromUserArgument(String[]) line: 48
ProjectGUI.main(String[]) line: 193

jmv-desktop: ~/src/eulergui_new/examples/ % N3SourcetoDrools.setRuleBase(): re-create workingMemory and copy 24 facts from old WM


The N3 shell is blocking when running in background and the Unis shell prints :

[1]  + suspended (tty output)  ~/apps/eclipse/eclipse -vmargs -Djava.library.path=/usr/lib/jni $*

when running this instruction in UnixTerminal.initializeTerminal() :

        // set the console to be character-buffered instead of line-buffered
        stty("-icanon min 1");

And the stack is :

Thread [N3 Shell] (Suspended)
UnixTerminal.initializeTerminal() line: 86
Terminal.setupTerminal() line: 75
Terminal.getTerminal() line: 26
ConsoleReader.<init>(InputStream, Writer, InputStream) line: 174
ConsoleReader.<init>(InputStream, Writer) line: 169
BasicRuntimeShell.run() line: 51
Thread.run() line: 662

2011-07-09

TODO : remove :

> # Copied from cache at Mon Apr 25 22:00:18 CEST 2011
> #  for URI file:/home/jmv/src/eulergui_new/test/catch_allQ.n3
> 
> # in cache since Mon Apr 25 22:00:17 CEST 2011
> #  from file:/home/jmv/src/eulergui_new/test/catch_allQ.n3

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 \
 -jar $HOME/.m2/repository/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar &

http://groups.yahoo.com/group/wwbota/

The Fifth International Conference on Web Reasoning and Rule Systems

http://axel.deri.ie/RR2011/Programme.html

http://www.agi-wiki.org/

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Frunning_eclipse.htm

Looking for PHP rules engines

This one looks good enough :

http://www.swindle.net/php-rules/tutorials/getting-started

http://code.google.com/p/phprulez/source/browse/#svn%2Ftrunk : empty project !!!!!!!!!!

2011-07-06

Examine POWL

Powl – Semantic Web Development Plattform

Last source code Update 2010-09-14

Last and only release 2006-11-07

Large models : A pOWL installation with the largest available models in its store:

NCI Oncology (463,878 statements)

Wordnet (473,528 statements)

UNSPSC code (82,500 statements)

Go to the large models ==> Alas !!! Le délai d'attente est dépassé

On the contrary, Web Protege has a demo that works !

2011-07-05

ssh-keygen -t rsa -C "jeanmarc.vanel@gmail.com"
git config --global user.name "Jean-Marc Vanel"
git config --global user.email "jeanmarc.vanel@gmail.com"
git config --global github.user jmvanel
git config --global github.token 45d70027fd748b80d4be0590f373d0b7

Your API token is 45d70027fd748b80d4be0590f373d0b7 — keep it secret! Changing your password will generate a new token.

http://agi-wiki.org/

Ideas :

2011-07-04

Java API for WordNet Searching (JAWS)

http://nlp.stanford.edu/software/lex-parser.shtml#Download The Stanford Parser: A statistical parser

http://manu.sporny.org/2011/false-choice/

Welcome to IPython. I will try to create a personal configuration directory

where you can customize many aspects of IPython's functionality in:

/home/jmv/.ipython

Initializing from configuration: /usr/lib/python2.7/dist-packages/IPython/UserConfig

Successful installation!

Please read the sections 'Initial Configuration' and 'Quick Tips' in the

IPython manual (there are both HTML and PDF versions supplied with the

distribution) to make sure that your system environment is properly configured

to take advantage of IPython's features.

Important note: the configuration system has changed! The old system is

still in place, but its setting may be partly overridden by the settings in

"~/.ipython/ipy_user_conf.py" config file. Please take a look at the file

if some of the new settings bother you.

http://stackoverflow.com/questions/771918/how-do-i-do-word-stemming-or-lemmatization

import nltk
from nltk.stem.wordnet import WordNetLemmatizer
lmtzr = WordNetLemmatizer()
nltk.download()
wordnet
lmtzr.lemmatize('cars')

from nltk.corpus import wordnet as wn

2011-07-02

http://www.codecatalog.net/

/usr/share/dict/american-english

Attempto

This is a good example of ambiguous pronoun reference :

If a bearer has a payment-incident then its order is canceled.

Paraphrase : If a bearer has a n:payment-incident X1 then an order of the n:payment-incident X1 is a:canceled Remedy 1 : BAD : If a bearer B has a payment-incident then the orders of B are canceled.

Paraphrase : If a bearer X1 has a n:payment-incident then at least 2 orders of the bearer X1 are a:canceled .

Remedy 1 : GOOD : If a bearer B has a payment-incident then every order of B is canceled.

Paraphrase : If a bearer X1 has a n:payment-incident then if there is an order X2 of the bearer X1 then the order X2 is a:canceled .

En Français :

Si un porteur B a un incident de paiement, alors chaque commande de B est annulée.

tried in sulci:

http://dev.sulci.dotcloud.com/

EulerGUI dev

Fixes TODO in EulerGUI

2011-07-01

?D list:in ?L

/home/jmv/src/deductions/n3_nojs/person-app.n3p

12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception in thread "AWT-EventQueue-0" 
12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.NullPointerException
12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor$5.getToolTipText_KB(TextEditor.java:559)
12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor$5.getToolTipText(TextEditor.java:544)
12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.gjt.sp.jedit.textarea.ExtensionManager.getToolTipText(ExtensionManager.java:135)
12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.gjt.sp.jedit.textarea.TextAreaPainter.getToolTipText(TextAreaPainter.java:663)
12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.ToolTipManager$insideTimerAction.actionPerformed(ToolTipManager.java:662)
12:21:20 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.Timer.fireActionPerformed(Timer.java:291)

2011-06-30

hg clone http://dig.csail.mit.edu/hg/tabulator/
ln -s ~/src/tabulator/  ~/.mozilla/extensions/\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}

Framenet

The genifer guys

http://blog.automenta.com/ sseehh

Looking for a semantic web simple navigator application that pretty prints RDF with resources as clickable hyperlinks . It could be stand alone or a browser plugin.

Of course it's not as simple as that, because common sens rules have be applied :

hg clone http://dig.csail.mit.edu/hg/tabulator/

RDF data for software projects

At launchpad they have that ( no N3 directly available ) :

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:doaml="http://ns.balbinus.net/doaml#"
         xmlns:foaf="http://xmlns.com/foaf/0.1/"
         xmlns:lp="https://launchpad.net/rdf/launchpad#"
         xmlns:wot="http://xmlns.com/wot/0.1/"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <lp:Product>
        <lp:specifiedAt rdf:resource="/lena/+rdf"/>
        <lp:name>lena</lp:name>
        <lp:displayName>LENA</lp:displayName>
        <lp:title>LENA - a Fresnel LEns based RDF NAvigator with SPARQL selector support.</lp:title>
        <lp:shortDescription>LENA stands for LEns based NAvigator. A lens represents a particular view onto RDF data and is described by the Fresnel Display Vocabulary. LENA enables viewing RDF data in your web browser, rendered according to the lens descriptions you provide. LENA supports the use of multiple lenses and indicates if they are available for a resource, so that a different view onto the same data is always just one click away!

To write lenses for complex RDF structures created through sophisticated ontology frameworks like COMM or X-COSIM, LENA supports SPARQL selectors. As comprehensive query language for RDF, SPARQL complies to the requirements needed to select from these complex structured RDF graphs. While a Fresnel SPARQL selector is a designated Fresnel selector an implementation did not yet exist. LENA provides an extension to support Fresnel SPARQL selectors that is now integrated into the Simile Fresnel engine.

The data which shall be processed by LENA, can either be put into the provided directory or be accessed through a Sesame HTTP repository. For more information about the usage of LENA see the FAQ. </lp:shortDescription>
        <lp:description></lp:description>
        <lp:creationDate>2008-07-16 13:38:24 UTC</lp:creationDate>
        <lp:homepage rdf:resource="http://isweb.uni-koblenz.de/Research/lena"/>
        
        <lp:series>
            <lp:ProductSeries>
                <lp:specifiedAt
    rdf:resource="/lena/trunk/+rdf"/>
            </lp:ProductSeries>
        </lp:series>
        <lp:owner>
            <foaf:Agent>
                <foaf:Account
    rdf:resource="/~tastentom/+rdf"/>
            </foaf:Agent>
        </lp:owner>
        <lp:status>Active</lp:status>     
    </lp:Product>
</rdf:RDF>

Wordnet 3.0 in RDF

Reading : Wordnet 3.0 in RDF

Explanations here : http://semanticweb.cs.vu.nl/lod/wn30/

Happily it follows the same schema as RDF mapping for WordNet version 2 (http://www.w3.org/TR/wordnet-rdf/#introduction ).

For example this synset :

http://semanticweb.cs.vu.nl/europeana/lod/purl/vocabularies/princeton/wn30/synset-chair-noun-1.rdf

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rdf:RDF [
    <!ENTITY cornetto 'http://purl.org/vocabularies/cornetto/'>
    <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
    <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
    <!ENTITY skos 'http://www.w3.org/2004/02/skos/core#'>
    <!ENTITY wn20s 'http://www.w3.org/2006/03/wn/wn20/schema/'>
    <!ENTITY wn30 'http://purl.org/vocabularies/princeton/wn30/'>
    <!ENTITY wnschema 'http://purl.org/vocabularies/princeton/wordnet/schema#'>
    <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>
]>

<rdf:RDF
    xmlns:cornetto="&cornetto;"
    xmlns:rdf="&rdf;"
    xmlns:rdfs="&rdfs;"
    xmlns:skos="&skos;"
    xmlns:wn20s="&wn20s;"
    xmlns:wn30="&wn30;"
    xmlns:wnschema="&wnschema;"
    xmlns:xsd="&xsd;"
>
 ...
<wn20s:NounSynset rdf:about="&wn30;synset-chair-noun-1">
  <wnschema:action rdf:resource="&wn30;synset-seat-verb-2"/>
  <wnschema:beneficiary rdf:resource="&wn30;synset-people-noun-1"/>
  <rdfs:label xml:lang="en-us">chair</rdfs:label>
  <skos:inScheme rdf:resource="&wn30;"/>
  <wn20s:gloss xml:lang="en-us">a seat for one person, with a support for the back; "he put his coat over the back of the chair and sat down"</wn20s:gloss>
  <wn20s:hyponymOf rdf:resource="&wn30;synset-seat-noun-3"/>

  <wn20s:senseLabel xml:lang="en-us">chair</wn20s:senseLabel>
  <wn20s:synsetId rdf:datatype="&xsd;integer">103001627</wn20s:synsetId>
</wn20s:NounSynset>
 ...
<rdf:Description rdf:about="&wn30;synset-chaise_longue-noun-1">
  <wn20s:hyponymOf rdf:resource="&wn30;synset-chair-noun-1"/>
</rdf:Description>

As a bonus it has some equivalents in european languages (chaise_longue is actually english).

One can also use this URI for a Turtle rendition :

http://semanticweb.cs.vu.nl/europeana/lod/purl/vocabularies/princeton/wn30/synset-chair-noun-1.ttl

which contains this triple block :

wn30:synset-chair-noun-1
  a wn20s:NounSynset ;
  wnschema:action wn30:synset-seat-verb-2 ;
  wnschema:beneficiary wn30:synset-people-noun-1 ;
  rdfs:label "chair"@en-us ;
  skos:inScheme <http://purl.org/vocabularies/princeton/wn30/> ;
  wn20s:gloss "a seat for one person, with a support for the back; \"he put his coat   over the back of the chair and sat down\""@en-us ;
  wn20s:hyponymOf wn30:synset-seat-noun-3 ;
  wn20s:senseLabel "chair"@en-us ;
  wn20s:synsetId 103001627 .

2011-06-29

Installing ACEWiki on my laptop

MAIL SENT to Tobias

The OS is Debian 6.0.1 .

cd $HOME/src/acewiki/ 
bzr update
ant createwebapps
ln -s $HOME/src/ape/ape.exe .
eval `swipl -dump-runtime-variables`
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$PLARCH:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$PLARCH/server:$LD_LIBRARY_PATH
export LD_PRELOAD=$PLBASE/lib/$PLARCH/libjpl.so
java -Djava.library.path=$PLBASE/lib/$PLARCH:/usr/lib -jar jetty-runner*.jar acewiki.war &

ALAS !!!

java: symbol lookup error: /usr/lib/swi-prolog/lib/amd64/libjpl.so: undefined symbol: PL_is_initialised

Indeed, this symbol is undefined in libjpl.so, and defined in libswipl.a :

objdump --syms /usr/lib/swi-prolog/lib/amd64/libswipl.a | grep PL_is_initialised
0000000000000000 g     F .text  000000000000003b PL_is_initialised

The remedy was to add /usr/lib/libswipl.so in LD_PRELOAD .

export LD_PRELOAD=$PLBASE/lib/$PLARCH/libjpl.so:/usr/lib/libswipl.so

It works also on Ubuntu 11.04 ; you have to add package swi-prolog .

Links: ozma, maven-scala-plugin, Actor_model , OpenCog

http://scala-tools.org/mvnsites/maven-scala-plugin/usage.html

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

https://github.com/sjrd/ozma

http://wiki.opencog.org/w/OpenCog_Technical_Information

opencog/server/cogserver
telnet localhost 17001

TODO

- in person-app.n3p , clicking in input field adds many new fields ( seems to happen with cached rule base )

- mail to Attempto

- enhance generated forms: ComboBox, cardinality > 1

- add ACE input in EulerGUI

- rule :defaultValue in generic_gui_projection-rules.n3

- Generic mechanism in N3/Drools engine for a property with cardinality one

2011-06-28

SEARCH:

NLP datasets WORD forms plural , conjugation for verbs

http://aclweb.org/aclwiki/index.php?title=Main_Page

http://aclweb.org/aclwiki/index.php?title=Resources_for_English

git clone git://github.com/automenta/jcog

http://wiki.opencog.org/w/Building_OpenCog_on_Ubuntu#Get_the_source_code

and then

http://wiki.opencog.org/w/Building_OpenCog

What's missing the most in Attempto

I'm thinking of what's missing in Attempto:

We provide expertise, training, consulting and technology transfer on three key technologies:

Résumé

Mr. Bryan B. Thompson is the co-founder and Chief Scientist of SYSTAP, LLC. His technical background includes expertise in cloud computing; the semantic web; web architecture; relational, object, and RDF database architectures; knowledge management and collaboration; artificial intelligence and connectionist models; natural language processing; metrics, scalability studies, benchmarks and performance tuning; decision support systems; and usability design. Significant developments include:

•The creation of bigdata®, an open source distributed database. Bigdata® is commercial licensed through OEMs and is used within in the intelligence community, telecommunications industry, managed storage networks, heath care, bioinformatics, etc.;

•The synthesis of a cognitive model of human reasoning about risk and uncertainty (“Recognition / Metacognition theory”: Cohen, Freeman & Thompson, 1998) with a connectionist model of human reflexive inference (“Shruti”: Shastri & Ajjanagadde 1993; Shastri, 1996) that provides a cognitive and computational explanation and model of expertise and critical thinking behaviors;

•Novel extensions to the IBIS architecture include support for reasoning with positive and negative evidence, support for planning, and support for engaging individuals in critical thinking dialogs that identify the sources of uncertainty in their expressed arguments.

•A class of optimal incremental planners (Thompson and Cohen, 1999) and their application to sophisticated knowledge models within an architecture for a connectionist reasoner (“Shruti”; Shastri, http://www.icsi.berkeley.edu/~shastri/shruti);

•An adaptive control methodology known as Action Dependent Heuristic Dynamic Programming (Lukes, Thompson and Werbos, Jan 1990). This method was first and most extensively published by Watkins as Q-Learning in his doctoral thesis (Watkins, 1989).

Compétences

semantic web

cloud computing

database engine design

cognitive science

AI and connectionist models

adaptive control systems

2011-06-27

Looking for several tools and libraries in Oz .

Mozart oz "semantic web"

On #oz IRC

<jmvanel_> Hi

<jmvanel_> I get comile erroes "unification error in needed statement" for simple examples like Lengh of a list in Van Roy 's book 's .

<jmvanel_> I suspect something wrong in my installation

I forgot the declare keyword at the begining !

I'm also reading about ozma, as someone here suggested .

<jmvanel_> And I ordered Van Roy's book in french .

The ozma thesis by Sébastien Doeraene actually allows to learn in parallel ;) Scala and Oz .

This was a little exercise to correct the syntax:

declare
fun {Learn Language} Language end
Knowledge = [thread
{Learn 'OZ'} end
     thread {Learn 'Scala'} end ]

{Browse Knowledge}

I found a bug in the OPI : when feeding region { Send P 1 ; missing }, it says ------- accepted and nothing happens

I can run demo/Bounce.oz like this : ozc -x Bounce.oz ; ./Bounc

but I don't know how to run it in emacs.

I like this sentence:

Hence, introducing the thread has not changed the global effect of the program.

737 746 Van Roy 156 174

Peter Van Roy 's home page : http://www.info.ucl.ac.be/~pvr/cvvanroy.html

COMMITED

- SourceFilesManagement : the proofExplanation JCheckBox was not set from the .n3p project

- for inner text panel, use global N3 Font from EulerGUI.instance().getN3Font()

- upgrade to Euler 2011-07-29

SNAPSHOT UPLOADED

2011-06-25

Attempto sentences : calls

Every call C is urgent or C is important. KO!!!!!

Paraphrase

If there is a call X1 then the call X1 is urgent or something is important.

Further simplifications:

If there is a call X1 then the call X1 is urgent or X1 is important. OK!!!!!

If there is a call X1 then the call X1 is urgent or is important. OK!!!!!

If there is a call then the call is urgent or is important. OK!!!!!

If there is a call then the call is urgent or is not urgent .

Paraphrase

If there is a call X1 then the call X1 is urgent or it is false that the call X1 is urgent.

Every call has an origin.

Test with Yap 's format built-in

WORKS:

format( "aaaaaabbb", jj ).

format("~s ~n", ["aaaaaabbb"] ).

format("~k --- ~n after newline", aaaaaa(b,c) ).

format("~a", aaaaaa ).

error(existence_error(procedure,format_to_chars/3),[context(user:format_to_chars([100,101,99,105,109,97,108,32],[],_134277),user:main/0)|local_sp(context(user:format_to_chars([100,101,99,105,109,97,108,32],[],_134277),user:main/0),269967868,[],[])])

Cause:

java.lang.RuntimeException: ** ERROR ** sem ** error(existence_error(procedure,format_to_chars/3),[context(user:format_to_chars(

[84,104,101,32,112,114,111,111,102,32,105,115,32,97,32,99,111,110,106,117,110,99,116,105,111,110,32,111,102,32,102,111,

108,108,111,119,105,110,103,32,99,111,109,112,111,110,101,110,116,115,58,60,98,114,47,62,10,9],

[<http://localhost/var#e1>],_146293),user:cn/1)|local_sp(context(user:format_to_chars(

[84,104,101,32,112,114,111,111,102,32,105,115,32,97,32,99,111,110,106,117,110,99,116,105,111,110,32,111,102,32,102,111,

108,108,111,119,105,110,103,32,99,111,109,112,111,110,101,110,116,115,58,60,98,114,47,62,10,9],

[<http://localhost/var#e1>],_146293),user:cn/1),270093164,[],[])])

euler.Process.execute(Process.java:57)

COMMITED

FIXES:

DroolsTripleHandler : avoid error and stack trace for unimplemented Euler builtins, eg e:format

ProjectLegacy : for proofExplanation and postProcessingActiveproject file roundtrip was broken

java.lang.NumberFormatException: For input string: "The proof is a conjunction of following components:<br/>"
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222)
        at java.lang.Double.parseDouble(Double.java:510)
        at n3_project.helpers.Triple.n3ValueToNumeric(Triple.java:374)
        at eulergui.inference.drools.impl.DroolsTripleHandler.droolsValueToNumericOperand(DroolsTripleHandler.java:638)
        at eulergui.inference.drools.impl.DroolsTripleHandler.acceptAntecedentSubjectList(DroolsTripleHandler.java:1644)
        at eulergui.inference.drools.impl.DroolsTripleHandler.acceptAntecedentSubjectList(DroolsTripleHandler.java:1489)
        at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:695)
        at eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:287)
        at eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:259)
        at eulergui.inference.drools.impl.N3DroolsEngineFacade.translate(N3DroolsEngineFacade.java:90)
        at eulergui.project.Project.translateToDrools(Project.java:953)
        at eulergui.gui.controller.N3ConversionRefesher.updateKB(N3ConversionRefesher.java:148)
        at eulergui.gui.controller.N3ConversionRefesher.n3SourceChanged(N3ConversionRefesher.java:47)
        at eulergui.project.ProjectChangeSupport.fireN3SourceChanged(ProjectChangeSupport.java:145)
        at eulergui.project.Project.fireN3SourceChanged(Project.java:1383)
        at eulergui.infrastructure.URIModificationChecker.checkN3Source(URIModificationChecker.java:90)
        at eulergui.infrastructure.URIModificationChecker.run(URIModificationChecker.java:62)

2011-06-23

java.lang.NoSuchMethodException: <unbound>=ProjectLegacy.setProofExplanation(Boolean);

at java.beans.Statement.invokeInternal(Statement.java:260)

java.io.IOException: Too many open files

at java.io.UnixFileSystem.createFileExclusively(Native Method)

at java.io.File.checkAndCreate(File.java:1704)

at java.io.File.createTempFile(File.java:1792)

at java.io.File.createTempFile(File.java:1828)

at n3_project.IOManager.getTemporaryFileWithSuffix(IOManager.java:113)

My .vimrc

set nu
syntax on
set hlsearch
set incsearch
" pasted from Mercury distrib README
filetype on
filetype plugin on
syntax enable

this project : http://openmind.media.mit.edu/ I don't know to what extent it's reusable , but the idea is nice.

http://www.google.com/search?q=task+manager+linux

http://www.automenta.com/ == sseehh of genifer

TODO read "Logic Programming" in Tutorial of Oz :

http://www.mozart-oz.org/documentation/tutorial/node12.html#chapter.lp

2011-06-22

compare Oz with Mercury

Dialog on #oz

If I compare Oz with Mercury, I note:

Mozart has a problem with porting to 64-bit, see "Mozart Project Ideas"

Oz seems to be written in C++, not in Oz :( (while Mercury is written in Mercury)

Oz is not running on a JVM

Functionality "Dataflow concurrency" is very interesting. I know of no language that has it .

Oz started from a more global thought , whereas Mercury started as adding functional features to Prolog, while removing the Prolog hacks like cut, etc

<jmvanel> I'm glad with the book by Van Roy, the Oz tutorail, and other material, but I have the usual questions:

<jmvanel> list of real projects in productions using Oz ; roadmap for new features

<jmvanel> another question is : is there a library for SemanticeWeb ?

<jmvanel> in case ... of , why is used [] as a separator between patterns ? Normally [] represents the empty list as in Prolog ...

Dialog on #Genifer

jmvanel> From experience, maintaining an IDE GUI like EulerGUI, with its extensive non-regression tests, even if it's time consuming, is nice because there is something that works, and continues to work while features grow .

<jmvanel> Of course features grow at a slow pace because the code quality is too low as I wrote .

<jmvanel> Also I think it's important to leverage on Semantic Web standards, even though it's just about data portability .

<_KY_> Semantic web has its limitations

<jmvanel> It also goes a good way in the direction of concepts portability .

<jmvanel> sure

<_KY_> The logic used is sometimes not expressive enough

<jmvanel> sure

<_KY_> I think what's critical is that the entire system must be capable of evolving

<jmvanel> they took the limitations from DL theory

From experience, maintaining an IDE GUI like EulerGUI, with its extensive non-regression tests, even if it's time consuming, is nice because there is something that works, and continues to work while features grow .

Nice general practical notes on Java

http://www.leepoint.net/notes-java/

Oz - Mozart

I tried this nice Prolog equivalent in Mozart :

proc {Append ?A ?B ?C}
  choice
    A=nil B=C
  [] As Cs X in
    A=X|As C=X|Cs {Append As B Cs}
  end
end

{Browse {SolveAll
  proc {$ S} X#Y=S in {Append X Y [1 2 3]} end}}

But it answers :

variable SolveAll not introduced

I have to work the basic syntax ...

The Mozart Browser "allows you to see the evolution of the instantiation of a term as concurrent computations (threads) proceed and add more information".

DOES NOT WORK:

mport Solve

proc {Append ?A ?B ?C}
choice
A=nil B=C
[] As Cs X in
A=X|As C=X|Cs {Append As B Cs}
end
end

{Browse {SolveAll
proc {$ S} X#Y=S in {Append X Y [1 2 3]} end}}

Links

http://www.mozart-oz.org/documentation/

http://www.info.ucl.ac.be/~pvr/ds/mitbook.html


semantic task manager with rules

Tweet

I dream of a semantic task manager with rules. Something that I could create with projects #EulerGUI and #Déductions.

http://www.google.com/search?client=ubuntu&channel=fs&q=emantic+task+manager+with+rules&ie=utf-8&oe=utf-8

Following the RDF annotation principle, if URI's are available for

2011-06-21

http://gephi.org/users/install/#linux

Oz - Mozart

About the enhanced Pascal program, FastTriangle, in the book by Van Roy, is there a compiler option to automatically save the duplicated function call into a variable, or issue a warning ?

The original Pascal program,

fun {ShiftLeft L}
  case L of H|T then
    H|{ShiftLeft T}
  else [0] end
end

The FastPascal enhanced Pascal program:

fun {FastPascal N}
  if N==1 then [1]
  else L in
    L={FastPascal N-1}
    {AddList {ShiftLeft L} {ShiftRight L}}
  end
end

2011-06-20

SNAPSHOT uploaded at 15:20 .

TODO

show a caret in N3 Shell GUI

Generic mechanism in N3/Drools engine for a property with cardinality one

TODO

There should be a generic mechanism in N3/Drools engine for a property with cardinality one. If the property would be a Java Property, it would be automatic. The second rule below is not a good mechanism, because app:currentUserLanguage triples are never removed. I see these solutions:

  1. use a timestamp to keep only the most recent triple, possibly a Drools fusion timestamp
  2. for properties that should be "transferred" to the Java world, just retract the triple when "transferring" to the Java world (here in the first rule)
  3. use a Drools query listener ??? (cf 4.3.3.2.2. Live Querries)

{ # when a new language is asserted, apply it
  app:currentApplication app:userLanguage ?LANG .
  ?GUI a java:n3_project-ProjectGUI .
} => {
  ?GUI javap:language ?LANG .
  app:currentApplication app:currentUserLanguage ?LANG .
  _:d eg:trace ( "userLanguage: called javap:language " ?GUI ?LANG  ).
}.

{ # when a new language is asserted, and it is different from the old one, delete the old one
  # TODO should be a generic mechanism for a property with cardinality one
  # maybe keep the javap: properties asserted in the KB
  app:currentApplication app:currentUserLanguage ?CLANG .
  app:currentApplication app:userLanguage ?LANG .
  ?LANG log:notEqual ?CLANG .
} => {
  _:d kb:retract ( app:currentApplication app:userLanguage ?LANG ) .
  _:d eg:trace ( "retracted app:currentApplication app:userLanguage" ?LANG  ).
}.

COMMITED

add N3 shell user input to the project as <project-name>-shell-history.n3

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

Plugin to simplify boolean expressions

static code analysis

in N3SourcetoDrools.translate() , rdfModel waits if necessary that N3 updating and parsing finishes

this was breaking test TestEulerGUIInputs

/** test for a plugin to simplify boolean expressions or embedded if blocks */
private void toBeRemoved( boolean b1, boolean b2 ) throws MalformedURLException, ParserException,
URISyntaxException {
if (b1) {
eventLoop();
} else if (!b1 && b2) {
initialize();
}
}

INTERNAL ERROR when initializing internal rule engine
Erreur pendant re-parsing N3 source
eulergui.project.N3Source.manageParseN3(N3Source.java:377)
eulergui.project.N3Source.update(N3Source.java:349)
eulergui.project.N3Source.parseResult(N3Source.java:390)
eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:240)
eulergui.inference.drools.impl.N3DroolsEngineFacade.translate(N3DroolsEngineFacade.java:90)
eulergui.project.Project.doTranslateN32Drools(Project.java:911)
eulergui.project.Project.translateN32Drools(Project.java:879)
eulergui.project.Project.prepareDrools(Project.java:843)
eulergui.gui.controller.ApplicationKB.<init>(ApplicationKB.java:98)
eulergui.gui.controller.ApplicationKB.instance(ApplicationKB.java:76)
Cause:
java.lang.NullPointerException
eulergui.project.N3Source.manageParseN3(N3Source.java:365)
eulergui.project.N3Source.update(N3Source.java:349)
eulergui.project.N3Source.parseResult(N3Source.java:390)
eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:240)
eulergui.inference.drools.impl.N3DroolsEngineFacade.translate(N3DroolsEngineFacade.java:90)
eulergui.project.Project.doTranslateN32Drools(Project.java:911)
eulergui.project.Project.translateN32Drools(Project.java:879)
eulergui.project.Project.prepareDrools(Project.java:843)
eulergui.gui.controller.ApplicationKB.<init>(ApplicationKB.java:98)
eulergui.gui.controller.ApplicationKB.instance(ApplicationKB.java:76)

http://www.leepoint.net/notes-java/GUI-lowlevel/keyboard/keyboard.html

dd if=~/Téléchargements/Fedora-15-x86_64-Live-Desktop.iso of=/dev/sdb

https://github.com/droolsjbpm/drools

-- Don't forget to add /usr/local/mercury-11.01/bin to your PATH,
-- /usr/local/mercury-11.01/man to your MANPATH,
-- and /usr/local/mercury-11.01/info to your INFOPATH,
-- and to add the following lines to the `.emacs' file
-- in your home directory:
        (add-to-list 'load-path 
                "/usr/local/mercury-11.01/lib/mercury/elisp")

2011-06-11

AgentSpeak(L): BDI Agents speak out in a logical computable language

2011-06-10

Jason / OWL2MAS

https://sourceforge.net/mailarchive/message.php?msg_id=19542173

GRAVE: Drools Error in file:/home/jmv/src/deductions/n3_nojs/generic_gui_projection-rules.n3 , Error: [ERR 103] Line 721:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "generic_gui_projection-rules.n3 13"
 Error Lines:  - 721 ; see Drools source in droolsSources/*.drl
10 juin 2011 11:08:28 eulergui.inference.drools.impl.N3SourcetoDrools showDroolsCompilationErrors
GRAVE: Drools compile ERROR: [0,0]: Parser returned a null Package
Drools Error: Parser returned a null Package
 ........
GRAVE: Drools compile ERROR: [323,15]: [ERR 103] Line 323:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 7"
Drools Error: [ERR 103] Line 323:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 7"
ErrorLines:  - 323
10 juin 2011 11:08:29 eulergui.inference.drools.impl.N3SourcetoDrools showDroolsCompilationErrors
GRAVE: Drools Error in file:/home/jmv/src/deductions/n3_nojs/app_gui-rules2.n3 , Error: [ERR 103] Line 323:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 7"
 Error Lines:  - 323 ; see Drools source in droolsSources/*.drl
10 juin 2011 11:08:29 eulergui.inference.drools.impl.N3SourcetoDrools showDroolsCompilationErrors
GRAVE: Drools compile ERROR: [354,15]: [ERR 103] Line 354:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 8"
Drools Error: [ERR 103] Line 354:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 8"
ErrorLines:  - 354
10 juin 2011 11:08:29 eulergui.inference.drools.impl.N3SourcetoDrools showDroolsCompilationErrors
GRAVE: Drools Error in file:/home/jmv/src/deductions/n3_nojs/app_gui-rules2.n3 , Error: [ERR 103] Line 354:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 8"
 Error Lines:  - 354 ; see Drools source in droolsSources/*.drl
10 juin 2011 11:08:29 eulergui.inference.drools.impl.N3SourcetoDrools showDroolsCompilationErrors
GRAVE: Drools compile ERROR: [385,15]: [ERR 103] Line 385:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 9"
Drools Error: [ERR 103] Line 385:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 9"
ErrorLines:  - 385
10 juin 2011 11:08:29 eulergui.inference.drools.impl.N3SourcetoDrools showDroolsCompilationErrors
GRAVE: Drools Error in file:/home/jmv/src/deductions/n3_nojs/app_gui-rules2.n3 , Error: [ERR 103] Line 385:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "app_gui-rules2.n3 9"
 Error Lines:  - 385 ; see Drools source in droolsSources/*.drl

2011-06-09

GRAVE: Drools Error in file:/home/jmv/src/deductions/n3_nojs/generic_gui_projection-rules.n3 , Error: [ERR 103] Line 720:15 rule 'class_key' failed predicate: {(helper.validateIdentifierKey(DroolsSoftKeywords.CLASS))}? in rule "generic_gui_projection-rules.n3 13"

http://docs.jboss.org/drools/release/5.2.0.CR1/droolsjbpm-introduction-docs/html_single/#d0e47

http://eulersharp.svn.sourceforge.net/svnroot/eulersharp/trunk/2003/03swap/rpo-rules.n3
Thread [N3 sources modification Checker] (Suspended)
N3Source.manageN3Cache(N3Source) line: 463
N3Source.doUpdate() line: 356
N3Source.update() line: 348
N3ConversionRefesher.updateN3(N3Source) line: 102
N3ConversionRefesher.n3SourceChanged(Project, N3Source) line: 46
ProjectChangeSupport.fireN3SourceChanged(Project, N3Source) line: 145
Project.fireN3SourceChanged(N3Source) line: 1383
URIModificationChecker.checkN3Source(N3Source) line: 90
URIModificationChecker.run() line: 62
Thread.run() line: 662

index.rdf
Thread [N3 sources modification Checker] (Suspended (breakpoint at line 42 in CacheFacade))
CacheFacade.manageLocalCache(String) line: 42
ProjectFactory.readProjectFromURL(URL) line: 233
ProjectFactory.restoreXMLURL(URL, boolean) line: 215
ProjectFactory.restore(String, boolean) line: 53
ProjectFactory.restoreAny(URI, boolean) line: 376
SWRLTranslator.n3SourceAdded(Project, N3Source) line: 42
SWRLTranslator.n3SourceChanged(Project, N3Source) line: 32
ProjectChangeSupport.fireN3SourceChanged(Project, N3Source) line: 145
Project.fireN3SourceChanged(N3Source) line: 1383
URIModificationChecker.checkN3Source(N3Source) line: 90
URIModificationChecker.run() line: 62
Thread.run() line: 662

_____________

#TRACE ( ":form_no_subclasses :DEBUG" <http://jmvanel.free.fr/ontology/gui_generic.owl#DatatypeInputWidget> )
#TRACE ( "1" <http://jmvanel.free.fr/ontology/gui_generic.owl#inputWidgetSpecification> "ObjectProperty" "a :OWLProperty" )
org.drools.runtime.rule.ConsequenceException: rule: project-java-rules.n3 4

        at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
        at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:927)
        at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
        at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
        at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
        at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
        at unif.TripleStoreDrools.fireAllRules(TripleStoreDrools.java:330)
        at eulergui.gui.controller.ApplicationKB.fireAllRules(ApplicationKB.java:204)
        at eulergui.gui.controller.ApplicationKB.n3SourceChanged(ApplicationKB.java:509)
        at eulergui.project.ProjectChangeSupport.fireN3SourceChanged(ProjectChangeSupport.java:145)
        at eulergui.project.Project.fireN3SourceChanged(Project.java:1377)
        at eulergui.infrastructure.URIModificationChecker.checkN3Source(URIModificationChecker.java:90)
        at eulergui.infrastructure.URIModificationChecker.run(URIModificationChecker.java:62)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
        at org.drools.common.EqualityAssertMapComparator.hashCodeOf(EqualityAssertMapComparator.java:48)
        at org.drools.core.util.ObjectHashMap.get(ObjectHashMap.java:100)
        at org.drools.common.SingleThreadedObjectStore.getHandleForObject(SingleThreadedObjectStore.java:122)
        at org.drools.common.AbstractWorkingMemory.getFactHandle(AbstractWorkingMemory.java:861)
        at n3_project.helpers0.Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.evaluate(Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.java:33)
        at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
        ... 12 more

12:03:15 [AWT-EventQueue-0] [warning] View: Buffer /tmp/dl-safe_small.owl.as.rules.n3 doesn't exist
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker: org.drools.runtime.rule.ConsequenceException: rule: project-java-rules.n3 4
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:927)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at unif.TripleStoreDrools.fireAllRules(TripleStoreDrools.java:330)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at eulergui.gui.controller.ApplicationKB.fireAllRules(ApplicationKB.java:204)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at eulergui.gui.controller.ApplicationKB.n3SourceChanged(ApplicationKB.java:509)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at eulergui.project.ProjectChangeSupport.fireN3SourceChanged(ProjectChangeSupport.java:145)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at eulergui.project.Project.fireN3SourceChanged(Project.java:1377)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at eulergui.infrastructure.URIModificationChecker.checkN3Source(URIModificationChecker.java:90)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at eulergui.infrastructure.URIModificationChecker.run(URIModificationChecker.java:62)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at java.lang.Thread.run(Thread.java:662)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker: Caused by: java.lang.NullPointerException
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.EqualityAssertMapComparator.hashCodeOf(EqualityAssertMapComparator.java:48)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.core.util.ObjectHashMap.get(ObjectHashMap.java:100)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.SingleThreadedObjectStore.getHandleForObject(SingleThreadedObjectStore.java:122)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.AbstractWorkingMemory.getFactHandle(AbstractWorkingMemory.java:861)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at n3_project.helpers0.Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.evaluate(Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.java:33)
12:03:21 [N3 sources modification Checker] [error] N3 sources modification Checker:  at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)

http://lambda-the-ultimate.org/search/node/rules+GUI

AgentSpeak(L): programming with beliefs, desires and intentions

http://lambda-the-ultimate.org/node/3003#comment-43996

http://jason.sourceforge.net/Jason/Documents.html

Trying Kawa GUI

Kawa is a kind of Scheme in Java; Scheme is itself is a kind of Lisp.

Kawa - Java integration has nice features, comparable to N3 Java integration.

http://www.gnu.org/software/kawa/toc.html

./configure --enable-kawa-frontend 
make
java kawa.repl
make check
 ./bin/kawa -w

http://per.bothner.com/blog/2007/ReplPane/

(define but1 (javax.swing.JButton "Salut") )
(set! but1:text "Bonjour!")

2011-05-31

BDI model (Belief-Desire-Intention model)

AgentSpeak(L): programming with beliefs, desires and intentions http://lambda-the-ultimate.org/node/3003

Norman swartz, Professor of Philosophy, Emeritus http://www.sfu.ca/~swartz/

TODO EulerGUI: remove subclassOf rules in Swing rule base, as it is now done with pre-processing OWL or N3 (?) .

Twit:

It would be nice to develop an agent / expert in finding ontologies on the web, if that does not exist already :)

Ontology to use for querying

http://answers.semanticweb.com/questions/2623/ontology-to-use-for-querying#2630

http://schemacache.test.talis.com/api-config

http://schemapedia.com/search?q=material&action=Search

http://sindice.com/search?q=material

http://swse.deri.org/list?keyword=material

http://schemacache.com/?q=material+type%3Ahttp\%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf\-schema%23Class&q=component+

http://schemacache.com/Res/?uri=http%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fcomponency.owl%23hasComponent

http://labs.mondeca.com/dataset/lov/index.html

http://dublincore.org/2010/10/11/dcterms.rdf#PhysicalMedium

http://ontologydesignpatterns.org/wiki/Main_Page

http://schemapedia.com/search?q=material&action=Search

Where can I find useful ontologies?

http://answers.semanticweb.com/questions/1039/where-can-i-find-useful-ontologies

The DBpedia Ontology

http://wiki.dbpedia.org/Ontology?v=1cql

2011-05-30

COMMIT

class EulerGUI : fixed excessive log for getLogger("cache")

2011-05-29

Twitted by Ontologiae : Jason, a AgentSpeak interpreter (BDI oriented language) uses a Description Logic Reasoner

http://lambda-the-ultimate.org/node/3003

Enforce OWL max Cardinality with rules

How to enforce max Cardinality with rules ?

{ ?C owl:maxCardinality ?MAX. ?C owl:onProperty ?P.
  _:d eu:findall ( ?SUBJECT
    { ?O ?P ?SUBJECT } ?SUBJECTS ).
  ?SUBJECTS math:memberCount ?COUNT .
  ?COUNT math:greaterThan ?MAX.
} => {
  false # ???
}.

It seems better to control input , as this is obviously a closed world feature.

This is the "concrete" example:

If there is a n : concrete X1

then the n : concrete X1 v : contains a n : cement

and the n : concrete X1 v : contains a n : granulate .

This is also the "koala" example:

:Animal
      a       owl:Class ;
      rdfs:seeAlso "Male" ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:minCardinality "1"^^<http://www.w3.org/2001/XMLSchema#int> ;
                owl:onProperty :hasHabitat
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:cardinality "1"^^<http://www.w3.org/2001/XMLSchema#int> ;
                owl:onProperty :hasGender
              ]

Looking for testers

on oasis IRC

jmvanel_> Hello

<jmvanel_> I'm looking for testers for EulerGUI 1.9 beta: Semantic Web / N3 GUI and framework, rules engines, mixing business rules and Java

<jmvanel_> open source

COMMIT

remove class MyResourceBundle duplicate of GuiResourceBundle

- move several helper classes to package eulergui.util

- mark helper classes with a private constructor

- generalize a little ReaderUtils.copyReader()

- add commented suggestions in ~/.eulergui/preferences.n3 , when empty :

@prefix app: <http://jmvanel.free.fr/ontology/software_applications.owl#> .
app:currentApplication app:userLanguage "de" .

2011-05-28

Thread [N3 sources modification Checker] (Suspended (breakpoint at line 1053 in ProjectGUI))
ProjectGUI.setLanguage(String) line: 1053
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
DeferredPropertyAssignment.findAndInvokeMethod(Object, Object, Class<?>) line: 103
DeferredPropertyAssignment.assign(Object) line: 45
DeferredPropertyAssignment.assign(Assignment) line: 39
Rule_DeferredPropertyAssignment_literal_argument_0.defaultConsequence(KnowledgeHelper, DeferredPropertyAssignment, FactHandle, Assignment, FactHandle) line: 13
Rule_DeferredPropertyAssignment_literal_argument_0DefaultConsequenceInvoker.evaluate(KnowledgeHelper, WorkingMemory) line: 34
DefaultAgenda.fireActivation(Activation) line: 917
DefaultAgenda.fireNextItem(AgendaFilter) line: 856
DefaultAgenda.fireAllRules(AgendaFilter, int) line: 1071
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter, int) line: 785
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() line: 751
TripleStoreDrools.fireAllRules() line: 330
ApplicationKB.fireAllRules() line: 204
ApplicationKB.n3SourceChanged(Project, N3Source) line: 509
ProjectChangeSupport.fireN3SourceChanged(Project, N3Source) line: 145
Project.fireN3SourceChanged(N3Source) line: 1377
URIModificationChecker.checkN3Source(N3Source) line: 90
URIModificationChecker.run() line: 62
Thread.run() line: 662

ECA Event Condition Action rules

I added starDict with a couple of dictionaries; everytime you select a word anywhere, a popup appears with definitions.

<jmvanel_> I'm ready for an EG release; couldn't find anyone on swig for testing :(

<jmvanel_> found this possibly interesting community : #Genifer, but they don't talk much

<jmvanel_> now I'm working to clean things in EG with the internal KB so that applicative rules can be triggered whenener something happens. As a concrete case, redraw the GUI when user update the preference N3 file.

The sequence of events:

  1. user saves N3 preference file
  2. through URIModificationChecker's loop and N3ConversionRefesher, an n3SourceChanged() event is initiated on the internal KB (ApplicationKB), which re-parses the preference N3 file ~/.eulergui/preferences.n3 which replaces the old one in the KB
  3. the new triple preference :
    app:currentApplication app:userLanguage "de" .

    replaces the old one

  4. because ApplicationKB is a project listener, fireAllRules() is called through n3SourceChanged()

Is there a standard design pattern in rule to have new inserted value of MyClass . myField replace the previous one ?

I mean assume :

class MyClass { public String myField ; }

insert object o1

COMMITS

remove ProjectGUI . updateWindow(), that was very similar to redoLayoutFrame

- watch preference file modifications

N3Source.parseResult(): parseResult (file:/home/jmv/.eulergui/preferences.n3) was null ==> re-parse (and possibly re-read N3 source)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0: [Fatal Error] :1:55: White spaces are required between publicId and systemId.
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception in thread "AWT-EventQueue-0" 
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.RuntimeException: N3SourceFromXML_Gloze.extractXMLNamespaces():
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Could not load from URL http://eulergui.sourceforge.net/examples#
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  reason: White spaces are required between publicId and systemId.
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  cause: null
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.inputs.dispatcher.FormatRecognizer.<init>(FormatRecognizer.java:36)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.SourceFactory.addSource(SourceFactory.java:103)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.tools.AddReferredOntologies.actionPerformed(AddReferredOntologies.java:52)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Component.processMouseEvent(Component.java:6289)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Component.processEvent(Component.java:6054)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Container.processEvent(Container.java:2041)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Component.dispatchEventImpl(Component.java:4652)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Container.dispatchEventImpl(Container.java:2099)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Component.dispatchEvent(Component.java:4482)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Container.dispatchEventImpl(Container.java:2085)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Window.dispatchEventImpl(Window.java:2478)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Component.dispatchEvent(Component.java:4482)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue.access$000(EventQueue.java:85)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue$1.run(EventQueue.java:603)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue$1.run(EventQueue.java:601)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.security.AccessController.doPrivileged(Native Method)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue$2.run(EventQueue.java:617)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue$2.run(EventQueue.java:615)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.security.AccessController.doPrivileged(Native Method)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Caused by: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.inputs.dispatcher.FormatRecognizer.<init>(FormatRecognizer.java:22)
15:03:31 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  ... 41 more

2011-05-27

INTERNAL ERROR when initializing internal rule engine
Erreur pendant re-parsing N3 source
eulergui.project.N3Source.manageParseN3(N3Source.java:377)
eulergui.project.N3Source.update(N3Source.java:350)
eulergui.project.N3Source.parseResult(N3Source.java:390)
eulergui.inference.drools.impl.N3SourcetoDrools.translate(N3SourcetoDrools.java:240)
eulergui.inference.drools.impl.N3DroolsEngineFacade.translate(N3DroolsEngineFacade.java:90)
eulergui.project.Project.doTranslateN32Drools(Project.java:905)
eulergui.project.Project.translateN32Drools(Project.java:859)
eulergui.project.Project.prepareDrools(Project.java:837)
eulergui.gui.controller.ApplicationKB.<init>(ApplicationKB.java:98)
eulergui.gui.controller.ApplicationKB.instance(ApplicationKB.java:76)

Cause:
file:/home/jmv/src/eulergui_new/target/classes-eclipse/eulergui/gui/controller/application-rules.n3
n3_project.exceptions.parser.ParsingException: parse succeed
reduce error: bad data class class net.sf.parser4j.parser.entity.parsenode.data.NullParseNodeData
no prefix for "javap:"
bad data class class net.sf.parser4j.parser.entity.parsenode.data.NullParseNodeData
no prefix for "javap:"

Looking for IRC channels:

specification, formal, intelligence, model, domain, generation, semantic .

Working on presentation "connaissances_DL_CNL_règles" in french .

Looking for testers on SWIG IRC

Good evening

I'm looking for testers for EulerGUI 1.9 beta: Semantic Web / N3 GUI and framework, rules engines, mixing business rules and Java

join us at #eulergui .

Features (Fact Sheet) : http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html#Features

Tests run: 169, Failures: 0, Errors: 0, Skipped: 0
INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 minutes 20 seconds
[INFO] Finished at: Fri May 27 15:52:54 CEST 2011

2011-05-26

Debugging Tests with Maven

http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html

TODO : implement uncompress with HTTP URL's returning e.g. :

Content-Type: application/x-bzip2

ACE examples: concrete material

every n : concrete v : contains a n : cement

and v : contains a n : granulate .

Paraphrase:

If there is a n : concrete X1

then the n : concrete X1 v : contains a n : cement

and the n : concrete X1 v : contains a n : granulate .

Possible Utilisations :

  1. if one defines a new concrete type, one must define at least one cement and one granulate
  2. if we admit the CWA, a formula involving a concrete containing a cement and a granulate is valid

Remarks:

Dialog on SWIG IRC

Hi any recommendation for a vocabulary about materials, e.g. "cement and granulate are Materials which are components of the concrete Material; the notion of component includes a percentage"

SUMO seems to have these concepts

<zazi> jmvanel_, I dunno a good vocabulary on that, however a funny jingle on cement in German ;) http://download.fritz.de/jingles/Fritz_Entschuldigung_Zement.MP3

<jmvanel_> :)

<jmvanel_> SUMO in OWL in 36 Mb ! :( attempt to load it in Protégé from HTTP fails ! But wget got it , and from that local file Protégé said "OutOfMemoryError: Java heap space"

<jmvanel_> not asking for help on that ...

<jmvanel_> but what is needed is a small vocab ...

<zazi> btw, what about dbpedia?

<jmvanel_> good idea

http://downloads.dbpedia.org/3.6/dbpedia_3.6.owl.bz2

<jmvanel_> zazi, FYI, I could this time load dbpedia ontology in Protégé :) , but not directly the bz2 URL ) ; however dbpedia is strong in science and technics :(

2011-05-25

http://bellard.org/jslinux/

TODO COMMIT

- Added toString() in FormulaMutableImpl.java

DISPLAY=localhost:0.0 gvim -c 'a|bisous !!!!!!!!!!!!!!!!!.'
E233: ouverture du display impossible

EulerGUI : fixed the build from sources

This was a problem that was here for more than a year. One of the dependency jars, jEdit, that was prepared for this project on our Maven depot, had all classes duplicated in a wrong directory classes/ in the jar. This was badly interaracting with recent changes in Maven. As a consequence, the jEdit editor windows were not working.

This is now fixed, and if you build from sources, these command should get you going :

rm $HOME/.m2/repository/org/jedit/jedit/4.3.1/jedit-4.3.1.jar
mvn clean
rm -r $HOME/.m2/repository/eulergui/eulergui/1.9-SNAPSHOT/
mvn -Dmaven.test.skip=true install

Issue with Maven build: class from dependency chosen

Asked on Maven IRC

I have a class C1 (jEdit) that is in src/main/java , and also in one (direct) dependency ; this used to work for a long time , and since a few days the C1 from the dependency seems to be chosen by the Maven build , plugin maven-assembly-plugin with predefined descriptor jar-with-dependencies .

What happens is that it copies all classes from dependencies, and when C1 comes from source, it says "C1.class already added, skipping".

What puzzles me is that I can't go back to a version that works.

Note that Surefire (and eclipse) work fine about this.

it's not normal that the classes made with maven-assembly-plugin with predefined descriptor jar-with-dependencies differ from those executed by surefire.

I noticed something strange : inside the generated jar-with-dependencies.jar for the problematic dependency, classes are duplicated : once normally, and once in a classes/ directory . And this happens only for this dependency .

OK, I removed the useless classes/ directory in the dependency jar , plus also the manifest , and it works now !

<jmvanel> my guess is that Maven assembly tries to be too smart , and takes classes that are not at the root of the dependency jars ;

<jmvanel> and this behavior is recent .

I got the same problem again on the laptop, even after republishing the jar that was bad on our repository. After running mvn install one time unsuccessfuly, I removed the generated eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar from the local repo, but not the source jar .

The whole issue may be related to an artifact without source jar .

2011-05-24

need visualizers for RDF graphs: as table, as graph.

could just generate an HTML table from an N3 template with eu:format .

% 14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception in thread "AWT-EventQueue-0" 
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.NoSuchFieldError: view
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor.displayEditor(TextEditor.java:289)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement.openJavaEditor(EditorManagement.java:133)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement.doOpenEditor(EditorManagement.java:103)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement.reallyDoOpenEditor(EditorManagement.java:71)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.EditorManagement$1.actionPerformed(EditorManagement.java:41)2011-05-24
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.Component.processMouseEvent(Component.java:6289)
14:59:41 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

2011-05-23

http://sourceforge.net/projects/eulergui/files/ : 1919 downloads today !!!

COMMIT

After recent class moves refactoring , test suite was broken due to hard coded packge path in Drools N3 engine.

eclipse questions

any way to move *several* methods together from one class C1 to class C2 of one field of C1 ?

( works with one method at a time )

Is there a plugin that tells which methods can become private or package visible ?

2011-05-21

According to stackoverflow.com , findbugs seems the best before PMD and Checkstyle ; so I ran :

mvn findbugs:gui 

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

2011-05-19

Running EulerGUI test suite on windows

The machine is running Windows 7, with latest JDK 25 .

I installed: JDK, Maven 3.0.3, Subversion, Cygwin (facultative).

Then I ran this with the Cygwin shell:

svn co https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui eulergui
export PATH=~/apps/apache-maven-3.0.3/bin:$PATH
export JAVA_HOME="C:/Program Files/Java/jdk1.6.0_25"
export M2_HOME=C:/cygwin/home/Daphné/apps/apache-maven-3.0.3
cd eulergui
mvn install

According to http://maven.apache.org/scm/subversion.html , it is necessary to create this file :

$user.home/.scm/svn-settings.xml

with (at least) this content:

<svn-settings>
  <configDirectory>C:\Users\Daphné\AppData\Roaming\Subversion</configDirectory>
</svn-settings>

I installed Subversion from subversion.tigris.org , hence the above configDirectory.

If you don't create this file, you can run svn commands directly from the cmd or Cygwin shell , but with Maven you get this ugly and hard to trace in internet message:

svn: Can't determine the user's config path

The first results are not wonderful :

Tests run: 164, Failures: 11, Errors: 7, Skipped: 0

TestDroolsQuery
testSearchFromProject + [ Detail ]0
result.size() expected:<1> but was:<0>
-----
TestN3JavaMapping
testUpdateJavaFromN3 + [ Detail ]0
a rule activation directly affects a Java object expected:<1> but was:<0>
----------
TestEulerGUIOutputs
testXMLOutputFromRDF + [ Detail ]0
kml.xml translated to RDF and back should be identical,
testXMLOutputFromN3 + [ Detail ]0
kml.xml translated to RDF and back should be identical,
--------
TestFacebookSearch
testLocalFacebookSearch + [ Detail ]0
Wait for "Action NAME Component Chooser "./facebook-search.n3" " subcomponent to be displayed
----------
TestGenericGuiGeneration
testOWLReasoner + [ Detail ]0
Frame with title "Ontology Hierarchy"
-----
TestGenericGuiGenerationInsertLogical

test_person_import30
test_foaf_import20
test_cv2 + [ Detail ]0
Wait AbstractButton with text "Skill" loaded
----------------------
TestImportSwrl
testLocalImportSwrlWithDrools + [ Detail ]0
Wait for "getText() Component Chooser ".as.rules.n3" " subcomponent to be displayed
testRemoteImportSwrlWithDrools + [ Detail ]0
Wait for "getText() Component Chooser "<http://owldl.com/ontologies/dl-safe.owl#bc> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://owldl.com/ontologies/dl-safe.owl#BadChild>" " subcomponent to be displayed
testLocalImportSwrlWithEuler + [ Detail ]0
Wait for "getText() Component Chooser ".as.rules.n3" " subcomponent to be displayed
------------

2011-05-18

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="8000" \
-cp $HOME/.m2/repository/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar \
  deductions.runtime.BasicRuntimeShell

Tested JLine with remote debugger

The JLine example does not work correctly in the eclipse console. So I need to run with remote debugger:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="8000" \
  -classpath /home/jmv/.m2/repository/jline/jline/1.0/jline-1.0.jar:target/test-classes \
  jline.example.Example simple

2011-05-17

S.M.A.R.T.

http://lea-linux.org/documentations/index.php/Hardware-hard_plus-smart#Soyez_Smart_.21

sudo smartctl --all /dev/sda1
sudo smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda1
sudo smartctl -l selftest /dev/sda1
sudo smartctl -A /dev/sda1
sudo smartctl -t short /dev/sda1

sudo smartctl -l selftest /dev/sda1
sudo smartctl -A /dev/sda1

EulerGUI dev.

COMMIT

Add Jline library in N3 shell for completion, history, like a real shell

- new class BasicRuntimeShell tested in KDE console: foaf: is completed :)

net.sf.joafip.service.FilePersistenceException: net.sf.joafip.store.service.StoreException: creation failed
at net.sf.joafip.service.FilePersistence.<init>(FilePersistence.java:284)
at net.sf.joafip.service.TestFilePersistenceSetupByProperties.setUp(TestFilePersistenceSetupByProperties.java:65)
at junit.framework.TestCase.runBare(TestCase.java:128)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: net.sf.joafip.store.service.StoreException: creation failed
at net.sf.joafip.store.service.AbstractStoreDelegatingToDataManager.<init>(AbstractStoreDelegatingToDataManager.java:135)
at net.sf.joafip.store.service.AbstractDelegatingToStoreManagers.<init>(AbstractDelegatingToStoreManagers.java:196)
at net.sf.joafip.store.service.Store.<init>(Store.java:203)
at net.sf.joafip.service.FilePersistence.<init>(FilePersistence.java:279)
 ... 18 more
Caused by: net.sf.joafip.heapfile.service.HeapException: no files in stable state, file store.data exist=true, file store.bak exist=false
at net.sf.joafip.heapfile.record.service.HeapElementManager.inconsistencyCheck(HeapElementManager.java:443)
at net.sf.joafip.heapfile.record.service.HeapElementManager.wasBadFileStableState(HeapElementManager.java:404)
at net.sf.joafip.heapfile.service.HeapFileDataManager.<init>(HeapFileDataManager.java:193)
at net.sf.joafip.store.service.AbstractStoreDelegatingToDataManager.<init>(AbstractStoreDelegatingToDataManager.java:132)
 ... 21 more

The last thing in kern.log before a reboot :

May 17 09:35:32 jmv-desktop kernel: [130719.686882] eclipse[23001] trap divide error ip:7fda7812f788 sp:7fff3d013c10 error:0 in libgtk-x11-2.0.so.0.2400.4[7fda78004000+436000]

The last thing in syslog before a reboot :

May 17 09:39:01 jmv-desktop CRON[1160]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)

2011-05-16

Tested JLine

Downloaded and tested JLine: a good library for managing user keyboard input, with completion.

cd ~/src/jline-1.0/src/
mvn install
java -classpath /home/jmv/.m2/repository/jline/jline/1.0/jline-1.0.jar:target/test-classes jline.example.Example files

Now the question is to find a console GUI component in Java. I think I need just to receive the KeyEvent's .

http://www.faqs.org/docs/javap/c6/s5.html

http://www.faqs.org/docs/javap/index.html

Tested Joafip on Linux

for f in src-*test/**/*.java
do
 sed -e 's/TestConstant.RUNTIME_DIR/TestConstant.getRuntimeDir()/' $f > $f.tmp
 mv $f.tmp $f
 echo $f Done
done

cd rifle
hg pull
hg up
cd trunk
cd apps
cd rifle-ast
mvn package
cd ..
cd rifle-psparser
mvn package
cd ..
cd rifle-prd-xml-bind
rm  /home/jmv/.m2/repository/net/sourceforge/rifle/rifle-prd-xml-bind/1.0/*
mvn package
cd rifle-prd-xml ; mvn package
cd ../rifle-dtb ; mvn package
cd ../rifle-jsr94 ; mvn package

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.102s
[INFO] Finished at: Mon May 16 14:24:53 CEST 2011
[INFO] Final Memory: 3M/116M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project rifle-jsr94: Could not resolve dependencies for project org.fundacionctic:rifle-jsr94:jar:0.1-SNAPSHOT: Failed to collect dependencies for [org.fundacionctic:rifle-validator:jar:0.1-SNAPSHOT (compile), log4j:log4j:jar:1.2.14 (compile), commons-logging:commons-logging:jar:1.1.1 (compile), slf4j-log4j12:slf4j-log4j12:jar:1.5.6 (compile), slf4j-api:slf4j-api:jar:1.5.6 (compile), junit:junit:jar:4.1 (compile), xalan:xalan:jar:2.7.0 (compile), xerces:xercesImpl:jar:2.7.1 (compile), jsr94:jsr94:jar:1.1 (compile)]: Failed to read artifact descriptor for org.fundacionctic:rifle-validator:jar:0.1-SNAPSHOT: Could not transfer artifact org.fundacionctic:rifle-validator:pom:0.1-SNAPSHOT from/to java.net (https://maven-repository.dev.java.net/nonav/repository): No connector available to access repository java.net (https://maven-repository.dev.java.net/nonav/repository) of type legacy using the available factories WagonRepositoryConnectorFactory -> [Help 1]

cd ../rifle-dtb-rest ; ant
BUILD FAILED
/home/jmv/src/rifle/trunk/apps/rifle-dtb-rest/nbproject/build-impl.xml:348: The libs.CopyLibs.classpath property is not set up.
This property must point to 
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
of NetBeans IDE installation and is usually located at 
<netbeans_installation>/java<version>/ant/extra folder.
Either open the project in the IDE and make sure CopyLibs library
exists or setup the property manually. For example like this:
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar

- clean TestEulerGUITooltip

- BasicRuntime: now listener does not Use a New Thread

- SwingHelper.disposeWindows() : revert to SwingUtilities.invokeLater() : more riskky !!! but possibly quicker test suite

- DroolsInferenceEngine . launch() : remove call to waitUpdateThreads() : more riskky !!! but possibly quicker test suite

- N3Source.manageParseN3 () : add : synchronized (parseResult)

- N3SourcetoDrools . launchDroolsKeepWM() : synchronized (ruleBase)

- N3toDroolsUpdater . launchDrools* : comment ou call to waitUpdateThreads() : more riskky !!! but possibly quicker test suite

2011-05-15

Tests run: 156, Failures: 0, Errors: 0, Skipped: 0
[INFO] [surefire-report:report {execution: default-cli}]
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 minutes 54 seconds

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

do you know this? http://www.kanzaki.com/docs/sw/img-annotator.html

<rszeno> there is a perlscript to get feed from youtube but i didn't had time to make clear how i can use it, :)

http://www.kanzaki.com/works/2003/imagedesc/030824_0958e.rdf looks nice !

the result of the img-annotator

<rszeno> yes, need a jquery plugin, :)

data flow in EulerGUI

N3 remote ==> N3 local ==> parse tree ==> facts, project rule base

Troubles with Ubuntu

<bregma> jmv__, I think we'll need an input capture to analyze the userspace side of your problem

<bregma> see https://wiki.edubuntu.org/DebuggingTouchpadDetection/evtest

<bregma> (it's from edubuntu but it is universally applicable)

<bregma> attach the log to a bug so developers can rerun the same input through the software stack for performance analysis

Troubles with npviewer

Last messages:

in syslog:

May 15 09:46:32 jmv-desktop gdm-simple-greeter[26385]: Gtk-WARNING: /build/buildd/gtk+2.0-2.24.4/gtk/gtkwidget.c:5687: widget not within a GtkWindow
May 15 09:46:33 jmv-desktop gdm-simple-greeter[26385]: WARNING: Unable to load CK history: no seat-id found

in kern.log :

May 15 09:46:07 jmv-desktop kernel: [233710.098684] show_signal_msg: 36 callbacks suppressed
May 15 09:46:07 jmv-desktop kernel: [233710.098695] npviewer.bin[31353]: segfault at ed22bae8 ip 00000000f701fbc8 sp 00000000ea6d004c error 6 in libpthread-2.13.so[f7015000+15000]

Here someone met the same problem :

http://ubuntuforums.org/showthread.php?t=647961

http://www.adobe.com/devnet/flashplayer.html proposes 10.3.181.14 (Windows, Mac, Linux, Solaris) , but Ubuntu is still at 10.2.159.1ubuntu1 !?!

2011-05-14

COMMIT

- ProjectFileManagement : when adding URIModificationChecker , the project waits Update Threads

- TestJemmy : when searching generatedFrame, sysematically exclude "EulerGUI Message" windows

Mysteriously in TestGenericGuiGenerationInsertLogicalRefactorRules . test_person_import3 (), the initial thread runs badly, as if the download was not finished before parsing :

 TemporaryFrame.TemporaryFrame(): update N3; PARSE ERROR in http://deductions.svn.sourceforge.net/svnroot/deductions/n3_nojs/person-app-spec.n3 ( /home/jmv/.eulergui/n3_cache/person-app-spec.n35514610858284335823.n3 ) 
Error during re-parsing N3 source
eulergui.project.N3Source.manageParseN3(N3Source.java:370)
eulergui.project.N3Source.update(N3Source.java:348)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:96)
eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:38)

Cause:
http://deductions.svn.sourceforge.net/svnroot/deductions/n3_nojs/person-app-spec.n3
n3_project.exceptions.parser.ParsingException: Last character read : " " on line 1
Expecting one of these :

eulergui.drools_engine.ParserLink.parse(ParserLink.java:117)
eulergui.project.N3Source.doParseN3(N3Source.java:399)
eulergui.project.N3Source.manageParseN3(N3Source.java:367)
eulergui.project.N3Source.update(N3Source.java:348)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:96)
eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:38)
ERROR

 N3Source.parseResult(): parseResult (person-events.n3) was null ==> re-parse (and possibly re-read N3 source)
N3SourcetoDrools.translate(): java.lang.NullPointerException
N3Source.parseResult(): parseResult (person-app-spec.n3) was null ==> re-parse (and possibly re-read N3 source)
N3SourcetoDrools.translate(): java.lang.NullPointerException
N3Source.parseResult(): parseResult (gui_generic.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (java_event-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (generic_gui_projection-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (software_applications.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (rpo-rules-small.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (java_library-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (form-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (generic_to_java-rules.n3) was null ==> re-parse (and possibly re-read N3 source)
N3JavaMappingBuiltin.acceptConsequent(): Drools compile WARNING: javax.swing.border.LineBorder has no No Argument Constructor!
Rule: ?W <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#javax-swing-border-LineBorder>
in generic_to_java-rules.n3 ,5
N3Source.parseResult(): parseResult (java_library.n3) was null ==> re-parse (and possibly re-read N3 source)
N3Source.parseResult(): parseResult (app_gui-rules2.n3) was null ==> re-parse (and possibly re-read N3 source)

<plants-q.n3> <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true . #U
# Assign>> file:/home/jmv/src/eulergui_new/examples/plants.n3 ==> class N3Source : file:/home/jmv/src/eulergui_new/examples/plants.n3
<file:/home/jmv/src/eulergui_new/examples/newproject.n3p.n3> <http://eulergui.sf.net/ontology/project.owl.n3#hasN3Query> <plants-q.n3> . #U
<file:/home/jmv/src/eulergui_new/./examples/newproject.n3p.n3> <http://eulergui.sf.net/ontology/project.owl.n3#imports> <http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/pom.xml> .
May 14, 2011 10:59:36 AM eulergui.drools_engine.DroolsHelper printWorkingMemory
org.drools.runtime.rule.ConsequenceException: rule: project-java-rules.n3 4
        at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
        at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:927)
        at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
        at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
        at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
        at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
        at unif.TripleStoreDrools.fireAllRules(TripleStoreDrools.java:310)
        at eulergui.gui.controller.ApplicationKB.fireAllRules(ApplicationKB.java:197)
        at eulergui.gui.controller.ApplicationKB.loadN3Project(ApplicationKB.java:432)
        at eulergui.project.ProjectFactory.restoreN3P(ProjectFactory.java:271)

2011-05-13

Hi

I have an HP ProBook 4310s ; I follow the latest updates of Ubuntu 11.04, and since about 1 week there is a transient problem with the touchpad : after a few minutes it becomes very slow to react ; that is the pointer lags the motion on the touchpad.

And it's the same with an USB mouse.

Of course memory and disk have been checked.

When I work through an ssh console , it's fine.

I suspect a recent update ...

I'm using the gnome interface, but I think it's the same with Unity.

<jmv__> my vendor specializing in Ubuntu said I have better installing preceding Ubuntu release ...

<jmv__> I think I can try to solve this with community ...

<bregma> jmv__, it sounds like a problem in the kernel causing input event backlogs

xserver-xorg-input-synaptics

Synaptics TouchPad driver for X.Org server

Java: Regular expression summary

http://www.leepoint.net/notes-java/data/strings/40regular_expressions/25sum-regex.html

New mother board, AMD Phenom CPU and 8 Gb !!!!!!!!!!!!!!

Regular expresion Maven tests console:

Running |Failures: 

COMMIT

- clean TestJemmy, TestImportSwrl, RETETest

- URIModificationChecker . requestStop() : add call to thread.join();

- SwingHelper . disposeWindows() : call SwingUtilities.invokeAndWait() instead of invokeLater()

- ProjectFileManagement : change thread name

After waiting URI refresing thread's stop :

Tests run: 166, Failures: 0, Errors: 0, Skipped: 0
[INFO] [surefire-report:report {execution: default-cli}]
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 minutes 17 seconds
[INFO] Finished at: Fri May 13 14:43:05 CEST 2011

Tests run: 150, Failures: 0, Errors: 0, Skipped: 0
[INFO] [surefire-report:report {execution: default-cli}]
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 minutes 8 seconds
[INFO] Finished at: Fri May 13 12:27:41 CEST 2011

Tests run: 153, Failures: 0, Errors: 1, Skipped: 0
[ERROR] There are test failures.
Please refer to /home/jmv/src/eulergui_new/target/surefire-reports for the individual test results.
[INFO] [surefire-report:report {execution: default-cli}]
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17 minutes 6 seconds

testLocalFacebookSearch - [ Detail ]0.015

Wait for "Action NAME Component Chooser "./facebook-search.n3" " subcomponent to be displayed

org.netbeans.jemmy.TimeoutExpiredException: Wait for "Action NAME Component Chooser "./facebook-search.n3"" subcomponent to be displayedat org.netbeans.jemmy.Waiter.waitAction(Waiter.java:147)at org.netbeans.jemmy.operators.ContainerOperator.waitSubComponent(ContainerOperator.java:298)at org.netbeans.jemmy.operators.JButtonOperator.<init>(JButtonOperator.java:74)at org.netbeans.jemmy.operators.JButtonOperator.<init>(JButtonOperator.java:86)at eulergui.gui.TestFacebookSearch.checkSearchResultsBeforeAndAfterDrools(TestFacebookSearch.java:38)at eulergui.gui.TestFacebookSearch.testLocalFacebookSearch(TestFacebookSearch.java:28)

TODO

With new translations of OWL subclass assertions to N3 rules as a pre-processing step, the Swing rule base should be changed, because some form fields are duplicated.

COMMIT

- refactor in TestJemmy the way to get the EuleGUI Frame : should fix the last Error in test suite in TestFacebookSearch

- Fix bad URI in testFieldOldArchitecture

TODO : test suite lasts now 17 minutes , N3 parsing or conversions probably occur 2 times

- Fix test suite, broken by new " has changed on " messages due to new translations of OWL subclass assertions to N3 rules

- call waitUpdateThreads in DroolsInferenceEngine (maybe not necessary, but more safe)

java.net.MalformedURLException: no protocol: anotherURI
        at java.net.URL.<init>(URL.java:567)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at n3_project.helpers.N3toDroolsUpdater.getTimeStamp(N3toDroolsUpdater.java:123)
        at n3_project.helpers.N3toDroolsUpdater.getTimeStamp(N3toDroolsUpdater.java:113)
        at n3_project.helpers.N3toDroolsUpdater.outdated(N3toDroolsUpdater.java:138)
        at n3_project.helpers.N3toDroolsUpdater.uptodate(N3toDroolsUpdater.java:147)
        at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:78)
        at eulergui.project.Project.doTranslateN32Drools(Project.java:898)
        at eulergui.project.Project.translateN32Drools(Project.java:869)
        at eulergui.project.Project.prepareDrools(Project.java:830)
        at eulergui.project.Project.doRunDrools(Project.java:784)
        at eulergui.project.Project.runDroolsTriples(Project.java:739)
        at eulergui.project.Project.runDroolsTriples(Project.java:749)
        at eulergui.project.Project.runDroolsTriples(Project.java:760)
        at deductions.runtime.TestRulesForUserEvents.testFieldOldArchitecture(TestRulesForUserEvents.java:83)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:243)
        at junit.framework.TestSuite.run(TestSuite.java:238)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:24)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:127)
        at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:51)
        at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:110)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
        at $Proxy0.invoke(Unknown Source)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

2011-05-12

Thread [doN3SourceAdded: person-app-spec.n3] (Suspended (exception NullPointerException))
ResultManagement.displayOriginalSourceWithErrors(N3Source, N3ParseResult) line: 245
N3ParsingExceptionProcessor.process(Throwable, ProjectGUI, TemporaryFrame) line: 36
N3ConversionRefesher.updateN3(N3Source) line: 121
UpdateN3Thread.run() line: 38

update N3; PARSE ERROR in http://deductions.svn.sourceforge.net/svnroot/deductions/n3_nojs/person-app-spec.n3 ( /home/jmv/.eulergui/n3_cache/person-app-spec.n35664059993073976050.n3 ) 
Erreur pendant  re-parsing N3 source
eulergui.project.N3Source.manageParseN3(N3Source.java:370)
eulergui.project.N3Source.update(N3Source.java:348)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:96)
eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:38)

Cause:
http://deductions.svn.sourceforge.net/svnroot/deductions/n3_nojs/person-app-spec.n3
n3_project.exceptions.parser.ParsingException: Last character read : "@" on line 1
Expecting one of these :

eulergui.drools_engine.ParserLink.parse(ParserLink.java:117)
eulergui.project.N3Source.doParseN3(N3Source.java:399)
eulergui.project.N3Source.manageParseN3(N3Source.java:367)
eulergui.project.N3Source.update(N3Source.java:348)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:96)
eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:38)

Added translations of OWL subclass assertions to N3 rules in EulerGUI

Drools Error: [ERR 102] Line 71:0 mismatched input 'end' expecting 'then' in rule "koala.owl.as.rules.n3 2"

ErrorLines: - 71

Added this in launcher for Amaya :

bash -c 'UBUNTU_MENUPROXY= amaya &'

If you now open examples/koala.n3p with EG ( even version 1.8 ) , you see now a (partial ) translation of OWL into N3 rules , like :

{?VAR a ns2:Parent} => {?VAR a ns2:Animal}.
{?VAR a ns2:Person} => {?VAR a ns2:Animal}.
{?VAR a ns2:Animal} => true.
{?VAR a ns2:Quokka} => {?VAR a ns2:Marsupials}.
{?VAR a ns2:Quokka} => {?VAR ns2:isHardWorking true}.
{?VAR a ns2:Marsupials} => {?VAR a ns2:Animal}.
{?VAR a ns2:Forest} => {?VAR a ns2:Habitat}.
{?VAR a ns2:Koala} => {?VAR a ns2:Marsupials}.
{?VAR a ns2:Koala} => {?VAR ns2:isHardWorking false}.
{?VAR a ns2:Koala} => {?t0 a ns2:DryEucalyptForest. ?VAR ns2:hasHabitat ?t0}.

I just added an HTTP rule to a project that is run for each OWL/RDF sources :

deductions/n3_new/owl-subclass-assertions-to-rules.n3

The rule in red translates like this Drools , and this is not correct Drools:

rule "koala.owl.as.rules.n3 2"
when
  $Triple_1 : Triple( $VAR : subject, predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>", object == "<http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Animal>" )

end

2011-05-11

gnome-session-save --kill

Heat problems!

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 2
model name      : AMD Phenom(tm) 9850 Quad-Core Processor
stepping        : 3
cpu MHz         : 1250.000
cache size      : 512 KB

According to http://www.pantherproducts.co.uk/Articles/CPU/CPU%20Temperatures.shtml , it should be :

AMD Phenom X4 (9100, 9750, 9850) 61°C

and I have 98 °C , and had as much as 108 !!!!!!!!!!!

EulerGUI regressions fixed

there are regressions :

Happens whn the URIModificationChecker thread starts too early , when the initial N3 processing still runs :

Thread [N3  sources modification Checker] (Suspended (exception NullPointerException))
N3SourcetoDrools.translate(N3Source, boolean, boolean, boolean) line: 232
N3toDroolsUpdater.translate(N3Source, boolean, boolean, boolean) line: 87
Project.translateToDrools(N3Source, boolean, boolean) line: 939
N3ConversionRefesher.updateKB(Project, N3Source) line: 142
N3ConversionRefesher.n3SourceChanged(Project, N3Source) line: 45
ProjectChangeSupport.fireN3SourceChanged(Project, N3Source) line: 140
Project.fireN3SourceChanged(N3Source) line: 1362
URIModificationChecker.checkN3Source(N3Source) line: 86
URIModificationChecker.run() line: 60
Thread.run() line: 662

OWL and N3 rules

TODO:

:BabyBoomer
      a       owl:Class ;
      owl:equivalentClass
              [ a       owl:Class ;
                owl:intersectionOf (:Person [ a       owl:Restriction ;
                            owl:onProperty :hasBirthday ;
                            owl:someValuesFrom
                                    [ a       rdfs:Datatype ;
                                      owl:onDatatype xsd:dateTime ;
                                      owl:withRestrictions
                                              ([ xsd:maxInclusive "1964-12-31T23:59:59"^^xsd:dateTime
                                                ] [ xsd:minInclusive "1946-01-01T00:00:00"^^xsd:dateTime
                                                ])
                                    ]
                          ])
              ] .

From this I'd like to generate:

{ ?P :hasBirthday ?B .
  ?B string:notGreaterThan "1964-12-31T23:59:59"^^xsd:dateTime .
  "1946-01-01T00:00:00"^^xsd:dateTime string:notGreaterThan ?B .
} => {
  ?B a :BabyBoomerEVENT.
}.

Added translations of OWL subclass assertions to N3 rules in EulerGUI

COMITTED in Déductions:

add owl-subclass-assertions-to-rules.n3 to swrl-n3-rules.n3p

TESTED wih examples/koala.n3p

Tooltips in EulerGUI

Exception in the editor when the N3 is not parsed :

09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.NullPointerException
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor$5.getToolTipText_KB(TextEditor.java:545)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.TextEditor$5.getToolTipText(TextEditor.java:530)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.gjt.sp.jedit.textarea.ExtensionManager.getToolTipText(ExtensionManager.java:135)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.gjt.sp.jedit.textarea.TextAreaPainter.getToolTipText(TextAreaPainter.java:663)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.ToolTipManager$insideTimerAction.actionPerformed(ToolTipManager.java:662)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.Timer.fireActionPerformed(Timer.java:291)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.Timer$DoPostEvent.run(Timer.java:221)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue.access$000(EventQueue.java:85)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue$1.run(EventQueue.java:603)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue$1.run(EventQueue.java:601)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.security.AccessController.doPrivileged(Native Method)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
09:31:26 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

2011-05-10

Time comparisons with EulerGUI

It is possible to use string comparisons defined in CWM Builtins to also compare dates expressed in ISO (and XML Schema datatype) format.

They compare according to Unicode(tm) code order.

log:equalTo

string:equalIgnoringCase

string:greaterThan

string:lessThan

string:notEqualIgnoringCase

string:notGreaterThan

string:notLessThan

Here is a minimal example showing how to define that an event belongs to an interval . It supposes a minimal ontology with 3 properties hasStart , hasEnd, hasTime, and belongsTo :

{ ?INTERVAL :hasStart ?S ;
            :hasEnd ?E .
  ?EVENT :hasTime ?T .
  ?T string:notGreaterThan ?E .
  ?S string:notGreaterThan ?T .
} => {
  ?EVENT :belongsTo ?INTERVAL.
}.

Of source it is possible to modify this to support the owl-time ontology.

xsd:dataTime^^""

@prefix : <http://www.w3.org/TR/owl-time/> .
:telecon
      a       :Interval ;
      :hasBeginning :teleconStart .
      
:meeting
      a       :Interval ;
      :hasBeginning :meetingStart ;
      :hasDurationDescription
              :meetingDuration .

:teleconStart
      a       :Instant ;
      :inXSDDateTime
              2006-11-05T18:00:00-5:00 .

:meetingStart
      a       :Instant ;
      :inXSDDateTime
              2006-11-05T14:00:00-8:00 .

:meetingDuration
      a       :DurationDescription ;
      :minutes 45 .

Tests run: 150, Failures: 0, Errors: 0, Skipped: 0

EulerGUI multi-thread fixes

SNAPSHOT UPLOADED

COMMITS

- added deleteCache in TestGenericGuiGeneration, TestGenericGuiGenerationInsertLogical ;

it is necessary to delete the cache because same projects are compiled twice with and without useInsertLogical

- more thread safe fixes in N3SourcetoDrools : factPerN3Source, rulePackageNumber

DONE : still tailure in TestEulerGUITooltip ( probably the N3 parsing is not yet done when the test checks tooltips )

- N3SourcetoDrools: remove current_document , that is not thread safe

- N3SourcetoDrools: synchronize ruleBase; tripleResult : no need because no used in parallel N3 source processing

- N3SourcetoDrools: firstRule is moved to DroolsTripleHandler

- N3toDroolsUpdater: compilationTimestamps, threads are now concurrent collections

- Project : sourcess , searches are now concurrent collections

TODO: factPerN3Source, n3DocumentCount, current_document, globalRuleCount, droolsElapsedTime

2011-05-09

- unactivate test_uml2() in TestGenericGuiGeneration (not clear why this stopped working ; was OK at revision 2394 )

- reactivated test_uml2() , test_foaf_import2(), in TestGenericGuiGenerationInsertLogical

-r 2407 # crash !!!!!!!

-r 2405 # crash !!!!!!!

svn update -r 2403 # crash !!!!!!!

svn update -r 2401 # crash !!!!!!!

svn update -r 2394 OK

I read an interesting discussion on "create HTML based on RDF?" on the public-lod mailing list.

Real estate; delegate computations to Java in N3 rule engine

Suppose an ontology like this:

AppartmentOrHouse <>--- Room <>--- ClosedCurve <>--- Point

N3 rules are well suited to express commercial or regulation rules, like determining a category, or estimating prices. However, It would not be convenient for complex mathematical computations, for example to express in N3 the computation of the surface of a room.

So these computations would be written in a imperative language, Java for instance. Then there are two implementation questions:

  1. how to ease access to the RDF data for the Java code ?
  2. how to give the N3 rule engine access to the results of the Java code ?

For point 1, we currently have nothing smart implemented, just access to the interface ITripleStoreRETE extending ITripleStore. But there are hints that need to be generalised, see Calling user Java code , Extension points with interfaces . Also there several projects for RDF to Java mapping frameworks, see Experience using Java-based frameworks for RDF-to-POJO (and vice versa) mapping, rdf2java, Tripresso .

For point 2, here is the recommended idiom:

# First, assign a Java class to an RDF resource:
{ ?CC a re:ClosedCurve.
} => {
  ?CC a java:geometry-ClosedCurve .
}.

# Then, the computation is triggered, and the result goes into the RDF KB:
{ ?CC a re:ClosedCurve. # facultative
  ?CC javam:getSurface ?SURFACE.
} => {
  ?CC re:hasSurface ?SURFACE. }.

2011-05-08

http://www.dcc.fc.up.pt/~vsc/Yap/documentation.html#index-format_002f2

update N3; PARSE ERROR in file:/home/jmv/src/deductions/n3_nojs/form-rules.n3 ( /home/jmv/src/deductions/n3_nojs/form-rules.n3 ) 
Erreur pendant  re-parsing N3 source
eulergui.project.N3Source.manageParseN3(N3Source.java:368)
eulergui.project.N3Source.update(N3Source.java:348)
eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:96)
eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:38)

Cause

COMMIT

IOManager.downloadURLToLocalCache() : rethrow exception instead of return value

2011-05-07

COMMIT

URICacheOSCache : if object == null , nothing to cache

Test run with full or empty cache

Tests run: 152, Failures: 0, Errors: 0, Skipped: 0

May 7, 2011 7:37:18 PM eulergui.drools_engine.DroolsHelper printWorkingMemory
org.drools.runtime.rule.ConsequenceException: rule: project-java-rules.n3 4
        at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
        at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:927)
        at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
        at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
        at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
        at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
        at unif.TripleStoreDrools.fireAllRules(TripleStoreDrools.java:310)
        at eulergui.gui.controller.ApplicationKB.fireAllRules(ApplicationKB.java:197)
        at eulergui.gui.controller.ApplicationKB.loadN3Project(ApplicationKB.java:432)
        at eulergui.project.ProjectFactory.restoreN3P(ProjectFactory.java:273)
        at eulergui.project.ProjectFactory.restoreAny(ProjectFactory.java:374)
        at eulergui.project.PostprojectHelper.projectLoaded(PostprojectHelper.java:36)
        at eulergui.gui.controller.N3ConversionRefesher.projectLoaded(N3ConversionRefesher.java:160)
        at eulergui.project.ProjectChangeSupport.fireProjectLoaded(ProjectChangeSupport.java:96)
        at eulergui.project.Project.rethrowEventsPlease(Project.java:1350)
        at n3_project.ProjectGUI.newWindow(ProjectGUI.java:222)
        at n3_project.ProjectGUI.main(ProjectGUI.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.netbeans.jemmy.ClassReference.invokeMethod(ClassReference.java:137)
        at org.netbeans.jemmy.ClassReference.startApplication(ClassReference.java:101)
        at eulergui.gui.TestJemmy.launchEulerGUIWithArgument(TestJemmy.java:222)
        at eulergui.gui.TestN3FormatForProject.test_person_import3(TestN3FormatForProject.java:25)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:243)
        at junit.framework.TestSuite.run(TestSuite.java:238)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:24)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:127)
        at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:51)
        at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:110)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
        at $Proxy0.invoke(Unknown Source)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: java.lang.NullPointerException
        at org.drools.common.EqualityAssertMapComparator.hashCodeOf(EqualityAssertMapComparator.java:48)
        at org.drools.core.util.ObjectHashMap.get(ObjectHashMap.java:100)
        at org.drools.common.SingleThreadedObjectStore.getHandleForObject(SingleThreadedObjectStore.java:122)
        at org.drools.common.AbstractWorkingMemory.getFactHandle(AbstractWorkingMemory.java:861)
        at n3_project.helpers0.Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.evaluate(Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.java:33)
        at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
        ... 58 more
May 7, 2011 7:37:18 PM eulergui.project.ProjectFactory restoreN3P
May 7, 2011 7:37:18 PM eulergui.project.ProjectChangeSupport addProjectListener

mvn surefire-report:report-only 

text/turtle and text/n3 are both now IANA registered media types:

http://www.iana.org/assignments/media-types/text/turtle

http://www.iana.org/assignments/media-types/text/n3

Very good news !

This should not appear only , N3 files also :

manageN3Cache() ./employee.uml

Still problems with the test suite, but SNAPSHOT uploaded : Révision : 2430

remove unused class ProjectsIndexer

( pour faire plaisir à Luc )



2011-05-06

COMMIT

solved 2 big multi-thread problems: isQuery and noCompilation were fields in N3SourceToDrools, modified concurrently

TODO still one multi-thread problem

 java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at n3_project.helpers.N3SourcetoDrools.copyN3factsToDrools(N3SourcetoDrools.java:581)
at n3_project.helpers.N3toDroolsUpdater.copyN3factsToDrools(N3toDroolsUpdater.java:197)
at eulergui.project.Project.translateToDrools(Project.java:1005)
at eulergui.gui.controller.N3ConversionRefesher.updateKB(N3ConversionRefesher.java:137)
at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:39)

2011-05-05

FIX infinite loop : opening locally deductions/n3_nojs/foaf_import2.n3p ; open one N3 source, put mouse other the editor

- cause : ParsingException constructor was calling indirectly ParserLink.parse()

        at eulergui.project.N3Source.parseResult(N3Source.java:380)
        at n3_project.exceptions.parser.ParsingException.<init>(ParsingException.java:33)
        at eulergui.drools_engine.ParserLink.parse(ParserLink.java:118)
        at eulergui.project.N3Source.doParseN3(N3Source.java:394)
        at eulergui.project.N3Source.manageParseN3(N3Source.java:365)
        at eulergui.project.N3Source.update(N3Source.java:348)
        at eulergui.project.N3Source.parseResult(N3Source.java:380)

New twit: http://twitter.com/#!/jmvanel

Keeping business logic and infrastructure and platform code separate: pure business logic are N3 rules, or OWL: http://tinyurl.com/664cvvw

New snapshot uploaded for Revision 2412 ; see CHANGELOG

Then ready for a release, when the parser multithtread issue is solved .

Tested without network with project deductions/n3_nojs/cv2.n3p

COMMITS

- class EulerGUI : set Level WARNING for Logger("cache") : TESTED

(necessary to keep a reference for the setting to remain in effet, as the javadoc says ) )

FIX NPE in URIModificationChecker . checkN3Source

- in class ProjectGUI assert that there is only one URIModificationChecker (assertion is not violated)

- ensure that the URIModificationChecker is stopped when the windows is closed

TODO: FIX (random) Exception due to N3 parser; in test TestJavaEditor ( project deductions/n3_new/foaf_import.n3p )

thread "doN3SourceAdded: ./foaf.n3" java.lang.RuntimeException: Error during re-parsing N3 source

at eulergui.project.N3Source.manageParseN3(N3Source.java:368)

Caused by: java.lang.NullPointerException

at eulergui.parser.n3.impl.parser4j.service.N3Parser.createUri(N3Parser.java:475)

Exception in thread "doN3SourceAdded: ./foaf.n3" java.lang.RuntimeException: Error during re-parsing N3 source
at eulergui.project.N3Source.manageParseN3(N3Source.java:368)
at eulergui.project.N3Source.update(N3Source.java:348)
at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:96)
at eulergui.gui.controller.UpdateN3Thread.run(UpdateN3Thread.java:38)
Caused by: java.lang.NullPointerException
at eulergui.parser.n3.impl.parser4j.service.N3Parser.createUri(N3Parser.java:475)
at eulergui.parser.n3.impl.parser4j.service.N3Parser.createSubject(N3Parser.java:300)
at eulergui.parser.n3.impl.parser4j.service.N3Parser.createStatementData(N3Parser.java:276)
at eulergui.parser.n3.impl.parser4j.service.N3Parser.computeN3Model(N3Parser.java:262)
at eulergui.parser.n3.impl.parser4j.service.N3Parser.parseN3(N3Parser.java:227)
at eulergui.drools_engine.ParserLink.doParse(ParserLink.java:132)
at eulergui.drools_engine.ParserLink.parse(ParserLink.java:110)
at eulergui.project.N3Source.doParseN3(N3Source.java:394)
at eulergui.project.N3Source.manageParseN3(N3Source.java:365)

- inhibit URIModificationChecker (refreshing N3 sources) when inference runs

- in URIModificationChecker no need to set initial timestamps anymore

- in N3Source , suppress inappropriate messages "N3 source has changed"

- class EulerGUI : try to set Level WARNING for Logger("cache")

- TemporaryFrame : print status "WARNING" or "ERROR"

- DroolsTripleHandler : attempt to fix Drools compile errors in query2.n3 due to new Java objects in N3 KB feature

TODO: this does fix not issues in test suite

2011-05-04

Thread [main] (Suspended (exception NullPointerException))
EqualityAssertMapComparator.hashCodeOf(Object) line: 48
ObjectHashMap.get(Object) line: 100
SingleThreadedObjectStore.getHandleForObject(Object) line: 122
ReteooStatefulSession(AbstractWorkingMemory).getFactHandle(Object) line: 861
Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.evaluate(KnowledgeHelper, WorkingMemory) line: 33
DefaultAgenda.fireActivation(Activation) line: 917
DefaultAgenda.fireNextItem(AgendaFilter) line: 856
DefaultAgenda.fireAllRules(AgendaFilter, int) line: 1071
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter, int) line: 785
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() line: 751
TripleStoreDrools.fireAllRules() line: 310
ApplicationKB.fireAllRules() line: 194
ApplicationKB.n3SourceAdded(Project, N3Source) line: 221
ApplicationKB.projectLoaded(Project) line: 293
ProjectChangeSupport.fireProjectLoaded(Project) line: 96
Project.prepare() line: 1192
ProjectFactory.prepareProject(Project, URL, boolean) line: 330
ProjectFactory.restoreXMLFile(File, URL, boolean) line: 130
ProjectFactory.restoreXMLURL(URL, boolean) line: 224
ProjectFactory.restore(String, boolean) line: 53
ProjectFactory.restoreAny(URI, boolean) line: 378
CommandLineArguments.makeProjectFromUserArgument(String[]) line: 43
ProjectGUI.main(String[]) line: 171
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ClassReference.invokeMethod(String, Object[], Class[]) line: 137
ClassReference.startApplication(String[]) line: 101
TestJavaEditor(TestJemmy).launchEulerGUIWithArgument(String) line: 218
TestJavaEditor.testSimpleURLProject() line: 41
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
TestJavaEditor(TestCase).runTest() line: 168
TestJavaEditor(TestCase).runBare() line: 134
TestResult$1.protect() line: 110
TestResult.runProtected(Test, Protectable) line: 128
TestResult.run(TestCase) line: 113
TestJavaEditor(TestCase).run(TestResult) line: 124
TestSuite.runTest(Test, TestResult) line: 243
TestSuite.run(TestResult) line: 238
JUnit3TestReference.run(TestExecution) line: 130
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197

Thread [main] (Suspended (exception NullPointerException))
EqualityAssertMapComparator.hashCodeOf(Object) line: 48
ObjectHashMap.get(Object) line: 100
SingleThreadedObjectStore.getHandleForObject(Object) line: 122
ReteooStatefulSession(AbstractWorkingMemory).getFactHandle(Object) line: 861
Rule_project_java_rules_n3_4_0DefaultConsequenceInvoker.evaluate(KnowledgeHelper, WorkingMemory) line: 33
DefaultAgenda.fireActivation(Activation) line: 917
DefaultAgenda.fireNextItem(AgendaFilter) line: 856
DefaultAgenda.fireAllRules(AgendaFilter, int) line: 1071
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter, int) line: 785
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() line: 751
TripleStoreDrools.fireAllRules() line: 310
ApplicationKB.fireAllRules() line: 194
ApplicationKB.n3SourceAdded(Project, N3Source) line: 221
ApplicationKB.projectLoaded(Project) line: 293
ProjectChangeSupport.fireProjectLoaded(Project) line: 96
Project.prepare() line: 1186
ProjectFactory.prepareProject(Project, URL, boolean) line: 330
ProjectFactory.restoreXMLFile(File, URL, boolean) line: 130
ProjectFactory.restoreXMLURL(URL, boolean) line: 224
ProjectFactory.restore(String, boolean) line: 53
ProjectFactory.restoreAny(URI, boolean) line: 378
CommandLineArguments.makeProjectFromUserArgument(String[]) line: 43
ProjectGUI.main(String[]) line: 171
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ClassReference.invokeMethod(String, Object[], Class[]) line: 137
ClassReference.startApplication(String[]) line: 101
TestJavaEditor(TestJemmy).launchEulerGUIWithArgument(String) line: 218
TestJavaEditor.testSimpleURLProject() line: 41
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
TestJavaEditor(TestCase).runTest() line: 154
TestJavaEditor(TestCase).runBare() line: 127
TestResult$1.protect() line: 106
TestResult.runProtected(Test, Protectable) line: 124
TestResult.run(TestCase) line: 109
TestJavaEditor(TestCase).run(TestResult) line: 118
TestSuite.runTest(Test, TestResult) line: 208
TestSuite.run(TestResult) line: 203
JUnit3TestReference.run(TestExecution) line: 130
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197

"null" . equals( e1.getLocalizedMessage() )
&&
"null" . equals( e1.getCause() )

e1.getLocalizedMessage() .contains( "null" )
    &&
e1.getCause().toString() . contains( "null" );

COMMIT

- pom.xml : upgrade commons-cli:commons-cli 1.0 -> 1.2 ; log4j:log4j 1.2.14 -> 1.2.16 ; opensymphony:oscache 2.4 -> 2.4.1

- pom.xml : try to remove output in console during tests

- synchronize on N3Source.localN3File in manageN3Cache

- reestablish warning window when an N3 source has been updated on file or Internet

mvn surefire:help -Ddetail=true

- TestGenericGuiGenerationInsertLogical , TestGenericGuiGenerationInsertLogicalRefactorRules : set drools options explicitely

- in N3SourcetoDrools add synchronize blocks when working memory of rule base could be modified in parallel by new UpdateN3Thread

N3SourcetoDrools : default n3JavaPathSeparator = '-';

FIX : keys in cache : were identical for the rule base and for the local copy of the .n3p project

FIX : Cache File for the local copy of the .n3p project was deleteOnExit()

Thread [doN3SourceAdded: person-events.n3] (Suspended (breakpoint at line 737 in N3JavaMappingBuiltin))

N3JavaMappingBuiltin.setN3JavaPathSeparator(char) line: 737

DroolsTripleHandler.setJavaObjectsInDrools(boolean, TripleStoreDrools) line: 1934

N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) line: 280

N3SourcetoDrools.translate(N3Source, boolean, boolean) line: 242

N3toDroolsUpdater.translate(N3Source, boolean) line: 90

Project.translateToDrools(N3Source, boolean, boolean) line: 983

N3ConversionRefesher.updateKB(Project, N3Source) line: 137

UpdateN3Thread.run() line: 39

2011-05-02

COMMIT

URIModificationChecker : reestablish "check less frequently the URL's on Internet"

FIX EyeHelper.addN3SourceToEulerArguments() in the case of RDF N3 source ( was breaking SWRL tests )

2011-05-01

java.lang.RuntimeException: ** ERROR ** file:///home/jmv/src/eulergui_new/examples/dl-safe_small.owl ** invalid_document(after_line(46))

2011-04-30

EulerGUI : N3 parser called several times

When launching Drools :

Daemon Thread [SwingWorker-pool-4-thread-1] (Suspended (breakpoint at line 98 in ParserLink))
ParserLink.parse(N3Source) line: 98
ParserLink.parseAndUpdateSource(N3Source) line: 128
N3SourcetoDrools.translate(N3Source, boolean, boolean) line: 240
N3toDroolsUpdater.translate(N3Source, boolean) line: 87
Project.doTranslateN32Drools(boolean) line: 934
Project.translateN32Drools(boolean) line: 887
Project.prepareDrools(boolean) line: 866
Project.doRunDrools(boolean) line: 821
Project.runDroolsTriples(boolean) line: 777
DroolsInferenceEngine.launch() line: 28
RunActionGeneric$EngineSwingWorker.doInBackground() line: 117
RunActionGeneric$EngineSwingWorker.doInBackground() line: 1
SwingWorker$1.call() line: 277
FutureTask$Sync.innerRun() line: 303
SwingWorker$2(FutureTask<V>).run() line: 138
RunActionGeneric$EngineSwingWorker(SwingWorker<T,V>).run() line: 316
ThreadPoolExecutor$Worker.runTask(Runnable) line: 886
ThreadPoolExecutor$Worker.run() line: 908
Thread.run() line: 662

At application startup :

Thread [main] (Suspended (breakpoint at line 98 in ParserLink))
ParserLink.parse(N3Source) line: 98
ParserLink.parseAndUpdateSource(N3Source) line: 128
N3SourcetoDrools.translate(N3Source, boolean, boolean) line: 240
N3toDroolsUpdater.translate(N3Source, boolean) line: 87
Project.translateToDrools(N3Source, boolean, boolean) line: 980
N3ConversionRefesher.updateKB(Project, N3Source) line: 131
N3ConversionRefesher.n3SourceAdded(Project, N3Source) line: 51
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 73
Project.rethrowEventsPlease() line: 1355
ProjectGUI.newWindow(Project, boolean) line: 227
ProjectGUI.main(String[]) line: 180

Thread [main] (Suspended (breakpoint at line 98 in ParserLink))
ParserLink.parse(N3Source) line: 98
N3Source.doUpdate() line: 367
N3Source.update() line: 358
N3ConversionRefesher.updateN3(N3Source) line: 90
N3ConversionRefesher.n3SourceAdded(Project, N3Source) line: 50
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 73
Project.rethrowEventsPlease() line: 1355
ProjectGUI.newWindow(Project, boolean) line: 227
ProjectGUI.main(String[]) line: 180

2011-04-29

[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   commons-cli:commons-cli ................................... 1.0 -> 1.2
[INFO]   commons-logging:commons-logging ......... 1.0.4 -> 99.0-does-not-exist
[INFO]   log4j:log4j ......................................... 1.2.14 -> 1.2.16
[INFO]   opensymphony:oscache .................................... 2.4 -> 2.4.1
[INFO]   org.drools:drools-api .............................. 5.1.1 -> 5.2.0.M1
[INFO]   org.drools:drools-compiler ......................... 5.1.1 -> 5.2.0.M2

EulerGUI : timeout for N3 sources from Internet

COMMIT

- simplify URIModificationChecker by calling N3Source.manageN3Cache()

- TestJemmy : fix TestGenericGuiGeneration where the "EulerGUI Message" window was taken for the generated application

- add 2 s timeout also for "add URL" button, implemented in SourceFactory

- in N3SourceFromXMI, remove the useless "retry once"

2011-04-28

Ubuntu 11.04 'Natty Narwhal'.

Thread [main] (Suspended (breakpoint at line 132 in ApplicationKB))
ApplicationKB.makeInternalProject() line: 132
ApplicationKB.<init>() line: 84
ApplicationKB.instance() line: 71
Project.prepare() line: 1198
ProjectFactory.prepareProject(Project, URL, boolean) line: 329
ProjectFactory.restoreXMLFile(File, URL, boolean) line: 134
ProjectFactory.restoreXML(File, boolean) line: 85
ProjectFactory.restore(File) line: 79
ProjectFactory.restore() line: 195
CommandLineArguments.makeProjectFromUserArgument(String[]) line: 39
BasicRuntime.initialize(String[]) line: 100
BasicRuntimeTest.testSimpleInference() line: 59
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
BasicRuntimeTest(TestCase).runTest() line: 154
BasicRuntimeTest(TestCase).runBare() line: 127
TestResult$1.protect() line: 106
TestResult.runProtected(Test, Protectable) line: 124
TestResult.run(TestCase) line: 109
BasicRuntimeTest(TestCase).run(TestResult) line: 118
JUnit3TestReference.run(TestExecution) line: 130
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197

EulerGUI : cache for N3 sources from Internet

I discovered that the cause of random tests result lays in the FOAF site being often down.

I must catch the network timeout exception so that project loading can go on, and eventually the failing URI will be gotten by the URI checker thread.

http://classic-web.archive.org/web/20080611134628/http://xmlns.com/foaf/spec/index.rdf

Fixing the issues in EG regarding timeouts , and how to work best with failing URI's : they are flagged with N3Source.setAccessible(false) , and no more checked with manageN3Cache() .

Also exception are caught so that project loading can go on in case of failing URI's; just error windows are produced.

TESTED with this FOAF site down : http://xmlns.com/foaf/spec/index.rdf,

Running deductions.runtime.TestRulesForUserEvents
Tests run: 4, Failures: 2, Errors: 1, Skipped: 0, Time elapsed: 67.174 sec <<< FAILURE!
Running eulergui.gui.TestFacebookSearch
Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 316.559 sec <<< FAILURE!

Thread [N3  sources modification Checker] (Suspended (breakpoint at line 101 in RDFToN3Converter)) (out of synch)
RDFToN3Converter.getN3FromRDFSynchronously(String, File) line: 101 (out of synch)
RDFToN3Converter.downloadRDFAndMakeN3(String, File) line: 55 (out of synch)
N3SourceFromRDF.convertToN3() line: 105
N3Source.manageN3Cache(N3Source) line: 475
N3SourceFromRDF.doUpdate() line: 69
N3SourceFromRDF(N3Source).update() line: 414
N3ConversionRefesher.updateN3(N3Source) line: 90
N3ConversionRefesher.n3SourceChanged(Project, N3Source) line: 43
ProjectChangeSupport.fireN3SourceChanged(Project, N3Source) line: 140
Project.fireN3SourceChanged(N3Source) line: 1412
URIModificationChecker.checkN3Source(N3Source) line: 129
URIModificationChecker.run() line: 77
Thread.run() line: 662

COMMIT

- Work around a problem with Eye : URL beginning with file:/// work, but not with a single / .

- could not pass the test suite, because FOAF ontology is not available at http://xmlns.com/foaf/spec/index.rdf

* I added a connection timeout of 1000 ms in URICacheImpl.getURITimeStamp() to have a quick fail .

- extract code into convertToN3() for N3SourceFromRDF , N3SourceFromOWL

eye --pass --nope \
--wcache http://deductions.svn.sourceforge.net/svnroot/deductions/n3_new/swrl-n3-rules.n3 /home/jmv/.eulergui/n3_cache/swrl-n3-rules.n32976197904589621514.n3 \
--wcache http://deductions.svn.sourceforge.net/svnroot/deductions/n3_new/variableSubstitution.n3 /home/jmv/.eulergui/n3_cache/variableSubstitution.n32031038912161997742.n3 \
http://deductions.svn.sourceforge.net/svnroot/deductions/n3_new/swrl-n3-rules.n3 \
http://deductions.svn.sourceforge.net/svnroot/deductions/n3_new/variableSubstitution.n3 \
file:/tmp/translation-724542147409490235.n3 \
--query http://deductions.svn.sourceforge.net/svnroot/deductions/n3_new/swrl-n3-rulesQ.n3

2011-04-27

Trying EclEmma 1.5.2 Java Code Coverage for Eclipse

http://www.eclemma.org/

EulerGUI : cache for N3 sources from Internet

TODO :

- also use same N3 sources Internet cache mechanism for N3 projects

- tests duration went from 8 mn to 15 mn

COMMIT

- activate --wcache for Euler engine, TESTED with

eulergui --no-qnames --pass http://eulersharp.sourceforge.net/2007/07test/abc.n3

COMMIT

cache for N3 sources from Internet (5). This is necessary for doing demos without Internet :) .

- remove IOMAnager.getLocalCache(); change getLocalN3() to call manageN3Cache()

- fix N3SourceFromXMI, N3SourceFromXML_Gloze,

- fix TestJavaEditor, because title of windows for translated non N3 sources do not include "translated" anymore

TESTS PASS !

Pave the way for a cache for N3 sources from Internet (4). This is necessary for doing demos without Internet :) .

- avoid useless copy from one temp location to another in N3SouceFromXML_Gloze

- pave the way in N3SourceFromXMI

TODO :

- extract code into convertToN3() for each N3Source subclass

- remove IOMAnager.getLocalCache(); change getLocalN3() to call manageN3Cache()

- also use same mechanism for N3 projects

2011-04-22

Pave the way for a cache for N3 sources from Internet

This is necessary for doing demos without Internet :) .

2011-04-21

TODO : to be able to make demos without Internet : minimal Web cache for SWRL rules

SNAPSHOT uploaded !

Suppose I have arguments that run fine e.g. :

eye http//a.org/a.n3 --query http//a.org/q.n3

- By default in N3Source accessible = true

eye --wcache : sent mail to Jos .

2011-04-20

file:///home/jmv/src/eulergui_new/target/site/emma/index.html

java.lang.RuntimeException: ** ERROR ** sem ** error(type_error(atom,format([60,112,62,65,110,32,105,110,102,101,114,101,110,99,101,59,32,103,105,118,105,
110,103,32,116,104,105,115,32,114,101,115,117,108,116,58,32,126,97,32,60,47,112,62],
charsio:[<http://example.com#connected>(<http://example.com#Davis>,
<http://example.com#Hancock>)])),[format/2|local_sp(269799044,270097676,[],[])])

Why is the subproject in WM having correct N3 source ?

Thread [main] (Suspended)
SubProjectsManagement.addButton(Project) line: 33
ProjectGUI_Updater.subprojectAdded(Project, Project) line: 143
ProjectChangeSupport.fireAddSubproject(Project, Project) line: 104
Project.addSubProject(Project) line: 227
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
DeferredMethodCall.doPperformMethodCall(Object, Map<String,Object>) line: 118
DeferredMethodCall.performMethodCall(Object, Map<String,Assignment>) line: 90
DeferredMethodCall.assign(Object, List<Assignment>) line: 70
DeferredMethodCall.assign(Assignment, List<Assignment>) line: 40
Rule_DeferredMethodCall_0.defaultConsequence(KnowledgeHelper, ArrayList, FactHandle, Assignment, FactHandle, DeferredMethodCall, FactHandle) line: 10
Rule_DeferredMethodCall_0DefaultConsequenceInvoker.evaluate(KnowledgeHelper, WorkingMemory) line: 39
DefaultAgenda.fireActivation(Activation) line: 917
DefaultAgenda.fireNextItem(AgendaFilter) line: 856
DefaultAgenda.fireAllRules(AgendaFilter, int) line: 1071
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter, int) line: 785
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() line: 751
TripleStoreDrools.fireAllRules() line: 310
ApplicationKB.fireAllRules() line: 204
ApplicationKB.n3SourceAdded(Project, N3Source) line: 232
ApplicationKB.projectLoaded(Project) line: 304
ProjectChangeSupport.fireProjectLoaded(Project) line: 96
Project.rethrowEventsPlease() line: 1369
ProjectGUI.newWindow(Project, boolean) line: 227
ProjectGUI.main(String[]) line: 180

Thread [main] (Suspended (breakpoint at line 25 in SubProjectsManagement))
SubProjectsManagement.addButton(Project) line: 25
ProjectGUI_Updater.subprojectAdded(Project, Project) line: 143
ProjectChangeSupport.fireAddSubproject(Project, Project) line: 104
Project.rethrowEventsPlease() line: 1393
ProjectGUI.newWindow(Project, boolean) line: 227
ProjectGUI.main(String[]) line: 180

COMMITED

Work on new N3 Format For Project : subproject does not work

- in ParserLink, in subjects and objects (not in lists nor predicates) , systematically expand the <> URI ; return '<' + modelURI + '>' if "<>" equals raw N3 String

- in ProjectFactory . restoreAny , normalize input URI

TESTS PASS

Work on new N3 Format For Project : subproject does not work

- TestN3FormatForProject does pass again

TODO

- the URI <> appears both in project and subproject , and <> is not expanded internally

- still random error in deductions.runtime.BasicRuntimeTest.*4

- test reading new N3 Format from an URL

2011-04-19

TODO stop using rdfs:seeAlso for real loacation of an EulerGUI project .

Thread [main] (Suspended (breakpoint at line 23 in SubprojectHelper))
SubprojectHelper.projectLoaded(Project) line: 23
N3ConversionRefesher.projectLoaded(Project) line: 148
ProjectChangeSupport.fireProjectLoaded(Project) line: 96
Project.rethrowEventsPlease() line: 1362
ProjectGUI.newWindow(Project, boolean) line: 223
ProjectGUI.main(String[]) line: 176

2011-04-18

21:23:55 [jEdit I/O #1] [error] ErrorListDialog$ErrorEntry: http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/pom.xml:
21:23:55 [jEdit I/O #1] [error] ErrorListDialog$ErrorEntry: The file could not be loaded correctly (some data might be lost) with
21:23:55 [jEdit I/O #1] [error] ErrorListDialog$ErrorEntry: the encoding "UTF-8Y".

ISSUE

This does not work in the consequent with current Drools N3 engine, because ?CP is not declared with a type.

However, it does not matter what the type is, because the property call is deferred. ?CP should be created as a new blank mode in the usual way.

?PANE a gengui:Frame .
?Layout a java:java-awt-GridLayout
; javam:setColumns ( 1 )
; javam:setRows ( 10 ) .
?PANE javap:contentPane ?CP .
?CP javam:setLayout ( ?Layout ).

COMMITED

ReflectionHelper : in method findMethod , return method With Same Name And Arguments Length also in case of 1 argument

N3JavaMappingBuiltin.acceptConsequent(): Drools compile WARNING: javax.swing.border.LineBorder has no No Argument Constructor!
Rule: ?W <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#javax-swing-border-LineBorder>

in file:/home/jmv/src/deductions/n3_nojs/generic_to_java-rules.n3 ,5
ReflectionHelper.findMethod(): java.lang.NoSuchMethodException: javax.swing.JFrame.setLayout(java.awt.GridBagLayout)

2011-04-17

subscribed to deductions_commits all developers : XXX@users.sourceforge.net

FitNesse:

http://fitnesse.org/FitNesse.UserGuide.TwoMinuteExample

COMMITED

generic_to_java-rules.n3 : solved the old issue of refreshing generated GUI dynamically : simply updated the rules calling Container.add()

TODO

Remove thse messages :

N3JavaMappingBuiltin.acceptConsequent(): Drools compile WARNING: javax.swing.border.LineBorder has no No Argument Constructor!
Rule: ?W <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#javax-swing-border-LineBorder>
in file:/home/jmv/src/deductions/n3_nojs/generic_to_java-rules.n3 ,5
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: javax.swing.JFrame.revalidate() ==> null
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JTextField, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JLabel, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JTextField, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JLabel, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JTextField, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JLabel, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JTextField, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)
ReflectionHelper.findMethod() 4: substituted non-Object type did not work: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JLabel, java.lang.Integer) ==> public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)

2011-04-16

This rule in query2.n3 is wrongly translated in Drools, and is not useful anymore , so I remove it from swing-rules3.n3p :

{
?X <http://java.sun.com/method#pack> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.
}
 => {
?X <http://java.sun.com/method#pack> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.
}

2011-04-15

EulerGUI's Drools N3 engine

- WIP : further simplifying the N3 - Java mapping by adding Triple.setObject() methods for each primitive type

- errors in Drools compilation (considered as internal errors) are marked SEVERE

TESTS PASS

2011-04-09

EulerGUI's Drools N3 engine

WIP : simplifying the N3 - Java mapping (working on updating the KB on focus lost events) : large commit

Needed to deactivate some tests in :

- TestGenericGuiGenerationInsertLogical : pending_test_foaf_import2 , pending_test_uml2

- TestReasonning : 2 math tests

- BasicRuntimeTest : pending_testJavaMappingAntecedentVariable , pending_testJavaMappingAntecedentVariableString2 , etc

class TestJemmy: in tearDown() reestablish global defaults:

setUseInsertLogical(true);

setN3JavaPathSeparator( '-' );

setJavaObjectsInDrools(true);

TestGenericGuiGenerationInsertLogical : in setUp N3 Java Path Separator '_' was not set

TestReasonning : print Working Memory when test fails

BasicRuntime : concerning empty prefix ( : ) , USER_INPUT_URI take precedence over prefix Declarations From Project

2011-04-04

B: http://elefant.developer.nicta.com.au/ from danbri

<danbri> B:Elefant (Efficient Learning, Large-scale Inference, and Optimisation Toolkit) is an open source library for machine learning licensed under the Mozilla Public License

REFACTOR ReflectionHelper.javaPropertyIsN3Literal()

- that paves the way for correct processing of String typed Java properties in N3 antecedent in N3JavaMappingBuiltin.makeDroolsCriterium() .

- GUIKBAdapter: also forward GUI Events To KB if source is instanceof JButton

INFO: XMI ou UMLT analysé: http://deductions.svn.sourceforge.net/svnroot/deductions/n3_logical/extlibrary.ecore
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.net.SocketException: Connection reset
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at eulergui.inputs.XMIToN3Converter.loadECoreURI(XMIToN3Converter.java:236)
at eulergui.inputs.XMIToN3Converter.loadEcoreURIAndTranslateToN3(XMIToN3Converter.java:69)
at eulergui.inputs.XMIToN3Converter.loadURIAndTranslateToN3(XMIToN3Converter.java:55)
at eulergui.inputs.N3SourceFromXMI.prepare(N3SourceFromXMI.java:44)
at eulergui.project.Project.setLocation(Project.java:118)
at eulergui.project.Project.setUri(Project.java:171)
at eulergui.project.ProjectFactory.prepareProject(ProjectFactory.java:284)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:122)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:216)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:50)
at eulergui.CommandLineArguments.makeProjectFromUserArgument(CommandLineArguments.java:40)
at n3_project.ProjectGUI.main(ProjectGUI.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.netbeans.jemmy.ClassReference.invokeMethod(ClassReference.java:137)
at org.netbeans.jemmy.ClassReference.startApplication(ClassReference.java:101)
at eulergui.gui.TestJemmy.launchEulerGUI(TestJemmy.java:220)
at eulergui.gui.TestJemmy.generateAndLaunch(TestJemmy.java:241)
at eulergui.gui.TestGenericGuiGenerationInsertLogical.test_ecore2(TestGenericGuiGenerationInsertLogical.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2672)
at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanName(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1445)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1241)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)

2011-04-03

env LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype

Regression : focus lost processing is lost !

Now it's possible to work on focus lost processing in the swing3 generated application with the N3 shell.

TODO search for a predicate ?P in consequent side.

{ ?A => ?C . ?C log:includes { ?S ?P ?O } .?P :log:equalTo :searchedResource .
} => { ?A => { ?S ?P ?O } }. 

:SB a java:java-lang-StringBuilder .
:SB javam:append ( "bla" ) .
:SB javam:toString ?RESULT . # this does not work currently with N3 Java mapping ! methods return values are lost :((

:TF a java:javax-swing-JTextField .
:TF javam:setText ( "bla" ).
@prefix javap: <http://java.sun.com/predicate#> . ?X javap:text ?T . # search does not work wih Java objects
@prefix javap: <http://java.sun.com/predicate#> . { ?TF a java:javax-swing-JTextField . ?TF javap:text ?T } => { :text :is ?T } . # outputs nothing, this is normal, but this is added to the KB:
# <http://example.com#text> <http://example.com#is> bla .

There is a bug here : should be "bla"

COMMITS

Now N3 shell (BasicRuntime) can show Déductions generated applications

- class N3SourcetoDrools : add Infrastructure Objects In WM (i.e. instance of GUIKBAdapter)

not only when calling LaunchDrools()

Now a rule base is only cached if the project has a permanent location.

So now testCreateProjectInGUI and testCreateProjectInGUI2() in TestFacebookSearch pass in succession .

They differ in reverting calls to pushRunDrools() and pushAddN3Search();

NOTE: The problem was possible because the Drools package name generated e.g. n3_project_helper0 , is not specific , which is not normally a problem because there is a Map associating the Drools package name with theN3 source.

I can reproduce deterministically this NullPointerException in addPackage : http://pastebin.com/sCtLMj7r

<jmvanel> with 5.1.1 ;

<jmvanel> does it make sense to try 5.2.0 BETA ?

I could not reproduce it on my laptop , then I cleaned in eclipse, and no NPE now.

java.lang.RuntimeException: Drools exception during package addition to rule base
at n3_project.helpers.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:391)
at n3_project.helpers.N3QueryToDroolsQuery.translate(N3QueryToDroolsQuery.java:39)
at n3_project.helpers.N3toDroolsUpdater.translateQuery(N3toDroolsUpdater.java:207)
at eulergui.project.Project.addN3Search(Project.java:419)
at n3_project.SourceFilesManagement$N3SearchAction.actualAction(SourceFilesManagement.java:285)

Caused by: java.lang.NullPointerException
at org.drools.reteoo.CompositeObjectSinkAdapter.unregisterFieldIndex(CompositeObjectSinkAdapter.java:313)
at org.drools.reteoo.CompositeObjectSinkAdapter.removeObjectSink(CompositeObjectSinkAdapter.java:163)
at org.drools.reteoo.ObjectSource.removeObjectSink(ObjectSource.java:167)
at org.drools.reteoo.ObjectTypeNode.doRemove(ObjectTypeNode.java:355)
at org.drools.reteoo.ObjectTypeNode.remove(ObjectTypeNode.java:325)
at org.drools.reteoo.ObjectSource.doRemove(ObjectSource.java:209)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at org.drools.reteoo.ObjectSource.doRemove(ObjectSource.java:209)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:289)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:293)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at org.drools.reteoo.QueryTerminalNode.doRemove(QueryTerminalNode.java:252)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:432)
at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:831)
at org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:623)
at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:539)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:445)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:452)
at n3_project.helpers.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:389)

2011-04-02

- test N3 search in interaction with inference : class TestFacebookSearch :new pending test with Project Created In GUI

- call setName() for several GUI components, to ease debug and tests

TestJmmy

- REFACTOR : extract pushRunDrools

- in tearDown() : call mainFrame.dispose() instead of SwingHelper.disposeWindows()

- in setUp() : no more call to SwingHelper.disposeWindows();

- SwingHelper.disposeWindows() done with invokeLater()

- TestFacebookSearch : no more specific setUp()

INFO: Project.findN3ByURI(): NOT FOUND: file:/tmp/translation-7279232034800042879.n3
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2672)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2667)
at n3_project.IOManager.copy(IOManager.java:190)
at n3_project.IOManager.getLocalCache(IOManager.java:169)
at n3_project.IOManager.getLocalCache(IOManager.java:148)
at eulergui.project.N3Source.getLocalCache(N3Source.java:568)
at eulergui.project.N3Source.getLocalN3(N3Source.java:576)
at n3_project.helpers.EyeHelper.addN3SourceToEulerArguments(EyeHelper.java:168)
at n3_project.helpers.EyeHelper.getEulerArguments(EyeHelper.java:140)
at n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:47)
at eulergui.project.Project.reasonExternalProlog(Project.java:507)
at eulergui.tools.SWRLTranslator.n3SourceAdded(SWRLTranslator.java:54)
at eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:73)
at eulergui.project.Project.rethrowEventsPlease(Project.java:1335)
at n3_project.ProjectGUI.newWindow(ProjectGUI.java:223)

Tried the N3 shell with the generated applications:

n3shell person-app.n3p
?FIELD gui:inputWidgetSpecification ?SPEC .
?EVENT gui::eventSource ?FIELD .
n3shell person_import3.n3p

Note that rules are not fired until a triple (or a comment ) is entered.

But only the button "Address" is here, but no text field.

In search , a blank node is treated as variable , e.g. this prints all the KB :

_:sk_FORM_4 ?P ?V .

N3 search do not seem to run right after creation; the only test is with ready made projects.

DONE

2011-04-01

http://www.plantontology.org/

COMMITED

Pave the way for processing a Java AWT FocusEvent in generated application:

Now possible to get value of a primitive accessor in antecedent of an N3 rule

Test: BasicRuntimeTest.testJavaMappingAntecedentVariable()

Thread [main] (Suspended (breakpoint at line 877 in N3JavaMappingBuiltin))
N3JavaMappingBuiltin.acceptList(String, String, List<String>, String) line: 877
DroolsTripleHandler.acceptList(String, LinesAndCols, String, LinesAndCols, List<String>, List<LinesAndCols>, String, LinesAndCols) line: 182
ParserLink.visitAllURI(LineTrackingTripleHandler) line: 617
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) line: 284
N3SourcetoDrools.translate(N3Source, boolean, boolean) line: 241
N3toDroolsUpdater.translate(N3Source, boolean) line: 87
Project.doTranslateN32Drools(boolean) line: 911
Project.translateN32Drools(boolean) line: 872
Project.prepareDrools(boolean) line: 852
BasicRuntime.initialize(String[]) line: 93
BasicRuntimeTest.testSimpleInference() line: 56

2011-04-31

"Ext JS is the developer's choice for building powerful desktop web applications using JavaScript and web standards."

http://www.sencha.com/products/extjs/

EulerGUI's Drools N3 engine

TODO

FIX: class GUIKBAdapter : call to fireAllRules() was missing in forwardGUIEventsToKBEmbed()

Variables in Drools N3 engine

Different facets of variables in Drools N3 engine

A possible design
N3Symbol getN3Symbol( String n3term );
class N3Symbol {
  String n3term;
  List<TripleInRule> inTriples;
  boolean isLiteral() {}
  boolean isUniversal() {}
  boolean isExistential() {}
  String getPlainVariable();
  String getReferenceVariable();
}
class TripleInRule extends Triple {
  N3Symbol subject, predicate, object;
  boolean inAntecedent;
}

TODO : replace

java.awt.event.FocusEvent( temporary == "false" , this == $JEVENT_reference )

by:

java.awt.event.FocusEvent( temporary == false, this == $JEVENT_reference )

Try to match a Java property in antecedent

For this N3 :

:l a java:java-util-ArrayList .
:l javam:add ( "bla" ).
{ ?L a java:java-util-List .
  ?L javap:empty ?E.
} => {
  :test :is :ok .
  :test :is ?E .
} .

The Drools is currently the following.

WHAT IS WRONG: ?E is actually universal (and moreover initialised by a Java property, because its first appearance is here). So ?E cannot be treated as an existential in the consequent , as it is below in red. Also, empty is Java property with a primitive type, so it makes sense not to use the Java reference variable $E_reference for it. I implemented this last criterium.

rule "match_Java_object.n3 0"
when
  $L_reference : java.util.List()
  Assignment( $L : name, reference == $L_reference )
  java.util.List( $E_reference : empty , this == $L_reference )
then
  Triple newTriple;
  TripleResult newTripleResult;
  newTriple = new Triple(  );
  newTriple.setSubject( "<test/match_Java_object.n3#test>" );
  newTriple.setPredicate( "<test/match_Java_object.n3#is>".toString() );
  newTriple.setObject( "<test/match_Java_object.n3#ok>".toString() );  insertLogical( newTriple );
  String E = Triple.resource("E") ;
  newTriple = new Triple(  );
  newTriple.setSubject( "<test/match_Java_object.n3#test>" );
  newTriple.setPredicate( "<test/match_Java_object.n3#is>".toString() );
  newTriple.setObject( E.toString() );  insertLogical( newTriple );
end

2011-04-30

gui_generic.owl ontology generated by rule-documentor : WIP

Commited the generated version of gui_generic.owl, like it was generated by rule-documentor :

# ontology for generic GUI widgets / components, strongly inspired by Java Swing

# temporarily put in http://jmvanel.free.fr/ontology/gui_generic.owl#

# reference version in https://deductions.svn.sourceforge.net/svnroot/deductions/html/ontology

# see runtime-rules.html , unification.html#Supporting in https://deductions.svn.sourceforge.net/svnroot/deductions/n3_nojs/html/

In some cases a prefix is not available to the N3 searches made by the editor tooltips

at eulergui.parser.n3.impl.parser4j.service.N3Parser.parseN3(N3Parser.java:194)
at eulergui.drools_engine.ParserLink.doParse(ParserLink.java:116)
at eulergui.drools_engine.ParserLink.parse(ParserLink.java:97)
at eulergui.drools_engine.ParserLink.parseAndUpdateSource(ParserLink.java:127)
at n3_project.helpers.N3toDroolsUpdater.translateQuery(N3toDroolsUpdater.java:205)
at eulergui.project.Project.searchFromString(Project.java:1081)
at eulergui.gui.view.RDFTooltipsInEditor.getDetailsForResource(RDFTooltipsInEditor.java:105)
at eulergui.gui.view.RDFTooltipsInEditor.getLabelForResource(RDFTooltipsInEditor.java:126)
at eulergui.gui.view.RDFTooltipsInEditor.getFormattedDetailsForResource_old(RDFTooltipsInEditor.java:40)
at eulergui.gui.view.TextEditor$5.getToolTipText_KB(TextEditor.java:568)
at eulergui.gui.view.TextEditor$5.getToolTipText(TextEditor.java:535)
 ......
in http://aURI842617598199753 at 3,3 thru 3,10: DefaultParseNodeInErrorStatus: no prefix for "javap:"

14:31:16 [AWT-EventQueue-0] [error] AWT-EventQueue-0: ParserLink.parse(): n3ParseResult.isInError: file:/tmp/translation-6900811067490934545.n3
14:31:16 [AWT-EventQueue-0] [error] AWT-EventQueue-0: ParserLink.parse(): LineNumber: -1
14:31:16 [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception in thread "AWT-EventQueue-0" 
14:31:16 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.RuntimeException: ParsingException: N3 source:
14:31:16 [AWT-EventQueue-0] [error] AWT-EventQueue-0: @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
14:31:16 [AWT-EventQueue-0] [error] AWT-EventQueue-0: @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
14:31:16 [AWT-EventQueue-0] [error] AWT-EventQueue-0: { javap:ID rdfs:label ?DETAIL } => { javap:ID rdfs:label ?DETAIL}.

 N3JavaMappingBuiltin.acceptConsequent(): WARNING: 
  ?EVENT a ?JTEXT_FIELD.
  : this variable was Already Met; put this Java object creation BEFORE its uses.

BUILD SUCCESSFUL in 10mn 40 on my laptop !

Snapshot uploaded : Revision : 2306 ; also with new Euler 04-29 snapshot:

http://eulersharp.sourceforge.net/maven2/euler/euler/2011-04-29/

However, on my desktop :

Running eulergui.gui.TestEulerGUIInputsTests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 86.4 sec
<<< FAILURE!Running eulergui.gui.TestGenericGuiGenerationInsertLogicalTests run: 6, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 97.784 sec
<<< FAILURE!

FIX TestN3FormatForProject by updating project-java-rules.n3

- some defense against null URI's in N3Source and Project

- refactor a bit ApplicationKB

2011-04-29

Added http://prefix.cc/kb

Drools N3 engine : try to match a Java AWT FocusEvent

With the Drools N3 engine, I try to match a Java AWT FocusEvent, to actually catch the Focus Lost Events at runtime.

When working focus lost processing, I saw that the actuel event is not FocusEvent, but a platform-specific subclass :

FocusEvent.class.isAssignableFrom( e.getClass() )
(boolean) true
 e.getClass()
(java.lang.Class<T>) class sun.awt.CausedFocusEvent

So I need to change the Drools translation in antecedent from :

Assignment( $JEVENT : name, reference.class == java.awt.event.FocusEvent,
             $JEVENT_reference : reference )

to :

Assignment( $JEVENT : name, $CLASS_1 : reference.class,
            $JEVENT_reference : reference )
eval( FocusEvent.class.isAssignableFrom( $CLASS_1 ) )

or , simpler :

Assignment( $JEVENT : name, $JEVENT_reference : reference )
eval( FocusEvent.class.isAssignableFrom( $JEVENT_reference.class ) )

Alas ! This is not not good , see this message:

org.drools.RuntimeDroolsException: Exception executing predicate reference.ID == "1005"
 ...
Caused by: [Error: unable to resolve method: deductions.runtime.GUIKBAdapter.ID() [arglength=0]]

This could not pass because FocusEvent has no no-parameter constructor , but it does not seem to be a problem .

$JEVENT_reference : FocusEvent()
Assignment( $JEVENT : name, reference == $JEVENT_reference )

But other Assignment conditions must still have

Assignment( $VAR : name, $VAR_reference : reference )

if VAR was never met before. So $JEVENT_reference should be recorded as a Drools variable with a type.

This creates the same RuntimeDroolsException. It seems that Drools never peeks into eval() expressions .

Assignment( $JEVENT : name, $JEVENT_reference : reference )
eval( $JEVENT_reference instanceof FocusEvent )

Next try :

$JEVENT_reference : FocusEvent()
Assignment( $JEVENT : name,
  reference.class == $JEVENT_reference.class )

Now the property criteria should be changed from :

Assignment( name == $JEVENT , reference == $JEVENT_reference , reference.ID == "1005" )

to:

Assignment( name == $JEVENT , reference == $JEVENT_reference, 
  reference.class == $JEVENT_reference.class
  reference.ID == "1005" )

2011-04-27

For motivation and explanation, see <http://www.w3.org/DesignIssues/Diff>

Attempt to an N3 Comparator

class N3Comparator : attempt to make a valid comparator for 2 RDF graphs,

* taking in account blank nodes renaming, e.g. for these 2 graphs, it will say "identical" :

* @prefix : <http://a.b/#>. _:a :p _:b.

* @prefix : <http://a.b/#>. _:a2 :p _:b2.

*

* Alas it says :

* [] <http://a.b/#p> [] .

Regression : focus lost processing is lost !

28 mars 2011 17:13:34 deductions.runtime.GUIKBAdapter focusLost
INFO: _GUIKBAdapter.focusLost() java.awt.FocusEvent[FOCUS_LOST,permanent,opposite=javax.swing.JTextField[,82,5,114x19,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@74bdc868,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=10,columnWidth=11,command=,horizontalAlignment=LEADING],cause=TRAVERSAL_BACKWARD] on javax.swing.JTextField[,60,5,114x19,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@74bdc868,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=10,columnWidth=11,command=,horizontalAlignment=LEADING]
28 mars 2011 17:13:34 unif.TripleStoreDrools createId
INFO: Creation de l'Id: event5
28 mars 2011 17:13:34 unif.TripleStoreDrools store
INFO: TripleStoreDrools.store( _:null <http://java.sun.com/predicate#text> "JMV" .

This piece of code is not working anymore:

// to satisfy this triple pattern:
// ?JTEXT_FIELD java:text ?TEXT .
// assert in the KB the textField Text:
String textFieldId = instantiator.objectToID( textField );

Idea: put the EulerGUI framework Id in the component itself with :

JTextField.setName()

Documenting eg: and kb: builtins

eulergui generic_gui_projection-rules.n3 java_event-rules.n3 \
 https://deductions.svn.sourceforge.net/svnroot/deductions/n3_logical/rules-documentor.n3 \
 --query https://deductions.svn.sourceforge.net/svnroot/deductions/n3_logical/rules-documentorQ.n3

ADDED : http://prefix.cc/eg

Snapshot uploaded : Revision : 2300

Tomorrow will add http://prefix.cc/kb

New N3 project file : tested

deductions//n3_logical/person_import3.n3p.n3

erroneous , but works quite good !

On project deductions/n3_nojs/person-app.n3p , Euler engine now gives a quick result !

Tested mixed business-Java rules

COMMIT in déductions :

n3_nojs/person-app.n3 : add callback in N3 that adds a label when user input is "JMV"

TODO :

2011-04-26

Refactoring N3 Swing rule base will enable changing GUI platform.

TODO

With the new Swing rule base in n3_nojs/ , in 50% of the runs , the fields do not appear until the window is slightly resized.

COMMITS:

REFACTOR: move rules refering to java* prefixes to generic_to_java-rules.n3 ; still 43 to do :

grep --count java generic_gui_projection-rules.n3

43

- TestGenericGuiGenerationInsertLogical : test projects are now taken from deductions/n3_nojs/

- TestJemmy : to detect the EulerGUI JFrame , give it a name with setName()

DeferredMethodCall : enhance debug print

DeferredPropertyAssignment : FIX for focus lost in generated app.: Integer etc types are converted to String when method argument demands String.

http://swordfish.rdfweb.org/discovery/2003/11/rdfical/www2004-draft-20031113-final-1.html

http://owlapi.sourceforge.net/documentation.html

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

http://sourceforge.net/apps/trac/eulergui/wiki/EulerGUIServer

http://www.inf.unibz.it/~franconi/dl/course/

Still worries with the test suite

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2672)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2667)
at n3_project.IOManager.copy(IOManager.java:190)
at n3_project.IOManager.getLocalCache(IOManager.java:169)
at n3_project.IOManager.getLocalCache(IOManager.java:148)
at eulergui.project.N3Source.getLocalCache(N3Source.java:565)
at eulergui.project.N3Source.getLocalN3(N3Source.java:573)
at n3_project.helpers.EyeHelper.addN3SourceToEulerArguments(EyeHelper.java:168)
at n3_project.helpers.EyeHelper.getEulerArguments(EyeHelper.java:140)
at n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:47)
at eulergui.project.Project.reasonExternalProlog(Project.java:506)
at eulergui.tools.SWRLTranslator.n3SourceAdded(SWRLTranslator.java:54)
at eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:73)
at eulergui.project.Project.rethrowEventsPlease(Project.java:1329)
at n3_project.ProjectGUI.newWindow(ProjectGUI.java:221)
at n3_project.ProjectGUI.main(ProjectGUI.java:174)
N3Source.getLocalN3(): Impossible de créer une copie locale pour lemplacement {0}
cause: null ; retry once

2 tests run for a long time

Trying to discover when the problem started.

svn update -r 2285
DISPLAY=:1 LANG=en mvn -DPARSER4J_TESTS=no --no-plugin-updates --offline
 ...
test[INFO] Total time: 13:30.735s

svn update  -r 2286        
[INFO] Total time: 13:47.805s

At this revision result are incorrect, but time is acceptable :)

rm -r  ~/.eulergui/rule_bases_cache
DISPLAY=:1 LANG=en mvn -DPARSER4J_TESTS=no --no-plugin-updates --offline test
[INFO] Total time: 13:59.223s

svn update
DISPLAY=:1 LANG=en mvn -DPARSER4J_TESTS=no --no-plugin-updates --offline test
[INFO] Total time: 14:16.812s

So the long test problem disappeared, it was probably due to a server problem. In the long term, it would be nice to start a local server for tests.

However there is still a problem with post-processing projects :

Running eulergui.gui.TestGenericGuiGenerationInsertLogical
Tests run: 6, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 123.245 sec <<< FAILURE!
Results :
Tests in error: 
  test_cv2(eulergui.gui.TestGenericGuiGenerationInsertLogical)
  test_uml2(eulergui.gui.TestGenericGuiGenerationInsertLogical)
  test_ecore2(eulergui.gui.TestGenericGuiGenerationInsertLogical)

EulerGUI TODO: redesign threads for a quicker application start

All this will be easier and more stable with the new N3 file format backed by the internal Knowledge Base. Note that this vicious loop should be avoided:

add N3 source in KB => Java event => add N3 isource in KB

One possibility is to replace the N3 source collection in Project with a direct access to the KB.

2011-04-25

Thread [main] (Suspended (breakpoint at line 83 in URICacheImpl))
URICacheImpl.getURITimeStamp(String, boolean) line: 83
URICacheImpl.getURITimeStamp(String) line: 78
ProjectUtils.computeTimeStamp(Project) line: 62
Project.compiledRulebaseLoadedFromCache(String) line: 696
Project.translateN32Drools(boolean) line: 868
Project.prepareDrools(boolean) line: 849
ApplicationKB.<init>() line: 93
ApplicationKB.instance() line: 73
Project.prepare() line: 1154
ProjectFactory.prepareProject(Project, URL, boolean) line: 291
ProjectFactory.restore(File, URL, boolean) line: 121
ProjectFactory.restore(File, boolean) line: 74
ProjectFactory.restoreAny(File, boolean) line: 347
ProjectFactory.restore(String, boolean) line: 58
ProjectFactory.restore(String) line: 65
TestDroolsQuery.setUp() line: 24
TestDroolsQuery(TestCase).runBare() line: 125
TestResult$1.protect() line: 106
TestResult.runProtected(Test, Protectable) line: 124
TestResult.run(TestCase) line: 109
TestDroolsQuery(TestCase).run(TestResult) line: 118
JUnit3TestReference.run(TestExecution) line: 130
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197

Still worries with the test suite

still worries with the test suite : now 2 tests run for a long time 1000s or more , but do not fail !

Running n3_project.helpers.TestDroolsQuery is lasting 2000 s :

[INFO] Total time: 106 minutes 22 seconds

[INFO] Finished at: Fri Mar 25 14:12:25 CET 2011

In isolationin eclipse it lasts 1mn30 , already too long !

Also eulergui.gui.TestFacebookSearch does not print its elapsed time :(

Trying to relaunch inProjectGUI.<init> is not working :(((

Caused by: sun.awt.X11.XException: Cannot write XdndAware property
at sun.awt.X11.XDnDDropTargetProtocol.registerDropTarget(XDnDDropTargetProtocol.java:79)
at sun.awt.X11.XDropTargetRegistry.registerDropSite(XDropTargetRegistry.java:554)
at sun.awt.X11.XWindowPeer.addDropTarget(XWindowPeer.java:1633)
at sun.awt.X11.XComponentPeer.addDropTarget(XComponentPeer.java:1509)
at java.awt.dnd.DropTarget.addNotify(DropTarget.java:493)
at java.awt.Component.addNotify(Component.java:6688)
at java.awt.Container.addNotify(Container.java:2567)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addImpl(Container.java:1068)
at java.awt.Container.add(Container.java:927)
at n3_project.ProjectGUI.layoutFrame(ProjectGUI.java:308)
at n3_project.ProjectGUI.<init>(ProjectGUI.java:136)
at n3_project.ProjectGUI.newWindow(ProjectGUI.java:198)
at n3_project.ProjectGUI.main(ProjectGUI.java:160)

isListNil(statement)
 (boolean) true
 model.getStatementSet() 
 (java.util.LinkedHashSet<E>) [_:list0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "eeeeeeeeeee".
, _:list0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.
, <http://example.com#lab> <http://java.sun.com/method#setText> _:list0.
]

Found regression in revision 2284 :

svn update -r 2284
mvn -Dmaven.test.skip=true --no-plugin-updates --offline package 
java -jar target/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar   ~/src/deductions/n3_logical/person_import3.n3p

DONE

BasicRuntime : removed log; now the Java package separator is from EulerGUI singleton.

Shoud be

:lab  javam:setText ( "eeeeeeeeeee" ) .

, but no warning is produced :

==> :myWindow java:title "gggggggggggggggg" .
FactCount: 2

==> :lab a java:javax_swing_JLabel ; java:setText ( "eeeeeeeeeee" ) .
java.lang.NullPointerException
at n3_project.helpers.DeferredPropertyAssignment.assign(DeferredPropertyAssignment.java:60)
at n3_project.helpers.N3JavaMappingBuiltin.acceptTriple(N3JavaMappingBuiltin.java:799)
at n3_project.helpers.DroolsTripleHandler.acceptTriple(DroolsTripleHandler.java:161)
at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:609)

==> :lab a java:javax_swing_JLabel .
==> :myWindow javam:add :lab .
ReflectionHelper.findMethod(): java.lang.NoSuchMethodException: javax.swing.JFrame.add(n3_project.helpers.Assignment)

2011-04-24

RDF + XQuery :

http://demo.exist-db.org/exist/xquery.xml?q=.%2F%2Fsection[ft%3Aquery%28.%2F%2Ftitle%2C%20%27RDF%27%29]%20or%20.%2F%2Fsection[ft%3Aquery%28.%2C%20%27RDF%27%29]&id=3.3.6#3.3.6

Found tool resembling EulerGUI : JRDF :

http://code.google.com/p/jrdf/wiki/GettingStarted

Alas the GUI does not start ! Sent a mail to the list , just to check.

builtins do not include N3JavaMappingBuiltin :

[n3_project.helpers.CRUD_builtins@68a980fa, n3_project.helpers.ListBuiltins@5052d2c4, n3_project.helpers.MathBuiltins@6d8b6b0e]

Thread [main] (Suspended (breakpoint at line 182 in DroolsTripleHandler))
DroolsTripleHandler.acceptList(String, LinesAndCols, String, LinesAndCols, List<String>, List<LinesAndCols>, String, LinesAndCols) line: 182
ParserLink.visitAllURI(LineTrackingTripleHandler) line: 617
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) line: 284
N3SourcetoDrools.translate(N3Source, boolean, boolean) line: 241
N3toDroolsUpdater.translate(N3Source, boolean) line: 87
Project.translateToDrools(N3Source, boolean, boolean) line: 953
N3ConversionRefesher.updateKB(Project, N3Source) line: 129
N3ConversionRefesher.n3SourceAdded(Project, N3Source) line: 49
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 73
Project.rethrowEventsPlease() line: 1328
ProjectGUI.newWindow(Project, boolean) line: 207
ProjectGUI.main(String[]) line: 160

2011-04-23

New batch runner

To compare result s with EYE, after Jos' mail.

cd ~/src/eulersharp/2006/02swap/
java -cp  /home/jmv/.m2/repository/eulergui/eulergui/1.9-SNAPSHOT/eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar \
  deductions.runtime.BatchRunner --nope http://eulersharp.sourceforge.net/2003/03swap/socrates.n3 \
  --query http://eulersharp.sourceforge.net/2003/03swap/socratesF.n3

This works, but I must get rid of the standard output by setting the log to SEVERE.

http://www.agfa.com/w3c/Talks/2011/01swig/

http://repast.sourceforge.net/docs.html#

http://www.jedit.org/api/org/gjt/sp/jedit/gui/CompletionPopup.html

JavaScript functions :

function createInputWidgetFromClass( classURI, container )
function createInputWidgetFromResource( uri, container )

Refactoring N3 Swing rule base

Since I'm now working on a more flexible way of using the N3 Swing rule base (see application-examples.html ), it's time to refactor this rule base .

All things below DONE

TODO : remove javapr:projection here in generic_gui_projection-rules.n3 :

{
  ?CONTAINER gui:components ?COMPONENT .
  ?CONTAINER javapr:projection ?JCONTAINER .
  ?COMPONENT javapr:projection ?JCOMPONENT .
} => {
  ?JCONTAINER javam:add ( ?JCOMPONENT ) .
  ?JCONTAINER gengui:hasComponent ?JCOMPONENT .
 _:d eg:trace ( "generic_gui_projection 6 >>> implement gui:components"
         ?JCONTAINER ?JCOMPONENT
         ?CONTAINER ?COMPONENT
  ) .
}.

Due to deferred Java method calls created by the framework, the Java method add will be called as soon as called object and argument are bound to Java objects.

Also gengui:hasComponent is useless, as it is used only in consequents of rules.

Also, this rule must be moved to generic_to_java-rules.n3 , like all rules refering to java* prefixes .

And for every pair of triples such as :

?JBUTTON a gengui:Button .
?FIELD javapr:projection ?JBUTTON .

replace it with:

?FIELD a gengui:Button .

An in the rule every occurence of ?JBUTTON should be replaced with ?FIELD .

So we will get rid of the javapr:projection predicate altogether.

This is the rule design pattern "Annotate the existing objects".

This pattern is already used in generic_to_java-rules.n3 , e.g. :

{ ?W a gengui:Panel.
  javapr:thisApplication app:platform app:Java .
} => {
  ?W a java:javax-swing-JPanel } .

2011-04-22

person-app.n3 : tested Building Applications : How to reuse the swing-rules3 rule base

WIP : less ugly , less direct reference to Java calls, still works !

person-app.n3 : tested Building Applications : How to reuse the swing-rules3 rule base

WIP : ugly because direct reference to Java calls, but works !

( cf eulergui/html/application-examples.html )

Notes:

KO:

<http://jmvanel.free.fr/ontology/examples/person#WINDOW> <http://deductions.sf.net/generic_gui#hasComponent> _:sk_label_64 .

Works OK :

_:sk_JFRAME_44 <http://deductions.sf.net/generic_gui#hasComponent>
_:sk_JPANEL_FORM_43 .
<http://jmvanel.free.fr/ontology/examples/person#WINDOW>
<http://jmvanel.free.fr/ontology/java_projection.owl#projection>
_:sk_JFRAME_44 .

Difficult to reproduce : SOLVED

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at unif.TripleStoreDrools.store(TripleStoreDrools.java:45)
at deductions.runtime.GUIKBAdapter.forwardGUIEventsToKB(GUIKBAdapter.java:97)
at deductions.runtime.GUIKBAdapter.focusGained(GUIKBAdapter.java:125)
at java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:203)
at java.awt.Component.processFocusEvent(Component.java:6178)
at java.awt.Component.processEvent(Component.java:6045)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850)

2011-04-21

true => { ?FORM gui:createFormFromClass foaf:Person . } .

TODO : should detect Java package separator .

java.lang.ClassNotFoundException: java-util-Date
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at n3_project.helpers.N3JavaMappingBuiltin.acceptConsequent(N3JavaMappingBuiltin.java:561)
        at n3_project.helpers.DroolsTripleHandler.acceptConsequent(DroolsTripleHandler.java:229)
        at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:743)
        at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:274)
        at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:239)
        at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:85)
        at eulergui.project.Project.doTranslateN32Drools(Project.java:908)
        at eulergui.project.Project.translateN32Drools(Project.java:869)
        at eulergui.project.Project.prepareDrools(Project.java:849)
        at eulergui.project.Project.doRunDrools(Project.java:804)
        at eulergui.project.Project.runDroolsTriples(Project.java:761)
        at eulergui.inference.drools.DroolsInferenceEngine.launch(DroolsInferenceEngine.java:27)
        

svn propset svn:keywords 'Date Author' tasks.html

http://wiki.preshweb.co.uk/doku.php?id=svn:propset

Upload snapshot for revision 2273.

http://www.codingforums.com/ : recommanded by Ruset.

http://www.mkbergman.com/391/more-structure-more-terminology-and-hopefully-more-clarity/

http://contraintes.inria.fr/

http://www.w3.org/2000/04/maillog2rdf/email

Why is it that sites like http://www.w3.org/2000/01/sw/ are no more active ?

<jmv> It's because things happen here : http://www.w3.org/2001/sw/

A major achievement

TODO post in EulerGUI users : new embedded Java objects.

Twit:

Embedded Java objects in SemWeb rule engine EulerGUI : now this works:

{ pure N3 } => { :myLabel java:setText ("something happened" ?T)}

2011-04-20

http://chatlogs.planetrdf.com/swig/2011-03-14.html

With Ubuntu 10.10 , I still have this error in the test suite :

sun.awt.X11.XException: Cannot write XdndAware property
at sun.awt.X11.XDnDDropTargetProtocol.registerDropTarget(XDnDDropTargetProtocol.java:79)
at sun.awt.X11.XDropTargetRegistry.registerDropSite(XDropTargetRegistry.java:554)
at sun.awt.X11.XWindowPeer.addDropTarget(XWindowPeer.java:1633)
at sun.awt.X11.XComponentPeer.addDropTarget(XComponentPeer.java:1509)
at java.awt.dnd.DropTarget.addNotify(DropTarget.java:493)

Leveraging the new embedded Java objects for a application

The application domain

Let's build an application to manage business contacts. It's possible to reuse the ICAL RDF vocabulary , e.g. attendee below. But the Vevent class should be particularized into physical meetings, telephone calls, Internet based conference (chat, shared computer via VNC, shared document, ...).

cal:attendee rdf:type owl:ObjectProperty ;        
             rdfs:label "ATTENDEE" ;
             rdfs:comment "The property defines an \"Attendee\" within a calendar component." ,  """ value type: CAL-ADDRESS""" ;
             spec:valueType "CAL-ADDRESS" ;
             rdfs:range cal:Value_CAL-ADDRESS ;
             rdfs:domain [ rdf:type owl:Class ;
                           owl:unionOf ( cal:Valarm
                                         cal:Vevent
                                         cal:Vfreebusy
                                         cal:Vjournal
                                         cal:Vtodo
                                       )
                         ] .

It's possible to import in batch or connect to an IMAP server for mails.

http://www.w3.org/2002/12/cal/

The user interaction piloted by rules

Commited in EulerGUI: eulergui/html/application-examples.html

This is a translation and enhancement of the seminal (!) post in french group deductions-fr "Applications exemples".

The user interaction is based on a simple semantics for user interaction, involving these concepts: CRUD data manipulations (CReate, Update, Remove), plus log, statistics, current tasks, represented by these imperative properties :

Data manipulations

I propose to model declaratively user interaction with the concept of user transaction. A user transaction is a list of data manipulations.

A data manipulation is an elementary input from the user. There are four kinds of data manipulations for the two kinds of properties as defined in OWL (Properties "object" and properties "datatype"):

  1. add RDF statement ,
  2. modify RDF statement,
  3. remove RDF statement,
  4. create a new RDF identifier with its type.

A data manipulation is associated with a subject and property in the OWL / RDF sense. Modification and destruction have in addition an object in RDF sense .

For example, adding a statement corresponds to the addition of an identifier article in a commercial order.

A creation of a new RDF identifier is the creation of a new bank account, for later making money transfers with it.

When you create a transaction via a rule, there is every possibility of the N3 language to add additional conditions. For example adding an ID article in a commercial order, we can restrict proposals to categories corresponding to the user's interests, or its past orders.

It remains only to create implementations for the language to user interaction through rules mixing Java and pure business. One can consider several implementations: Swing, GWT, SWT, command, etc..

To begin, one must write this small N3 vocabulary . We'll put it in the project Deductions in owl/user_interaction.owl.n3

Here is an example of using the app:hasLogEntry predicate . Assume we are in the RHS of a rule (the consequent) . So a variable ?CONTACT, non existent in the left side of the rule (the antecedent) is a creation of a new identifier.

@prefix app: <http://eulergui.sf.net/ontology/application.owl.n3#>.
:myApp app:log [ "Ajout d'un nouveau contact"@fr ?CONTACT ].
?CONTACT a :Contact. 

Here is an example of using the app:hasStatistic predicate:

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#> .
{ _:d e:findall( ?CONTACT { ?CONTACT a :Contact } ?CONTACTS ).
   ?CONTACTS math:memberCount ?NB_CONTACT.
} => {
  ?S a app:Statistic.
  ?S rdfs:label "Nombre de contacts: "@fr .
  ?S app:information ?NB_CONTACT .
  :myApp app:hasStatistic ?S.
}. 

Design

It's possible to reuse the swing-rules3 rule base, with small modification to make it more flexible.

Currently, the infered GUI is only partly MVC (Model-View-Controler). The controler is provided by the rule base. However, the Views do not (yet) listen to the Model ( which is, for this framework , the RDF Knowledge Base).

The swing-rules3 rule base gathers all properties that are reachable from an RDF node, taking in account class assertions, domains, ranges , etc. However user interaction needs more flexibility:

  1. having input fields that do not necessary coincide with the domain ontologies
  2. verification of user input,
  3. different and specific widgets.

For point 1, the trick is to design a class specific for the user interaction, plus rules to interpret the user interaction data, and transform it into regular ontolgy data that is stored in the Knowledge Base.

For point 2, we would like to write verification as pure domain rules, like this :

@prefix ded: <http://deductions.sf.net/owl/events#> .
@prefix    : <http://jmvanel.free.fr/ontology/examples/person#> .
# <http://deductions.sf.net/owl/events#exception>
{ ?P a :Person .
  ?P :name "bush" .
} => {
  ?E a ded:Exception
  ; rdfs:label " is already retired!"
  ; rdf:subject ?P
  ; rdf:predicate :name .
} .

Something close to this used to work in the very first version of the framework, where the focus lost listener was implemented 100% in Java.

It is possible to add in the Swing rule base rules to match ded:Exception, retrieve the associated input field widget, and reestablish the former value in the widget and the KB.

For point 3, the current framework with embedded Java objects allows to instatiate any custom widget , add it to relevant panel, and add it as a listener.

A typical inference flow :

application => main window and panels for data manipulations, log, statistics, current tasks
user => create Form From Class ?C
  => create new RDF ID
  => create input widget for new RDF ID in data manipulations panel

The user action to create a Form From Class ?C can be done in a specific button or menu entry, whose callback simply asserts the imperative RDF in the KB. Or, for the developer, the imperative RDF can be entered in the N3 shell.

The predicate in form-rules.n3 is used like this :

?FORM gui:createFormFromClass ?CLASS .

Trouble with RDF conformance in the Swing rule base

Currently one gets this exception when clicking on Tools / Snapshot of the user KB in N3 editor :

Exception in thread "AWT-EventQueue-0" com.hp.hpl.jena.n3.turtle.TurtleParseException: Encountered " <BLANK_NODE_LABEL> "_:sk_FORM_3 "" at line 12, column 15.
Was expecting one of:
    "a" ...
    <IRIref> ...
    <PNAME_NS> ...
    <PNAME_LN> ...
    "=" ...
    "=>" ... 
        at com.hp.hpl.jena.n3.turtle.ParserTurtle.parse(ParserTurtle.java:41)
        at com.hp.hpl.jena.n3.turtle.TurtleReader.readWorker(TurtleReader.java:21)
        at com.hp.hpl.jena.n3.JenaReaderBase.readImpl(JenaReaderBase.java:101)
        at com.hp.hpl.jena.n3.JenaReaderBase.read(JenaReaderBase.java:35)
        at n3_project.ResultEditorN3Action.convertReaderIntoN3(ResultEditorN3Action.java:98)
        at eulergui.tools.LaunchUserWMN3Editor.actionPerformed(LaunchUserWMN3Editor.java:41)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

Ha ha, Jena grunts at this :

_:sk_WINDOW_1 _:sk_FORM_3 <http://jmvanel.free.fr/ontology/examples/person#Person> .

Apparently predicate should not be a blank node ! I'll have to change the Swing rule base. This was an attempt to make a ternary association. But I may have to change the Drools/N3 engine, because I'm not sure that matching lists really works with the Drools/N3 engine.

I'll have to think about this when I refactor the Swing rule base.

2011-04-19

you need to put in .xinitrc this two lines

<rszeno> errorlog=path to logs

<rszeno> exec >> $errorlog 2>&1

<rszeno> before exec kde window manager

http://www.karlrunge.com/x11vnc/faq.html#faq-accept-opt

x11vnc -accept popup

TODO : does not work:

@prefix java: <http://java.sun.com/class#> .
@prefix javam: <http://java.sun.com/method#> .
true => {
  :x javam:setVisible ( true )
  ; javam:setSize ( 400 200 )
  ; javam:setTitle ( "generated by rule" ) .
  :x a java:javax_swing_JFrame .
} .

EulerGUI + embedded Java objects demo

Hors d'oeuvre : le shell N3 :

==> { :a :a :a } => { :b :b :b } .
==> :a :a :a .
==> :b ?X ?Y .

test/true_antecedent_java.n3 :

true => { ?x a java:javax_swing_JFrame;
 javam:setVisible ( true );
 javam:setSize ( 400 200 );
 javam:setTitle ( "generated by rule" ) .
} .

Montrer la traduction Drools

information sens N3 ==> Java

Montrer src/main/resources/eulergui/inference/drools/impl/infrastructure-rules.drl

Montrer swing-rules3 : nouveau menu "outils"

règle dans generic_gui_projection-rules.n3 :

{
  ?CONTAINER gui:components ?COMPONENT .
  ?CONTAINER javapr:projection ?JCONTAINER .
  ?COMPONENT javapr:projection ?JCOMPONENT .
} => {
  ?JCONTAINER javam:add ( ?JCOMPONENT ) .
  ?JCONTAINER gengui:hasComponent ?JCOMPONENT .
} .

information sens Java ==> N3 : via GUIKBAdapter

2011-04-18

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

generic_gui_projection-rules.n3 : remove tests in antecedent involving abstract Java classes, e. .g :

?JCONTAINER a java:java_awt_Container.

?JCOMPONENT a java:java_awt_Component

Now the new embedded Java objects architecture works in EulerGUI !!!

( it also works with the current architecture with JavaScript engine )

2011-04-16

I discovered the map feature : https://sourceforge.net/projects/eulergui/files/eulergui/stats/map

also OS : https://sourceforge.net/projects/eulergui/files/eulergui/stats/os

<jmv> ( click on grey rectangle "TOP COUNTRY" or "TOP OS"

https://sourceforge.net/projects/eulergui/files/eulergui/stats/map?dates=2011-01-01%20to%202011-03-16

https://sourceforge.net/projects/joafip/files/stats/map?dates=2011-01-01%20to%202011-03-16

@prefix java: <http://java.sun.com/class#> . @prefix javam: <http://java.sun.com/method#> . :x a java:javax-swing-JFrame . :x javam:setVisible ( true ) .

public void deductions.runtime.GUIKBAdapter.add(java.awt.Container,java.awt.Component,int)

FIXED java.awt.Window.setSize(int,int) in ReflectionHelper.findMethod(): substitute non-Object type

TODO: take care of :

ReflectionHelper.findMethod() 4: java.lang.NoSuchMethodException: deductions.runtime.GUIKBAdapter.add(javax.swing.JPanel, javax.swing.JLabel, java.lang.Integer)

I want to accumulate instances of MyClass in the WM, whose property "name" is contained in $LIST , which is a List of Strings.

accumulate( $AS : MyClass( $OO contains $AS.name ) )

$ARR : ArrayList() from collect ( MyClass( $LIST contains name ) )

Drools says : Unable to create Field Extractor for '$LIST of '[ClassObjectType class=MyClass

$ARGS_OBJ : ArrayList() from collect ( Assignment( name memberOf $OO ) )

$ARR: ArrayList() from collect ( MyClass( name memberOf $LIST ) )

16 mars 2011 17:39:02 eulergui.inputs.N3SourceFromXML_Gloze convertToN3
INFO: _N3SourceFromXML_Gloze.prepare(): gloze =_ new Gloze()
N3Source.getKnownURIPrefixes(): parsing had not been done.
N3Source.getKnownURIPrefixes(): parsing had not been done.
N3Source.getKnownURIPrefixes(): parsing had not been done.
N3Source.getKnownURIPrefixes(): parsing had not been done.
16 mars 2011 17:39:04 eulergui.inputs.N3SourceFromXML_Gloze convertToN3
INFO: Namespaces XML extraits depuis la sources XML "http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/pom.xml"
16 mars 2011 17:39:04 eulergui.inputs.N3SourceFromXML_Gloze convertToN3
INFO: {http://maven.apache.org/POM/4.0.0=http://maven.apache.org/maven-v4_0_0.xsd}
16 mars 2011 17:39:04 eulergui.inputs.N3SourceFromXML_Gloze convertToN3
INFO: gloze.target=/tmp/translation-33405222027830969.n3
16 mars 2011 17:39:04 eulergui.inputs.N3SourceFromXML_Gloze convertToN3
INFO: Démarrage de Gloze.main() avec les arguments 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 
Exception in thread "main" java.lang.IllegalAccessError: tried to access field com.hp.gloze.Gloze.target from class eulergui.inputs.N3SourceFromXML_Gloze
        at eulergui.inputs.N3SourceFromXML_Gloze.convertToN3(N3SourceFromXML_Gloze.java:110)
        at eulergui.inputs.N3SourceFromXML_Gloze.doUpdate(N3SourceFromXML_Gloze.java:148)
        at eulergui.project.N3Source.update(N3Source.java:405)
        at eulergui.gui.controller.N3ConversionRefesher.updateN3(N3ConversionRefesher.java:88)
        at eulergui.gui.controller.N3ConversionRefesher.n3SourceAdded(N3ConversionRefesher.java:48)
        at eulergui.project.ProjectChangeSupport.fireAddN3Source(ProjectChangeSupport.java:73)
        at eulergui.project.Project.rethrowEventsPlease(Project.java:1328)
        at n3_project.ProjectGUI.newWindow(ProjectGUI.java:207)
        at n3_project.ProjectGUI.main(ProjectGUI.java:160)

Testing embedded Java objects

Solved:

ReflectionHelper.findMethod(): java.lang.NoSuchMethodException: javax.swing.JFrame.setSize(java.lang.Number)
ReflectionHelper.findMethod(): java.lang.NoSuchMethodException: javax.swing.JFrame.addWindowListener(deductions.runtime.GUIKBAdapter)

Testing embedded Java objects - WIP

- new DeferredMethodCall for 0 to 3 arguments, object or literal

- TODO: change Drools translator to actually populate the KB with DeferredMethodCall objects

2011-04-15

http://www.researchgate.net/profile/Cedric_Becquey/

An issue is that EulerGUI should warn when such triples are not consistent with Java method and class :

  ?JEVENT a java:java_awt_event_FocusEvent ; # AWTEvent ; # Event ;
    javap:ID 1005 ; # 1005 means FOCUS_LOST in Swing class FocusEvent

java.lang.NullPointerException
at n3_project.helpers.URLHelper.getURI_prefix(URLHelper.java:29)
at unif.Instanciator.getNameSpace(Instanciator.java:572)
at unif.N3JavaHelper.isJavaPropertyOrIdentifier(N3JavaHelper.java:86)
at n3_project.helpers.N3JavaMappingBuiltin.acceptConsequent(N3JavaMappingBuiltin.java:545)
at n3_project.helpers.DroolsTripleHandler.acceptConsequent(DroolsTripleHandler.java:229)
at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:775)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:274)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:239)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:85)
at eulergui.project.Project.doTranslateN32Drools(Project.java:908)
at eulergui.project.Project.translateN32Drools(Project.java:869)
at eulergui.project.Project.prepareDrools(Project.java:849)
at eulergui.project.Project.doRunDrools(Project.java:804)
at eulergui.project.Project.runDroolsTriples(Project.java:761)
at eulergui.inference.drools.DroolsInferenceEngine.launch(DroolsInferenceEngine.java:27)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:117)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:92)
at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:316)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Testing embedded Java objects

_:sk_JLABEL_DT_28 ; reference == null

Now this triple

?JEVENT javap:ID 1005 .

is translated as:

$JEVENT_reference : java.awt.Event( ID == 1005 )

whenever ?JEVENT is already known as a Java object.

The test suite PASSES , including eulergui.gui.TestN3FormatForProject !

Still random errors in test suite

[ERROR] - 2011-03-15 18:15:17,962 [main]
com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler
(RDFDefaultErrorHandler.java:error:40)http://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/test/ontologies/cv.rdfs(line
110 column 3): {E213} Connection reset

The hypothesis is now that the thread to watch URI modifications interferes with normal project download.

A remedy could be to postpone the thread to watch URI modifications by an arbitray time, or , even better, to deactivate until normal project download is over.

Announce Release EulerGUI 1.8

17 downloads at 17:00 CET ; top : US 29% ; W$ 71% https://sourceforge.net/projects/eulergui/files/eulergui/1.8/eulergui-1.8-jar-with-dependencies.jar/stats/timeline

Announces on Jena, Drools, Pellet, CWM, semantic-web@w3.org, Protégé , FuXi, EulerGUI french and english private lists, Twitter.

TODO

grep -l X11.XException target/surefire-reports/* | grep -v output.txt | grep -v '.xml'

COMMIT:

doc.: add Maven 3, Semantic Web

2011-04-14

TODO: need to have predicates for SPARQL updates; also a setting and binding for the generated application.

The Simple Widget Markup Language (SWM)

http://swm.deri.org/

http://mondeca.wordpress.com/tag/gwt/

Maven trick: display-dependency-updates-mojo

Is there an utility telling me when some dependencies ( or Maven plugins ) are updatable, that is, they have newer versions available ?

http://mojo.codehaus.org/versions-maven-plugin/display-dependency-updates-mojo.html

But no similar stuff for Maven plugins , or does it also process them ?

<bentmann> you might want to check the other plugin goals

[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   commons-cli:commons-cli ................................... 1.0 -> 1.2
[INFO]   commons-logging:commons-logging ......... 1.0.4 -> 99.0-does-not-exist
[INFO]   hsqldb:hsqldb ...................................... 1.8.0.10 -> 1.7.2
[INFO]   junit:junit ........................................... 3.8.1 -> 4.8.2
[INFO]   log4j:log4j ......................................... 1.2.14 -> 1.2.16
[INFO]   opensymphony:oscache .................................... 2.4 -> 2.4.1
[INFO]   org.drools:drools-api .......................... 5.1.1 -> 5.2.0-alpha1
[INFO]   org.drools:drools-compiler ..................... 5.1.1 -> 5.2.0-alpha1
[INFO]   org.eclipse.emf:common .................. 2.4.0.v200902171115 -> 2.4.0
[INFO]   org.eclipse.emf:ecore ................... 2.4.2.v200902171115 -> 2.4.2
[INFO]   org.eclipse.emf.ecore:xmi ...
[INFO]                               2.4.1.v200902171115 -> 2.3.0-v200706262000
[INFO]   org.eclipse.uml2:common ... 1.4.0.v200805131030 -> 1.3.0-v200706251652
[INFO]   org.eclipse.uml2:uml ...... 2.2.2.v200811051031 -> 2.1.0-v200706251652
[INFO]   parser4j:all ......................................... trunk2 -> trunk

mvn versions:display-plugin-updates
 ...
[INFO] The following plugin updates are available:
[INFO]   maven-surefire-plugin .................................. 2.7.2 -> 2.8
[INFO]   org.codehaus.mojo:build-helper-maven-plugin .............. 1.1 -> 1.5
[INFO]   org.codehaus.mojo:buildnumber-maven-plugin . 1.0-beta-3 -> 1.0-beta-4
[INFO]   org.codehaus.mojo:exec-maven-plugin ...................... 1.1 -> 1.2
[INFO] 
[WARNING] The following plugins do not have their version specified:
[WARNING]   org.apache.felix:maven-bundle-plugin ................... (unknown)
[WARNING]   maven-assembly-plugin .................................. (unknown)
[WARNING]   maven-compiler-plugin .................................. (unknown)
[WARNING]   maven-eclipse-plugin ................................... (unknown)
[WARNING]   org.codehaus.mojo.webstart:webstart-maven-plugin ....... (unknown)

COMMIT:

Upgrade Maven plugins to latest versions : maven-surefire-plugin, build-helper-maven-plugin, buildnumber-maven-plugin, exec-maven-plugin

Release EulerGUI 1.8

I finally found the recipe for release:perform with Maven 3 ! :)

  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-ssh</artifactId>
         <version>1.0-beta-7</version>
      </extension>
    </extensions>

[WARNING] Some problems were encountered while building the effective model for eulergui:eulergui:jar:1.9-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo.webstart:webstart-maven-plugin is missing. @ line 278, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.felix:maven-bundle-plugin is missing. @ line 432, column 11
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-eclipse-plugin is missing. @ line 421, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building eulerGUI 1.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.lucene:lucene-core:jar:2.3.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The artifact xstream:xstream:jar:1.2 has been relocated to com.thoughtworks.xstream:xstream:jar:1.2

[INFO] [DEBUG] Using connector WagonRepositoryConnector with priority 0 for sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2 as jmvanel,eulergui
[INFO] Uploading: sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2/eulergui/eulergui/1.8/eulergui-1.8.jar
[INFO] [DEBUG] Could not set user agent for wagon org.apache.maven.wagon.providers.ssh.jsch.SftpWagon: java.lang.NoSuchMethodException: org.apache.maven.wagon.providers.ssh.jsch.SftpWagon.setHttpHeaders(java.util.Properties)
[INFO] 
[INFO] Uploading: sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2/eulergui/eulergui/1.8/eulergui-1.8.pom
[INFO] 
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 13:22.273s
[INFO] [INFO] Finished at: Mon Mar 14 16:34:20 CET 2011
[INFO] [INFO] Final Memory: 51M/388M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project eulergui: Failed to deploy artifacts: Could not transfer artifact eulergui:eulergui:jar:1.8 from/to repository.eulergui.sf.net (sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2): Cannot connect. Reason: Auth fail -> [Help 1]
[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project eulergui: Failed to deploy artifacts: Could not transfer artifact eulergui:eulergui:jar:1.8 from/to repository.eulergui.sf.net (sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2): Cannot connect. Reason: Auth fail

[INFO] 1) No implementation for org.apache.maven.wagon.Wagon annotated with @Named(value=sftp) was bound.

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project eulergui: Failed to deploy artifacts/metadata: No connector available to access repository repository.eulergui.sf.net (sftp://web.sourceforge.net/home/groups/e/eu/eulergui/htdocs/maven2) of type default using the available factories WagonRepositoryConnectorFactory -> [Help 1]

https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html

http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh/

DISPLAY=:1 LANG=en ~/apps/apache-maven-3.0.2/bin/mvn -X release:perform -DconnectionUrl=scm:svn:https://eulergui.svn.sourceforge.net/svnroot/eulergui/tags/eulergui-1.8/eulergui/

rm wget.dot

mv pom.xml.edited java_find_method_with_parameter_drools.n3 java_find_method_with_parameter.n3 quick_tests_mvn3.sh test/new_source.n3 test/instances.n3 examples/herbivores.owl examples/java_find_method_with_parameterQ.n3

Cannot prepare the release because you have local modifications :

[wget.dot:unknown]

[quick_tests_mvn3_pom_new.sh:unknown]

[quick_tests_deductions_local.sh:unknown]

[java_find_method_with_parameter_drools.n3:unknown]

[OWL+SWRL:unknown]

[pom.xml.edited:unknown]

[java_find_method_with_parameter.n3:unknown]

[pom_new.xml:unknown]

[quick_tests_mvn3.sh:unknown]

[test/new_source.n3:unknown]

[test/instances.n3:unknown]

[src/main/resources/eulergui_save.properties:unknown]

[src/main/resources/eulergui/gui/controller/test-rules_var.n3:unknown]

[examples/herbivores.owl:unknown]

[examples/java_find_method_with_parameterQ.n3:unknown]

2011-04-13

N3JavaMappingBuiltin : reference to DroolsTripleHandler was not set prior to running

extracted the algorithmic part of N3ParsingExceptionProcessor, keeping only the GUI aspect.

TODO : this does not work with Drools translation :

true => { :x a java:javax-swing-JFrame . :x javam:setVisible ( true ) . } .

true => { ?x a java:javax-swing-JFrame . ?x javam:setVisible ( true ) . } .

then is not produced :

when
  javax.swing.JFrame "<http://example.com#x>"_reference = new javax.swing.JFrame ();
  insert( new Assignment( "<http://example.com#x>".toString(), "<http://example.com#x>"_reference ));
  DeferredPropertyAssignment dpa_x2 = new DeferredPropertyAssignment();
  dpa_x2.setSubject("<http://example.com#x>".toString() );
  dpa_x2.setPredicate( "<http://java.sun.com/method#setVisible>" );
  dpa_x2.setObject("true");
  insert( dpa_x2 );
end

2011-04-12

grep -l X11.XException target/surefire-reports/* | grep -v output.txt | grep -v '.xml'

Deployment of an EulerGUI runtime

There is flexibility for deployment of an EG runtime.

Here are the options for the pure expert system part ( business rules + possibly some RDFS + OWL generic rules ).

  1. Java platform : "pure" expert system, not stateful : use Euler engine jar ( < 8Mb ) + EG jar ( < 1Mb )
  2. Java platform : stateful Knowledge Base with Drools : drools-core (< 2.2 Mb ) + EG jar ( < 1Mb ) + compiled rule base in cache
  3. any platform supporting Yap prolog engine : call a Yap run with a system exec call or the Yap C API, on a set of N3 data and rules representing an EulerGUI project (one N3 data file has to be populated prior to calling Yap, and the result has to be parsed, which is easy with --no-qnames Euler option)
  4. any platform supporting Python : use Python N3 engines : CWM or FuXi
  5. any platform : use EulerGUI web server (work in progress ) , or Euler server based on URL-encoding an argument string for stateless processing

Now for database access here are the options:

  1. use existing SPARQL source in EulerGUI (not sure if currently the query is re-done at every inference launch), and a choice of SPARQL server (Jena TDB or SDB, Virtuoso, Redland, Sesame, etc )
  2. use one of the relational to RDF bridges : D2R. DataMaster, etc

And for user interface generation here are the options. This is very promising, but it's work in progress.

  1. there is a nice OWL ==> Swing form generator, that is working at runtime with the Drools engine, but it is not feature complete;

    we are finishing the new architecture for embedding Java objects in KB, so that they are activable by rules.

  2. of course one can reuse an existing framework for form generation, or an existing code base
  3. we are working on a code generator for several GUI platforms : Swing , GWT, TCL/TK, HTML+PHP ; leveraging on an ontology of atomic user interactions (see in French the thread applications exemples ) , and on Euler capabilities to produce formatted strings ( builtin e:format )

Fixed BasicRuntime (alias N3 shell, N3 command line)

N3ConversionRefesher now has a field updateDroolsRuleBase ( false by default) to enable dynamic addition of rules ;

tested in a empty BasicRuntime :

==> { :a :a :a } => { :b :b :b } .
==> :a :a :a .
==> :b ?X ?Y .

PENDING:

There is a problem with N3 source from string, in the N3 shell, when the same URI is re-used; the compilationTimestamps Map in N3toDroolsUpdater is set the first time; then getTimeStamp() returns 0, so outdated() returns false.

As a consequence the new line in the shell in not processed.

Possible remedy:

Thread [main] (Suspended)
N3toDroolsUpdater.getTimeStamp(String) line: 129
N3toDroolsUpdater.getTimeStamp(N3Source) line: 109
N3toDroolsUpdater.outdated(N3Source) line: 134
N3toDroolsUpdater.uptodate(N3Source) line: 143
N3toDroolsUpdater.translate(N3Source, boolean) line: 79
Project.translateToDrools(N3Source, boolean, boolean) line: 953
N3ConversionRefesher.updateKB(Project, N3Source) line: 129
N3ConversionRefesher.n3SourceAdded(Project, N3Source) line: 49
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 73
Project.addN3Source(N3Source, boolean) line: 309
Project.addN3Source(N3Source) line: 290
BasicRuntime.processTriplesOrRules(String) line: 147
BasicRuntime.executeLine(String) line: 136
BasicRuntime.eventLoop() line: 100
BasicRuntime.main(String[]) line: 62

==> { :a :a :a } => { :b :b :b } .
==> :a :a :a .
TripleStoreDrools.store( <http://user_input#a> <http://user_input#a> <http://user_input#a> .
==> :b ?X ?Y .

2011-04-11

http://main.csregistry.org/tiki-index.php?page=my+account&bl=y

I'll do the release this week end , no hurry ...

TODO

Testing the N3 shell ( alias N3 command line )

Re-working on the N3 shell :) .

The N3 shell is a laboratory for exploring application generation , generally N3 <--> Java interaction , and other stuff. These extensions are planned :

* integrate in the GUI, probably in a tab

* keep all N3 input from user in an N3 file

* have commands for actions in EulerGUI: open N3 source, launch inference engine X, etc

% cat  ~/bin/n3shell
java -cp $HOME/.m2/repository/eulergui/eulergui/1.8-SNAPSHOT/eulergui-1.8-SNAPSHOT-jar-with-dependencies.jar deductions.runtime.BasicRuntime $*

% n3shell examples/java_gen.n3p
Enter N3 / RDF triples, or queries like: :x ?P ?O . , line by line; empty line to stop.
Bound prefixes: [:, e:, java:, javam:, os:, owl:, rdfs:, xsd:, :, java:, javam:]
:x a java:javax-swing-JFrame . :x javam:setVisible ( true ) .

Something is missing in N3 - Java mix: this should instantiate and display the window. This happens through rules, but not through plain triples like here :( .

Thinking more, this cannot be by default in EulerGUI; otherwise any Java triples in any of the N3 sources will trigger lots of Java calls right on opening the project !

:x pimo:attendee :a , :b .
?A foaf:knows ?B .

2011-04-10

also retry once URLK download for XMI sources (for connection reset )

INFO: XMI or UMLT parsed: http://deductions.svn.sourceforge.net/svnroot/deductions/n3/extlibrary.ecore
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.net.SocketException: Connection reset
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at eulergui.inputs.XMIToN3Converter.loadECoreURI(XMIToN3Converter.java:236)
at eulergui.inputs.XMIToN3Converter.loadEcoreURIAndTranslateToN3(XMIToN3Converter.java:69)
at eulergui.inputs.XMIToN3Converter.loadURIAndTranslateToN3(XMIToN3Converter.java:55)
at eulergui.inputs.N3SourceFromXMI.prepare(N3SourceFromXMI.java:51)
at eulergui.project.Project.setLocation(Project.java:115)
at eulergui.project.Project.setUri(Project.java:169)
at eulergui.project.ProjectFactory.prepareProject(ProjectFactory.java:285)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:121)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:217)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:50)
at n3_project.ProjectGUI.main(ProjectGUI.java:161)

Smart behavior when network is down and up again

I'm trying something not so trivial:

when network is not reachable the remote N3 sources are shown as buttons ; download later when network is reachable again;

generally I try to make a few things more robust before release ...

<rszeno> this is where caching is a good thing, :)

well, there is no file caching now for downloaded things ; except for really long things : compiled Drools rule bases; "compiled" XSD 's .

There is already a loop in a background thread that checks file or URL timestamp every 0.5 s ; I leverage on that.

However there is a cache , for ownloaded things, for the duration of the session.

Thread [N3  sources modification Checker] (Suspended (breakpoint at line 83 in RDFToN3Converter))
RDFToN3Converter.getN3FromRDFSynchronously(String) line: 83
RDFToN3Converter.getN3FromRDF(String) line: 41
N3SourceFromRDF.doUpdate() line: 157
N3SourceFromRDF(N3Source).update() line: 408
N3SourceFromRDF(N3Source).parseResult() line: 103
N3ConversionRefesher.updateKB(Project, N3Source) line: 123
N3ConversionRefesher.n3SourceChanged(Project, N3Source) line: 41
ProjectChangeSupport.fireN3SourceChanged(Project, N3Source) line: 139
Project.fireN3SourceChanged(N3Source) line: 1364
URIModificationChecker.checkN3Source(N3Source) line: 117
URIModificationChecker.run() line: 70
Thread.run() line: 662

2011-04-09

http://www.w3.org/2001/XMLSchema#

http://jmvanel.free.fr/ontology/software_applications.owl#

COMMIT: rules-documentor.n3 : enhance : when ones documents a property, the output containing a skeleton documetation becomes empty .

Documenting a rule base with EulerGUI

There is a rule base that acts as a helper for documenting a rule base. Here a how-to. We may later add a button to facilitate that even more in EulerGUI.

First create an EulerGUI project with all the rules URI's you want to document, plus rules-documentor.n3 rules and as a query rules-documentorQ.n3 . This can be done e.g. by such a command line :

% eulergui generic_gui_projection-rules.n3 generic_to_java-rules.n3 rules-documentor.n3 --query rules-documentorQ.n3

A project containing all the rules you want to document can also be imported as a subproject.

Then click on Tools / Add all referred ontologies; this way you retrieve all definitions of properties and classes for the used prefixes.

Then you run the project with Euler ; this is very quick :

#ENDS 140 [msec] TC=136 TP=544 BC=0 BP=223 PM=0 CM=0 FM=0 AM=0

Look at the output of the inference: every Property that has no documentation, at least with rdfs:comment will appear. Now click on the second yellow button on the top right; you'll see that every undocumented RDF Property has gotten a skeleton documentation like this :

app:hasWindow
      a       rdf:Property ;
      rdfs:comment "???" ;
      rdfs:domain "???" ;
      rdfs:label "???" ;
      rdfs:range "???" .

The next step is to save this output of the inference in a non temporary file, and add it to the project. Then, of course, you have to complete by hand the "???" strings, and URI's for RDFS label and range. You should also change rdf:Property into owl:DatatypeProperty or owl:DatatypeProperty, as appropriate.

Then, for a check, you can re-run the project with Euler; every Property that has been completed by hand, at least with rdfs:comment , will not appear in the output.

And the cool thing with that is: N3 rules (rules-documentor.n3) process N3 rules to create N3 output !

RDF graph for Simulation data

To think more: how to design an RDF graph for Simulation data along these lines ?

:s a :SimulationSpecification
  ; rdfs:label "Simulation of multiple pendulum"
  ; :gravitation "9.81"
  ; simulationEngine <http://ptolemy.eecs.berkeley.edu/> .

Idea: build the equivalent of Spring configuration in N3.

http://www.semanticoverflow.com/

pom.xml : upgraded some Maven plugins, by adding missing versions: buildnumber-maven-plugin, maven-jar-plugin, exec-maven-plugin, maven-source-plugin; tested with Maven 3.0.2 .

2011-04-08

Uploaded an EulerGUI snapshot at Révision 2206

2011-04-07

http://java.dzone.com/articles/upgrading-maven-3

doc : https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html

EulerGUI developpement

TODO

Investigating random errors

In TestRulesForUserEvents

testFocusLost(deductions.runtime.TestRulesForUserEvents)  Time elapsed: 0.624 sec  <<< ERROR!
java.lang.RuntimeException: ERROR in restore( URL http://deductions.svn.sourceforge.net/svnroot/deductions/n3/person_test.n3p
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:229)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:189)
at deductions.runtime.TestRulesForUserEvents.getTestProjectFromURL(TestRulesForUserEvents.java:187)
at deductions.runtime.TestRulesForUserEvents.testFocusLost(TestRulesForUserEvents.java:234)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2669)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.read1(BufferedReader.java:185)
at java.io.BufferedReader.read(BufferedReader.java:261)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:214)

in Test*Generation*

In project person_import3.n3p :

// drools compile Time: 0 ms// drools fireAllRules: 381 ms, N3SourcetoDrools.queryTripleResults(): 489
Mar 7, 2011 5:25:47 PM n3_project.helpers.N3SourcetoDrools launchDroolsKeepWM
INFO: result Triples: 489
[ERROR] - 2011-03-07 17:25:48,053 [AWT-EventQueue-1] n3_project.ResultManagement (ResultManagement.java:displayStandardError:190) 
 java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2669)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2664)
at n3_project.IOManager.copy(IOManager.java:190)
at n3_project.IOManager.getLocalCache(IOManager.java:169)
at n3_project.IOManager.getLocalCache(IOManager.java:148)
at eulergui.project.N3Source.getLocalCache(N3Source.java:566)
at eulergui.project.N3Source.getLocalN3(N3Source.java:573)
at eulergui.drools_engine.ParserLink.parse(ParserLink.java:139)
at eulergui.drools_engine.ParserLink.parseAndUpdateSource(ParserLink.java:178)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:238)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:85)
at eulergui.project.Project.doTranslateN32Drools(Project.java:909)
at eulergui.project.Project.translateN32Drools(Project.java:885)
at eulergui.project.Project.prepareDrools(Project.java:850)
at eulergui.project.Project.doRunDrools(Project.java:805)

In project ecore2.n3p :

INFO: XMI or UMLT parsed: http://deductions.svn.sourceforge.net/svnroot/deductions/n3_logical/extlibrary.ecore
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.net.SocketException: Connection reset
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at eulergui.inputs.XMIToN3Converter.loadECoreURI(XMIToN3Converter.java:236)
at eulergui.inputs.XMIToN3Converter.loadEcoreURIAndTranslateToN3(XMIToN3Converter.java:69)
at eulergui.inputs.XMIToN3Converter.loadURIAndTranslateToN3(XMIToN3Converter.java:55)
at eulergui.inputs.N3SourceFromXMI.prepare(N3SourceFromXMI.java:51)
at eulergui.project.Project.setLocation(Project.java:115)
at eulergui.project.Project.setUri(Project.java:169)
at eulergui.project.ProjectFactory.prepareProject(ProjectFactory.java:267)
at eulergui.project.ProjectFactory.restore(ProjectFactory.java:120)

Fixed TestDroolsQuery , after regression due to literal processing

DONE

add Package "infrastructure_rules" in ruleBase only if is not already there ( NOTE; had NullPointerException in ClassFieldReader.getIndex() line: 78 )

Fixed TestDroolsQuery , after regression due to bad change in literal processing in N3 terms; added unit test in TestReasoning.

We still have these random errors in TestGenericGuiGeneration, TestGenericGuiGenerationInsertLogical, TestSwingGeneration .

Must kill these random errors !!!

I had this NPE with Drools :

Daemon Thread [SwingWorker-pool-4-thread-1] (Suspended (exception NullPointerException))
ClassFieldReader.getIndex() line: 78
LeftTupleIndexHashTable.<init>(int, float, AbstractHashTable$FieldIndex[]) line: 64
LeftTupleIndexHashTable.<init>(AbstractHashTable$FieldIndex[]) line: 51
SingleBetaConstraints.createBetaMemory(RuleBaseConfiguration) line: 176
JoinNode(BetaNode).createMemory(RuleBaseConfiguration) line: 400
ConcurrentNodeMemories.createNodeMemory(NodeMemory) line: 94
ConcurrentNodeMemories.getNodeMemory(NodeMemory) line: 73
ReteooStatefulSession(AbstractWorkingMemory).getNodeMemory(NodeMemory) line: 1521
JoinNode.assertObject(InternalFactHandle, PropagationContext, InternalWorkingMemory) line: 101
CompositeObjectSinkAdapter.doPropagateAssertObject(InternalFactHandle, PropagationContext, InternalWorkingMemory, ObjectSink) line: 450
CompositeObjectSinkAdapter.propagateAssertObject(InternalFactHandle, PropagationContext, InternalWorkingMemory) line: 378
ObjectTypeNode.assertObject(InternalFactHandle, PropagationContext, InternalWorkingMemory) line: 190
EntryPointNode.assertObject(InternalFactHandle, PropagationContext, ObjectTypeConf, InternalWorkingMemory) line: 145
ReteooStatefulSession(AbstractWorkingMemory).insert(InternalFactHandle, Object, Rule, Activation, ObjectTypeConf) line: 1174
ReteooStatefulSession(AbstractWorkingMemory).insert(Object, boolean, boolean, Rule, Activation) line: 1123
ReteooStatefulSession(AbstractWorkingMemory).insert(Object) line: 917
N3SourcetoDrools.addInfrastructureObjectsInWM() line: 544
N3SourcetoDrools.launchDrools() line: 535
N3toDroolsUpdater.launchDrools() line: 49
Project.doRunDrools(boolean) line: 810
Project.runDroolsTriples(boolean) line: 762
DroolsInferenceEngine.launch() line: 27
RunActionGeneric$EngineSwingWorker.doInBackground() line: 117
RunActionGeneric$EngineSwingWorker.doInBackground() line: 1
SwingWorker$1.call() line: 277
FutureTask$Sync.innerRun() line: 303
SwingWorker$2(FutureTask<V>).run() line: 138
RunActionGeneric$EngineSwingWorker(SwingWorker<T,V>).run() line: 316
ThreadPoolExecutor$Worker.runTask(Runnable) line: 886
ThreadPoolExecutor$Worker.run() line: 908
Thread.run() line: 662

Other debugging session:

ApplicationKB.projectLoaded(Project) line: 287
ProjectChangeSupport.fireProjectLoaded(Project) line: 95
Project.prepare() line: 1151
ProjectFactory.prepareProject(Project, URL, boolean) line: 272
ProjectFactory.restore(File, URL, boolean) line: 120
ProjectFactory.restore(File, boolean) line: 73
ProjectFactory.restoreAny(File, boolean) line: 328

N3SourcetoDrools.droolsCompile(String) line: 381
N3QueryToDroolsQuery.translate(IRDFIterator, String, boolean) line: 39
N3toDroolsUpdater.translateQuery(N3Source) line: 205
Project.addN3Search(N3Source) line: 420
ProjectLegacy$2.put(String, N3Source) line: 144

thisn3_project.helpers.N3SourcetoDrools (id=86) n3_project.helpers.N3SourcetoDrools
ruleBaseorg.drools.reteoo.ReteooRuleBase (id=132) org.drools.reteoo.ReteooRuleBase
workingMemoryorg.drools.reteoo.ReteooStatefulSession (id=147) org.drools.reteoo.ReteooStatefulSession

2011-04-06

Links

http://botego.com/howdoesitwork.htm

http://www.nltk.org/getting-started

prymas - Question and Answering, Knowledge Management, Information Retrieval blog

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

http://groups.engin.umd.umich.edu/CIS/course.des/cis479/projects/agent/Intelligent_agent.html

International Conference on Web Intelligence, Mining and Semantics (WIMS'11)

http://wims.vestforsk.no/pro-is.html

2011-04-05

Let's drink to rules, which will rule the world ! Another play on words: I went this summer to a school on CHR, and there I got a bag saying : "make your own rules".

EulerGUI developpement

temporarily unactivate TestEulerGUIInputs . testXMLInputGloze() , pending correction of N3 parser's NPE regression

Test failing : TestDroolsQuery

This is a vicious consequence of new N3 format stuff, that also gets activated with ordinary .n3p format, due to the fact that ApplicationKB is a Project listener , and has rules to add things to the project. That could even lead to infinite loops !

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner at localhost:55629
Thread [main] (Suspended (exception MalformedURLException))
URL.<init>(URL, String, URLStreamHandler) line: 567
URL.<init>(URL, String) line: 464
N3Source.uri() line: 314
N3toDroolsUpdater.getTimeStamp(N3Source) line: 108
N3toDroolsUpdater.outdated(N3Source) line: 134
N3toDroolsUpdater.uptodate(N3Source) line: 143
N3toDroolsUpdater.translateQuery(N3Source) line: 194
Project.addN3Search(N3Source) line: 428
Project.setN3Query(N3Source) line: 374
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
DeferredPropertyAssignment.findAndInvokeMethod(Assignment, Object, Class<?>) line: 82
DeferredPropertyAssignment.assign(Assignment, Assignment) line: 47
Rule_DeferredPropertyAssignment2_0.defaultConsequence(KnowledgeHelper, DeferredPropertyAssignment, FactHandle, Assignment, FactHandle, Assignment, FactHandle) line: 7
Rule_DeferredPropertyAssignment2_0DefaultConsequenceInvoker.evaluate(KnowledgeHelper, WorkingMemory) line: 39
DefaultAgenda.fireActivation(Activation) line: 917
DefaultAgenda.fireNextItem(AgendaFilter) line: 856
DefaultAgenda.fireAllRules(AgendaFilter, int) line: 1071
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter, int) line: 785
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() line: 751
TripleStoreDrools.fireAllRules() line: 312
ApplicationKB.fireAllRules() line: 185
ApplicationKB.n3SearchAdded(Project, N3Source) line: 180
ApplicationKB.projectLoaded(Project) line: 289
ProjectChangeSupport.fireProjectLoaded(Project) line: 95
Project.prepare() line: 1170
ProjectFactory.prepareProject(Project, URL, boolean) line: 271
ProjectFactory.restore(File, URL, boolean) line: 166
ProjectFactory.restore(File, boolean) line: 73
ProjectFactory.restoreAny(File, boolean) line: 327
ProjectFactory.restore(String, boolean) line: 57
ProjectFactory.restore(String) line: 64
TestDroolsQuery.setUp() line: 24
TestDroolsQuery(TestCase).runBare() line: 125
TestResult$1.protect() line: 106
TestResult.runProtected(Test, Protectable) line: 124
TestResult.run(TestCase) line: 109
TestDroolsQuery(TestCase).run(TestResult) line: 118
JUnit3TestReference.run(TestExecution) line: 130
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197
Thread [ReaderThread] (Running)

Catch error in getTimeStamp

TODO : TestRulesForUserEvents :

java.net.MalformedURLException: no protocol: aURI
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at eulergui.project.N3Source.uri(N3Source.java:314)
at n3_project.helpers.N3toDroolsUpdater.getTimeStamp(N3toDroolsUpdater.java:108)
at n3_project.helpers.N3toDroolsUpdater.outdated(N3toDroolsUpdater.java:134)
at n3_project.helpers.N3toDroolsUpdater.uptodate(N3toDroolsUpdater.java:143)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:79)
at eulergui.project.Project.doTranslateN32Drools(Project.java:933)
at eulergui.project.Project.translateN32Drools(Project.java:885)
at eulergui.project.Project.prepareDrools(Project.java:865)
at eulergui.project.Project.doRunDrools(Project.java:820)
at eulergui.project.Project.runDroolsTriples(Project.java:777)
at eulergui.project.Project.runDroolsTriples(Project.java:785)
at eulergui.project.Project.runDroolsTriples(Project.java:796)
at deductions.runtime.TestRulesForUserEvents.testFieldOldArchitecture(TestRulesForUserEvents.java:82)

Testing embedded Java objects

Luc has corrected the triple order issue, so I continue testing embedded Java objects :) .

ERROR in running Drools Inference EngineCause:org.drools.RuntimeDroolsException: Exception executing predicate reference.ID
== 1005
64

The issue is that Drools does NOT take in account the class criterium below, so its stops on ID property , when the first object is inserted in the Working Memory.

rule "java_event-rules.n3 0"
when
  ...
  Assignment( $JEVENT : name, reference.class == java.awt.Event, $JEVENT_reference : reference )
  Assignment( name == $JEVENT, reference == $JEVENT_reference, reference.ID == 1005 )
 ...

I tried to add methods equals() and hashCode() in class Assignment, so that Droools should know that these two object criteria refer to the same objects.

But no success!

Asked on Drools IRC :

There 2 new snapshots on Maven repo :

5.1.2-SNAPSHOT (yesterday) , 5.2.0-SNAPSHOT (today ) ; what's the status of this ?

New error in parser, after recent correction for triple order

Thread [main] (Suspended (exception NullPointerException))
MatchSquareBracket.reduceAction(IParseSessionForMatchMgr, IParseNode, IParseNode[], int[]) line: 39
MatchMgrInvoker.reduceAction(int, IMatchMgr, IParseNode, IParseNode[], int[], IParseSessionForMatchMgr) line: 261
MatchMgrInvoker.computeData(IParseSessionForMatchMgr, IParseNode) line: 560
MatchMgrInvoker.endVisitImpl(IParseNode) line: 527
MatchMgrInvoker(AbstractParseNodeVisitor).endVisit(IParseNode) line: 57
ConcatParseNode(AbstractNonTerminalParseNode).accept(IParseNodeVisitor) line: 414
AlternativeParseNode(AbstractNonTerminalParseNode).accept(IParseNodeVisitor) line: 402
AlternativeParseNode(AbstractNonTerminalParseNode).accept(IParseNodeVisitor) line: 402
MatchMgrInvoker.checkDataComputed(IParseSessionForMatchMgr, IParseNode) line: 462
MatchMgrInvoker.computeParseNodeData(IParseSessionForMatchMgr, ParseStack) line: 449
ParseStackAction.reduce(ParseStack, boolean, int, EnumSource, EnumSource, int, int, IParseNode[], int[], boolean) line: 222
Parser.matchManagement(ParseStack, boolean, MatchEntrySet, List<IParseNode>) line: 1020
Parser.checkForMatch(ParseStack) line: 917
Parser.matchManagement(ParseStack, boolean, MatchEntrySet, List<IParseNode>) line: 1031
Parser.checkForMatch(ParseStack) line: 917
Parser.matchManagement(ParseStack, boolean, MatchEntrySet, List<IParseNode>) line: 1031
Parser.checkForMatch(ParseStack) line: 917
Parser.matchManagement(ParseStack, boolean, MatchEntrySet, List<IParseNode>) line: 1031
Parser.checkForMatch(ParseStack) line: 917
Parser.shiftByToken() line: 808
Parser.parse(ParserFileReader, boolean, boolean) line: 398
N3Parser.parseN3(String, InputStream) line: 194
ParserLink.doParse(URL, String) line: 167
ParserLink.parse(N3Source) line: 140
N3Source.doUpdate() line: 440
N3Source.update() line: 432
N3ConversionRefesher.updateN3(N3Source) line: 75
N3ConversionRefesher.n3SourceAdded(Project, N3Source) line: 47
ProjectChangeSupport.fireAddN3Source(Project, N3Source) line: 72
Project.rethrowEventsPlease() line: 1392
ProjectGUI.newWindow(Project, boolean) line: 314
ProjectGUI.main(String[]) line: 206

2011-04-04

Disorder in the triples out of parser N3: WIP

add (failing) pending_testTripleOrderInAntecedent in class TestN3FileParser

http://vocab.org/vann/.html

http://sort-of.homelinux.org/sb/

http://www.google.com/search?client=ubuntu&channel=fs&q=treat+rete

TREAT or RETE, neither, LEAPS is best.

http://www.cs.utexas.edu/~miranker/treator.htm

1988-Comparison of the Rete and Treat Production Matchers for Soar , byP Nayak

RETE and TREAT are prominent algorithms that have been designed to perform match in production .... the RETE and TREAT matchers, factoring out the effect of ...

www.aaai.org/Papers/AAAI/1988/AAAI88-123.pdf

2011-04-02

Disorder in the triples out of parser N3

I have a big problem with how eulergui.n3model.impl.< wbr>FormulaMutableImpl populates its field statementSet .

Tested with : deductions/n3_logical/java_< wbr>event-rules.n3

But the rule is :

{
?JTEXT_FIELD a java:javax_swing_JTextField .
?JEVENT
#
a java:java_awt_Event ;
javap:ID 1005 ; # 1005 means FOCUS_LOST in Swing class FocusEvent
javap:source ?JTEXT_FIELD ;

javap:temporary false .
?JTEXT_FIELD javapr:generic_field ?FIELD .
?JTEXT_FIELD javap:text ?TEXT .
} => {
?JEVENT a gui:FocusLostEvent ;
gui:eventSource ?FIELD

; gui:newValue ?TEXT .
_:d eg:trace ( "FocusLostEvent" ?JTEXT_FIELD ?FIELD "gui:newValue" ?TEXT ) .
} .

The stack :


2011-02-26

EulerGUI : fix bug in base URI in parser

At this URI :

http://eulersharp.sourceforge.net/2003/03swap/log-rules#

there is this prefix declaration :

@prefix e: <log-rules#> .

I think that this really means :

@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#> .

because the original URI is a relative URI, which is expanded with the base URI .

Indeed CWM says on the original URI :

#   Base was: http://eulersharp.sourceforge.net/2003/03swap/log-rules
    @prefix e: <#> .

We have this piece of code in class PrefixMap:

  if (uriUtil.isRelativeUri(prefixUri)) {
    absoluteUri = baseUri + prefixUri;

This is , alas, not so simple !

I searched a simple link explaning how base URI is computed , and how N3 prefixes are interpreted .

Well , I don't have to really understand in depth http://www.ietf.org/rfc/rfc1808.txt , there is a class URI with methods resolve() and relativize() that do the job !

So the right code is :

  if (uriUtil.isRelativeUri(prefixUri)) {
    absoluteUri = new URI(baseUri).resolve(prefixUri).toString();

baseUri was set by EG beforehand:

http://eulersharp.sourceforge.net/2003/03swap/log-rules#

and prefixUri is: log-rules# .

So absoluteUri is computed to be just equal to baseUri in this case.

N3 format for EulerGUI project

I fixed reading new N3 projects like newproject.n3p.n3), now fixing writing.

There are some subtleties. The example has typical triples like this:

<> owl:imports <book.n3> .

But it could be like this with the explicit project's URI:

<file:/home/jmv/myProj.n3p.n3> owl:imports <book.n3> .

Anyway, the internal KB has triples like this, because it can host several EulerGUI projects , and the internal KB must distinguish them.

Now, when user says "Save as ... (new format)" , under say myNewProj.n3p.n3, EulerGUI should take all triples :

<file:/home/jmv/myProj.n3p.n3> ?P ?O .
?O ?PO ?OO .

and save them as :

<file:/home/jmv/myNewProj.n3p.n3> ?P ?O . ?O ?PO ?OO .

Note that we don't need all the transitive closure from the project's URI, given the kind of triples that new N3 format for EulerGUI project contains .

2011-02-25

Due to a bad update on W$ on Samsung phones, the phone does not boot anymore, and costumers are obliged to exchange the phone !

N3 format for EulerGUI project using DeferredPropertyAssignment: degugging

Subprojects

Pave the way for Subprojects with N3 format for EulerGUI project: harmonize properties Uri and Location in class Project.

isActivated

The current issue is not when there is one N3 source with :isActivated false , all N3 sources become also unactivated. This rule seems to fire when it should not :

{ # r2
  ?N3S a java:eulergui-project-N3Source .
  ?N3S java:URI ?IMPORT_URI .
  ?IMPORT log:uri ?IMPORT_URI .
  ?IMPORT :isActivated ?ACTIV .
} => {
  ?N3S java:activated ?ACTIV .
}.

The cause of this is : log:uri does not take in account that ?IMPORT_URI is bound and ?IMPORT is not. So a single triple ?IMPORT :isActivated ?ACTIV . is enough to trigger the rule for any N3 source.

Remedies:

  1. add in class N3Source a new method getURIAsN3, with this antecedent :
    ?N3S a java:eulergui-project-N3Source .
    ?N3S java:URIAsN3 ?IMPORT .
    ?IMPORT :isActivated ?ACTIV .
  2. use string:concatenation (not implemented at the moment)
  3. change log:uri so that it takes in account that object is bound

Solution 1 is the quickest to implement, and also makes for a shorter rule.


Another issue is that when there is a <> URI for the project, it does not allow to distinguish several project in a the (shared) internal KB. Happily , a listener corrects that after the inference :

Unité d'exécution [main] (Suspendue)
ApplicationKB.add_project_n3_imports(Project, String) ligne : 218
ApplicationKB.n3SourceAdded(Project, N3Source) ligne : 201
ApplicationKB.projectLoaded(Project) ligne : 278
ProjectChangeSupport.fireProjectLoaded(Project) ligne : 95
Project.prepare() ligne : 1208
ProjectFactory.prepareProject(Project, URL, boolean) ligne : 271
ProjectFactory.restoreN3P(File) ligne : 244
ProjectFactory.restoreAny(File, boolean) ligne : 324
ProjectFactory.restore(String, boolean) ligne : 57
ProjectGUI.main(String[]) ligne : 188

This KB content seems correct, except that the Project's URI is not set:

<book.n3> <http://eulergui.sf.net/ontology/project.owl.n3#isActivated> false . #U
# Assign: _:sk_N3S_1 ==> eulergui.project.N3Source: file:/tmp/plants.n3
# Assign: _:sk_N3S_0 ==> eulergui.project.N3Source: file:/tmp/book.n3
<> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/project_ontology.html> . #U
<> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> . #U
# Assign: <> ==> eulergui.project.Project: URI not set
<> <http://www.w3.org/2002/07/owl#imports> <book.n3> . #U
<> <http://www.w3.org/2000/01/rdf-schema#comment> " example: Proposal for a new N3 format for RDF + OWL + rules projects " . #U
<> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <file:/home/jmv/src/eulergui_new/examples/newproject_isActivated_1.n3p.n3> .
<> <http://www.w3.org/2002/07/owl#imports> <plants.n3> . #U

2011-02-24

N3 format for EulerGUI project using DeferredPropertyAssignment

BIG COMMIT: N3 format for EG project: WIP: added DeferredPropertyAssignment

Tested with examples/BloodPressure.n3p.n3

TODO : test suite, test examples/newproject.n3p.n3.owl ; clean new code

TODO

2011-02-22

N3 + Java cohabitation

I've got a solution to a long time problem with N3 + Java cohabitation.

In the case of a Java object coming from another rule, a Drools rule that says: "when there is a deferred property assignment ?X ?P ?V , and ?X is a Java object, then make the property assignment and delete the deferred property assignment".

Note that this will actually simplify N3 to Drools translation, because this will work in both cases: is the Java object has been declared or not.

Note that this could be expressed in N3 or in Drools language.

Is this also the case for user callback binding ?

It could be with pre-procesising by Euler engine, if we could get the rule from the rule number.

2011-02-16

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 minutes 42 seconds
[INFO] Finished at: Wed Feb 16 19:30:57 CET 2011

EulerGUI : enhance new Java N3 mapping

Need to generate two versions, depending on whether variable $IMPORT_URI has already been defined or not:

  Assignment( name == $N3S, $N3S_reference : reference, 
              $IMPORT_URI : reference.URI )

or:

  Assignment( name == $N3S, $N3S_reference : reference,
              reference.URI == $IMPORT_URI )

I can reuse the method:

String processTripleElement( TripleRole role, String uri, String ruleId) {

with TripleRole role changed to: String javaProperty ; and IMPORT_URI is argument uri, reference.URI being argument javaProperty

--------------------------------------- tmp --------------------------

  Assignment( $N3S : name, reference.class == eulergui.project.N3Source, $N3S_reference : reference  )
  Assignment( name == $N3S, $N3S_reference : reference, $IMPORT_URI : reference.URI )

after modif:

  Assignment( $N3S : name, reference.class == eulergui.project.N3Source )
  Assignment( name == $N3S, $N3S_reference : reference, $IMPORT_URI : reference.URI )

COMMITED: New N3 - Java mapping: Method or property call: fix $VAR_reference and $VAR : reference.javaProperty

2011-02-14

http://identi.ca/jmvanel/foaf

propset --revprop -r 2117 --force "svn:log" "svn propset svn:mime-type text/html *.html" https://eulergui.svn.sourceforge.net/svnroot/eulergui

Snapshot with new features:

2011-02-12

:m a nmo:EMail .

After questions by <rszeno>

FAQ on Déductions form generator

What is an implicit button?

An implicit button is a button that is inferred by the GUI generator e.g. from an OWL object property, where button action launches a new few form.

Can I add an explicit button ?

Here is the kind of N3 to put in a consequent side of a rule :

?BUTTON_id1 a gengui:Button .
?CONTAINER gui:components ?BUTTON_id1 .

How does the multi-platform GUI generation work?

When a generic Button is created, it is qualified as a platform specific component by a simple rule, e.g. for Java:

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

Can I add a callback to a button ?

We are working on this.

Any widget (aka component) , Button or other, implicit or explicit, is accessible by the framework through its URI. The component specific URI is derived from the N3 variable , e.g. ?BUTTON_id1 above.

The runtime framework maintains a a multimap of all generated components keyed by URI's and component types. Using an N3 vocabulary, the developer can bind a callback class she has writen to the component URI ( TODO specify ). Then, at runtime, the framework binds the associated callback class (if any) to the newly instanciated component.

For example in Java, MyListener is a plain Java class implementing ActionListener that is associated to URI associated to N3 variable ?BUTTON_id1 . The runtime framework will call :

BUTTON_id1-instance . addActionListener (MyListener )

whenever a ?BUTTON_id1 is created through the rule.

Can I add validation to a input when user loses focus?

We are also working on this. Basically a business rule with false in the consequent side should be enough. However this does not provide any explanation to the user. So we had this in the very version of the framework, where the GUI events are managed by Java code and not by N3 rules. In project deductions/n3/test_person.n3p , we have this in person-events.n3 :

{ ?P a :Person .
  ?P :name "bush" .
} => {
  ded:exception :throw " is already retired!" .
} .

This is interpreted by the Java driver (runtime framework ) so that it shows a popup window and refuses the user input when it's "bush" .

To make this work, in tools, click on "JavaScript console, OLD ARCH." , after a Drools inference.

We should re-establish this in the latest framework version, as hooks for arbitrary Java code (see callback to a button question).

Can I have datatype validation in input fields?

This worked in some old version of EulerGUI , also with "JavaScript console, OLD ARCH.". It should refuse a non-number when the range of the property is a Number.

We should re-establish this in the latest framework version, as hooks for arbitrary Java code (see callback to a button question).

2011-02-11

79.92.90.238

http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm

EulerGUI : dans la merde avec les tests et les threads

After upgrading Parser4J (which new features ?) , Luc tested on Windows ( 7? ) and provided in class InErrorTests a suite of Tests in error. And here are my analysis of problems :

Test name Errors Failure Comments
TestLineTracking.test_LineTracking_fromN3 1 COMMITED comment out where current result is wrong

NOTE: this LineTracking mechanism is not much used currently, except for highlighting syntax errors

TestSwingGeneration . test_person_import

1 SocketException, TimeoutExpiredException

passes in isolation; see below

TestImportSwrl . testRemoteImportSwrlWithEuler

1 TimeoutExpiredException

passes in isolation

TestDroolsQuery . testSearch

1 Maybe related to my Revision 2097

Modified Wed Feb 9 17:42:51 2011 UTC (44 hours, 30 minutes ago) by jmvanel

Basic Runtime with a command line N3 interface ( class BasicRuntime ):

- adding queries like: :x ?P ?O .

- also FIX in N3Source when given by N3 string and URI: URI was lost

- TODO : issues with default namespace in queries

==> in fact clearing the cache was enough (because due to this modification the URI of the search has changed)

These are the stacks I copied in an error popup during TestSwingGeneration . test_person_import () :

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2669)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2664)
at n3_project.IOManager.copy(IOManager.java:190)
at n3_project.IOManager.getLocalCache(IOManager.java:169)
at n3_project.IOManager.getLocalCache(IOManager.java:148)
at eulergui.project.N3Source.getLocalCache(N3Source.java:595)
at eulergui.project.N3Source.getLocalN3(N3Source.java:602)
at eulergui.drools_engine.ParserLink.parse(ParserLink.java:139)
at eulergui.drools_engine.ParserLink.parseAndUpdateSource(ParserLink.java:178)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:236)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:85)
at eulergui.project.Project.doTranslateN32Drools(Project.java:886)
at eulergui.project.Project.translateN32Drools(Project.java:862)
at eulergui.project.Project.prepareDrools(Project.java:827)
at eulergui.project.Project.doRunDrools(Project.java:782)
at eulergui.project.Project.runDroolsTriples(Project.java:739)
at eulergui.inference.drools.DroolsInferenceEngine.launch(DroolsInferenceEngine.java:33)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:112)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:1)
at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:316)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

java.lang.RuntimeException: Impossible de créer une copie locale pour lemplacement {0}
at n3_project.IOManager.getLocalCache(IOManager.java:173)
at n3_project.IOManager.getLocalCache(IOManager.java:148)
at eulergui.project.N3Source.getLocalCache(N3Source.java:595)
at eulergui.project.N3Source.getLocalN3(N3Source.java:602)
at eulergui.drools_engine.ParserLink.parse(ParserLink.java:139)
at eulergui.drools_engine.ParserLink.parseAndUpdateSource(ParserLink.java:178)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:236)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:85)
at eulergui.project.Project.doTranslateN32Drools(Project.java:886)
at eulergui.project.Project.translateN32Drools(Project.java:862)
at eulergui.project.Project.prepareDrools(Project.java:827)
at eulergui.project.Project.doRunDrools(Project.java:782)
at eulergui.project.Project.runDroolsTriples(Project.java:739)
at eulergui.inference.drools.DroolsInferenceEngine.launch(DroolsInferenceEngine.java:33)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:112)
at eulergui.gui.inference.RunActionGeneric$EngineSwingWorker.doInBackground(RunActionGeneric.java:1)
at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:316)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

My idea is that is due to several threads acting in parallel, the Java socket layer is lost.

This is coherent with these facts:

Currently we have Threads in all these classes:

% grep -l --recursive  Thread src/main/java/**/*.java 
src/main/java/eulergui/drools_engine/ParserLink.java
src/main/java/eulergui/gui/view/TextEditor.java
src/main/java/eulergui/infrastructure/cache/URICacheOSCache.java
src/main/java/eulergui/infrastructure/URIModificationChecker.java
src/main/java/eulergui/inputs/N3SourceFromOtherFormat.java
src/main/java/eulergui/inputs/N3SourceFromXMI.java
src/main/java/eulergui/project/N3Source.java
src/main/java/eulergui/tools/SWRLTranslator.java
src/main/java/n3_project/ConsoleFrame.java
src/main/java/n3_project/helpers/CoddHelper.java
src/main/java/n3_project/ProjectFileManagement.java
src/main/java/n3_project/RDFToN3Converter.java
src/main/java/org/gjt/sp/jedit/jEdit.java
src/main/java/unif/TemporaryFrame.java

and we have synchronizedblocks in different areas :

grep -l --recursive synchronized  src/main/java/**/*.java 
src/main/java/eulergui/infrastructure/cache/URICacheImpl.java
src/main/java/eulergui/infrastructure/cache/URICacheOSCache.java
src/main/java/eulergui/infrastructure/URIModificationChecker.java
src/main/java/eulergui/inputs/JavaToN3Converter.java
src/main/java/eulergui/n3model/impl/StringUriType.java
src/main/java/eulergui/project/ProjectChangeSupport.java
src/main/java/eulergui/project/ProjectFactory.java
src/main/java/n3_project/IOManager.java
src/main/java/n3_project/OWLToN3Converter.java
src/main/java/n3_project/RDFToN3Converter.java
src/main/java/org/gjt/sp/jedit/jEdit.java

In summary, my feeling is that the new inference execution thread must wait that all HTTP downloads , and local translations (not always cached) are finished.

Note that only local translations to N3 from XML are always cached, not the rest like RDF/OWL.

EulerGUI : problem with search in command line

Unité d'exécution [main] (Suspendue (point d'arrêt à la ligne 518 de N3JavaMappingBuiltin))
N3JavaMappingBuiltin.setN3JavaPathSeparator(char) ligne : 518
N3JavaMappingBuiltin.<init>() ligne : 40
DroolsTripleHandler.setJavaObjectsInDrools(boolean) ligne : 1936
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) ligne : 267
N3SourcetoDrools.translate(N3Source, boolean, boolean) ligne : 237
N3toDroolsUpdater.translate(N3Source, boolean) ligne : 85
Project.doTranslateN32Drools(boolean) ligne : 886
Project.translateN32Drools(boolean) ligne : 862
Project.prepareDrools(boolean) ligne : 827
Project.prepareDrools() ligne : 807
ApplicationKB.<init>() ligne : 77
ApplicationKB.instance() ligne : 62
Project.prepare() ligne : 1199
ProjectFactory.prepareProject(Project, URL, boolean) ligne : 271
ProjectFactory.restore(File, URL, boolean) ligne : 166
ProjectFactory.restore(File, boolean) ligne : 73
ProjectFactory.restoreAny(File, boolean) ligne : 327
ProjectFactory.restore(String, boolean) ligne : 57
ProjectFactory.restore(String) ligne : 64
BasicRuntime.intiialize(String) ligne : 130
BasicRuntime.main(String[]) ligne : 58

Unité d'exécution [main] (Suspendue (point d'arrêt à la ligne 401 de N3JavaMappingBuiltin))
N3JavaMappingBuiltin.acceptConsequent(String, String, String, String, String, DroolsTripleHandler) ligne : 401
DroolsTripleHandler.acceptConsequent(String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String) ligne : 226
ParserLink.visitAllURI(LineTrackingTripleHandler) ligne : 780
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) ligne : 272
N3SourcetoDrools.translate(N3Source, boolean, boolean) ligne : 237
N3toDroolsUpdater.translate(N3Source, boolean) ligne : 85
Project.doTranslateN32Drools(boolean) ligne : 886
Project.translateN32Drools(boolean) ligne : 862
Project.prepareDrools(boolean) ligne : 827
Project.prepareDrools() ligne : 807
BasicRuntime.intiialize(String) ligne : 131
BasicRuntime.main(String[]) ligne : 58

INFO: Starting jEdit.main -gui -noserver file:/home/jmv/src/deductions/samples/crm/jmv-contacts.n3
19:04:10 [AWT-EventQueue-0] [error] EditBus: Exception while sending message on EditBus:
19:04:10 [AWT-EventQueue-0] [error] EditBus: java.lang.NegativeArraySizeException
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.jEdit.getViews(jEdit.java:2480)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.bufferset.BufferSetManager.visit(BufferSetManager.java:293)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.bufferset.BufferSetManager.handleMessage(BufferSetManager.java:110)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.EditBus.dispatch(EditBus.java:212)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.EditBus.sendImpl(EditBus.java:247)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.EditBus.send(EditBus.java:188)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.jEdit.propertiesChanged(jEdit.java:944)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at org.gjt.sp.jedit.jEdit.main(jEdit.java:459)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at eulergui.gui.view.TextEditor.displayEditor(TextEditor.java:304)
19:04:10 [AWT-EventQueue-0] [error] EditBus:  at n3_project.EditorManagement.openJavaEditor(EditorManagement.java:133)

<rszeno> attempto, just take the vocabulary and map

<rszeno> they don't fully understand if mapping is ok or not to reject what's wrong and confirm what's good

2011-02-10

NEPOMUK Message Ontology

http://www.semanticdesktop.org/ontologies/nmo/

http://vocab.deri.ie/

PIMO - Personal Information Model

http://www.semanticdesktop.org/ontologies/2007/11/01/pimo#

EulerGUI TODO

Rule examples to test with the new N3 Command Line

Context: a mini-application to manage contacts; ontology: FOAF + extensions for Meetings and Talks.

Need to import contacts from gmail.

Need to have a an import or notification for mails from gmail.

EulerGUI tests

The failures are not 100% reproductible!

Cyril suggest that some components can be out of the window size ...

Or there can be troubles in one of the servers ...

Another trouble is that Xephyr and/or fluxbox disappears in the middle of tests without any message. For the latter thing I try to remove -terminate argument to Xephyr

Cyril will add a callback for the end of inference , that will be leveraged , so that tests duration will go down from 16 to 10 minutes.

COMMITED: in TestFacebookSearch , raise the Thread.sleep() to 6000 , to avoid failure

Tests run: 133, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESSFUL

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 18 minutes 23 seconds

2011-02-07

[After replacing my car's lights]

Software engineering is just like any engineering: to repair or use a device, one has to think like the original designers and respect the original spirit.

somebody have a signature "if Barbie is so popular, why d you have to buy her a friend?"

good example for polysemic word leading to logic false model

In jEdit Options / shortcuts, I changed the keys for "Complete Word" , and set it to Control Space (initially Control b) ; this is the same feature as Control P in gvim, and Control Space in eclipse.

I also changed "Line comment"

Validate an EulerGUI project

Rules:

2011-02-05

mvn doap:generate

Commited in déductions :

added transforms/maven-pom_to_doap.n3p ; the first real-life example of an XML to RDF conversion based on N3 rules

The most desirable features for EG

We basically have the bricks for that.

2011-02-04

http://whatismyipaddress.com/

Solved problem with video on Skype on Ubuntu

env LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so  skype

http://developer.skype.com/LinuxSkype

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

Tackling the POM ==> DOAP conversion

doing an exercise with EG: tackling the POM ==> DOAP conversion. So I started with project in deductions/transforms/ ; added a doap: prefix that was completed by prefix.cc , opened http://usefulinc.com/ns/doap# in EG ; then launched OWL reasonner just to have a class tree.

Then adding a search for ?P a rdf:Property.

added http://prefix.cc/pom

EulerGUI : commited new button to stop inference engines

Thanks to Cyril !

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 minutes 20 seconds

2011-02-03

EulerGUI cleaning

ParserLink objects were not reusable twice ==> TestImportSwrl was broken when binding new Reasoner4J inference engine

substitute viewvc with svnroot in examples/

Coping with Sourceforge ViewVC server outage

COMMITED in Déductions:

To cope with current outage of Sourceforge server viewvc, substitute viewvc with svnroot in **/*.n3p

COMMITED in EulerGUI:

To cope with current outage of Sourceforge server viewvc, substitute viewvc with svnroot in URL's

Still errors and 1 failure:

Running eulergui.gui.TestJavaEditor

Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 27.931 sec <<< FAILURE!

Running eulergui.gui.TestImportSwrl

Tests run: 5, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 6.169 sec <<< FAILURE!

Running n3_project.helpers.TestDroolsQuery

Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.163 sec <<< FAILURE!

Running n3_project.TestProject

Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.073 sec <<< FAILURE!

Running eulergui.gui.TestSwingGeneration

Tests run: 6, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 5.039 sec <<< FAILURE!

Running eulergui.gui.TestFacebookSearch

Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 12.018 sec <<< FAILURE!

2011-02-02

Back from south India !

Sourceforge server has problems: ViewVC

This is due to a problem on the SF.NET site;

they got attacks and were obliged to shut down ViewVC ( Web access to

SVN ) ; see :

https://sourceforge.net/blog/sourceforge-attack-full-report/

https://sourceforge.net/apps/wordpress/sourceforge/

Installing Ubuntu on EeePC Asus

I got help on #ubuntu on freenode ( 1574 users ! ).

F2 is the key to set boot order in the bios options.

I just installed Linux on Asus EeePC; but the network does not work, even the ethernet.

2011-01-10

<jmv_> We'll talk of a possible partnership wth logilab.fr , a Parisian Service Company in SemWeb , OSS, and scientific soft .

OWL -> N3 rules translation

Every man likes at least 3 cars .

In OWL parlance:

man SubClassOf like min 3 car

There are 2 ways of translating with rules:

  1. infer false model when a man X likes less than 3 cars
  2. infer the existence of 3 cars liked by a man X

Well, for point 1, one must quit Open World Assumption.

For point 2, blank nodes will be added.

AceWiki

Problem accessing /acewiki/. Reason:

 com/thoughtworks/xstream/io/HierarchicalStreamDriver

Caused by:

java.lang.NoClassDefFoundError: com/thoughtworks/xstream/io/HierarchicalStreamDriver at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at nextapp.echo.app.util.PeerFactory.<init>(PeerFactory.java:72) at nextapp.echo.webcontainer.PropertySerialPeerFactory.<init>(PropertySerialPeerFactory.java:79) at nextapp.echo.webcontainer.PropertySerialPeerFactory.forClassLoader(PropertySerialPeerFactory.java:65) at nextapp.echo.webcontainer.SynchronizationContext.get(SynchronizationContext.java:106) at nextapp.echo.webcontainer.InputProcessor$InputContext.get(InputProcessor.java:78) at nextapp.echo.webcontainer.ClientPropertiesInputProcessor.process(ClientPropertiesInputProcessor.java:115) at nextapp.echo.webcontainer.ClientMessage.process(ClientMessage.java:163) at nextapp.echo.webcontainer.InputProcessor.process(InputProcessor.java:144) at nextapp.echo.webcontainer.Synchronization.process(Synchronization.java:104) at nextapp.echo.webcontainer.service.SynchronizeService.service(SynchronizeService.java:78) at nextapp.echo.webcontainer.WebContainerServlet.process(WebContainerServlet.java:398) at ch.uzh.ifi.attempto.acewiki.AceWikiServlet.process(Unknown Source) at nextapp.echo.webcontainer.WebContainerServlet.doPost(WebContainerServlet.java:305) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:516) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:929) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) at org.eclipse.jetty.server.Server.handle(Server.java:352) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1068) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.io.HierarchicalStreamDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:417) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:370) ... 44 more 

Caused by:

java.lang.ClassNotFoundException: com.thoughtworks.xstream.io.HierarchicalStreamDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:417) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:370) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at nextapp.echo.app.util.PeerFactory.<init>(PeerFactory.java:72) at nextapp.echo.webcontainer.PropertySerialPeerFactory.<init>(PropertySerialPeerFactory.java:79) at nextapp.echo.webcontainer.PropertySerialPeerFactory.forClassLoader(PropertySerialPeerFactory.java:65) at nextapp.echo.webcontainer.SynchronizationContext.get(SynchronizationContext.java:106) at nextapp.echo.webcontainer.InputProcessor$InputContext.get(InputProcessor.java:78) at nextapp.echo.webcontainer.ClientPropertiesInputProcessor.process(ClientPropertiesInputProcessor.java:115) at nextapp.echo.webcontainer.ClientMessage.process(ClientMessage.java:163) at nextapp.echo.webcontainer.InputProcessor.process(InputProcessor.java:144) at nextapp.echo.webcontainer.Synchronization.process(Synchronization.java:104) at nextapp.echo.webcontainer.service.SynchronizeService.service(SynchronizeService.java:78) at nextapp.echo.webcontainer.WebContainerServlet.process(WebContainerServlet.java:398) at ch.uzh.ifi.attempto.acewiki.AceWikiServlet.process(Unknown Source) at nextapp.echo.webcontainer.WebContainerServlet.doPost(WebContainerServlet.java:305) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:516) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:929) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) at org.eclipse.jetty.server.Server.handle(Server.java:352) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1068) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451) at java.lang.Thread.run(Thread.java:619) 

Powered by Jetty:/

Rifle

Subscribed to mailing list .

https://sourceforge.net/apps/mediawiki/rifle/

EulerGUI

Features

compliments

It is nice to hear EulerGUI is so rapidly developing!

Well, not as quick as I'd wish ; the list of planned features is huge :

http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html#TODO

We need users and feedback!

I'm not only for rules, it's a general tool for semantic web; if I knew another I'd use it or extend it.

2011-01-09

By Ruset; this works :

      @prefix : <#> .
      :bob :said { :gigi :know :lucy . } .
      :charly :said { :lucy :know :gigi . } .
      @forAll :x, :y .
      {
        [] :said { :x :know :y . } .
        [] :said { :y :know :x . } .
      } => {
        :x :know-each-other :y .
      } .

Ruset's attempt:

@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix : <#> .
:bob :said { :gigi :know :lucy . } .
:charly :said { :lucy :know :gigi . } .
{
  [] :said ?whatever .
  [] :said {
     ?x :know ?y .
     ?whatever log:includes { ?y :know ?x . } .
  } .
} => {
  ?x :know-each-other ?y .
} .

attempt to run a rule that is *inside* a context

:ctx1 :said { :me :know :luc . }.
{ :ctx1 :said ?FORMULA
} => {
  ?FORMULA log:includes {{ ?x :know ?y . ?y :know ?x . } => { ?x
:know-each-other ?y }}
}

https://sourceforge.net/mailarchive/message.php?msg_id=26570111

https://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTim9D3q1RLE1_tLihFiW_sTxO48bUfBVPem55NDB%40mail.gmail.com&forum_name=eulergui-user

mkdir eulergui-parser
mkdir -p eulergui-parser/src/main/java
mv src/main/java/eulergui/parser src/main/java/eulergui/n3model eulergui-parser/src/main/java
mkdir -p eulergui-parser/src/test/java
mv src/test/java/eulergui/parser  eulergui-parser/src/test/java
cp pom.xml eulergui-parser/
cd eulergui-parser/echo 'in pom.xml : change artifactId ; comment out scm section.'
mvn --no-plugin-updates --offline compile

2011-01-08

I exchanged mails with Nicolas Peltier.

What do you think of CYC ?

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

http://nekohtml.sourceforge.net/usage.html

http://mvnrepository.com/artifact/nekohtml/nekohtml/1.9.6.1

OWL -> N3 rules translation

Problems with oneOf

Currently this OWL axiom :

[]    a       owl:Class ;
      rdfs:subClassOf :rock-fan ;
      owl:intersectionOf (owl:Thing [ a       owl:Restriction ;
                  owl:onProperty :like ;
                  owl:someValuesFrom
                          [ a       owl:Class ;
                            owl:oneOf (:Jimi_Hendrix)
                          ]
                ]) .

gives this N3 rule :

{?VAR :like ?t16. ?t16 a ?e56. ?VAR a owl:Thing} => {?VAR a :rock-fan}. # BAD

DIAGNOSTIC:

When the object of owl:someValuesFrom were a class URI, it works. The rule currently is:

{ # someValuesFrom Restriction
  ( ?ORIGINAL ?CLASS ?VAR ?Z) :owlClassExpressionHasFormula ?FORMULA .
  ?CLASS a owl:Restriction;
          owl:someValuesFrom ?VALUES_CLASS;
         owl:onProperty ?PROP .
  ?V e:tuple ?CLASS.
} => {
   ?FORMULA :includes { ?VAR ?PROP ?V. ?V a ?VALUES_CLASS }.
}.

There must be a way to generate a class membership test from a class URI. When the class URI is an explicit class, the above rule in green works. But for more complex class definitions, I must invent something ...

I'm trying to take inspiration from http://www.w3.org/TR/rif-owl-rl/ to enhance my OWL -> N3 rules translation.

I'm trying to learn RIf , just to understand the OWL RL rules given in rif-owl-rl .

SOLVED

2011-01-07

http://vocab.org/vann/.html

http://eulersharp.sourceforge.net/2003/03swap/eye-note.txt

http://www-formal.stanford.edu/guha/guha-thesis.ps about contexts .

http://en.wikipedia.org/wiki/Ramanathan_V._Guha

http://bnode.org/media/2009/07/08/semantic_web_technology_stack.png

http://esw.w3.org/Foaf%2Bssl

http://foafssl.org/

http://www.nltk.org/faq

Project.showShortName()

snapshot uploaded

Looking at http://ontotext.com/ , and I'm impressed by what they achieved.

Troubles when reading a bad XHTML

Unité d'exécution [main] (Suspendue)
SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) ligne : non disponible [méthode native]
SocketInputStream.read(byte[], int, int) ligne : 129
BufferedInputStream.fill() ligne : 218
BufferedInputStream.read1(byte[], int, int) ligne : 258
BufferedInputStream.read(byte[], int, int) ligne : 317
HttpClient.parseHTTPHeader(MessageHeader, ProgressSource, HttpURLConnection) ligne : 687
HttpClient.parseHTTP(MessageHeader, ProgressSource, HttpURLConnection) ligne : 632
HttpURLConnection.getInputStream() ligne : 1200
XMLEntityManager.setupCurrentEntity(String, XMLInputSource, boolean, boolean) ligne : non disponible
XMLEntityManager.startEntity(String, XMLInputSource, boolean, boolean) ligne : non disponible
XMLEntityManager.startEntity(String, boolean) ligne : non disponible
XMLDTDScannerImpl.startPE(String, boolean) ligne : non disponible
XMLDTDScannerImpl.skipSeparator(boolean, boolean) ligne : non disponible
XMLDTDScannerImpl.scanDecls(boolean) ligne : non disponible
XMLDTDScannerImpl.scanDTDExternalSubset(boolean) ligne : non disponible
XMLDocumentScannerImpl$DTDDispatcher.dispatch(boolean) ligne : non disponible
XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) ligne : non disponible
XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) ligne : non disponible
XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) ligne : non disponible
SAXParser(XMLParser).parse(XMLInputSource) ligne : non disponible
SAXParser(AbstractSAXParser).parse(InputSource) ligne : non disponible
FormatRecognizer.<init>(URL) ligne : 22
SourceFactory.addSource(URL, Project) ligne : 76
ProjectGUI.makeProjectFromEulerCommandLine(String[]) ligne : 245
ProjectGUI.main(String[]) ligne : 184

OWL -> N3 rules translation

Applied to Wine ontology, the translation is awfully long: 835830 [msec] .

Anyway, there are some errors still :

Today's result for ACE examples with : owl-subclass-assertions-to-rules.n3

{?VAR a owl:Thing. ?VAR a ?e2} => {?VAR a :vegetarian-food}. # BAD
{?VAR a :man. ?VAR :like ?t8. ?t8 a ?e17} => {_:sk22 e:findall (?t0 {?VAR
  :like ?t0. ?VAR a :car} ?t1). ?t1 math:memberCount _:sk23. _:sk23
  math:notLessThan "3"^^xsd:nonNegativeInteger}. # BAD
{?VAR a :person. ?VAR :manages ?t6. ?t6 a owl:Thing} => {?VAR a ?e7}. # BAD
{?VAR :manages ?t6. ?t6 a owl:Thing. ?VAR a :person} => {?VAR a :manager}.
{?VAR :like ?t8. ?t8 a ?e17. ?VAR a :man} => {?VAR :own ?t2. ?t2 a :stick}. # BAD
{?VAR a :cat} => {_:sk20 e:findall (?t4 {?VAR ?e45 ?t4} ?t5).
  ?t5 math:memberCount _:sk21. _:sk21 math:notLessThan "2"^^xsd:nonNegativeInteger}. # BAD
{?VAR :like ?t10. ?t10 a :carrot. ?VAR a owl:Thing} => {?VAR a :herbivore}.
{?VAR ?e50 ?t12. ?t12 a :man. ?VAR a owl:Thing} => {?VAR a :good}. # BAD
{?VAR :have ?t14. ?t14 a :subordonate. ?VAR a :employee} => {?VAR a :manager}.
{?VAR :like ?t16. ?t16 a ?e56. ?VAR a owl:Thing} => {?VAR a :rock-fan}. # BAD

Every cat is liked by at least 2 things.

If X is-a-friend-ofs Y then Y is-a-friend-ofs X.

Everything that is managesed by something is a subordinate.

/* MOS: person(?x2), person(?x4), user(?x1), has-as-friend(?x1, ?x2), has-as-friend(?x1, ?x4), has-as-friend(?x2, ?x7), has-as-friend(?x4, ?x7), DifferentFrom (?x2, ?x4), DifferentFrom (?x7, ?x1) -> is-a-proposed-friend-for(?x7, ?x1) */

John likes at most 1 woman.

Every employee that has a subordonate is a manager.

Everything that is manageded by something is a subordinate.

jmv likes Jimi_Hendrix.

Everything that is bought by a man is a good.

John is not Joseph.

Every subordinate is a subordonate. Every subordonate is a subordinate.

Everything that does not has-as-topping something that is not a vegetable-topping is a vegetarian-food.

Everything that likes Jimi_Hendrix is a rock-fan.

Every man likes at least 3 cars.

Every person is something that is an unemployed-person or that has a job.

If X contains something that contains Y then X contains Y.

Estonia is bordered by exactly 2 countries.

Everything ancestprs at most 1 thing.

Every man that likes something that is Mary and that hates a dog owns a stick.

Everything that likes a carrot is a herbivore.

Every person that manageses something is a manager.

If X borderses Y then Y borderses X.


Jos wrote:

In the case of an unbound e:findall subject, scope will be bound to the list of knowledge source uris that were used and span will be bound to 1.

2011-01-06

find . -maxdepth 1 -name '*n3' -size 0 -exec ls -l '{}' \;
find . -maxdepth 1 -name '*n3' -size 0 -exec rm '{}' \; 

Grips with ACE View

Trying rules owl-subclass-assertions-to-rules.n3 with wine.rdf

takes about 1 mn

incorrect results : not a single =>

eulergui owl-subclass-assertions-to-rules.n3 http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine.rdf

After some correction, the result is not wrong from a logical point of view, but not good enough :

{?t0 a ns1:Anjou. ?t1 a ns1:Anjou. ?t2 a ns1:Anjou. ?t3 a ns1:Anjou
} => {
?t0 ns1:hasFlavor ns1:Delicate. ?t1 ns1:hasSugar ns1:OffDry. ?t2 ns1:hasColor ns1:Rose. ?t3 ns1:hasBody ns1:Light}.

It should be:

{ ?t0 a ns1:Anjou.
} => {
  ?t0 ns1:hasFlavor ns1:Delicate;
      ns1:hasSugar ns1:OffDry;
      ns1:hasColor ns1:Rose;
      ns1:hasBody ns1:Light
}.

It may be due to this at line 43:

  ?VAR e:tuple (?SUBCLASS rdfs:subClassOf ?SUPERCLASS).

By this I hope that everytime this appears in an antecedent , the same ?VAR is retrieved. In fact it was just "called" once, but caling it where needed does not change anything.

I follow advice by Jos in march28 2010:

After a correction in euler.yap you can now use free variables (*) for this purpose:

@prefix : <http://test.com#>.

@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#> .

@prefix log: <http://www.w3.org/2000/10/swap/log#> .

@prefix list: <http://www.w3.org/2000/10/swap/list#> .

@prefix var: <http://localhost/var#>.

{

:crit :classes ?CC .

?SCOPE e:findall ({var:V a ?C} {?C list:in ?CC} ?CRITS0).

?CRITS0 log:conjunction ?CRITS.

} => {

?CRITS => {var:V :consequence :inferred}.

}.

(*) free variable are not quantified with @forSome or @forAll and for euler they live in <http://localhost/var#>

IT WORKS !

TODO implement owl:equivalentClass

2011-01-04

Using SWRL for Rule-Driven Applications ( Mission Critical IT)

https://sourceforge.net/projects/eulergui/files//stats/timeline?dates=2007-08-24+to+2011-01-04

Towards Ontology-Driven Development of Applications for Smart Environments

by: Artem Katasonov, and Marko Palviainen

http://www.bibsonomy.org/bibtex/2b0abc07ce6ec4603ac0b73467895ec00/sjbutler

Factoring common part in N3 rule

I'm translating directly OWL subclass assertions into N3 rules , using N3 rules:

http://deductions.svn.sourceforge.net/viewvc/deductions/n3_new/owl-subclass-assertions-to-rules.n3

I have this rule :

{ # minCardinality Restriction
  ( ?ORIGINAL ?CLASS ?VAR ?Z) :owlClassExpressionHasFormula ?FORMULA .
  ?CLASS a owl:Restriction;
         owl:minCardinality ?MIN;
         owl:onProperty ?PROP .
  ?V e:tuple ?CLASS.
  ?Y e:tuple (?CLASS).
} => {
   ?FORMULA :includes {
   _:d e:findall (?V {?VAR ?PROP ?V} ?Y).
   ?Y math:memberCount ?C.
   ?C math:notLessThan ?MIN }.
}.

and I'm tempted to copy and paste it with 2 modifications :

{ # maxCardinality Restriction
  ( ?ORIGINAL ?CLASS ?VAR ?Z) :owlClassExpressionHasFormula ?FORMULA .
  ?CLASS a owl:Restriction;
         owl:maxCardinality ?MIN;
         owl:onProperty ?PROP .
  ?V e:tuple ?CLASS.
  ?Y e:tuple (?CLASS).
} => {
   ?FORMULA :includes {
   _:d e:findall (?V {?VAR ?PROP ?V} ?Y).
   ?Y math:memberCount ?C.
   ?C math:notGreaterThan ?MIN }.
}.

What better can I do ?

I first thought of factoring the common part in antecedent:

{ # maxCardinality Restriction
  ( ?ORIGINAL ?CLASS ?VAR ?Z) :owlClassExpressionHasFormula ?FORMULA .
  ?CLASS a owl:Restriction;
         ?RESTRICTION ?MIN;
         owl:onProperty ?PROP .
  ?V e:tuple ?CLASS.
  ?Y e:tuple (?CLASS).
} => {
   ?FORMULA :formulaForRestriction (
     ?VAR ?PROP ?RESTRICTION ?MIN ).
}.

But this has the inconvenient of only acting on the antecedent. So I thought of parametrizing the part that differs in both rules, and - guess what ? It works !

owl:minCardinality :hasOperator math:notLessThan.
owl:maxCardinality :hasOperator math:notGreaterThan.

{ # maxCardinality Restriction
  ( ?ORIGINAL ?CLASS ?VAR ?Z) :owlClassExpressionHasFormula ?FORMULA .
  ?CLASS a owl:Restriction;
         ?CardinalityProperty ?NUMBER;
         owl:onProperty ?PROP .
  ?V e:tuple ?CLASS.
  ?Y e:tuple (?CLASS).
  ?CardinalityProperty :hasOperator ?OPERATOR.
} => {
   ?FORMULA :includes {
   _:d e:findall (?V {?VAR ?PROP ?V} ?Y).
   ?Y math:memberCount ?C.
   ?C ?OPERATOR ?NUMBER }.
}.

Now there is yet another group of three Object Property Restrictions, the qualified ones, e.g. :

_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:qualifiedCardinality n.
_:x owl:onClass C.

EulerGUI release 1.7.1

[INFO] BUILD SUCCESSFUL

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 12 minutes 28 seconds

2011-01-03

http://www.agfa.com/w3c/Talks/2004/03swig/slide4-0.html

Copy and paste in the X-Window way in OpenOffice

Asked on IRC #Openoffice.org

Do you know how to set OO on Linux, so that I can copy and paste in the X-Window way ?

( not only Control C and V ) , but implicit selection and middle button

ANSWER: in Options / OpenOffice.org / Display / middle button / paste

End user tools for collaborative SW developements

What are the end user tools for collaborative SW developements? I know Collaborative Protégé (http://protegewiki.stanford.edu/wiki/Collaborative_Protege) .

<kwijibo> semantic mediawiki ?

http://semantic-mediawiki.org/wiki/Introduction_to_SMW

http://dev.w3.org.cvsweb.info/2000/scribe-bot/

2011-01-02

eulergui --quiet --quick-false --quick-possible http://eulersharp.sourceforge.net/2007/07test/pd_hes_tactic.n3 --query http://eulersharp.sourceforge.net/2007/07test/pd_hes_query.n3 http://eulersharp.sourceforge.net/2007/07test/pd_hes_theory.n3 &

Id: euler.yap 4022 2010-12-31 10:41:25Z josd
YAP 6.2.0 (i686-linux): Fri Dec 17 21:16:16 CET 2010
starting 50 [msec cputime] 53 [msec walltime]
GET /tmp/translation-5007022677345039164.n3
GET /tmp/translation-8172267930067690675.n3
GET /tmp/translation-6030004360966864743.n3
networking 20 [msec cputime] 12 [msec walltime]
java.lang.RuntimeException: ** ERROR ** sem ** maximimum_step_count(5000000)
at euler.Process.execute(Process.java:56)
at euler.ProofEngine.runProofEngine(ProofEngine.java:170)
at euler.ProofEngine.runProofEngine(ProofEngine.java:185)
at n3_project.helpers.EyeHelper.reasonExternalProlog(EyeHelper.java:49)

EulerGUI TODO

Explore possible model feature in Euler

As a side note, it's now possible to enter Euler/EYE arguments in EulerGUI command line arguments; a project will be created (but not saved) :

eulergui  --nope --quiet --quick-possible \
http://eulersharp.sourceforge.net/2007/07test/alpP001.n3 \
http://eulersharp.sourceforge.net/2007/07test/alpA010.n3 \
--query http://eulersharp.sourceforge.net/2007/07test/alpQ001.n3

In this example the project name will be alpP001.n3.n3p .

In the following output , ones sees that possible models compatible with the inputs and query are listed, as well as one counter Model.

[ e:possibleModel {:Peter :ascribed :smokes}
; r:gives {
   :Peter :ascribed :wheezing.
  }
].

[ e:counterModel {:Peter :ascribed :nonsmoker}
].

[ e:possibleModel {:Peter :ascribed :influenza}
; r:gives {
   :Peter :ascribed :wheezing.
  }
].

It seems that all examples with possible model also have e:disjunction in them.

2011-01-01

Tomorrow , I'll try to reason with possible models with Euler, with an OWL ontology, and

_:x a SomeClass .

to see if Euler can infer

_:x _:someProp _:y .

INFO: _removeRulePackage(): aucun fait correspondant à file:/home/jmv/src/deductions/rule-process/flatten-rules.n3
java.lang.NullPointerException
at n3_project.helpers.DroolsTripleHandler.processLogBuiltin(DroolsTripleHandler.java:408)
at n3_project.helpers.DroolsTripleHandler.makeDroolsCriterium(DroolsTripleHandler.java:251)
at n3_project.helpers.DroolsTripleHandler.acceptAntecedent(DroolsTripleHandler.java:215)
at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:718)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:272)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:237)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:85)
at eulergui.project.Project.translateToDrools(Project.java:925)

Splitting EulerGUI into several Maven sub-projects

qu'y aurait-il pour vous faire plaisir ?

<lcpvrr> ha si, découper EG en sous projets:

<lcpvrr> - model java N3

<lcpvrr> - parser N3

<lcpvrr> - editeur N3

<lcpvrr> - moteur N3 commun

<lcpvrr> - par implementation de moteur

<lcpvrr> - et EG principal bien sûr

<lcpvrr> vous avez peut être d'autres composants en tête

<jmvanel> oui, c'est sur la road map

je passe à l'anglais :)

ça paut intéresser l'assistance :)

I think of splitting into several Maven sub-projects ; within the same EulerGUI project on sf.net. This way people can reuse just what they need. But to that we need another developer !

My priority is to :

java.lang.NullPointerException
at n3_project.helpers.N3SourcetoDrools.setRuleBase(N3SourcetoDrools.java:863)
at n3_project.helpers.N3toDroolsUpdater.setRuleBase(N3toDroolsUpdater.java:165)
at eulergui.project.Project.compiledRulebaseLoadedFromCache(Project.java:675)
at eulergui.project.Project.translateN32Drools(Project.java:844)
at eulergui.project.Project.prepareDrools(Project.java:825)
at eulergui.project.Project.doRunDrools(Project.java:780)
at eulergui.project.Project.runDroolsTriples(Project.java:737)
at n3_project.RunDroolsAction.actionPerformed(RunDroolsAction.java:48)

commited:

- Feature: before launching Euler / EYE, expand Arguments entered in the input field

TESTED with test/BloodPressure.n3p

- add a key listener in TextFieldWithLabel , so that when the project is saved, the fields Euler and CWM arguments are also saved

java.lang.NullPointerException
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1261)
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1242)
at n3_project.helpers.N3SourcetoDrools.removeRulePackage(N3SourcetoDrools.java:767)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:84)
at eulergui.project.Project.doTranslateN32Drools(Project.java:827)
at eulergui.project.Project.translateN32Drools(Project.java:788)
at eulergui.project.Project.prepareDrools(Project.java:768)
at eulergui.project.Project.doRunDrools(Project.java:723)
at eulergui.project.Project.runDroolsTriples(Project.java:680)
at n3_project.RunDroolsAction.actionPerformed(RunDroolsAction.java:48)

2010-12-26

if you want the eclipse stuff, just use the last hudson build

<conan> https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/target/

http://sort-of.homelinux.org/foaf.rdf

Thinking declaratively

TODO : continue

I'm thinking about using Euler for generating the Drools code.

One of the problems is generating the variable declarations.

From the rules, ones extracts a list of variable references, like:

( ?X ?Y ?X )

To each variable reference, one must associate :declaration if it is the first use, and :use otherwise.

( :declaration :declaration :use )

The condition for :declaration is : "the list of variable before current variable with the same id is empty" .

For this I need a predicate to output the list of sub-elements preceding an element :

:sublistBefore a rdf:Property.
( (:a :b :c :d :e) :c ) :sublistBefore ( :a :b ). 

I could probably define this with 2 recursions, one for the begining of list, and another for the end, but I tried this :

{ ( ?L1 (?ELEM) ?L2) list:concatenation ?LIST .
} => {
   (?LIST ?ELEM) :sublistBefore ?L1 .
} .

Alas, I tried with --pass , and also with a query ; anyway it loops forever.

Solution from Jos: add ?LIST a rdf:List in the antecedent .

Begining of a solution by recursion, without any builtin:

@forAll ?X.
( () ?X ) :sublistBefore ().
@forAll ?X , ?W .
( (?W ?X) ?X ) :sublistBefore (?W).

2010-12-25

flatten-rules.n3 : WIP : wonder if it's right way to go for flatening N3 rules:

- hard to avoid that flatening rules are processed by themselves

( currently rules with notEqual are skipped )

- maybe do it in a single big rule

- can still do it in Java with TripleHelper

- TODO: for Drools generation, generate declarations when meeting a variable for the first time

2010-12-22

announce on jEdit

internship: rules and queries on OWL models

jEdit completion

EulerGUI TODO

Bug in EulerGUI release!

Ugly messages:

22 déc. 2010 17:31:06 n3_project.helpers.N3SourcetoDrools droolsCompile
INFO: // drools ruleBase.addPackage( http://aURI1753638619817718 ) : 15 ms, drools Total Time 1 388 ms
22 déc. 2010 17:31:06 n3_project.helpers.N3SourcetoDrools droolsCompile
INFO: _// Compilation Drools http://aURI1753638619817718 : 16 ms

---------------------

INFO: _removeRulePackage(): aucun fait correspondant à file:/home/jmv/src/deductions/rule-process/flatten-rules.n3
java.lang.NullPointerException
        at n3_project.helpers.DroolsTripleHandler.processLogBuiltin(DroolsTripleHandler.java:405)
        at n3_project.helpers.DroolsTripleHandler.makeDroolsCriterium(DroolsTripleHandler.java:248)
        at n3_project.helpers.DroolsTripleHandler.acceptAntecedent(DroolsTripleHandler.java:212)
        at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:718)
        at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:272)
        at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:237)
        at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:85)
        at eulergui.project.Project.translateToDrools(Project.java:868)
        at eulergui.gui.controller.N3ConversionRefesher.updateKB(N3ConversionRefesher.java:108)

FIXED Bug with plain XML import with Gloze : one N3 prefix was swalowed by preceding comments; tested with

http://www.w3.org/2010/rif-schema/core/CoreCond.xsd

( need to clean the whole cache )

EulerGUI release!

Revision : 2027

un: 133, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 minutes 45 seconds
[INFO] Finished at: Wed Dec 22 11:26:00 CET 2010
[INFO] Fina

All went smoothly ! ( except warnings for one depedendency)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34 minutes 12 seconds
[INFO] Finished at: Wed Dec 22 12:25:07 CET 2010
[INFO] Final Memory: 21M/288M

Links

http://deductions.svn.sourceforge.net/viewvc/deductions/n3_logical/convert-UML2_metamodel_to_OWL.n3p : BAD LINK <<<<<<<<<<<<

n3_new/convert-UML2_metamodel_to_OWL.n3p

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

http://liftweb.net/

The DLV Project

A Disjunctive Datalog System (and more)

http://www.dbai.tuwien.ac.at/proj/dlv/

E-Business and Web Science Research Group at Bundeswehr University Munich.

http://ebusiness-unibw.org/

http://www.brcommunity.com/brcsearch.php?zoom_query=Silvie+Spreeuwenberg&zoom_per_page=20&zoom_and=1&zoom_sort=1

Who's Afraid of Ontologies?

http://blog.pingoured.fr/

http://www.ilrt.bris.ac.uk/aboutus/staff/staffprofile/?search=cmdms

Jean Bézivin

LRSG

Université de Nantes

http://www.flaterco.com/purls/oopsla98_bezivin/

http://www.juansequeda.com/

AIR Reasoner: The reasoner for the semantic-web rules language AIR

http://www.pipian.com/blog/category/projects/

http://www.dicosmo.org/coordinates.html

2010-12-21

# Contenu de la base:

<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .

_:sk_N3S_0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#eulergui-project-N3Source> .

<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://java.sun.com/method#setN3Query> ( _:sk_N3S_0) .

<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://eulergui.sf.net/ontology/project.owl.n3#imports> <math.n3> .

<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://eulergui.sf.net/ontology/project.owl.n3#hasN3Query> <./math_q.n3> .

<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#eulergui-project-Project> .

<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://java.sun.com/class#Uri> file:/home/jmv/src/eulergui_new/test/math.n3p .

<./math_q.n3> <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true .

# - Fin - 8elements.

http://www.pipian.com/blog/category/projects/

# Assign: file:/home/jmv/src/eulergui_new/test/math.n3 ==> eulergui.project.N3Source: file:/home/jmv/src/eulergui_new/test/math.n3
# Assign: file:/home/jmv/src/eulergui_new/test/math.n3p ==> eulergui.project.Project: file:/home/jmv/src/eulergui_new/test/math.n3p
<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
_:sk_N3S_0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#eulergui-project-N3Source> .
# Assign: file:/home/jmv/src/eulergui_new/test/math.n3 ==> eulergui.project.N3Source: file:/home/jmv/src/eulergui_new/test/math.n3
<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://java.sun.com/method#setN3Query> ( _:sk_N3S_0) .
# Assign: file:/home/jmv/src/eulergui_new/test/math.n3p ==> eulergui.project.Project: file:/home/jmv/src/eulergui_new/test/math.n3p
<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://eulergui.sf.net/ontology/project.owl.n3#imports> <math.n3> .
<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://eulergui.sf.net/ontology/project.owl.n3#hasN3Query> <./math_q.n3> .
# Assign: file:/home/jmv/src/eulergui_new/test/math.n3 ==> eulergui.project.N3Source: file:/home/jmv/src/eulergui_new/test/math.n3
<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#eulergui-project-Project> .
<file:/home/jmv/src/eulergui_new/test/math.n3p> <http://java.sun.com/class#Uri> file:/home/jmv/src/eulergui_new/test/math.n3p .
file:/home/jmv/src/eulergui_new/test/math_q.n3 <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true .
_:sk_N3S_0 <http://java.sun.com/class#URI> ./math_q.n3 .

Announces for EulerGUI 1.7 and 1.7.1

semantic-web@w3.org

Sent! for 1.7.1

EulerGUI is a GUI for N3 / RDF and rules, centered on the N3 language.

It can launch these inference engines for N3 logic :

- Euler (embedded for Linux and Windows)

- Drools / N3 (embedded)

- CWM, FuXi (external programs)

It is Open Source, written in Java Swing.

It has an N3 textual editor, with syntax coloring, tooltips on terms based on rdfs:label and rdfs:comment. This N3 editor is reusing the famous jEdit editor.

EulerGUI includes SPARQL queries, Pellet OWL reasoner, Graphviz diagram, etc.

It has importers for OWL+SWRL ontologies, plain XML, UML, eCore, java bytecode (just method signatures).

DOWNLOAD:

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

User Manual: http://eulergui.sourceforge.net/documentation.html

Protégé

Sent! for 1.7 and 1.7.1

Reminder:

EulerGUI is a GUI for N3 / RDF and rules, centered on the N3 language. It is Open Source, written in Java Swing.

N3 is a human readable language for RDF, OWL, and rules. It is used by many tools (including Protégé); N3 rules look like the query language SPARQL.

EulerGUI has an N3 textual editor, with syntax coloring, tooltips on terms based on rdfs:label and rdfs:comment. This N3 editor is reusing the famous jEdit editor.

EulerGUI includes SPARQL queries, Pellet OWL reasoner, Graphviz diagram, etc.

It has importers for OWL+SWRL ontologies, plain XML, etc.

It can launch several N3 logic engines.

For Protégé users, the main new features are:

- Read an OWL/XML document; from a file XXX.xml, XXX.owl, or from an URL;

- when an OWL, RDF, XML, XMI file is modified on disk by Protégé, it is re-loaded and re-translated automatically to N3 within EulerGUI

This allows to enter OWL + SWRL in Protégé 4.1 or older, and run the SWRL rules in the EulerGUI window, by just clicking a button in EulerGUI.

More details in the CHANGELOG.

Jena

Sent! for 1.7 and 1.7.1

Reminder:

EulerGUI is a GUI for N3 / RDF and rules, centered on the N3 language. It is Open Source, written in Java Swing, and reuses Jena, Arq, and Gloze.

It has an N3 textual editor, with syntax coloring, tooltips on terms based on rdfs:label and rdfs:comment. This N3 editor is reusing the famous jEdit editor.

EulerGUI includes SPARQL queries, Pellet OWL reasoner, Graphviz diagram, etc.

It has importers for OWL+SWRL ontologies, plain XML, plain XML, UML, eCore, java bytecode (just method signatures).

It can launch several N3 logic engines.

For Jena users, the main new features are:

- Read an OWL/XML document; from a file XXX.xml , XXX.owl, or from an URL; recognizes the root XML element (uses OWL API 3.1.0)

- when an N3, OWL, RDF, XML, XMI file is modified on disk or Internet, it is re-loaded, re-translated to N3, re-parsed, and syntax errors are highlighted

- editor uses the nice http://prefix.cc Webservice for filling missing N3 prefixes when saving N3 files

- N3 conversions of plain XML documents (by Gloze) are cached

- new N3 - Java mapping, leverages on Drools inference engine to call Java methods in real time from N3 rules; will replace the JavaScript+Java translator in most places

More details in the CHANGELOG.

Drools

Sent! for 1.7.1

rules-users@lists.jboss.org

Reminder:

EulerGUI is a GUI for Semantic Web plus rules, centered on the N3 language. It is Open Source, written in Java Swing, and reuses Drools, Jena, etc.

It has an N3 textual editor, with syntax coloring, tooltips. This N3 editor is reusing the famous jEdit editor.

EulerGUI includes SPARQL queries, Pellet OWL reasoner, Graphviz diagram, etc.

It has importers for OWL+SWRL ontologies, plain XML, plain XML, UML, eCore, java bytecode (just method signatures).

It can launch several N3 logic engines, the main being based on Drools, by translating N3 rules (adapted to the Semantic Web) to Drools rules language.

For Drools users, the main new features are:

- Drools N3 engine :

* Use Drools' insertLogical() feature for automatic retraction of consequences no more holding,

* implement e:max, e:min (with dynamic RDF lists coming from e:findall)

* better handling of RDF lists, predicates list:in, math:memberCount

* better translation of e:findall

* fewer calls to the eval() macro of Drools,

* implement add and multiply builtins with more than 2 operands

* eg:trace works with variables created in an algebraic formula

* Jos de Roo's owl rules for OWL now passes Drools translation

- new cache for compiled rule bases using OSCache

- new N3 - Java mapping, leverages on Drools to call Java methods in real time from N3 rules; will replace the JavaScript+Java translator in most places

More details in the CHANGELOG.

DOWNLOAD:

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

User Manual: http://eulergui.sourceforge.net/documentation.html

FuXi

Sent! for 1.7.1

EulerGUI is a GUI for N3 / RDF and rules, centered on the N3 language.

It is Open Source, written in Java Swing.

It has an N3 textual editor, with syntax coloring, tooltips on terms based on rdfs:label and rdfs:comment. This N3 editor is reusing the famous jEdit editor.

EulerGUI includes SPARQL queries, Pellet OWL reasoner, Graphviz diagram, etc.

It has importers for OWL+SWRL ontologies, plain XML, UML, eCore, java bytecode (just method signatures).

It can launch these N3 logic engines:

- Euler (embedded for Linux and Windows)

- Drools / N3 (embedded)

- CWM, FuXi (external programs)

More details in the CHANGELOG.

DOWNLOAD:

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

User Manual: http://eulergui.sourceforge.net/documentation.html

Pellet

Sent! for 1.7.1

EulerGUI is a GUI for N3 / RDF and rules, centered on the N3 language.

It is Open Source, written in Java Swing.

It has an N3 textual editor, with syntax coloring, tooltips on terms based on rdfs:label and rdfs:comment. This N3 editor is reusing the famous jEdit editor.

EulerGUI includes SPARQL queries, Pellet OWL reasoner, Graphviz diagram, etc.

It has importers for OWL+SWRL ontologies, plain XML, UML, eCore, java bytecode (just method signatures).

It can launch these N3 logic engines:

- Euler (embedded for Linux and Windows)

- Drools / N3 (embedded)

- CWM, FuXi (external programs)

More details in the CHANGELOG.

DOWNLOAD:

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

User Manual: http://eulergui.sourceforge.net/documentation.html

WebSemantique.org

Sent! for 1.7.1

Rappel

EulerGUI est une interface graphique pour N3 / RDF et les règles, centrée sur le langage N3.

Il est Open Source, écrit en Java Swing.

Il dispose d'un éditeur textuel N3, avec coloration syntaxique, des info-bulles sur les termes à partir de rdfs:comment et rdfs:label . Cet éditeur N3 est la réutilisation du célèbre éditeur jEdit .

EulerGUI comprend les requêtes SPARQL, le raisonneur OWL Pellet , des diagrammes avec Graphviz, etc.

Il a des importateurs pour: ontologies OWL + SWRL , XML brut, UML, eCore, bytecode java (signatures de méthodes seulement ).

Il peut lancer ces moteurs en logique N3:

- Euler (embarqué pour Linux et Windows)

- Drools / N3 (embarqué)

- CWM, Fuxi (programmes externes)

Plus de détails dans le CHANGELOG.

Téléchargement: http://sourceforge.net/projects/eulergui/

Manuel utilisateur : http://eulergui.sourceforge.net/documentation.html

My corrections to DesignIssues/N3Logic by Tim Berners-Lee

Corrections to DesignIssues/N3Logic was sent :

19 février 2010 17:08

I was based on this Revision :

Tim Berners-Lee, August 2005

$Revision: 1.19 $ of $Date: 2012-03-09$

Today, http://www.w3.org/DesignIssues/N3Logic.html says:

Tim Berners-Lee, August 2005

$Revision: 1.19 $ of $Date: 2012-03-09$

The version commited in eulergui :

% head html/N3Logic.html<!-- saved from
url=(0063)file:///home/jmv/Documents/www.w3.org/DesignIssues/N3Logic.html --><HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><META
http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>Notation 3 Logic </TITLE><LINK href="file:///home/jmv/Documents/www.w3.org/DesignIssues/di.css"
rel="stylesheet" type="text/css"></HEAD><BODY xml:lang="en" lang="en"><ADDRESS>Tim Berners-Lee, August 2005<BR><SMALL>$Revision: 1.19 $ of $Date: 2012-03-09$</SMALL><BR>

This old HTML formatting is bad , and I can't remember how I made it.

The version sent to Tim Berners-Lee :

% head -33 /home/jmv/Téléchargements/N3Logic.html
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>Notation 3 Logic </title>
  <link href="di.css" rel="stylesheet" type="text/css" />
</head>

<body xml:lang="en" lang="en">
<address>
  Tim Berners-Lee, August 2005<br />
  <small>$Revision: 1.19 $ of $Date: 2012-03-09$</small><br />
  Status: An early draft of a semi-formal semantics of the N3 logical
  properties. 
</address>

And a version downloaded from W3C 3 days ago :

% head -33 N3Logic.html
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator" content=
    "HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 13), see www.w3.org" />
    <meta http-equiv="content-type" content=
    "text/html; charset=us-ascii" />
    <title>
      Notation 3 Logic
    </title>
    <link href="di.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <address>
      Tim Berners-Lee, August 2005<br />
      <small>$Revision: 1.19 $ of $Date: 2012-03-09$</small><br />
      Status: An early draft of a semi-formal semantics of the N3
      logical properties.
    </address>

Now diffing my version passed in Tidy with the latest Tim version gives this :

1a2,3
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5c7
<     "HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 13), see www.w3.org" />
---
> "HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" />
8,10c10
<     <title>
<       Notation 3 Logic
<     </title>
---
> <title>Notation 3 Logic</title>

So the real issue is that the two tidy versions differ in formatting.

For now, I'll commit this version.

I tried a smart thing. I pass Time latest version in my Linux version of Tidy :

tidy -asxml N3Logic.html > N3Logic_tidy.html

Now the diff gets much better!

COMMITED:

Enhanced N3Logic.html (my corrections to DesignIssues/N3Logic by Tim Berners-Lee)

The old HTML formatting was bad , and I can't remember how I made it.

I took the version that I mailed to timbl on 19 feb. 2010 17:08 ,

and applied to it tidy -asxml

Now the diff with current timbl's version on W3C gets much better,

provided that I also apply tidy -asxml to timbl's version;

this is because he used

HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 13), see www.w3.org"

and I use

HTML Tidy for Linux (vers 25 March 2009)

TODO: still a problem with differences in nbsp's

1,$s/&nbsp;&nbsp;/ \&nbsp;/g

http://www.w3.org/DesignIssues/Notation3

2010-12-20

new snapshot with last new feature http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/documentation.html#L6597

Revision 2012

eulergui.gui.TestImportSwrl

Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 37.479 sec <<< FAILURE!

in N3ConversionRefesher.updateKB(Project project, N3Source n3)

add n3 to KB only if it is Activated

Unité d'exécution [main] (Suspendue (point d'arrêt à la ligne 513 de N3SourcetoDrools))
N3SourcetoDrools.copyN3factsToDrools() ligne : 513
N3toDroolsUpdater.copyN3factsToDrools() ligne : 186
Project.translateToDrools(N3Source, boolean) ligne : 868
N3ConversionRefesher.updateKB(Project, N3Source) ligne : 106
N3ConversionRefesher.n3SourceAdded(Project, N3Source) ligne : 47
ProjectChangeSupport.fireAddN3Source(Project, N3Source) ligne : 72
Project.rethrowEventsPlease() ligne : 1352
ProjectGUI.newWindow(Project, boolean) ligne : 247
ProjectGUI.main(String[]) ligne : 191

17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.NullPointerException
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1261)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1242)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.helpers.N3SourcetoDrools.removeRulePackage(N3SourcetoDrools.java:767)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:84)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.project.Project.translateToDrools(Project.java:867)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.controller.N3ConversionRefesher.updateKB(N3ConversionRefesher.java:106)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.controller.N3ConversionRefesher.n3SourceActivationChanged(N3ConversionRefesher.java:56)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.project.ProjectChangeSupport.fireN3SourceActivationChanged(ProjectChangeSupport.java:151)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.project.Project.fireN3SourceActivationChanged(Project.java:1374)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.project.N3Source.setActivated(N3Source.java:282)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at eulergui.gui.view.ButtonsForN3Source$ActivatedItemListener.itemStateChanged(ButtonsForN3Source.java:163)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton.fireItemStateChanged(AbstractButton.java:2023)
17:08:22 [AWT-EventQueue-0] [error] AWT-EventQueue-0:  at javax.swing.AbstractButton$Handler.itemStateChanged(AbstractButton.java:2325)

Gonzalez Hugo Universidad Politécnica de Cataluña Spain

Larrañaga Xabier Amutxastegi SJER Spain

Ortiz Rebón Grupo de Inteligencia Computacional de la UPV/EHU Spain

Toro Carlos VICOMTech Spain

Yepez Luis Universidad Politécnica de Cataluña Spain

Zuloaga Urko SJER Spain

Fixed a regression in SWRL import introduced at revision 1991

Still test in timeout : TestSwingGeneration.test_ecore()

In N3ConversionRefesher.n3SourceActivationChanged()

when N3 source is Activated ( and was deActivated before), add the Triple facts to the user KB

2010-12-18

http://reasoner4j.svn.sourceforge.net/viewvc/reasoner4j/

EulerGUI

TODO before release

2010-12-17

EulerGUI

New popup messages for bad URL in N3 source, open project, and open sub-project

TODO

2010-12-16

RDF vocab for rules

<jmv_> Besides RIF_In_RDF http://www.w3.org/2005/rules/wiki/RIF_In_RDF , is there another RDF vocab for rules ?

RIF:

rule raise_rate {
  when {
    a: Account(r: rate; r > 1; r < 2);
  }
  then {
    modify a { rate = 2; }
  }
}

N3 equivalent in EulerGUI:

{
    a1 a Account;
      rate ?r.
    ?r math:greaterThan 1;
       math:lessThan 2 .
} => {
    -:d  kb:replaceValue ( a1 rate 1 2 ) .
}

Future tweets

Thinking of writing a rule-based generic compiler for RETE engines.

Using @cygri's nice and useful http://prefix.cc Web service for filling missing N3 prefixes when saving files in EulerGUI

Searching people knowledgeable in rule engines and/or logic programming

I had a look at RIF_In_RDF http://www.w3.org/2005/rules/wiki/RIF_In_RDF ; I think the mapping should be done like Gloze does. (mail to Sandro )

spinrdf

I actually have rules in N3 to transform SWRL into N3

2010-12-15

refactoring : put all of class EulerBuiltins into class MathBuiltins

RIF_In_RDF

http://www.w3.org/2005/rules/wiki/RIF_In_RDF

RIF In RDF

Editors

Sandro Hawke, W3C/MIT

Axel Polleres, DERI, NUI Galway

Abstract

This document specifies a reversible mapping (or transformation) from Rule Interchange Format (RIF) XML documents to Resource Description Framework (RDF) graphs. This mapping allows the contents of RIF documents to be interoperably stored and processed as RDF triples, using existing serializations and tools for RDF. When used with the standard mapping from RDF triples to RIF frames, this also provides a "reflection" or "introspection" mechanism, an interoperable way for RIF rules to operate on RIF documents.


EulerGUI

The N3 is translated 3 times into Drools :

Run Drools:

Unité d'exécution [AWT-EventQueue-0] (Suspendue (point d'arrêt à la ligne 225 de DroolsTripleHandler))
DroolsTripleHandler.acceptConsequent(String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String) ligne : 225
ParserLink.visitAllURI(LineTrackingTripleHandler) ligne : 800
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) ligne : 269
N3SourcetoDrools.translate(N3Source, boolean, boolean) ligne : 236
N3toDroolsUpdater.translate(N3Source, boolean) ligne : 85
Project.doTranslateN32Drools(boolean) ligne : 819
Project.translateN32Drools(boolean) ligne : 795
Project.prepareDrools(boolean) ligne : 760
Project.doRunDrools(boolean) ligne : 716
Project.runDroolsTriples(boolean) ligne : 674
RunDroolsAction.actionPerformed(ActionEvent) ligne : 48
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) ligne : 1995

Open the project:

Unité d'exécution [main] (Suspendue (point d'arrêt à la ligne 225 de DroolsTripleHandler))
DroolsTripleHandler.acceptConsequent(String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String) ligne : 225
ParserLink.visitAllURI(LineTrackingTripleHandler) ligne : 800
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) ligne : 269
N3SourcetoDrools.translate(N3Source, boolean, boolean) ligne : 236
N3toDroolsUpdater.translate(N3Source, boolean) ligne : 85
Project.translateToDrools(N3Source, boolean) ligne : 860
N3ConversionRefesher.updateKB(Project, N3Source) ligne : 89
N3ConversionRefesher.n3SourceAdded(Project, N3Source) ligne : 47
ProjectChangeSupport.fireAddN3Source(Project, N3Source) ligne : 72
Project.rethrowEventsPlease() ligne : 1345
ProjectGUI.newWindow(Project, boolean) ligne : 247
ProjectGUI.main(String[]) ligne : 191

Unité d'exécution [main] (Suspendue (point d'arrêt à la ligne 225 de DroolsTripleHandler))
DroolsTripleHandler.acceptConsequent(String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String, LinesAndCols, String) ligne : 225
ParserLink.visitAllURI(LineTrackingTripleHandler) ligne : 800
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) ligne : 269
N3SourcetoDrools.translate(N3Source, boolean, boolean) ligne : 236
N3toDroolsUpdater.translate(N3Source, boolean) ligne : 85
Project.doTranslateN32Drools(boolean) ligne : 819
Project.translateN32Drools(boolean) ligne : 795
Project.prepareDrools(boolean) ligne : 760
Project.prepare() ligne : 1138
ProjectFactory.prepareProject(Project, URL, boolean) ligne : 272
ProjectFactory.restore(File, URL, boolean) ligne : 165
ProjectFactory.restore(File, boolean) ligne : 72
ProjectFactory.restoreAny(File, boolean) ligne : 328
ProjectFactory.restore(String, boolean) ligne : 56
ProjectGUI.main(String[]) ligne : 186

- Prefix was wrong : http://www.w3.org/2005/xpath-functions

- added tests in math.n3 for:

- process statically created lists in e:max , e:min

- process dynamically created lists in math:sum, etc

Drools : how to have GUI automatically updated by the KB

I wonder if automatic retract works for Collections, e.g. :

when $c : Customer( totalsOrders > 100000 )
then $list.add( $c )

Well, it can't, as for automatic retract , an insertLogical() is to be used, and we have no addLogical() for Collections.

This will do automatic retract :

when $c : Customer( totalsOrders > 100000 )
then insertLogical(new Display( $c, $goodCustomersPanel ) )

But the question : how to have a GUI display of the Display objects without too much ad-hoc code ?

The solution I see is to have Drools query for the Display objets , launch this query at every firing of rules, and re-populate the GUI with the result of the query.

Ontology for Unit and Measurement

On swig IRC :

<jmv_> Any idea of an ontology for units and physical elements like mass, length, temperature ... maybe as properties on DataType Properties, or classes Unit and Measurement ?

<tobyink> jmv_: take a look at http://forge.morfeo-project.org/wiki_en/index.php/Units_of_measurement_ontology

<tobyink> However, it uses the http://esw.w3.org/InterpretationProperties antipattern.

<tobyink> i.e. it models things like this: <#me> :height [ :value 178 ; :unit :centimetres ] .

<tobyink> whereas it's better to model things like this: <#me> :height [ :centimetres 178 ] .

<tobyink> or even: <#me> :height "178"^^:centimetres .

remove field editedN3Source in Project

TODO : remove URIModificationChecker when the GUI is closed

2010-12-10

EulerGUI

- statically created lists in e:max , e:min

TODO in

( 3 2 4 1 ) e:max ?MAX .

?MAX is 4.0 . e:max should return 4 , or ?MAX log:equalTo 4.0 be true

# TODO anyway I don't know how to make use of ?MAX in the antecedent;

# same old problem of creating variables in the antecedent that are not

# associated to a Drools object criterium (alias Pattern in Drools doc)

Maybe we can use from accumulate create the list from its elements

- ensure the bidirectional association between EditorManagement and ProjectGUI

- pave the way for using http://prefix.cc for filling missing prefixes when saving N3 files

http://twitter.com/josderoo

  ?LIST e:max ?MAX .
  ?MAX log:equalTo 8848 .

jmv> I try to compute in the LHS the sum of a List of String ; the problem is parse the strings as number; I tried this :

$MAX : Number() from accumulate( $MAX_STRING : String from $LIST , 
max( Double.parseDouble($MAX_STRING) ) )

Trials in Drools:

$MAX : Number()  from accumulate( $NUM : Number() , $LIST.contains( $NUM ) , max($NUM) )

??????????????? or :

$MAX : Number()  from accumulate( $NUM : Number() from $LIST , max($NUM) )
// rather:
$MAX : Number()  from accumulate( $S : String from $LIST , $NUM : Double(Double.parseDouble($S)) , max($NUM) )

Unité d'exécution [AWT-EventQueue-0] (Suspendue (point d'arrêt à la ligne 267 de ResultManagement))
ResultManagement.displayOriginalSourceWithErrors(N3Source, N3ParseResult) ligne : 267
N3ConversionRefesher.updateN3(N3Source) ligne : 81
N3ConversionRefesher.n3SourceAdded(Project, N3Source) ligne : 50
ProjectChangeSupport.fireAddN3Source(Project, N3Source) ligne : 72
Project.rethrowEventsPlease() ligne : 1345
ProjectFileManagement$1.actionPerformed(ActionEvent) ligne : 82
JMenu$1(AbstractButton).fireActionPerformed(ActionEvent) ligne : 1995
AbstractButton$Handler.actionPerformed(ActionEvent) ligne : 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) ligne : 387
DefaultButtonModel.setPressed(boolean) ligne : 242
JMenu$1(AbstractButton).doClick(int) ligne : 357
BasicMenuItemUI.doClick(MenuSelectionManager) ligne : 1223

file:/home/jmv/src/eulergui_new/bbtransitiveProp.n3 has changed on disk or on Internet
Error during re-parsing N3 source
Cause: n3_project.exceptions.parser.ParsingException: parse succeed
reduce error: bad data class class net.sf.parser4j.parser.entity.parsenode.data.NullParseNodeData
no prefix for "rdfs:"
bad data class class net.sf.parser4j.parser.entity.parsenode.data.NullParseNodeData
no prefix for "rdfs:"

http://prefix.cc/eu

http://prefix.cc/eg TODO

http://www-sop.inria.fr/edelweiss/software/corese/kgram/index.php

COMMITED

FEATURE: now N3 conversions of plain XML documents (by Gloze) are cached

CAVEAT: HTTP URL's without "last updated" header are never updated

implementation: using URICacheOSCache

2010-12-09

ProjectFactory : Remove unnecessary call to prepareN3Sources()

Tests run: 133, Failures: 0, Errors: 0, Skipped: 0

BUILD SUCCESSFUL

[INFO] Total time: 12 minutes 28 seconds

2010-12-08

EulerGUI

TODO

Messages for N3 errors : getting them in all cases

needed to cut method Project.prepare() in pieces , to be able to recompile by Drools for one N3 source

feature:

- after adding an N3 file, the tooltips in N3 editor are active

TESTED : scenario: adding to an empty project: examples/person-app-spec.n3

- now adding an erroneous N3 file triggers the usual red popup

- ensure the bidirectional association between EditorManagement and ProjectGUI

- DONE: further error in the newly added N3 file triggers nothing

Test and clean

[INFO] BUILD SUCCESSFUL
[INFO] Total time: 11 minutes 16 seconds
[INFO] Finished at: Wed Dec 08 16:41:22 CET 2010
[INFO] Final Memory: 63M/361M
% svn info
Révision : 1963

TODO

COMITTED

Remove the preparations during reading by XMLDecoder, in the case of subprojects

With these commits, the tests in trunk are correct again:

Revision 1959 - Directory Listing

Modified Wed Dec 8 10:50:11 2010 UTC (2 minutes, 5 seconds ago) by jmvanel

Project : for subprojects, during Drools runs, the argument useInsertLogical was not passed,

which caused functional tests TestGenericGuiGeneration and TestSwingGeneration to fail

(they require useInsertLogical == false , which is not the default anymore )

Revision 1958 - Directory Listing

Modified Wed Dec 8 10:20:47 2010 UTC (31 minutes, 29 seconds ago) by jmvanel

TestRulesForUserEvents was doing an infinite loop ; need to call

project.runDroolsTriples()

with useInsertLogical == false

2010-12-07

EulerGUI test and clean

TODO

TODO : Remove the preparations during and after reading by XMLDecoder

GOALS

ISSUES


Removed this in Project's comments

* For Euler SEM reasoner, We would like to reuse the same rules and facts

* compiled in Prolog for several queries, but this is not currently possible in

* Euler due to 2 problems. There is a problem when translating in Prolog the

* query alone: no query on output.

* <p/>

* A 2nd problem is with the namespace prefix renaming that could be the case in

* the query file, so the transaction approach is the only feasible one at the

* moment.

Struggle with form generation gone wild

COMITTED

I tried to pass tests like this, but this does not exclude anything.

DISPLAY=:1 LANG=en mvn -e -DPARSER4J_TESTS=no \
   '-Dmaven.test.excludes=**/TestGenericGuiGeneration.java' test

<bentmann> I see no expression mentioned in the Surefire docs for the excludes param which means it can't be set from CLI

<jmv> bentmann, you mean Surefire docs == http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#excludes ?

<bentmann> yes

<jmv> I optimistically though that CLI were available for everything that is available with pom.xml .

Last prints for TestGenericGuiGeneration with cv2.n3p with useInsertLogical==false :

#TRACE ( ">>> implement DatatypeInputWidget" _:sk_PROPERTY_43 _:sk_FIELD_173 _:sk_JPANEL_FIELD_174 )
#TRACE ( "generic_gui_projection 7" _:sk_JPANEL_FORM_129 "gengui:hasComponent" _:sk_JPANEL_FIELD_174 )
#TRACE ( "9 gui:label" _:sk_FIELD_173 _:sk_PROPERTY_43 _:sk_NAME_44 )
#TRACE ( "9 gui:label" _:sk_FIELD_173 _:sk_PROPERTY_43 "cvCopyright" )
#TRACE ( "6" _:sk_PROPERTY_43 <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> )
#TRACE ( "added a subject to the field: " _:sk_RESOURCE_128 _:sk_FIELD_173 )
#TRACE ( ":form_no_subclasses :DEBUG" _:sk_OWL_CLASS_6 )
#TRACE ( "generic_gui_projection 12" _:sk_FIELD_132 "gui:type" _:sk_OWL_CLASS_6 )
#TRACE ( "2" _:sk_PROPERTY_36 "a :OWLProperty" )
#TRACE ( ":form_no_subclasses :DEBUG" _:sk_OWL_CLASS_27 )
#TRACE ( "generic_gui_projection 12" _:sk_FIELD_131 "gui:type" _:sk_OWL_CLASS_27 )
#TRACE ( "2" _:sk_PROPERTY_115 "a :OWLProperty" )
#TRACE ( ":form_no_subclasses :DEBUG" _:sk_OWL_CLASS_120 )
#TRACE ( "generic_gui_projection 12" _:sk_FIELD_160 "gui:type" _:sk_OWL_CLASS_120 )
#TRACE ( "2" _:sk_PROPERTY_9 "a :OWLProperty" )
#TRACE ( "1" _:sk_PROPERTY_98 "ObjectProperty" "a :OWLProperty" )

http://downloads.jboss.com/drools/updatesite3.5/

I have a very simple rule with a single criterium, a single insert on the RHS, and a single matching initial fact , but I can't understand why it triggers twice .

Unité d'exécution [main] (Suspendue (point d'arrêt à la ligne 390 de N3SourcetoDrools))
N3SourcetoDrools.droolsCompile(String) ligne : 390
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) ligne : 298
N3SourcetoDrools.translate(N3Source, boolean, boolean) ligne : 236
N3toDroolsUpdater.translate(N3Source, boolean) ligne : 88
Project.doTranslateN32Drools(boolean) ligne : 817
Project.translateN32Drools(boolean) ligne : 789
Project.prepareDrools(boolean) ligne : 753
Project.prepare() ligne : 1119
ProjectFactory.prepareProject(Project, URL, boolean) ligne : 193
ProjectFactory.restore(File, URL, boolean) ligne : 167
ProjectFactory.restore(File) ligne : 71
ProjectFactory.restoreAny(File) ligne : 364
ProjectFactory.restore(String, boolean) ligne : 59
ProjectGUI.main(String[]) ligne : 186

Unité d'exécution [AWT-EventQueue-0] (Suspendue (point d'arrêt à la ligne 390 de N3SourcetoDrools))
N3SourcetoDrools.droolsCompile(String) ligne : 390
N3SourcetoDrools.translate(IRDFIterator, boolean, boolean) ligne : 298
N3SourcetoDrools.translate(N3Source, boolean, boolean) ligne : 236
N3toDroolsUpdater.translate(N3Source, boolean) ligne : 88
Project.doTranslateN32Drools(boolean) ligne : 817
Project.translateN32Drools(boolean) ligne : 789
Project.prepareDrools(boolean) ligne : 753
Project.doRunDrools(boolean) ligne : 709
Project.runDroolsTriples(boolean) ligne : 667
RunDroolsAction.actionPerformed(ActionEvent) ligne : 48
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) ligne : 1995

#TRACE ( "FocusLostEvent" "kb:replaceValue" _:sk_FIELD_259 _:sk_RESOURCE_55 <http://jmvanel.free.fr/ontology/examples/person#birthday> "" "" )
replaceValue [fact 0:13750:1793879339:-2043207012:1056078:DEFAULT:_:sk_RESOURCE_55 <http://jmvanel.free.fr/ontology/examples/person#birthday> "" . #U
]

2010-12-04

Expressing counting, maximum, sums in ACE

Started a thread about expressing counting, maximum, sums in ACE:

https://lists.ifi.uzh.ch/pipermail/attempto/2010-December/000672.html

See entry in my blog yesterday: "Représentation des connaissances : exprimer maximum, sommation"

EulerGUI testing

FIXED REGRESSION from refactoring branch: in doing "Save as"; the subproject's query was saved in the main project as a seemingly local file;

TESTED with examples/acceleration_form.n3p.

Note that the project's main query coming from the subproject is present as a button.

java.lang.OutOfMemoryError: PermGen space

java.lang.IllegalArgumentException: URI scheme is not "file"
at java.io.File.<init>(File.java:366)
at n3_project.IOManager.getInputStream(IOManager.java:41)
at eulergui.parser.n3.impl.parser4j.service.TestForJos.doTheTestForOneFile(TestForJos.java:89)
at eulergui.parser.n3.impl.parser4j.service.TestForJos.doTheTest(TestForJos.java:77)
at eulergui.parser.n3.impl.parser4j.service.TestForJos.testFromEulerSharp(TestForJos.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
[ INFO] - 2010-12-04 17:25:55,368 [main] eulergui.parser.n3.impl.parser4j.service.TestForJos (TestForJos.java:doTheTestForOneFile:84) 
 http://eulersharp.sourceforge.net/2003/03swap/graph.axiom.n3

2010-12-03

EulerGUI testing

TODO

Déductions sample "pricing"

DONE

Now the GUI for pricing appears in EulerGUI

- add query2.n3 (it is already in the subproject, but there is a bug in EulerGUI right now )

Form generation examples, like deductions/samples/pricing/pricing-gui.n3p , give a correct (but simple) result.

Implement sum rule; syntax correct with CWM, Euler and Parser4J/N3 , e.g. :

eye --pass --nope pricing.n3

EulerGUI testing

Still problems with form generation and Drools' Insert Logical

With useInsertLogical == true in EulerGUI , the test suite seems without error or failure but it says :

Tests run: 128, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to /home/jmv/src/eulergui_test/eulergui/target/surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 minutes 49 seconds

Moreover, some form generation examples run forever, like examples/acceleration_form.n3p .

With useInsertLogical == false in EulerGUI :

Running eulergui.gui.TestGenericGuiGeneration
Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 176.882 sec <<< FAILURE!

CONCLUSION: TODO:

We must debug the form generation rule base in swing-rules3.n3p . There are 2 different problems: 1) infinite loop 2) pricing-gui.n3p gives an empty result, due to main query from subproject not taken in account . This is also the oportunity to enhance debugging tools.

In fact the problem was not "main query from subproject not taken in account", it was in doing "Save as"; the subproject's query was saved in the main project.

Other TODO:

2010-12-02

com.hp.hpl.jena.n3.turtle.parser.TokenMgrError: Lexical error at line 65, column 161. Encountered: "\n" (10), after : "\" describes what the application is used for;"

EulerGUI testing

I upload a snapshot for Revision : 1944 . <<<<<<

TODO

Three lines are incorrect in the internal KB:

file:/home/jmv/src/deductions/samples/pricing/query2.n3 <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true .
http://deductions.svn.sourceforge.net/viewvc/deductions/n3_logical/query2.n3 <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true .
<file:/home/jmv/src/deductions/samples/pricing/pricing-gui.n3p> <http://java.sun.com/class#Uri> file:/home/jmv/src/deductions/samples/pricing/pricing-gui.n3p .

Should be:

<file:/home/jmv/src/deductions/samples/pricing/query2.n3> <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true .

<http://deductions.svn.sourceforge.net/viewvc/deductions/n3_logical/query2.n3> <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true .

<file:/home/jmv/src/deductions/samples/pricing/pricing-gui.n3p> <http://java.sun.com/class#Uri> <file:/home/jmv/src/deductions/samples/pricing/pricing-gui.n3p> .

Problem with N3 sources modification Checker

12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker: java.net.ConnectException: Connection refused: connect
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.net.PlainSocketImpl.socketConnect(Native Method)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.net.PlainSocketImpl.doConnect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.net.PlainSocketImpl.connect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.net.SocksSocketImpl.connect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.net.Socket.connect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.net.Socket.connect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.NetworkClient.doConnect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.http.HttpClient.openServer(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.http.HttpClient.openServer(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.http.HttpClient.<init>(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.http.HttpClient.New(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.http.HttpClient.New(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at eulergui.infrastructure.cache.URICacheImpl.getURITimeStamp(URICacheImpl.java:95)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at eulergui.infrastructure.cache.URICacheImpl.getURITimeStamp(URICacheImpl.java:77)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at eulergui.infrastructure.URIModificationChecker.run(URIModificationChecker.java:70)
12:18:49 [N3  sources modification Checker] [error] N3  sources modification Checker:  at java.lang.Thread.run(Unknown Source)

N3 mode (syntax) now works from within the jar

N3 mode (syntax) now works from within the jar, in /modes/n3.xml

but if present, the mode $HOME/.jedit/modes/n3.xml will be applied instead.

Solved by defensive programming:

Thread [AWT-EventQueue-0] (Suspended (exception NullPointerException))
Hashtable<K,V>.put(K, V) line: not available
JEditMode(Mode).setProperty(String, Object) line: 179
jEdit$7(ModeCatalogHandler).startElement(String, String, String, Attributes) line: 81
SAXParser(AbstractSAXParser).startElement(QName, XMLAttributes, Augmentations) line: not available
SAXParser(AbstractXMLDocumentParser).emptyElement(QName, XMLAttributes, Augmentations) line: not available
XMLNSDTDValidator(XMLDTDValidator).emptyElement(QName, XMLAttributes, Augmentations) line: not available
XMLNSDocumentScannerImpl.scanStartElement() line: not available
XMLNSDocumentScannerImpl$NSContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available
XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available
XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available
XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available
SAXParser(XMLParser).parse(XMLInputSource) line: not available
SAXParser(AbstractSAXParser).parse(InputSource) line: not available
XMLUtilities.parseXML(InputStream, DefaultHandler) line: 139
jEdit.loadModeCatalog(String, boolean) line: 4251
jEdit.reloadModes() line: 1324
jEdit.main(String[]) line: 467
TextEditor.displayEditor(ProjectGUI, N3Source) line: 277
EditorManagement.openJavaEditor(N3Source) line: 134
EditorManagement.doOpenEditor(N3Source) line: 104
EditorManagement.reallyDoOpenEditor(ProjectGUI, N3Source) line: 72
EditorManagement$1.actionPerformed(ActionEvent) line: 42
JButton(AbstractButton).fireActionPerformed(ActionEvent) line: not available
AbstractButton$Handler.actionPerformed(ActionEvent) line: not available

Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\luc.PEUVRIER-LUC.000>java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

INFO: Starting jEdit.main -gui -noserver file:/C:/_DATA/deductions/samples/pricing/pricing.n3
13:55:52 [AWT-EventQueue-0] [error] jEdit$3: java.io.FileNotFoundException: \modes\text.xml (Le chemin d'accs spcifi est introuvable)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.io.FileInputStream.open(Native Method)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.io.FileInputStream.<init>(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.io.FileInputStream.<init>(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.syntax.ModeProvider.loadMode(ModeProvider.java:150)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.jEdit.loadMode(jEdit.java:2981)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.JEditMode.loadIfNecessary(JEditMode.java:100)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.Mode.getTokenMarker(Mode.java:114)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.buffer.JEditBuffer.setMode(JEditBuffer.java:1822)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.Buffer.setMode(Buffer.java:1152)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.Buffer.finishLoading(Buffer.java:1953)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.Buffer.access$400(Buffer.java:89)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.jedit.Buffer$1.run(Buffer.java:255)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.util.WorkThreadPool.doAWTRequest(WorkThreadPool.java:398)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.util.WorkThreadPool.doAWTRequests(WorkThreadPool.java:383)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.util.WorkThreadPool.access$200(WorkThreadPool.java:37)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at org.gjt.sp.util.WorkThreadPool$RunRequestsInAWTThread.run(WorkThreadPool.java:483)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.event.InvocationEvent.dispatch(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.EventQueue.dispatchEvent(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
13:55:52 [AWT-EventQueue-0] [error] jEdit$3:  at java.awt.EvenDispatchThread.run(Unknown Source)

2010-12-01

http://protege.stanford.edu/conference/2009/attendees.html

% date --rfc-3339=date
2010-12-01
% date --rfc-3339=seconds
2010-12-01 12:12:25+01:00

French localization of eclipse

I added this update source:

babel R0.8.0 helios - http://download.eclipse.org/technology/babel/update-site/R0.8.0/helios

I works fine, but at the same time I had a hardware crash when restarting eclipse, so I lost my workspace, but not my projects.

EulerGUI testing

- FIXED Infinite loops in Drools inference: hard-coded useInsertLogical = true and false was remaining

in N3SourceToDrools and N3SourceUpdater

- added a missing I18 string

Infinite loop with acceleration_form.n3p

#TRACE ( ">>>> starting createFormFromResource: " _:sk_FORM_33 <http://eulergui.sf.net/example#creamTart> )
#TRACE ( "    " _:sk_WINDOW_32 <http://eulergui.sf.net/example#Mobile> )
#TRACE ( ">>>> createFormFromResource: " _:sk_FORM_33 <http://eulergui.sf.net/example#creamTart> <http://eulergui.sf.net/example#Mobile> )
#TRACE ( "generic_gui_projection 5" _:sk_FORM_33 "javapr:projection" _:sk_JPANEL_FORM_34 )
log:notEqualTo RT : <http://www.w3.org/2002/07/owl#Thing> <http://eulergui.sf.net/example#Mobile>
#TRACE ( "3" <http://eulergui.sf.net/example#Mobile> <http://jmvanel.free.fr/ontology/gui_generic.owl#hasForm> _:sk_FORM_33 )

Changing this in Project.doTranslateN32Drools() solves the problem :

//                  getTranslator().translate( n3, useInsertLogical ); TODO test <<<<<<<<<<<<<<<<<<<<<<
                    getTranslator().translate( n3 );

This could mean that the rule base for form generation is still not clean enough to work with insertLogical.

Or the parameter useInsertLogical is not transmitted correctly.

With the old line translate( n3 ) , this test runs forever :

eulergui.gui.TestGenericGuiGeneration

but the other 2 TestXXXGeneration run fine.

In fact a hard-coded useInsertLogical = true was remaining somewhere :(((

That solves the problem ! :((

A stop in the middle of the infinite run :

Unité d'exécution [AWT-EventQueue-1] (Suspendue)
Class<T>.getMethod(String, Class<?>...) ligne : 1605
ReteooStatefulSession(AbstractWorkingMemory).removePropertyChangeListener(FactHandle) ligne : 1216
ReteooStatefulSession(AbstractWorkingMemory).retract(FactHandle, boolean, boolean, Rule, Activation) ligne : 1271
TruthMaintenanceSystem$LogicalRetractCallback.execute(InternalWorkingMemory) ligne : 278
ReteooStatefulSession(AbstractWorkingMemory).executeQueuedActions() ligne : 1471
ReteooStatefulSession(AbstractWorkingMemory).insert(InternalFactHandle, Object, Rule, Activation, ObjectTypeConf) ligne : 1179
ReteooStatefulSession(AbstractWorkingMemory).insert(Object, boolean, boolean, Rule, Activation) ligne : 1123
DefaultKnowledgeHelper.insertLogical(Object, boolean) ligne : 160
DefaultKnowledgeHelper.insertLogical(Object) ligne : 138
Rule_generic_gui_projection_rules_n3_12_0.defaultConsequence(KnowledgeHelper) ligne : 12
Rule_generic_gui_projection_rules_n3_12_0DefaultConsequenceInvoker.evaluate(KnowledgeHelper, WorkingMemory) ligne : 24
DefaultAgenda.fireActivation(Activation) ligne : 917
DefaultAgenda.fireNextItem(AgendaFilter) ligne : 856
DefaultAgenda.fireAllRules(AgendaFilter, int) ligne : 1071
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter, int) ligne : 785
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() ligne : 751
N3SourcetoDrools.launchDroolsKeepWM() ligne : 583
N3SourcetoDrools.launchDrools() ligne : 551
N3toDroolsUpdater.launchDrools() ligne : 48
Project.doRunDrools(boolean) ligne : 720
Project.runDroolsTriples(List<ITriple>) ligne : 670
Project.runDroolsTriples(boolean) ligne : 664
RunDroolsAction.actionPerformed(ActionEvent) ligne : 48
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) ligne : 1995
AbstractButton$Handler.actionPerformed(ActionEvent) ligne : 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) ligne : 387
DefaultButtonModel.setPressed(boolean) ligne : 242
BasicButtonListener.mouseReleased(MouseEvent) ligne : 236
AWTEventMulticaster.mouseReleased(MouseEvent) ligne : 272
JToolBar$1(Component).processMouseEvent(MouseEvent) ligne : 6267
JToolBar$1(JComponent).processMouseEvent(MouseEvent) ligne : 3267
JToolBar$1(Component).processEvent(AWTEvent) ligne : 6032
JToolBar$1(Container).processEvent(AWTEvent) ligne : 2041
JToolBar$1(Component).dispatchEventImpl(AWTEvent) ligne : 4630
JToolBar$1(Container).dispatchEventImpl(AWTEvent) ligne : 2099
JToolBar$1(Component).dispatchEvent(AWTEvent) ligne : 4460
QueueTool$JemmyQueue(EventQueue).dispatchEvent(AWTEvent) ligne : 599
QueueTool$JemmyQueue.dispatchEvent(AWTEvent) ligne : 588
EventDispatchThread.pumpOneEventForFilters(int) ligne : 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) ligne : 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) ligne : 174
EventDispatchThread.pumpEvents(int, Conditional) ligne : 169
EventDispatchThread.pumpEvents(Conditional) ligne : 161
EventDispatchThread.run() ligne : 122

REGRESSION: N3 sources' URI broken for a Web subproject of a file project

Still get some test waiting forever with 100% of 1 CPU, but the preject alone runs fine (deductions/n3_logical/person_import3.n3p),

COMMITED

in N3Source.getLocation() line: 47 recompute the location everytime

TODO : that's not enough , and Tests in error:

testXMLOutputFromRDF(eulergui.gui.TestEulerGUIOutputs)

testXMLOutputFromN3(eulergui.gui.TestEulerGUIOutputs)

- REGRESSION FIXED: N3 sources' URI broken for a Web subproject of a file project:

- also changes in ProjectFactory.prepareN3Sources() : only call prepare on Direct N3 Sources and direct N3 Query

TODO: is ProjectFactory.prepareN3Sources() useful at all ?

- clean unused imports

The other problem is in this stack :

Thread [main] (Suspended (breakpoint at line 58 in N3Source))
N3Source.getLocation() line: 58
N3Source.prepare(Project) line: 405
N3Source.setProject(Project) line: 365
N3Source.prepare(Project) line: 401
ProjectFactory.prepareN3Sources(Project) line: 328
ProjectFactory.prepareProject(Project, URL, boolean) line: 186
ProjectFactory.restore(File, URL, boolean) line: 167
ProjectFactory.restore(File) line: 71
ProjectFactory.restoreAny(File) line: 362
ProjectFactory.restore(String, boolean) line: 59
ProjectGUI.main(String[]) line: 186

At this point the N3Source has a bad location: file:/home/jmv/src/eulergui_new/examples/software_applications.n3

within Project file:/home/jmv/src/eulergui_new/examples/acceleration_form.n3p

Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 831 in Project))
Project.doTranslateN32Drools(boolean) line: 831
Project.translateN32Drools(boolean) line: 779
Project.prepareDrools(boolean) line: 759
Project.doRunDrools(boolean) line: 715
Project.runDroolsTriples(List<ITriple>) line: 670
Project.runDroolsTriples(boolean) line: 664
RunDroolsAction.actionPerformed(ActionEvent) line: 48
JToolBar$1(AbstractButton).fireActionPerformed(ActionEvent) line: 1995

In fact the N3Source inside the subproject

http://deductions.svn.sourceforge.net/viewvc/deductions/n3_logical/swing-rules3.n3p

already have this bad location.

This probably happens during ProjectFatory.restore() .

Adding this breakpoint in Project.addN3Source(N3Source n3, boolean isTransient)

n3.getLocation().toString().contains( "form-rules.n3" )

And this at the begining of N3Source.getLocation() :

( location != null &&
  location.toString().contains( "form-rules.n3" )
)
||
( uri_ != null &&
  uri_.toString().contains( "form-rules.n3" )
)

Now I'm here for :

http://deductions.svn.sourceforge.net/viewvc/deductions/n3_logical/form-rules.n3

those project is the correct one :

http://deductions.svn.sourceforge.net/viewvc/deductions/n3_logical/swing-rules3.n3p

but the location field was pre-computed false:

file:/home/jmv/src/eulergui_new/form-rules.n3

Thread [main] (Suspended (breakpoint at line 47 in N3Source))
N3Source.getLocation() line: 47
N3Source.prepare(Project) line: 405
N3Source.setProject(Project) line: 365
Project.addN3Source(N3Source, boolean) line: 282
Project.addN3Source(N3Source) line: 277
ProjectLegacy$1.put(String, N3Source) line: 126
ProjectLegacy$1.put(Object, Object) line: 1
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
Trampoline.invoke(Method, Object, Object[]) line: 37
GeneratedMethodAccessor1.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
MethodUtil.invoke(Method, Object, Object[]) line: 244
MutableExpression(Statement).invokeInternal() line: 239
Statement.access$000(Statement) line: 39
Statement$2.run() line: 140
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
MutableExpression(Statement).invoke() line: 137
MutableExpression(Expression).getValue() line: 98
MutableExpression.getValue() line: 445
ObjectHandler.getValue(Expression) line: 108
ObjectHandler.endElement(String) line: 372
SAXParserImpl$JAXPSAXParser(AbstractSAXParser).endElement(QName, Augmentations) line: not available
XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanEndElement() line: not available
XMLDocumentScannerImpl$ContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available
XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available
XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available
XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available
SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: not available
SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource) line: not available
SAXParserImpl$JAXPSAXParser.parse(InputSource) line: not available
SAXParserImpl(SAXParser).parse(InputSource, HandlerBase) line: 364
SAXParserImpl(SAXParser).parse(InputStream, HandlerBase) line: 142
XMLDecoder.getHandler() line: 238
XMLDecoder.readObject() line: 201
ProjectFactory.restore(File, URL, boolean) line: 134
ProjectFactory.restore(URL, boolean) line: 239
ProjectFactory.restore(URL) line: 207
ProjectLegacy.injectSubproject(String) line: 203
ProjectLegacy.setSubProjects(HashSet<String>) line: 218
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
Trampoline.invoke(Method, Object, Object[]) line: 37
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
MethodUtil.invoke(Method, Object, Object[]) line: 244
MutableExpression(Statement).invokeInternal() line: 239
Statement.access$000(Statement) line: 39
Statement$2.run() line: 140
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
MutableExpression(Statement).invoke() line: 137
MutableExpression(Expression).getValue() line: 98
MutableExpression.getValue() line: 445
ObjectHandler.getValue(Expression) line: 108
ObjectHandler.endElement(String) line: 372
SAXParserImpl$JAXPSAXParser(AbstractSAXParser).endElement(QName, Augmentations) line: not available
XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanEndElement() line: not available
XMLDocumentScannerImpl$ContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available
XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available
XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available
XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available
SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: not available
SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource) line: not available
SAXParserImpl$JAXPSAXParser.parse(InputSource) line: not available
SAXParserImpl(SAXParser).parse(InputSource, HandlerBase) line: 364
SAXParserImpl(SAXParser).parse(InputStream, HandlerBase) line: 142
XMLDecoder.getHandler() line: 238
XMLDecoder.readObject() line: 201
ProjectFactory.restore(File, URL, boolean) line: 134
ProjectFactory.restore(File) line: 71
ProjectFactory.restoreAny(File) line: 362
ProjectFactory.restore(String, boolean) line: 59
ProjectGUI.main(String[]) line: 187

Regressions

2010-11-30

Strategies for Building Semantic Web ApplicationsStrategies for Building Semantic Web Applications

http://notes.3kbo.com/rdf2gae

http://richard.cyganiak.de/blog/2007/02/debugging-semantic-web-sites-with-curl/

EulerGUI development

FEATURE TODO

prefix.cc is useful: from this kind of URL one gets ( with N3 content type) :

http://prefix.cc/foaf,dc,owl.file.n3

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc:   <http://purl.org/dc/terms/> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .

By entering somehow "foaf" in the GUI, the @prefix declaration will be added in the editor.

At the same time, the ontology (loaded from its URI) will be added to the project as a transient N3 source.

DONE

Regression

when saving a legacy project (with ProjectWithSubProjects) with a sub-project, everything in the sub-project was put in the main project

[FEATURE] (had been lost in the big merge) Creation of an input Form from a click in Class tree, using rules from Déductions project;

class CreateClassFormMouseListener: uses JavaScript Instantiation, not the new N3JavaMappingBuiltin

- activated; tested with new project : examples/test_form_from_treeview.n3p

- doc. updated

show using TemporaryFrame the explanation of the OWL inconsistency when calling Pellet reasoner , using : kb.getExplanation()

Trying RDFAuthor

I tried the Java Swing version.

Pretty bugged and not maintained since 2003, but there are good ideas :

http://rdfweb.org/people/damian/RDFAuthor/Tutorial/Tutorial1/

2010-11-29

http://www.ip-adress.com/

Trying RDF download with HTTP header accept:application/rdf+xml

A discussion on SWIG IRC:

Hi ! In the RDF GUI I'm developing, I need to have a list of well-known RDF/N3 prefixes with the URI of the ontology which defines the URI having the prefix; e.g. :

<http://xmlns.com/foaf/0.1/> eg:prefixOf <http://xmlns.com/foaf/spec/index.rdf> .

Any suggestion for the predicate eg:prefixOf ?

<kwijibo> eulergui-1.7_: see prefix.cc/vanni est parti (Read error: Connection reset by peer) <webr

<webr3> that's not realy a prefix foaf -> http://xmlns.com/foaf/0.1/ is a prefix, the mapping you've got there is one which changes over time

<webr3> http://xmlns.com/foaf/0.1/ <-- perma uri

-dc_swig/#swig- A: http://xmlns.com/foaf/0.1/ from webr3

<eulergui-1.7__> webr3, sounds good, but what would be permanent URI for http://xmlns.com/foaf/spec/index.rdf ?

<eulergui-1.7__> kwijibo, vann has good stuff ( and my family name is Vanel ;) ) ,et by peer) <webr

<eulergui-1.7__> but it lacksiation between a prefiw and the dereferentiable location of the ontolo the association between a prefiw and the dereferentiable location of the ontology .

<webr3> eulergui-1.7__, tbh this is to do with the way FOAF and DC are published and the URIs they use, for nearly every other ontology you don't have this problem, as they all use #frag properties

<jmv__> kwijibo, in the GUI we develop (EulerGUI), there tooltips showing rdf:label and rdf:comment about the term under the mouse ( in a N3 editor ).

<kwijibo> jmv__: so?

<jmv__> so when the user is editing for example a FOAF N3 document, it needs to find the ontology ,

<jmv__> and this should be done from an N3 configuration file

<kwijibo> jmv__: you can let your http client dereference it for you? what's the use-case for knowing what it derferences to in advance ?

<jmv__> thanks, kwijibo, vann indeed suits my purpose; however I don't understand what you don't understand about my use case ...

<kwijibo> jmv__: if you do a GET on http://xmlns.com/foaf/0.1/ (and follow the redirect), you get the URL of the document - why do you need to know anything other than the http://xmlns.com/foaf/0.1/ URI ?

<kwijibo> after all, it could change it every day

<kwijibo> (the spec.rdf URL )

<jmv__> kwijibo, alas if I do a GET on http://xmlns.com/foaf/0.1/ , at least in my browser, I get an HTML page saying : FOAF Vocabulary Specification 0.98

<jmv__> Namespace Document 9 August 2010 - Marco Polo Edition , etc

<kwijibo> jmv__: that's because you're not sending an accept: application/rdf+xml header

<kwijibo> (or rather, your browser isn't)

<jmv__> Maybe if I did by program an HTTP query with content negotiation, but in the most general case the prefix URI of an ontology is not enough to donwload its definition.

<kwijibo> yeah it is

<kwijibo> if a vocab namespace URI doesn't deref, with conneg, to RDF, it's not doing it right

<jmv__> I'd like that , but It's not garantied AFAIK

<kwijibo> I bet it's more reliable than a hard coded mapping

<kwijibo> which vocabs don't deref to RDF?

<jmv__> the hard coded mapping is just for the vocabs that don't do things right

<kwijibo> which ones are they?

<jmv__> I'll try to pick one , kwijibo :)

<jmv__> kwijibo, indeed that works fine :

wget --header=accept:application/rdf+xml http://xmlns.com/foaf/0.1/

<jmv__> after dinner I'll try many more .

<kwijibo> lol


Following advice by Keith Alexander on the SWIG IRC, I'm trying RDF download with HTTP header accept:application/rdf+xml , e.g. this works:

wget --header=accept:application/rdf+xml http://xmlns.com/foaf/0.1/

From the browser, http://xmlns.com/foaf/0.1/ returns the HTML man readable specification.

In the case of SIOC, the URI is the ontology definition, and the HTML man readable specification:

http://rdfs.org/sioc/spec/

only ever returns HTML, no matter what the HTTP header accept says.

EulerGUI development

TODO

examples/famous-ontologies.n3p

DONE

doc.: enhance:

- Finding data on the Web (LOD),

- Finding rules on the Web; rules for OWL concepts

- difference in behavior between queries like SPARQL queries, and rules like N3 or SWRL rules

TODO: update with respect to CHANGELOG

SNAPSHOT uploaded on nov. 29 at 14: SCM-Revision: 1928

Tests run: 132, Failures: 0, Errors: 0, Skipped: 0[INFO] --------------------------------------------------------
[INFO] BUILD SUCCESSFUL[INFO] 
[INFO] Total time: 13 minutes 8 seconds
[INFO] Finished at: Mon Nov 29 13:45:41 CET 2010

- for now ( no incremental N3 parser) we cannot create tooltips on a file with parse errors:, so they are deactivated in this case

- When there is an N3 parse error (seen when saving in the editor or pushing the parse button), set the caret in the editor

- at the same time a TemporaryFrame is shown

- in ProjectFactory catch Exceptions occurring in parsing and compiling N3 sources , and display them in a TemporaryFrame

- in Project.prepare, re-throw any Exception as RuntimeException, to be caught later in the GUI layer

- in RunDroolsAction, show any Exception in a TemporaryFrame

- TextEditor: WIP : try to really make the caret visible

- N3ParseResult : remove the stack from the error message

- TODO; When there is an N3 parse error, set the caret in the editor

2010-11-28

EulerGUI development

SNAPSHOT uploaded on nov. 29

- tidy code in TextEditor and EditorManagement (but was unable to make the jEdit window move to top the second time)

- When there is a SPARQL error such as a QueryParseException, set the caret in the editor;

- in EditorManagement catch any error to display it in TemporaryFrame

- refactoring : extract and move new method TemporaryFrame.showException()

TODO : make corresponding functional test

SELECT DISTINCT ?pname ?v

CONSTRUCT { dbpedia:Buddy_Guy ?pname ?v }

Protégé 4.1 feedback

2010-11-26

Semantic Web training finished !!!!!!!!!

EulerGUI development

TODO

after several "new project window" , open and close editor, the leftmost button was not working anymore , and I got a NegativeArraySizeException: reproduce, debug, and fix that

DONE

- for N3SourceFromSPARQLSource, make visible dynamically the button for table view for SELECT queries and the leftmost N3 editor button

- in URIModificationChecker catch any error to display it in TemporaryFrame

TODO : make corresponding functional test

src/test/java/eulergui/gui/TestEulerGUIInputs.java

src/main/java/eulergui/gui/controller/ProjectGUI_Updater.java

src/main/java/eulergui/gui/view/ButtonsForN3Source.java

src/main/java/n3_project/ProjectGUI.java

2010-11-25

ARQ - Basic Federated SPARQL Query

EulerGUI development

TODO

When there is a SPARQL error such as :

N3SourceFromSPARQLSource.doUpdate(): file:/home/jmv/src/eulergui_test/eulergui/examples/service2.sparql ; 
Cause:
com.hp.hpl.jena.query.QueryParseException: Lexical error at line 3, column 9.  Encountered: " " (32), after : "SERVICE"

set the caret in the editor;

implementation: NO need of a correspondance N3Source --> jEdit editor, as jEdit does that when calling jEdit.openFile(jEdit.view, toOpen) .

DONE

- URIModificationChecker: display the temporary frame when there is a unchecked exception in the forever loop

- N3ConversionRefesher was not added as a ProjectListener

- doc:Added the famous Linked Open Data image map graph view to EG documentation

2010-11-24

Following "Give yourself a URI" , I made my URI: http://jmvanel.free.fr/jmv.rdf#me .

Making URI's for the most common things

Asked on the swig IRC:

Are there documents or sites about making URI's for the most common things, to enhance interoperability of data sources ?

Web search: semantic web URI cities species companies products

Found a nice presentation by Sandro Hawke:

[PDF] Introduction to Linked Data

June 8 2010, Cambridge Semantic Web Gathering ... City of Boston website: http://www.cityofboston.gov. Subject: http://www.cityofboston.gov ... People, places, governments, companies, products, ... species of plants, species of animals, … ... A URI for a Web page/information source about it ...

files.meetup.com/1336198/LinkedDataPresentation-SandroHawke.pdf

http://dbpedia.org/page/Boston

http://linkeddata.uriburner.com/ode/?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FBoston

http://www.w3.org/DesignIssues/LinkedData.html

Jena accepted into the Apache Incubator

Jena has been accepted into the Apache Incubator:

http://mail-archives.apache.org/mod_mbox/incubator-general/201011.mbox/%3C4CEC31E4.9080401@apache.org%3E

The proposal was:

http://wiki.apache.org/incubator/JenaProposal

2010-11-23

EulerGUI development

DONE, SNAPSHOT uploaded

- deactivate DroolsHelper.printRuleBase() in all places

- class URIModificationChecker: close the HTTP connection, which should prevent the messages "java.net.SocketException: Too many open files"

- automatically save generated Drools source in case of error

- this rule in Jos' owl-rules.n3 did not pass Drools translator, because list related triples are processed together at the next non list related triple, and a single list related triple was not implemented

{
<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> ?X.
}
 => false.

- this rule in Jos' owl-rules.n3 does not pass Drools translator, because an empty antecedent was not implemented

{ } => {
<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://eulersharp.sourceforge.net/2003/03swap/owl-rules#notItem> ?X.
}

- add a version of owl-rules.n3 in examples/ ; just move log:notEqualTo at the end of the antecedent.

TODO

The problem is that the implementation of log:notEqualTo expects that all variables were already used in preceding triples in same rule.

This is not easy to implement with Drools. The translation should be postponed to end of the antecedent.

2010-11-22

./ape.exe -guess -text "A fruit-tree is a tree which v:bears some fruits." -solo owlfsspp  
Ontology(
   http://attempto.ifi.uzh.ch/ontologies/owlswrl/test
   ClassAssertion(
      ObjectMinCardinality(
         2
         ObjectProperty(:bears)
         Class(:fruits)
      )
      AnonymousIndividual(764411320891237613)
   )
   ClassAssertion(
      Class(:tree)
      AnonymousIndividual(764411320891237613)
   )
   ClassAssertion(
      Class(:fruit-tree)
      AnonymousIndividual(764411320891237613)
   )
)

Using ATTEMPTO for speficying rules for RDF graph transforms

I'm thinking about using ATTEMPTO for speficying rules for RDF graph transforms.

Take for exemple these rules in the N3 rule langage [1] , that are part of a rule base [2] for transforming an UML model into an OWL model :

{?UML_CLASS a uml:Class .
} => {
?OWL_CLASS a owl:Class .?OWL_CLASS :translatedFromUML ?UML_CLASS .} .

{ # transfer uml:name predicate to rdfs:label for Classes, properties, etc
?UML_CLASS uml:name ?NAME .?OWL_CLASS :translatedFromUML ?UML_CLASS .
} => {
?OWL_CLASS rdfs:label ?NAME .} .

A naive verbalization of these 2 rules reads:

If UC is a uml-class then there is a owl-class OC, and OC is transtaled-from UC.

If UC has-uml-name N, and OC is transtaled-from UC then UC has-rds-label N.

This does not work directly, as "variable names consist of a single upper case letter, optionally followed by an integer".

If U is a uml-class then there is a owl-class O, and O is transtaled-from U.

If U has-uml-name N, and O is transtaled-from U then U has-rds-label N.

Note that the first can also be writen:

If U is a uml-class then there is a owl-class O, and O is translated-from U.

Now let's try that last one in ACE View:

   SubClassOf(
      ObjectIntersectionOf(
         Class(owl:Thing)
         Class(:uml-class)
      )
      ObjectSomeValuesFrom(
         ObjectInverseOf(ObjectProperty(:translated-from))
         Class(:owl-class)
      )
   )

This is perfectly sound logically, but we are quite far from a rule suitable for a forward chaining engine.

I look now at what the OWL N3 rules by Jos de Roo from the Euler project can do. I first generate the OWL+SWRL file :

./ape.exe -guess -text \
"If U is a uml-class then there is a owl-class O, and O is translated-from U.  If U has-uml-name N, and O is transtaled-from U then U has-rds-label N." \
  -solo owlxml > uml-owl.owl

Then I can open uml-owl.owl in EulerGUI. The rule 1 (name transmission rule) was an SWRL rule and is now become an N3 rule:

{?t0 ns1:has-uml-name ?t2.
 ?t1 ns1:transtaled-from ?t0} => {?t0 ns1:has-rds-label ?t2}.

No logical problem, but the identifiers were transformed from the original N3.

Now the other, pure OWL, sentence.

There are 35 OWL N3 rules by Jos de Roo from the Euler project :

~/src/eulersharp/2003/03swap/ % ls owl-*.n3                            
owl-AllDifferent.n3           owl-FunctionalProperty.n3         owl-propertyChainAxiom.n3
owl-AllDisjointClasses.n3     owl-hasKey.n3                     owl-propertyDisjointWith.n3
owl-AllDisjointProperties.n3  owl-hasValue.n3                   owl-rules-200.n3
owl-allValuesFrom.n3          owl-intersectionOf.n3             owl-rules-660.n3
owl-AsymmetricProperty.n3     owl-InverseFunctionalProperty.n3  owl-rules.n3
owl-complementOf.n3           owl-inverseOf.n3                  owl-sameAs-ext.n3
owl-differentFrom.n3          owl-IrreflexiveProperty.n3        owl-sameAs.n3
owl-disjointUnionOf.n3        owl-maxCardinality.n3             owl-someValuesFrom.n3
owl-disjointWith.n3           owl-maxQualifiedCardinality.n3    owl-SymmetricProperty.n3
owl-distinctMembers.n3        owl-NegativePropertyAssertion.n3  owl-TransitiveProperty.n3
owl-equivalentClass.n3        owl-Nothing.n3                    owl-unionOf.n3
owl-equivalentProperty.n3     owl-oneOf.n3

The owl-rules.n3 file gathers all the rules. We see that there are rules for all the OWL primitives used in our OWL expression (colored in green). So we add this URL to the EulerGUI project, together with a simple test data and query.

http://www.agfa.com/w3c/euler/owl-rules.n3

Alas with Euler, the result is empty, and Drools crashes :

java.lang.NullPointerException
at n3_project.helpers.DroolsTripleHandler.processLogBuiltin(DroolsTripleHandler.java:378)
at n3_project.helpers.DroolsTripleHandler.makeDroolsCriterium(DroolsTripleHandler.java:240)
at n3_project.helpers.DroolsTripleHandler.acceptAntecedent(DroolsTripleHandler.java:207)
at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:707)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:266)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:237)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:88)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:78)
at eulergui.project.Project.doTranslateN32Drools(Project.java:829)

The reason is that this rules is not translated correctly from N3 to Drools , that is, the rule owl-differentFrom.n3 :

{
  ?X <http://www.w3.org/2000/10/swap/log#notEqualTo> ?Y.
  ?A <http://www.w3.org/2002/07/owl#distinctMembers> ?L.
  ?L <http://eulersharp.sourceforge.net/2003/03swap/owl-rules#item> ?Y.
  ?L <http://eulersharp.sourceforge.net/2003/03swap/owl-rules#item> ?X.
} => {
  ?X <http://www.w3.org/2002/07/owl#differentFrom> ?Y.
} .

TODO

The problem is that the implementation of log:notEqualTo expects that all variables were already used in preceding triples in same rule, which is not the case for first triple here.

This is not easy to implement with Drools. The translation should be postponed to end of the antecedent.

Or I could ask Jos to change the rule :) .

EulerGUI development

DONE

- new class URIModificationChecker, that starts a loop to check Modification status of files and URL's, for all original sources, and then if modified call Project.fireN3SourceChanged(N3Source) , to refresh the N3 conversion

- the old mechanism with jEdit to get notifications of LOADED events for original source should be commented out and replaced with this one

TODO : more manual testing

Generic file and URL modification checking service

I thought about implementing the processing of the N3 source in a lazy way with timestamp in doUpdate() for XML and XMI sources (so that the project opens more quickly), but it is more useful to have a generic file and URL modification checking service, so that N3 refreshing occurs even when the original source is not opened.

For the file and URL modification checking service, I saw that jEdit offers no service to reuse.

We would like to register a file to get its modifications events, even though it has not been opened by the user.

2010-11-21

http://www.cambridgesemantics.com/2008/09/sparql-by-example/

http://staff.um.edu.mt/mros1/cnl2010/prog_after.html

http://www.w3.org/TR/sparql11-query/

http://www.ted.com/

http://objectmix.com/prolog/183275-abusing-chr.html

Description Logic and Rules the CHR Way Extended Abstract

+chr unbound variables

http;//www.informatik.uni-ulm.de/pm/mitarbeiter/fruehwirth/Papers/dl-rules-chr07-slides.pdf

EulerGUI development

TODO

- loading a project from the command line should not be done in main() , because the GUI hooks are not there

- remove the "active" checkbox in the case of SELECT SPARQL

- reestablish the "active" checkbox and the N3 converted blue link button when a SPARQL query becomes CONSTRUCT from SELECT

- implement the processing of the N3 source in a lazy way in doUpdate() and the refreshment when the original source changes: for XMI sources

TESTED with examples/docbook.n3p

- temporary popup ( class TemporaryFrame ) to inform user of problems; add this in RDF/OWL , XML , XMI sources

- XML conversion (Gloze) : add N3 prefixes in converted N3

DONE

- put TemporaryFrame in Color RED if error status

- implement the processing of the N3 source in doUpdate() and the N3 refreshment when the original source changes, for XML sources

TESTED with examples/docbook.n3p

- move towards having a temporary popup ( class TemporaryFrame ) to inform user of problems

added this in SPARQL sources

- REGRESSION: preceding commits caused adding a new SPARQL source to fail


It is not possible to get more information than "500 SPARQL Request Failed".

The stack is :

Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 33 in QueryExceptionHTTP))
QueryExceptionHTTP.<init>(int, String) line: 33
HttpQuery.execCommon() line: 302
HttpQuery.execGet() line: 192
HttpQuery.exec() line: 147
QueryEngineHTTP.execSelect() line: 133
SPARQLToN3Converter.doSelectQuery(Query, URL, String) line: 135
N3SourceFromSPARQLSource.doUpdate() line: 68
N3SourceFromSPARQLSource(N3Source).update() line: 425
ButtonsForN3Source$3.actionPerformed(ActionEvent) line: 215
JButton(AbstractButton).fireActionPerformed(ActionEvent) line: 1995

Trying DBPedia SPARQL queries

http://sparql.org/sparql.html

I get this for

SELECT DISTINCT ?p WHERE {?s ?p ?o}

but this is normal :(

N3SourceFromSPARQLSource.doUpdate():
file:/home/jmv/src/eulergui_new/examples/find_properties.sparql ;
http://dbpedia.openlinksw.com:8890/sparql
Cause:HttpException: HttpException: 500 SPARQL Request Failed: HttpException: 500
SPARQL Request Failed

Alas the Web page at http://dbpedia.org/sparql says more:

42000 Error The estimated execution time 4453 (sec) exceeds the limit of 1500 (sec).

http://mondeca.wordpress.com/2007/12/06/requeter-le-contenu-de-wikipedia-avec-sparql/

http://wiki.dbpedia.org/OnlineAccess

http://dbpedia.org/About

http://wiki.dbpedia.org/Ontology

http://dbpedia.org/ontology/Place

<jmv> In fact my initial request SELECT DISTINCT ?p WHERE {?s ?p ?o} is pretty useless and would give a huge result ;

<jmv> happily if I add one triple in the WHERE part to restrict subject to belong to a class, I get an answer :)

PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?p ?pname
WHERE {
  ?mus ?p ?v .
  ?mus a <http://dbpedia.org/class/yago/AmericanBluesGuitarists>.
  ?p rdfs:label ?pname .
}

<MacTed> the public DBpedia instance *being* public ... yes, there are limits on execution times, results sets, etc.

<MacTed> people who want to run longer queries or get larger result sets can quickly get their own EC2 mirrors ( http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtAWSDBpedia351C ), or set up local LAN instances. ultra-special cases may get pinhole permission grants on the main service.

2010-11-19

EulerGUI dev

- FIXED: got an infinite loop with jEdit LOADED event when clicking on the XXX.owl button;

TESTED with examples/koala.n3p

- change architecture to process the N3 source in a lazy way in doUpdate() :

for SPARQL , tested with examples/dplb.n3p

RDF ==> tmp N3 ==> editor

2010-11-16

EulerGUI dev

DONE

The actual SPARQL query is done when opening the editor for the result or updating the query

2010-11-15

Raw Google translate

First thing, we must improve the current design and implementation of the Java engine + N3, based on Drools, as with N3 rules language, which is a unique combination of Semantic Web, rules engine, and the platform Java.Dans form the existing implementation, the translator N3 to Drools is a simple architecture that spits strings over water. We need something like a compilation technique driven by rules. And we would also generate rules Jena, Mercury code, Scala, CHR rules, etc.. I thought about using transformation rules in N3 N3 for input, and GF (GrammaticalFramework) for the release of the final string.

Second thing, we need to design and implement a backward chaining engine for querying databases SPARQL in the presence of business rules in N3. It will generate a large accumulation by recursive query SPARQL criteria, substitution variables, renaming variables if necessary. I think to this point 2, CHR capacity to manage the free variables can be used.

Another issue concerns the generation of user interfaces

from high level specifications, including ontologies

OWL, business rules in SWRL or N3, and other specifications

declarative user interaction.

Linked to this, a rule-based board would operate

history of user actions to infer their intentions,

and propose appropriate actions (good servant paradigm).

Finally, we apply the inference techniques for

semantic manipulation of existing software assets: guess

calling sequences from sample code, annotate

semantically libraries, classes and methods, generating code

join from semantic annotations (Modularity

intelligent).

Sketch of a roadmap

The Déductions stuff

First thing, we need to enhance the current design and implementation

of the Java + N3 engine, based on Drools, with N3 as rule language;

this is a unique combination of Semantic Web, rule engine, and Java

platform. There already something working, but that is a simplistic

architecture spitting strings along the way; we need something like a

compiler technique piloted by rules.

Second thing, we need to design and implement a backward engine for

querying SPARQL databases; it will generate a big SPARQL query by

recursively accumulating criterium terms, substituting bound

variables, renaming variables if necessary.

I think that for point 2, the capabilities of CHR to handle unbound

variables can be leveraged.

Another thema is generating user interfaces from high level specifications.

The CNL stuff

Still thinking about possible tasks for you .

Among the things we talked in the last months:

- cleaning ACE=>OWL by using Thea stuff

- verbalizing N3 and SWRL rules

- adding more of the OWL "semantyic sugar" like transitive properties,

equivalent classes, etc

Plus reusing in ACE URI's for classes and properties, which is

certainly on top priority.

Related to that is verbalization of some typical OWL ontologies; a

default verbalization of these ontologies and of instances by ACE

often looks bad, for lack of noun and verb forms.

A good test case is FOAF's official OWL spec. .

These is also the algebraic formulas.

By the way I'm worried about how the ACE as a whole is going. Still no

answer from Norbert and the team about the depot question, which is just

the first of a series of questions about gouvernance.

About my projects EulerGUI and Déductions, I must set a road map ;

this is larger than the CNL stuff, as we are building a whole

framework for building business and scientific applications. There are

several important things to do or enhance :

- mix in rules triples for domain data with Java objects , leveraging Drools

- at runtime query SPARQL sources taking in account rules in the KB

- generate easily all formats from RDF

EulerGUI dev

DONE

- EditorManagement: simplify fileToOpen() : in all cases call N3Source.getFileName()

- XmiInputAction : remove duplicated action of Translating To N3 the underlying XMI

- remove all call to IOManager.getTemporaryN3File() , except in RDFToN3Converter

- FEATURE: Jena view of the result (second yellow button) : add N3 prefixes

- show using TemporaryFrame the explanation of the OWL inconsistency when calling Pellet reasoner

- encapsulate ResultManagement().result, pProjectGUI.toolBar

- FEATURE: view of the result as GraphViz graph

- FIX: in GraphViz graphs labels for URI's were blank

TEST SUITE PASSES !!!

TODO

- FIX: in GraphViz graphs labels for URI's should be N3 abbreviated form

- simplify RDFToN3Converter : get rid of rdfUrlToLocalN3TranslationFile like other XXXConverter

2010-11-14

EulerGUI TODO

2010-11-10

EulerGUI

SPARQL queries:

TODO: redo the SPARQL query when the SPARQL source file is updated (saved or loaded)

Tooltips in N3 editor

- now N3 terms like :xx or p:xx work also, provided there are rdfs:label or rdfs:comment in the project

- arrange the assertions in eulergui.gui.TestEulerGUITooltip

- some comments in code

SNAPSHOT uploaded

2010-11-09

http://stackoverflow.com/questions/76327/how-can-i-prevent-java-from-creating-hsperfdata-files

EulerGUI : tooltips in N3 editor

DONE

get rid of class ProjectIndexer; now the Drools-based searches get the RDF labels and coments, while simple string manipulation get the N3 term under the mouse

TODO arrange the assertions in eulergui.gui.TestEulerGUITooltip

- pom.xml : add maven-javadoc-plugin

- doc. : link to javadoc on the site

The Jena object model for RDF and inference

Reference: Jena 2 Inference support ; Jena JavaDoc ; EulerGUI JavaDoc (NEW!)

InfGraph ---|> Graph ---|> GraphAdd

             bound
Reasonner <>------ InfGraph
             schema
Reasonner <>------ Graph

InfGraph is a Graph where Triples added by inference can be distinguished.

Each Reasoner implementation is associated to ReasonerFactory.

ReasonerFactory are registered in a singleton ReasonerRegistry.

Graph is on the SPI side (Service Provider Interface), while Model (a huge interface) is on the API side.

Comparison with EulerGUI model

In EulerGUI this does not exist:

In EulerGUI this exists:

Project and N3Source are at the heart of EulerGUI. The accent is put on how to build a RDF + rules Model out of heterogeneous parts. In contrast in Jena the accent is put on the RDF Model itself, and once a source is added to the Model, this action of adding is forgotten.

About reasoner support, there are differences. In Jena, one can bind many reasoners of the same or different implementation to the same Graph, resulting in as many InfGraph objects. In EulerGUI, each different engine implementation is a unique service. A common feature is that different rule engines do not collaborate, each has its own augmented model.

Currently (alas) the glue code for the inference engines (alias reasoners) in EulerGUI is all in class Project. The first task is to modularize the inference engines support in EulerGUI. To this end, these hardships exist:

Modularizing the inference engines support in EulerGUI

The first thing in modularizing the inference engines support in EulerGUI is to design an API to be used by the GUI layer. The possible inference engines should not be hard coded in the class Project, but offered as a uniform list of services. The minimal capabilities expected from an inference engine instance (already bound to a Project) are in this interface :

public interface InferenceEngine {
  void setArguments(String args);
  String getArguments();
  N3Source launch();
  String getWarnings(); // and errors also
}

This is easy to do, but does not take in account the dynamic knowledge base features of Drools. Drools' RuleBase and WorkingMemory are used directly in Project. These existing EulerGUI interfaces should be used more:

ITripleStoreRETE ---|> ITripleStore

The idea is to simply add this method in interface InferenceEngine :

  /** non dynamic knowledge base can return a NullTripleStore */
  ITripleStore getTripleStore();

Note the use of the null object design pattern. A non dynamic knowledge base can also return a real ITripleStore, that can be implemented by parsing and aggregating the N3 sources. This is a service that is not currently provided by EulerGUI.

Here the interface ITripleStoreRETE is not necessary, as one can call InferenceEngine.launch() .

The GUI layer should be able to get a uniform list of services corresponding to the possible inference engines, and bind a Project to an inference engine:

public interface InferenceEngineSupport {
  List<InferenceEngineFactory> getInferenceEngines();
}

The interface InferenceEngineFactory is just a place holder for an Inference Engine implementation, and a concrete implementation knows how to create an actual InferenceEngine, and bind it to a Project.

public interface InferenceEngineFactory {
  InferenceEngine bindInferenceEngine( InferenceEngineFactory e, Project p );
  String showShortName();
  String showLongName();
}

Now to add SPI support, one can just add an interface InferenceEngineRegistry:

public interface InferenceEngineRegistry {
  void register( InferenceEngineFactory e );
  InferenceEngineSupport getInferenceEngineSupport();
}

The interface InferenceEngineRegistry should be implemented as a singleton.

Note that other design goals could be worked on:

2010-11-08

Hi I have 2 JFrames from the same application ; both have the same icon, but when the 2 are grouped by Gnome in the bottom line, the group has the Java icon instead of mine :(

EulerGUI

test setting to false: Project.prepareWMEarly:

Running eulergui.gui.TestEulerGUITooltipTests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 9.812 sec
<<< FAILURE!

TODO test addition of a new search and run at once

Work on updating translated stuff when files are changed

TEST PROJECT:

eulergui_new/examples/swrl-n3-rules-owl.n3p

edit manually in another (external) editor :

eulergui_new/examples/dl-safe_small.owl

Then the stack is:

Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 222 in TextEditor$2))
TextEditor$2.handleMessage(EBMessage) line: 222
EditBus.dispatch(EditBus$EBMessageHandler, EBMessage) line: 212
EditBus.sendImpl(EBMessage) line: 247
EditBus.send(EBMessage) line: 188
Buffer$1.run() line: 282
WorkThreadPool.doAWTRequest(WorkThreadPool$Request) line: 398
WorkThreadPool.doAWTRequests() line: 383
WorkThreadPool.access$200(WorkThreadPool) line: 37
WorkThreadPool$RunRequestsInAWTThread.run() line: 483
InvocationEvent.dispatch() line: 209
EventQueue.dispatchEvent(AWTEvent) line: 597
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174
EventDispatchThread.pumpEvents(int, Conditional) line: 169
EventDispatchThread.pumpEvents(Conditional) line: 161
EventDispatchThread.run() line: 122

http://jedit.svn.sourceforge.net/viewvc/jedit/jEdit/trunk/org/gjt/sp/jedit/

http://www.jedit.org/api/index.html

Solved broken tests

In fact, in the case of a non N3 source, we do not need a copy of the original source. Indeed, various tools can cope with a URL obtained from N3Source.getURI() ): jEdit editor, inference engines, translator of SPARQL to N3.

COMMITED revision 1895. ( let's not breathe too strong, tests may break !!!

- Enhance IOManager.getLocalCache() : in all cases except local N3 source, initializes the Local Cache File object;

only for non local N3 source fills the Local Cache File

- change accordingly class XMLExport

BUILD SUCCESSFUL

[INFO] Total time: 22 minutes 39 seconds

Last revision before moving refectoring branch to trunk

~/src/eulergui/ % svn info .Chemin : .URL :
 https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulerguiRacine du dépôt :
 https://eulergui.svn.sourceforge.net/svnroot/eulerguiUUID du dépôt :
 d5d6ab8c-d186-441e-ab20-4354300cfa0eRévision : 1863

Explanation of the OWL inconsistency

TODO I should add that in EulerGUI:

For an inconsistent ontology, Pellet can calculate an "explanation" of the inconsistency, which consists of 1 or more sets of axioms. The combination of all of the axioms in any one of these sets is sufficient to make the ontology inconsistent.

Check out ExplanationExample.java in the "examples" directory of the Pellet distribution for an example of programmatically obtaining explanations. You'll probably want to use the following method of the PelletExplanation class:

Set<Set<OWLAxiom>> getInconsistencyExplanations(int maxExplanations)

2010-11-07

REGRESSION:

- populating the N3 from SPARQL was broken

- proposal for API change in N3Source : see mailing list deuctions-fr

- NOT tested : dbpedia is down

2010-11-06

Cleaned EulerGUI's Project class

Still 1380 lines !

SOLVED : failure in TestRulesForUserEvents

- cause: useless code in Project.addN3Query() caused the temporary location to be lost, in the case of an N3 source given by an N3 string

Thread [main] (Suspended (breakpoint at line 917 in Project))
Project.translateN32Drools(boolean) line: 917
Project.prepareDrools(boolean) line: 891
Project.doRunDrools(boolean) line: 842
Project.runDroolsTriples(List<ITriple>) line: 797
Project.runDroolsTriples(boolean) line: 791
Project.runDroolsTriples() line: 820
TestRulesForUserEvents.testFieldOldArchitecture() line: 81

2010-11-05

When trying past revisions, it is necessary to set --offline:

LANG=en mvn --offline -Dtest=deductions.runtime.TestRulesForUserEvents clean test

DONE

{_:t0 :sibling _:t1.
 _:t0 :hates _:t1.
 _:t0 a :Grandchild} => {_:t0 a :BadChild}.

2010-11-04

RDFToN3Converter.rdfUrlToLocalN3TranslationFile :

{file:/home/jmv/src/eulergui_new/examples/dl-safe_small.owl=/tmp/translation-6059220547887949513.n3}

but uri argument from N3SourceFromRDF.uri() is:

file:///home/jmv/src/eulergui_new/examples/dl-safe_small.owl

The former is generated by this in ProjectFactory :

projectFile.toURI().toURL()

DONE

Feature: when the OWL or RDF file is modified in the editor, it is re-translated to N3

TODO:

- does not work yet;

- also implement case when the OWL or RDF file is modified outside of the editor

- also implement other non N3 sources

- timestamp stuff not implemented; reuse what is done for RuleBase cache

IMPLEMENTATION: new method update() in N3Source, which calls new overriden method doUpdate()

2010-11-03

Hi all ! I'm looking for a simple Java implementation of a Unix-like shell , with commands mv cp rm cd , echo "bla" > file.txt ;

My use case is to ease my tests.

Register-a-User-Name-on-Freenode

http://www.wikihow.com/Register-a-User-Name-on-Freenode

/nick jmvanel
/msg nickserv register my_password jeanmarc.vanel@gmail.com
# after receiving the mail:
/msg NickServ VERIFY REGISTER jmvanel password_received

Drools: 5.1.1; bug with loading from serialized

http://blog.athico.com/2010/08/drools-51-released.html

Asked on the Drools IRC:

when reloading a RuleBase from serialized file, the field ReteooBuilder.rules does not seem to be populated, which leads to this NPE when replacing a Drools Package that was part of a reloaded RuleBase from serialized file :

Caused by: java.lang.NullPointerException

at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:235)

EulerGUI

Enhance tooltips in editor, backed by N3 searches

DONE: in method Project.searchFromString() , now get rid of the temporary search in the RuleBase

Interesting stack:

Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 484 in AbstractRuleBase))
ReteooRuleBase(AbstractRuleBase).addPackages(Collection<Package>) line: 484
ReteooRuleBase.addPackages(Collection<Package>) line: 445
ReteooRuleBase.addPackage(Package) line: 452
N3SourcetoDrools.droolsCompile(String) line: 421
N3QueryToDroolsQuery.translate(IRDFIterator, String, boolean) line: 39
N3toDroolsUpdater.translateQuery(N3Source) line: 197
Project.searchFromString(String, Object[]) line: 1054
Project.getDetailsForResource(String, String) line: 1096
Project.getLabelForResource(String) line: 1071
TextEditor$5.getToolTipText(int, int) line: 570
ExtensionManager.getToolTipText(int, int) line: 135
TextAreaPainter.getToolTipText(MouseEvent) line: 663
ToolTipManager$insideTimerAction.actionPerformed(ActionEvent) line: 662
Timer.fireActionPerformed(ActionEvent) line: 271
Timer$DoPostEvent.run() line: 201
InvocationEvent.dispatch() line: 209
EventQueue.dispatchEvent(AWTEvent) line: 597
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174
EventDispatchThread.pumpEvents(int, Conditional) line: 169
EventDispatchThread.pumpEvents(Conditional) line: 161
EventDispatchThread.run() line: 122

With examples/swrl*.n3p ???

java.lang.NullPointerException
at n3_project.helpers.DroolsTripleHandler.processLogBuiltin(DroolsTripleHandler.java:378)
at n3_project.helpers.DroolsTripleHandler.makeDroolsCriterium(DroolsTripleHandler.java:240)
at n3_project.helpers.DroolsTripleHandler.acceptAntecedent(DroolsTripleHandler.java:207)
at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:706)

TODO

FIX TestImportSwrl

FIX TestImportSwrl : was broken in eclipse, not with Maven

- the N3 generated by Euler from the SWRL, being transient, must not be taken in account in the Project timestamp

- TODO: there is still a Drools problem: when reloading a RuleBase a from serialized file, the field ReteooBuilder.rules does not seem to be populated, which leads to this NPE when modifying an N3 rule file when the corresponding Drools Package was part of a reloaded RuleBase from serialized file :

Caused by: java.lang.NullPointerExceptionat org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:235)at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:432)at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:831)at org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:623)at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:539)at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:445)at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:452)at n3_project.helpers.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:421)

2010-11-02

AbstractRuleBase.pkgs

Map<Rule, BaseNode[]>

ReteooBuilder.rules

ReteooBuilder line 235

file:/home/jmv/src/eulergui_new/examples/swrl-n3-rules-owl.n3p

REGRESSIONS

2010-10-25

I tried a simple rule to flatten a rule base:

{?A => ?C} => {?R a :Rule.?R :hasAntecedent ?A.?R :hasConsequent ?C.} .

When I run with --no-qvars (or without) , the information that EYE has already inferred, namely which variables are existential and which are universal, is lost. Is there a way to recover this information in the output ?

Hi Jean-Marc,

The real good thing about coherent logic is that there is only 1 kind of variable and the quantification is automatic.

So there is ultimately no problem.

2010-10-23

http://www.webkb.org/doc/model/comparisons.html by Philippe Martin.

Problems with EulerGUI

DONE

doc.: add details in :

- list of arguments in parag. "Main use case"

- parag. "Tests : CAUTION - TROUBLESHOOTING;"

- add DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa

When adding an N3 sources the GUI does not show the new N3, one has to resize manually the window.

remove empty implementation of ProjectListener in class Project

The arguments for Euler are in the .n3p file , but were not shown in the input, nor processed in a run

mvn test -Dtest=eulergui/gui/TestImportSwrl

The order of clauses has changed in the N3 generated by Euler !

# !!! This file was generated automatically from data source at: file:/home/jmv/src/eulergui_refactoring/eulergui/examples/dl-safe_small.owl. !!!
 ...
@prefix n3: <http://www.w3.org/2004/06/rei#>.
{?t0 :sibling ?t1.
 ?t0 :hates ?t1.
 ?t0 a :Grandchild} => {?t0 a :BadChild}.
#ENDS 10 msec
#Trunk : 60/792 = 7.57575757575758 %
#Branch: 0/63 = 0.0 %

After correcting the regular expression, there was a problem in Drools. Solved by clearing the rule bases cache:

rm -rf $HOME/.eulergui/rule_bases_cache/application/*

java.lang.RuntimeException: Drools exception during package addition to rule base
at n3_project.helpers.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:423)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:304)
at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:237)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:88)
at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:78)
at eulergui.project.Project.doTranslateN32Drools(Project.java:967)
at eulergui.project.Project.translateN32Drools(Project.java:907)
at eulergui.project.Project.prepareDrools(Project.java:881)
at eulergui.project.Project.doRunDrools(Project.java:832)
at eulergui.project.Project.runDroolsTriples(Project.java:787)
at eulergui.project.Project.runDroolsTriples(Project.java:781)
at n3_project.RunDroolsAction.actionPerformed(RunDroolsAction.java:46)
 ...
Caused by: java.lang.NullPointerException
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:235)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:432)
at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:831)
at org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:623)
at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:539)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:445)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:452)
at n3_project.helpers.N3SourcetoDrools.droolsCompile(N3SourcetoDrools.java:421)
 ... 32 more

TODO

java.lang.NullPointerException
        at n3_project.helpers.DroolsTripleHandler.aggregateLinesAndCols(DroolsTripleHandler.java:1316)
        at n3_project.helpers.DroolsTripleHandler.acceptSubjectList(DroolsTripleHandler.java:183)
        at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:684)
        at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:266)
        at n3_project.helpers.N3SourcetoDrools.translate(N3SourcetoDrools.java:237)
        at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:88)
        at n3_project.helpers.N3toDroolsUpdater.translate(N3toDroolsUpdater.java:78)
        at eulergui.project.Project.doTranslateN32Drools(Project.java:967)
        at eulergui.project.Project.translateN32Drools(Project.java:907)
        at eulergui.project.Project.prepareDrools(Project.java:881)
        at eulergui.project.Project.prepareDrools(Project.java:856)
        at eulergui.project.Project.prepare(Project.java:1415)
        at eulergui.project.ProjectFactory.prepareProject(ProjectFactory.java:181)

Theorem proving with Euler engine

Suppose we have a Knowledge Base with basic facts involving one predicate: hasParent, and 3 classes : Man, Woman and Human, and some facts.

Suppose we want to a have the Knowledge Base entail :

Every person has a grandparent.

Then we must first "define" grandparent by a rule using parent in the antecedent.

Then we must have an existential rule for the primitive notion of parent.

starting 60 [msec cputime] 60 [msec walltime]

GET /home/jmv/src/eulergui_refactoring/eulergui/examples/family3.n3

networking 0 [msec cputime] 1 [msec walltime]

Exception in thread "Thread-6" java.lang.RuntimeException: ** ERROR ** sem ** maximimum_step_count(5000000)

at euler.ProcessErr.run(ProcessErr.java:18)

at java.lang.Thread.run(Thread.java:619)

Business Rules community

http://www.brcommunity.com/

Silvie Spreeuwenberg, "Count your Rules!" Business Rules Journal, Vol. 11, No. 10 (Oct. 2010), URL: http://www.BRCommunity.com/a2010/b557.html

2010-10-22

Try JRules language with Attempto

Original JRules sentence:

If the shopping cart value is greater than $100 and the customer category is Gold then apply a 15% discount.

Unsuccessful attemps:

If the shopping-cart value is greater than $100 and the customer-category is Gold then apply a 15% discount.

If the shopping-cart value is greater than $100 and the customer-category is Gold then order-mangement, apply a 15% discount !

There is a problem with paraphrase of imperative sentences:

./ape.exe -guess -text 'John, go to a bank !' -cdrs

./ape.exe -guess -text 'John, go to a bank !' -solo paraphrase

# ...


Aurélien Pelletier - Java, Architecture, Web 2.0: Drools

Re-trying Rifle RIF tool

http://www.w3.org/2005/rules/wiki/Implementations

cd rifle  
hg pull  
hg update --verbose
cd trunk/apps/rifle-dtb
mvn -Dmaven.test.skip=true install
cd ../rifle-psparser 
mvn clean install
cd ../rifle-jsr94
mvn clean install
cd ../rifle-validator
mvn clean install
[WARNING] repository metadata for: 'snapshot org.fundacionctic:rifle-dtb:0.1-SNAPSHOT' could not be retrieved from repository: jena HP due to an error: Error transferring file: Connection timed out
[INFO] Repository 'jena HP' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.fundacionctic:rifle-dtb

Reason: Error getting POM for 'org.fundacionctic:rifle-dtb' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/home/jmv/.m2/repository/org/fundacionctic/rifle-dtb/0.1-SNAPSHOT/maven-metadata-java.net.xml': end tag name </body> must match start tag name <hr> from line 7 (position: TEXT seen ...</address>\n</body>... @9:8) 
  org.fundacionctic:rifle-dtb:pom:0.1-SNAPSHOT

2010-10-21

Revelator: a game for better arguments

Exchanged several mails with MK whom I met at CNL2010

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

ETALIS, system for Complex Event Processing, in Logic Programming

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

ETALIS is an open source system for Complex Event Processing with two accompanied languages called: ETALIS Language for Events (ELE) and Event Processing SPARQL (EP-SPARQL). ETALIS is based on a declarative semantics, grounded in Logic Programming. Due to its root in logic, ETLAIS also supports reasoning about events, context, and real-time complex situations (i.e., Knowledge-based Event Processing). ETALIS stands for Event TrAnsaction Logic Inference System.

ETALIS is implemented in Prolog. The engine runs on many Prolog systems: YAP, SWI, SICStus and XSB. Download ETALIS from here.

2010-10-20

Prova Rule Language -- version 3.0.3 is released on October 17, 2010

MyLogitech usb microphone on Linux

there's an open thread at http://ubuntuforums.org/showthread.php?t=225019.

at the end of it says:

Fix: Double click on the volume applet, File>Change Devices>AK5370, and raise the volume as high as it goes.

==> It works !!!!!

Mail to an junior researcher, PW

First thing, we need to enhance the current design and implementation of the Java + N3 engine, based on Drools, with N3 as rule language; this is a unique combination of Semantic Web, rule engine, and Java platform. There is already something working. But the N3 to Drools translator is a simplistic architecture spitting strings along the way; we need something like a compiler technique piloted by rules. And we would like to generate also Jena rules, Mercury code, Scala code, CHR rules. I thought about using N3 rules for transforming input N3, and GF for outputting the final string .

Second thing, we need to design and implement a backward engine for querying SPARQL databases; it will generate a big SPARQL query by recursively accumulating criterium terms, substituting bound variables, renaming variables if necessary.

I think that for point 2, the capabilities of CHR to handle unbound variables can be leveraged.

Another thema is generating user interfaces from high level specifications.

2010-10-19

ICOM conceptual modelling tool

We are on the way to release ICOM 3, the latest reincarnation an old proof of concept which evolved in the last 13 years or so.

ICOM is an advanced conceptual modelling tool, which allows the user to design multiple ER or UML class diagrams with inter- and intra-model constraints, expressed in a rich view but usable language similar to OCL and relational algebra (based on a very expressive description logic).

It is the first time I'm advertising the new version - still in beta; I'd be happy to get comments.

http://www.inf.unibz.it/~franconi/icom/

P. R. Fillottrani, E. Franconi, S. Tessaris. The ICOM 3.0 Intelligent Conceptual Modelling tool and methodology. White Paper, KRDB Research Centre for Knowledge and Data (2010), Free University of Bozen-Bolzano, Italy.

2010-10-18

Me on Google Code

Kaarel Kaljurand just got back from his trip around the world, and went back to work on ACEView. Soon ACEView will be available with Protégé 4.1.

I became a developper in ACEView. For now, I just added a GUI test with Jemmy.

https://code.google.com/u/jeanmarc.vanel/

http://code.google.com/p/support/wiki/GettingStarted

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

https://code.google.com/p/owlverbalizer/

2010-10-17

ACE View with Protégé 4.1

Building from sources

http://protegewiki.stanford.edu/wiki/Protege4DevDocs#Building_Protege4.1_from_scratch_using_ant

http://smi-protege.stanford.edu/svn/protege4/ide/eclipse/protege4.1/

Applicative test with Jemmy

  1. start Protégé
  2. wait for a new window
  3. click on "Create New Ontology"
  4. wait for a new window entitled "Create ontology wizard"
  5. click on button "Continue"
  6. again
  7. click on button "Finish"
  8. click on tab "ACE View"
  9. paste in "Ace snippet editor" :

    Toulouse belongs-to France .

  10. the same sentence should appear in panel "Paraphrases"
  11. the panel's title should be "Paraphrases: 1"
  12. this should appear in panel "Corresponding logical axioms"

    Toulouse belong-to France

  13. the panel's title should be "Corresponding logical axioms: OWL: 1 SWRL: 0"

2010-10-15

http://www.irchelp.org/irchelp/networks/servers/

Text below the panel after launching a Inference Engine: added JScrollPane

Test German localization of EulerGUI

Variants of this do not work:

export LANG=de_DE.ISO-8859-1

This works:

java -Duser.language=de -jar target/eulergui-1.7-SNAPSHOT-jar-with-dependencies.jar &

2010-10-14

DONE

2010-10-11

COMMITED

the roundtrip project load - save - reload was not correct, especially with post-precessing

added class ProjectData for saving

SNAPSHOT uploaded for revision

The internal rules project is now loaded from the Web:

http://eulergui.sourceforge.net/rules/internal.n3p

and the rule base is cached as any other project

printing and computing of a project's timestamps enhahnced

DONE

TODO

2010-10-10

diff -w --recursive --exclude=entries --exclude=all-wcprops src/main/java ~/src/eulergui_refactoring/eulergui/src/main/java

Thread [main] (Suspended (breakpoint at line 112 in SourceFilesManagement))
SourceFilesManagement.addSourceActions(ProjectGUI) line: 112
ProjectGUI.addMenus() line: 341
ProjectGUI.getMenu() line: 271
ProjectGUI.layoutFrame() line: 292
ProjectGUI.<init>(Project) line: 118
ProjectGUI.newWindow(Project, boolean) line: 209
ProjectGUI.main(String[]) line: 166

java.lang.NullPointerException
at org.drools.base.ClassFieldReader.getIndex(ClassFieldReader.java:78)
at org.drools.core.util.LeftTupleIndexHashTable.<init>(LeftTupleIndexHashTable.java:64)
at org.drools.core.util.LeftTupleIndexHashTable.<init>(LeftTupleIndexHashTable.java:51)
at org.drools.common.SingleBetaConstraints.createBetaMemory(SingleBetaConstraints.java:176)
at org.drools.reteoo.BetaNode.createMemory(BetaNode.java:400)
at org.drools.common.ConcurrentNodeMemories.createNodeMemory(ConcurrentNodeMemories.java:94)
at org.drools.common.ConcurrentNodeMemories.getNodeMemory(ConcurrentNodeMemories.java:73)
at org.drools.common.AbstractWorkingMemory.getNodeMemory(AbstractWorkingMemory.java:1521)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:61)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:138)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:148)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:368)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:360)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:190)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:145)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1174)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1123)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:917)
at n3_project.helpers.N3SourcetoDrools.copyN3factsToDrools(N3SourcetoDrools.java:548)
at n3_project.helpers.N3SourcetoDrools.launchDrools(N3SourcetoDrools.java:537)
at n3_project.helpers.N3toDroolsUpdater.launchDrools(N3toDroolsUpdater.java:48)
at eulergui.project.Project.doRunDrools(Project.java:837)
at eulergui.project.Project.runDroolsTriples(Project.java:787)
at eulergui.project.Project.runDroolsTriples(Project.java:781)
at n3_project.RunDroolsAction.actionPerformed(RunDroolsAction.java:46)

2010-10-08

Asked on #eclipse IRC on freenode:

Is there an eclipse plugin that can suggest methods to be made private or package scope ?

anli_> That would be great

<jmv_> or even methods have only 1 or 2 out-of-context calls ...

<anli_> whats that?

<jmv_> a public method that is called many times inside the class but just once outside .

<jmv_> candidate to be made private


/error\|exception

DONE

TODO

2010-10-06

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

http://www.prova.ws/

http://people.cs.kuleuven.be/~peter.vanweert/

JPA+Drools

We are considering connecting an OO persistent store to Drools, and I have some questions regarding JPA+Drools.

Is there other documentation besides drools-expert paragraph " 3.3.10. Persistence and Transactions" ? Some design documents ?

How are you storing objects in JPA? User classes as such, or just a limited number or Drools classes, and user classes are stored as serialized blobs ?

How is Drools using JPA Transactions ? After each fireAllRules ?

Is Drools using JPA rollback on its own initiative , or just when the end application calls a roolback ?

Which kind of JPA query is Drools doing ?

Remove the *.java from the EulerGUI archive

cd ~/src/eulergui_refactoring/eulergui/target/
ls -l eulergui-1.7-SNAPSHOT-jar-with-dependencies.jar
-rw-r--r-- 1 jmv jmv 44613942 2010-10-06 00:00 eulergui-1.7-SNAPSHOT-jar-with-dependencies.jar
zip -d eulergui-1.7-SNAPSHOT-jar-with-dependencies.jar '*.java'
ls -l eulergui-1.7-SNAPSHOT-jar-with-dependencies.jar                                           
-rw-r--r-- 1 jmv jmv 41287225 2010-10-06 13:29 eulergui-1.7-SNAPSHOT-jar-with-dependencies.jar

2010-10-05

Simple JPA implementation based on JoaFip

import a very simple JPA implementation based on JoaFip; no rollback, no Id, no query

* * Mapping of concepts:

* EntityManager ~ FilePersistence

* EntityTransaction ~ IDataAccessSession

class SimpleJPA actually runs.

To import JPA jar, run:

mvn dependency:sources

http://maven.apache.org/ref/2.2.1/maven-model/maven.html#class_build

http://www.jpox.org/docs/1_2/tutorials/jpa_tutorial.html#step5

Manage subprojects in new N3 project file

COMMITED

Add this triple to each subproject: when adding an N3 , e.g. :

<./swing-rules3.n3p> <http://eulergui.sourceforge.net/engine.owl#subproject> <file:/home/jmv/src/deductions/n3_logical/person_import3.n3p> .

To test, open deductions/n3_logical/person_import3.n3p , that has subproject swing-rules3.n3p

- regression FIXED: Save as ... has no triples ( in Project )

- Manage subprojects in new N3 project file: Save as file is correct

WIP: TODO:

- test reading a new N3 project file with subprojects

- implement post-processing projects

- generalize to an URL : ProjectFactory.restoreN3P( File projectFile )

- set the project's URI in the GUI

regression FIXED: saving and re-reading correctly a project in new N3 format

( in class ApplicationKB )

WIP: problem when reading a new N3 format converted from .n3p format, when it has a subproject: the subproject stays in .n3p, and the latter is badly read as N3, resulting in all N3 sources being at the first level in the GUI

The new format, pretty-printed by CWM :

#   Base was: file:///home/jmv/src/deductions/n3_logical/person_import3.n3p.n3
     @prefix : <http://www.w3.org/2002/07/owl#> .
    
    <swing-rules3.n3p>     <http://eulergui.sourceforge.net/engine.owl#subproject>
      <file:/home/jmv/src/deductions/n3_logical/person_import3.n3p> .
    
    <file:/home/jmv/src/deductions/n3_logical/person_import3.n3p>     a :Ontology;
         <http://eulergui.sf.net/ontology/project.owl.n3#hasN3Query> <query2.n3>;
         :imports <app_gui-rules2.n3>,
                <form-rules.n3>,
                <generic_gui_projection-rules.n3>,
                <generic_to_java-rules.n3>,
                <gui_generic.n3>,
                <java_event-rules.n3>,
                <java_library-rules.n3>,
                <java_library.n3>,
                <person-app-spec.n3>,
                <person-data.n3>,
                <person-events.n3>,
                <rpo-rules-small.n3>,
                <software_applications.n3>,
                <swing-rules3.n3p>,
                <http://eulersharp.svn.sourceforge.net/viewvc/eulersharp/trunk/2003/03swap/rpo-rules.n3> .

2010-10-04

COE is a project whose goal is to develop an integrated suite of software tools for constructing, sharing and viewing OWL encoded ontologies based on CmapTools, a concept mapping software used in educational settings, training, and knowledge capturing. Concept maps provide a human-centered interface to display the structure, content, and scope of an ontology.

What is the recommended location in a project for Java code examples ?

mvn dependency:sources

Ambiguity in Controled Natural Languages

There is a nice discussion between participants of CNL 2010. Some (Enrico) want to keep ambiguity in the formal language resulting form parsing the CNL, others (Norbert) want to remove any ambiguity by a strict grammar.

Enroco has nice arguments, but Norbert is more in line with real business knowledge management.

I made a nice example of ambiguity solved by context (see just below) :

set an expiration time for OSCache ( 2 weeks )

EulerGUI: introduce OSCache

COMMITED

Cache for Drools compiled Rule Bases

Now BUILD (SUCCESSFUL) is only 7 minutes 18 seconds !!!

TODO

EulerGUI TODO before release

2010-10-03

EulerGUI: introduce OSCache

Cache for Drools compiled Rule Bases

assert ruleBase == workingMemory getRuleBase()

1) OK:

Thread [main] (Suspended (modification of field ruleBase in N3SourcetoDrools))
N3SourcetoDrools.setRuleBase(RuleBase) line: 900
N3toDroolsUpdater.setRuleBase(RuleBase) line: 149
Project.compiledRulebaseLoadedFromCache(String) line: 735
Project.translateN32Drools(boolean) line: 887
Project.prepareDrools(boolean) line: 863
Project.prepareDrools() line: 838
ApplicationKB.<init>() line: 76
ApplicationKB.instance() line: 43
ProjectFactory.restoreN3P(File) line: 248
ProjectFactory.restoreAny(File) line: 332
ProjectFactory.restore(String, boolean) line: 55
ProjectGUI.main(String[]) line: 161

2) KO :

Thread [main] (Suspended (breakpoint at line 33 in DroolsHelper))
DroolsHelper.printRuleBase(RuleBase) line: 33
ApplicationKB.loadN3Project(URI) line: 303
ProjectFactory.restoreN3P(File) line: 249
ProjectFactory.restoreAny(File) line: 332
ProjectFactory.restore(String, boolean) line: 55
ProjectGUI.main(String[]) line: 161

Remedy: setRuleBase() was not re-creating the Project's Workingmemory

2010-09-30

Preparing EulerGUI for release

TODO

Manage subprojects in new N3 project file:

COMMITED

Read an OWL/XML document; tested with examples/example_owl_xml.owl ;

should also work from a file XXX.xml or from an URL

(use OWL API 3.X)

2010-09-29

Testing GF

cd ~/src/gf/examples/tutorial/food/ 
gf
import FoodEng.gf
parse "this delicious cheese is very Italian" | visualize_tree -view="open"

TestAttempto> p "a clerk is an animal ."
baseText (sText (vpS (aNP clerk_N) (npVP (aNP animal_N))))

2010-09-28

I joined the #mercury IRC chanel on freenode.

Trying Grammatical Framework (GF)

I found this abstract grammar :

examples/RDF/RDF.gf

I guess that I could write a concrete grammar for N3.

What's the use of the grammars in examples/SUMO/ ?

Installing from source depot

darcs get --lazy --set-scripts-executable http://code.haskell.org/gf/

   Warning: no linearization of young_A
Compiling [AllTenses] lib/src/urdu/AllUrd.gf
Running: dist/build/gf/gf '-batch' '-gf-lib-path=lib/src' '+RTS' '-K16M' '-RTS' '-s' '--gfo-dir=dist/build/rgl/alltenses' 'lib/src/urdu/AllUrd.gf'
checking module VerbUrd
   Warning: no linearization of CompCN
Stack space overflow: current size 16000000 bytes.
Use `+RTS -Ksize -RTS' to increase it.
Setup.hs: gf exited with exit code: 2

The Attempto grammars

The Attempto grammars are in GF/examples/attempto/. The main file for each language L is TestAttemptoL.gf.

I should try this

http://code.google.com/p/grammatical-framework/wiki/LaunchWebDemos

In "Lesson 7: Embedded grammars", there are intructions to generate Haskell and Javascript programs, but not Java. I guess I have to use the Java Scripting facility.


I have trouble with the dependency to Syntax.

I found no way to extend the search directory list.

> i TestAttemptoEng.gf

File Syntax.gf does not exist.
searched in:
/home/jmv/src/gf-src-3.1.6/examples/attempto
/usr/local/share/gf-3.1.6/lib
/usr/local/share/gf-3.1.6/lib/prelude

Languages:
30 msec
> i /home/jmv/src/gf-src-3.1.6/examples/tutorial/syntax/Syntax.gf
+ reading /usr/local/share/gf-3.1.6/lib/prelude/Predef.gfo
+ reading /usr/local/share/gf-3.1.6/lib/prelude/Prelude.gfo
+ reading /home/jmv/src/gf-src-3.1.6/examples/tutorial/syntax/Grammar.gfo
+ reading /home/jmv/src/gf-src-3.1.6/examples/tutorial/syntax/Syntax.gfo
linking ... no module found for Syntax
> i TestAttemptoEng.gf
<same thing>

Answer by Aarne:

You need lib/present. This is not produced by Cabal/Setup.hs currently because (as I've been told) Windows doesn't support the preprocessor that making the 'present' library involves. But it can be produced by

cd GF/lib/src

make present

A lighter alternative is to use alltenses instead of present:

i -path=.:alltenses TestAttemptoEng.gf
p -lang=Eng "there are at least ten apples ."

Try this first, so you don't need to compile any libraries. It will make the compilation slower, but should work for all languages except perhaps Finnish ;-)

TestAttempto> p -lang=Eng "there are at least nine apples ."
no trees found; unknown words: nine

This one is funny:

TestAttempto> gr | l -treebank
TestAttempto: baseText (impVP (theNP beginning_N) (v3VP give_V3 (pnNP england_PN) (allCollNP form_N)))
TestAttemptoEng: give all forms to England , the beginning !

These were made with help from TAB :

TestAttempto> p -lang=Eng "a customer rejects a course . "
baseText (sText (vpS (aNP customer_N) (v2VP reject_V2 (aNP course_N))))

20 msec
TestAttempto> 
0 msec
TestAttempto> p -lang=Eng "a customer rejects one course . "
baseText (sText (vpS (aNP customer_N) (v2VP reject_V2 (cardNP one_Card course_N))))

10 msec
TestAttempto> p -lang=Eng "a customer rejects two course . "
no trees found, but all words are known
0 msec
TestAttempto> p -lang=Eng "a customer rejects two courses . "
baseText (sText (vpS (aNP customer_N) (v2VP reject_V2 (cardNP two_Card course_N))))

0 msec
TestAttempto> p -lang=Eng "a customer rejects three courses . "
no trees found; unknown words: three
0 msec
TestAttempto> p -lang=Eng "a customer rejects five courses . "
baseText (sText (vpS (aNP customer_N) (v2VP reject_V2 (cardNP five_Card course_N))))

10 msec
TestAttempto> p -lang=Eng "a customer rejects six courses . "
no trees found; unknown words: six

2010-09-27

svn diff --diff-cmd /usr/bin/diff -x -bw \
    src/main/java/eulergui/project/N3Source.java

COMMITED

- remove misleading message : when opening the application, Drools compilation forced for N3 rules

- N3Source.uri() now really returns the absolute URI

After CNL 2010

I finally found the Proceedings of CNL 2009

http://sunsite.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-448/

Workshop on Controlled Natural Language

Pre-Proceedings of the Workshop on Controlled Natural Language (CNL 2009)

Marettimo Island, Italy, 8-10 June, 2009

Edited by

Norbert E. Fuchs

Questions about CNL

Sent a message to the participants.

Questions about GF (Grammatical Framework)

Articles:

Implementing Controlled Languages in GF

Aarne Ranta, Krasimir Angelov

software specification authoring (Hähnle & al. 2005)

The main mailing list is the Google group

http://groups.google.com/group/gf-dev

I joined !

The Attempto grammars are in GF/examples/attempto/. The main file for each language L is TestAttemptoL.gf.

I found the tutorial's examples in the source in :

~/src/gf-src-3.1.6/examples/tutorial/hello/

2010-09-26

https://sites.google.com/a/octo.com/nosql/home

Migration to eclipse 3.6

With subclipse, I could recover my project without re-download from Subversion. I just deleted the project and re-created it.

With subclipse, in the history of a file , I was able to change the Log Message a posteriori.

Cleaning EulerGUI for release

Regressions in the EulerGUI "refactoring" branch

2010-09-25

unchecked is replaced (partially) by rawtypes

Groovy, Grape

Caution, Grape needs latest Groovy 1.8, not the Groovy 1.6 from Ubuntu !

http://groovy.codehaus.org/Grape

http://blog.mycila.com/2010/04/subversion-password-recovery.html

Subclipse Subversion plugin in eclipse

Symptom

Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /home/jmv/apps/jdk1.6.0_21/jre/lib/amd64/server:/home/jmv/apps/jdk1.6.0_21/jre/lib/amd64:/home/jmv/apps/jdk1.6.0_21/jre/../lib/amd64:/usr/lib64/xulrunner-addons:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

Remedy

/home/jmv/apps/eclipse/eclipse \
  -vmargs -Djava.library.path=/usr/lib/jn

2010-09-23

Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 1741 in Project))

Project.addProjectListener(ProjectListener) line: 1741

ProjectGUI_Updater.<init>(ProjectGUI) line: 29

ProjectGUI.setProject(Project) line: 695

ProjectFileManagement$1.actionPerformed(ActionEvent) line: 70

JMenu$1(AbstractButton).fireActionPerformed(ActionEvent) line: 2015

AbstractButton$Handler.actionPerformed(ActionEvent) line: 2338

DefaultButtonModel.fireActionPerformed(ActionEvent) line: 402

DefaultButtonModel.setPressed(boolean) line: 259

JMenu$1(AbstractButton).doClick(int) line: 376

BasicMenuItemUI.doClick(MenuSelectionManager) line: 829

BasicMenuItemUI$Handler.mouseReleased(MouseEvent) line: 873

JMenu$1(Component).processMouseEvent(MouseEvent) line: 6341

JMenu$1(JComponent).processMouseEvent(MouseEvent) line: 3311

JMenu$1(Component).processEvent(AWTEvent) line: 6106

JMenu$1(Container).processEvent(AWTEvent) line: 2122

JMenu$1(Component).dispatchEventImpl(AWTEvent) line: 4701

JMenu$1(Container).dispatchEventImpl(AWTEvent) line: 2180

JMenu$1(Component).dispatchEvent(AWTEvent) line: 4527

LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4706

LightweightDispatcher.processMouseEvent(MouseEvent) line: 4369

LightweightDispatcher.dispatchEvent(AWTEvent) line: 4299

ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2166

ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2611

ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4527

EventQueue.dispatchEvent(AWTEvent) line: 618

EventDispatchThread.pumpOneEventForFilters(int) line: 286

EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 201

EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 191

EventDispatchThread.pumpEvents(int, Conditional) line: 186

EventDispatchThread.pumpEvents(Conditional) line: 178

EventDispatchThread.run() line: 139

Regressions in the EulerGUI "refactoring" branch

Learning Mercury

I sent a mail to the list :

I continued practicing with the tutorial. I came to the dictionary example in 2.7 Abstract types.

Being proficient enough in Prolog, I understand the code in the tutorial.

But I found no example of actually using an abstract type, or other flavours of types.

To be concrete, I wrote this minimal piece of code, but how to create an empty dictionary , with the right type (string) of key and value in variable Dic ?

Dic2 = set( Dic, "jmv", "JM Vanel" ),
search( Dic2, "jmv", V),
io.write_string( "search( dic, jmv, V) : V= ", !IO),
io.write_string( V, !IO) .

% ./eliza

Hi! I'm Eliza. Please tell me your problem.

> I'm happy.

Did you come to me because you are happy?

> No.

Are you saying no just to be negative?

> Yes.

You seem quite positive.

> Fuck.

I'm not sure I understand you fully.

> My wife beats me.

What does that suggest to you?

> Revenge.

I see.

> What do you see ?

Why do you ask?

2010-09-22

Learning Scala

Scala in command line :

scala> val x=4
x: Int = 4

scala> 1 + 2 * 3 / x
res2: Int = 2

scala> x=x+1
<console>:5: error: reassignment to val
       x=x+1
        ^
scala> "ggGg" . exists(_.isUpperCase)

res5: Boolean = true

Scala IDE for eclipse

I took a brand new eclipse 3.6.

http://download.scala-ide.org/nightly-update-helios-2.8.0.final

2010-09-21

Strong background in software engineering.

Concerns about keeping a clean code base, avoiding forks, avoiding re-implementations, while still preserving the freedom of researchers.

Import a whole repository changes database on SF.NET

http://gribble.dreamhosters.com/viewfactoids.php?db=%23sourceforge

jmv_> Hi all

<ctsai-sf> Hello.

<jmv_> When creating a new project, is ti possible to import a whole repository changes database of a previously existing project elsewhere ?

<ctsai-sf> What exactly would you like to import? An SCM repository?

<jmv_> yes

<jmv_> don't know yet if it is CVS, or another

<ctsai-sf> Okay, well, the answer is yes. If you need to import to CVS, you can use the ,,cvsadminrepo tool to do that.

<gribble> You can manage your CVS repository from the shell using the adminrepo tool: http://sourceforge.net/apps/trac/sourceforge/wiki/CVS%20adminrepo

<ctsai-sf> To import to SVN, use ,,svnadminrepo

<gribble> You can manage your SVN repository from the shell using the adminrepo tool: http://sourceforge.net/apps/trac/sourceforge/wiki/SVN%20adminrepo

<ctsai-sf> Or if you're importing to Git, Bazaar or Mercurial, you have direct access to those via the ,,shell if you need that to manage the import.

<gribble> Documentation on the SourceForge shell services is here: http://sourceforge.net/apps/trac/sourceforge/wiki/Shell%20service

<ctsai-sf> And, it's not a necessary step, but, whatever SCM the original source repository uses, you may want to consider migrating to something different before importing.

<jmv_> OK, I already used the SF shell , and I'm mainly working with *sh for 20 years + ; I'm satisfied by your answers :)

<jmv_> But why are writing ,,shell and ,,svnadminrepo with2 commas in front ?

<gribble> Documentation on the SourceForge shell services is here: http://sourceforge.net/apps/trac/sourceforge/wiki/Shell%20service

<gribble> You can manage your SVN repository from the shell using the adminrepo tool: http://sourceforge.net/apps/trac/sourceforge/wiki/SVN%20adminrepo

<ctsai-sf> Because that's the syntax to call the bot (gribble) to post the links.

<ctsai-sf> Factoids rather.

<jmv_> ok :)

<ctsai-sf> Factoids list here: http://gribble.dreamhosters.com/viewfactoids.php?db=%23sourceforge

<ctsai-sf> More info on bot here: http://sourceforge.net/apps/mediawiki/gribble/index.php?title=Main_Page

<jmv_> OK, I saw the factoids page; is there also a web log of the chat ?

<ctsai-sf> No, we are not allowed to have public logs of this channel

EulerGUI development: read projects files in N3 with URI's different from <>

TODO : exceptions in jEdit with:

Resource not found: null!/org/gjt/sp/jedit/icons/themes/closebox.gif

DONE

now possible to read projects files in N3 with URI's différent from <>

implementation: to retrieve the right project in the ApplicationKB after fireAllRules, this triple is asserted:

<project URI> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <location URI> .

TODO :

- also read project from an URL

- comment out save in old format XMLEncode

- re-test opening an ontology from Protégé with owl:imports

- specify GUI behavior in the case of opening an ontology from Protégé with other content as owl:imports

* how to edit this other content , and possibly take in account modifications of owl:imports triples

* how to represent recursive owl:imports

* read-write-read round-trip with sub-projects

Web application architecture with database: questions

Some good questions by Animesh S.:

How does the user ask for some data (e.g. how are menu selections turned into some kind of search)

How does that search get marshalled into something that can be sent to the server

How does the marshalled data actually get transmitted and what does the client do while it’s waiting for a response

How does the server receive the request

How does the server unmarshall the search, and what kind of structure is it unmarshalled into

How is the search sent to the database

How does that data returned by the database get marshalled into something that can be sent back to the client.

How is the marshalled data sent back to the client

How does the client unmarshall the data, and what kind of model does the data get unmarshalled into

What does the client do if the returned data overlaps something it already has in another window, what if the returned data relates to a different entity but has different attributes values

How does the model data get transferred to display fields

When the user makes a change to the displayed fields how is that input validated.

If the change is to data that the user is displaying in another window, how does that other window get updated.

How is the change sent back to the server

How does the server apply the change to the database

How do other clients connected to the same workspace find out about the change

You could also add login/session logic, application of a system filter (e.g. for embargoed data) and application of a user filter on the server. You could then add authorisation features – how does the server check the users authority to do something, what does it do if the user isn’t allowed to do it. Etc. etc.

A more complicated case would use Drools to validate data on the server and retrieve and present validation results.

2010-09-20

AceWiki suggestion

export as OWL/RDF or N3


With the EulerGUI tool chain, one can enter ontologies + rules in Controled English with AVE View http://attempto.ifi.uzh.ch/aceview/ , or soon AceWiki http://attempto.ifi.uzh.ch/acewiki/ , and have all this translated in Drools.

There is a set of N3 rules for OWL RL, that can be translated into Drools and executed along with the business rules.

RDF property for expressing the (dereferentiable) URL origin (file or Web) of an URI ?

Asked on swig IRC:

What would be the most consensual and widely accepted property for expressing the (dereferentiable) URL origin (file or Web) of an URI ?

<gromgull> jmv: rdfs:seeAlso :)

<gromgull> jmv: I would use the Nepomuk Information Element ontology, but this is hardly consensual

<jmv> danke, gromgull , I'll use rdfs:seeAlso for now , although it's not specific enough ;

<jmv> I had a look at Nepomuk Information Element ontology , but it's a big ontology where I couldn't find my need

2010-09-19

Trying XRadar with Maven

http://xradar.sourceforge.net/usage/maven-plugin/howto.html

mvn site

DOES NOT WORK:

EulerGUI tests: drag-and-drop of an OWL file

EulerGUI regression:

after drag-and-drop of an OWL file, the line of buttons is not shown ; the user has to resize the window

DONE

an URL for an RDF document was treated as plain XML,

e.g. http://www.w3.org/2008/05/skos-xl

in class SourceFactory, accept content Type like

application/rdf+xml; qs=0.9

TODO: why was this commented out ?

//projectGUI.getProject().applicationKB.fireFileSavedEvent(pathSaved);

2010-09-18

Debugging with the Maven Jetty Plugin in Eclipse

http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Plugin+inside+Eclipse

Trying AceWiki

After the session has expired :

010-09-18 16:32:28.503:WARN::Error for /acewiki/
java.lang.UnsatisfiedLinkError: Native Library /usr/lib/swi-prolog/lib/amd64/libjpl.so already loaded in another classloader
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1768)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at jpl.JPL.loadNativeLibrary(JPL.java:100)
        at jpl.fli.Prolog.<clinit>(Prolog.java:85)
        at jpl.JPL.init(JPL.java:177)
        at ch.uzh.ifi.attempto.ape.APELocal.<init>(APELocal.java:74)
        at ch.uzh.ifi.attempto.ape.APELocal.init(APELocal.java:114)
        at ch.uzh.ifi.attempto.acewiki.AceWikiServlet.newApplicationInstance(AceWikiServlet.java:61)
        at nextapp.echo2.webcontainer.ContainerInstance.init(ContainerInstance.java:206)

2010-09-17

Succeeded to run AceWiki from Maven

I get this error when I run:

mvn -Djava.library.path=/usr/lib/swi-prolog/lib/amd64 jetty:run

  2010-09-17 17:31:43.687:WARN::Error for /acewiki/
java.lang.UnsatisfiedLinkError: no jpl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at jpl.JPL.loadNativeLibrary(JPL.java:100)
        at jpl.fli.Prolog.<clinit>(Prolog.java:85)
        at jpl.JPL.init(JPL.java:177)
        at ch.uzh.ifi.attempto.ape.APELocal.<init>(Unknown Source)
        at ch.uzh.ifi.attempto.ape.APELocal.init(Unknown Source)
        at ch.uzh.ifi.attempto.acewiki.AceWikiServlet.newApplicationInstance(AceWikiServlet.java:61)
        at nextapp.echo2.webcontainer.ContainerInstance.init(ContainerInstance.java:206)

/SRC/attempto_java_packages-091207/src

/SRC/pl/packages/jpl/src/java/jpl

But it runs OK with:

eval `swipl -dump-runtime-variables`
mvn package
java -Djava.library.path=$PLBASE/lib/$PLARCH \
     -jar $HOME/apps/jetty-runner*.jar target/acewiki-0.4.2-SNAPSHOT.war

This also runs OK (complete suite of commands ) :

cd ~/src/acewiki-0.4.1/
ln -s $HOME/src/ape/ape.exe .
eval `swipl -dump-runtime-variables` 
export LD_PRELOAD=$PLBASE/lib/$PLARCH/libjpl.so
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$PLARCH:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$PLARCH/server:$LD_LIBRARY_PATH
export MAVEN_OPTS="-Djava.library.path=$PLBASE/lib/$PLARCH"
mvn jetty:run

To debug in eclipse, add this to MAVEN_OPTS :

-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

Installing SWI Prolog from sources

./prepare
The following submodules are not yet initialised
   bench
   packages/chr
   packages/clpqr
   packages/inclpr
   packages/jpl
   packages/protobufs
Do you want me to run git submodule update --init? yes

Try to run AceWiki

I search for the JPL library :

locate libjpl.so 
/usr/lib/swi-prolog/lib/amd64/libjpl.so

I paste this in the shell (inspired by the README.txt and by my previous experience of starting the local APE server for ACE View) :

eval `swipl -dump-runtime-variables`
export LD_PRELOAD=$PLBASE/lib/$PLARCH/libjpl.so
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$PLARCH:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$PLARCH/server:$LD_LIBRARY_PATH

which adds this in the environment:

% echo $LD_LIBRARY_PATH                                                    
/home/jmv/apps/jdk1.6.0_21/jre/lib/amd64/server:/home/jmv/apps/jdk1.6.0_21/jre/lib/amd64:

% echo $LD_PRELOAD     
/usr/lib/swi-prolog/lib/amd64/libjpl.so

After Maven adaptation, run the sofware so :

mvn -Djetty.port=8088 -Djava.library.path=$PLBASE/lib/$PLARCH jetty:run

http://localhost:8088/acewiki/acewiki/

Note that the how-to "Testing ACE editor again from sources" still works with the unmodified AceWiki source directory.

GF (grammatical-framework) for Attempto Controled English

I found this grammar :

http://www.grammaticalframework.org/examples/attempto/AttemptoFre.gf

with this content :

--# -path=.:present
concrete AttemptoFre of Attempto = SymbolsC ** AttemptoI with
  (Syntax = SyntaxFre),
  (Symbolic = SymbolicFre),
  (LexAttempto = LexAttemptoFre) ;

Is this the reference version for Attempto Controled English in GF ?

Or should I generically translate the french into english with GF, and then apply the standard ACE tools ?

Installed GF (grammatical-framework)

Compiled from sources following :

http://code.google.com/p/grammatical-framework/wiki/DevelopersPage

The build step does not complete , but the install step seem to work :

runghc Setup.hs build +RTS -K100M -RTS
...
Running: dist/build/gf/gf '-batch' '-gf-lib-path=lib/src' '-s' '--gfo-dir=dist/build/rgl/alltenses' 'lib/src/api/TryEng.gf'
Compiling [AllTenses] lib/src/api/TryFin.gf
Running: dist/build/gf/gf '-batch' '-gf-lib-path=lib/src' '-s' '--gfo-dir=dist/build/rgl/alltenses' 'lib/src/api/TryFin.gf'
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.
Setup.hs: gf exited with exit code: 2

REMEDY:

export GHCRTS=-K100M
runghc Setup.hs build

I may use GF to help serialize N3 / RDF graphs in various formats (see ??? ).

2010-09-16

After CNL 2010

2nd Workshop on Controlled Natural Language

Gordon Pace! ! University of Malta ! ! ! ! gordon.pace@um.edu.mt

ask for for reference of article about using rule engine in user interaction

send to Marcos Cramer! University of Bonn! ! ! ! ! marcos.cramer@gmail.com link to the Prolog module for using Mercury declarations


Think about how to use Enrico's CNL GUI for user interaction, and ask for a visit to Bolzano

Enrico Franconi! ! Free University of Bozen-Bolzano! ! franconi@inf.unibz.it


Send to Mary links to my tools, and ask for pointers to her game :

Mary Keeler!! ! CyberCORE!! ! ! ! ! mkeeler@uw.edu



New repository for ACE prolog code

Since soon no one working on ACE will be in the University of Zürich, it is time to setup a new repository .

I propose to do that.

ACE Wiki is on LaunchPad.

The ACE View source code is hosted by Google Code .

There is also CodeHaus, and certainly others.

preserve history.

strong background in software engineering

concerns about keeping a clean code base, avoiding forks, avoiding re-implementations, while still preserving the freedom of researchers.


Send to Hans links to my tools :

Hans Leiss! ! ! CIS University of Munich! ! leiss@cis.uni-muenchen.de


Send to Silvie links to my blogs:

Silvie Spreeuwenberg! LibRT, Amsterdam! ! ! ! ! silvie@librt.com


Send to Adam links to my tools :

Adam Wyner ! ! University of Leeds!! ! ! ! adam@wyner.info


AceWiki suggestions

Questions

Mavenizing AceWiki

Send to Tobias pointers to Maven

Tobias Kuhn!! ! University of Zurich! ! ! ! kuhntobias@gmail.com

Here is what I did to adapt the directory structure of AceWiki to Maven. Of course the file moves should be done with Software Configuration Management, to preserve files history.

mkdir --parents src/main/java
mv src/ch src/main/java
mkdir --parents src/main/resources
mv src/overview.html src/main/resources

# all these files should be moved to src/main/resources :
ls -l src/main/java/**/*.pl | grep -v '.java$' | grep -v /test/

mkdir --parents src/main/resources/ch/uzh/ifi/attempto/codeco/ 
mv  src/main/java/ch/uzh/ifi/attempto/codeco/   src/main/resources/ch/uzh/ifi/attempto/codeco/
mkdir --parents src/main/resources/ch/uzh/ifi/attempto/acewiki/gui/img/
mv  src/main/java/ch/uzh/ifi/attempto/acewiki/gui/img/* src/main/resources/ch/uzh/ifi/attempto/acewiki/gui/img/
mkdir --parents src/main/resources/ch/uzh/ifi/attempto/aceeditor/img/
mv src/main/java/ch/uzh/ifi/attempto/aceeditor/img/* src/main/resources/ch/uzh/ifi/attempto/aceeditor/img/
mkdir --parents src/main/resources/ch/uzh/ifi/attempto/echocomp/style/ 
mv src/main/java/ch/uzh/ifi/attempto/echocomp/style/* src/main/resources/ch/uzh/ifi/attempto/echocomp/style/
mkdir --parents src/main/resources/ch/uzh/ifi/attempto/aceeditor/
mv src/main/java/ch/uzh/ifi/attempto/aceeditor/*.pl   src/main/resources/ch/uzh/ifi/attempto/aceeditor/
mv src/main/java/ch/uzh/ifi/attempto/aceeditor/*.html src/main/resources/ch/uzh/ifi/attempto/aceeditor/
mv src/main/java/ch/uzh/ifi/attempto/aceeditor/*.tex  src/main/resources/ch/uzh/ifi/attempto/aceeditor/
mv src/main/java/ch/uzh/ifi/attempto/aceeditor/*.pdf  src/main/resources/ch/uzh/ifi/attempto/aceeditor/
mkdir  src/main/resources/ch/uzh/ifi/attempto/acewiki/core
mv  src/main/java/ch/uzh/ifi/attempto/acewiki/core/{*.pl,*.html,*.pdf,*.tex} src/main/resources/ch/uzh/ifi/attempto/acewiki/core
mkdir --parents src/test/resources/ch/uzh/ifi/attempto/aceeditor/test/           
mv src/main/java/ch/uzh/ifi/attempto/aceeditor/test/* src/test/resources/ch/uzh/ifi/attempto/aceeditor/test/
mkdir --parents src/test/resources/ch/uzh/ifi/attempto/acewiki/core/test/
mv src/main/java/ch/uzh/ifi/attempto/acewiki/core/test/* src/test/resources/ch/uzh/ifi/attempto/acewiki/core/test/
# all these Java files should be moved to src/test/java :
grep test build.xml
mkdir --parents src/test/java
mkdir --parents src/test/java/ch/uzh/ifi/attempto/aceeditor/test/            
mkdir --parents src/test/java/ch/uzh/ifi/attempto/acewiki/core/test/
mv  src/main/java/ch/uzh/ifi/attempto/aceeditor/test/*.java src/test/java/ch/uzh/ifi/attempto/aceeditor/test/  

mkdir src/main/webapp
mv webapps/war/* src/main/webapp

# deploy locally the attempto ape jar (later should be put on a public repo from sources)
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ \  
  -Dfile=${HOME}/src/acewiki-0.4.1/lib/attempto-ape.jar \
  -DgroupId=attempto -DartifactId=ape -Dversion=1.0   -Dpackaging=jar
# same for OWLAPI
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ \
  -Dfile=${HOME}/src/acewiki-0.4.1/lib/owlapi-bin.jar \
  -DgroupId=owlapi -DartifactId=owlapi -Dversion=3.1.0   -Dpackaging=jar
# same for HermiT
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ \
  -Dfile=${HOME}/src/acewiki-0.4.1/lib/HermiT.jar \
  -DgroupId=hermit -DartifactId=hermit -Dversion=1.2.4   -Dpackaging=jar
# same for OWLLINK; not sure which implementation is used, so groupId/artifactId/version is tentative
# ? http://owllink-owlapi.sourceforge.net/ ?
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ \
  -Dfile=${HOME}/src/acewiki-0.4.1/lib/owllink-bin.jar \
  -DgroupId=owllink -DartifactId=owllink -Dversion=1.0   -Dpackaging=jar
# same for JPL from SWI Prolog
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ \
  -Dfile=${HOME}/src/acewiki-0.4.1/lib/jpl.jar \
  -DgroupId=jpl -DartifactId=jpl -Dversion=1.0   -Dpackaging=jar

# same for Echo2 from NextApp
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ \
  -Dfile=${HOME}/src/acewiki-0.4.1/lib/Echo2_App.jar \
  -DgroupId=com.nextapp -DartifactId=echo2-app -Dversion=2.1.1  -Dpackaging=jar
# same for echopointng
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ \
  -Dfile=${HOME}/src/acewiki-0.4.1/lib/echopointng-2.2.0rc2.jar \
  -DgroupId=net.sourceforge.echopoint -DartifactId=echopointng -Dversion=2.2.0rc2  -Dpackaging=jar
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ -Dfile=${HOME}/src/acewiki-0.4.1/lib/Echo2_WebContainer.jar -DgroupId=com.nextapp -DartifactId=echo2-webcontainer -Dversion=1.0  -Dpackaging=jar
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ -Dfile=${HOME}/src/acewiki-0.4.1/lib/Echo2_FileTransfer_WebContainer.jar -DgroupId=com.nextapp -DartifactId=echo2-filetransfer -Dversion=1.0  -Dpackaging=jar
mvn deploy:deploy-file -Durl=file:${HOME}/.m2/repository/ -Dfile=${HOME}/src/acewiki-0.4.1/lib/Echo2_Extras_WebContainer.jar -DgroupId=com.nextapp -DartifactId=echo2-webcontainer -Dversion=1.0  -Dpackaging=jar

I created the pom.xml file (attached). After that, if you have installed Maven 2, it's possible to run the test suite:

mvn test
 ...
 T E S T S
-------------------------------------------------------
Running ch.uzh.ifi.attempto.aceeditor.test.ChartParserGenerationTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec
Running ch.uzh.ifi.attempto.aceeditor.test.TestGrammar
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running ch.uzh.ifi.attempto.aceeditor.test.ChartParserParsingTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

and then run the sofware:

mvn -Djetty.port=8088 jetty:run

Note that this will do: compile, build, test, build, and launch.

The existing build.xml is not used at all by Maven.

2010-09-14

LePUS3, SEMAT

2010-09-14

00 46 73 822 8179

Krasimir

http://www.owllink.org/

http://www.naproche.net/inc/downloads.php

http://www.inf.unibz.it/~franconi/publications.html#quelo

http://www.inf.unibz.it/~franconi/

Latino: text to ontology

Rabbit Clone, SOS

Questions to Tobias

EulerGUI

2010-09-13

EulerGUI

turn table

formats

inference engines

framework

second inner reasoner ( the consience of the application )

good practices of design for OO applications

questions

reuse ontologies

use probabilistic methods to "translate" natural language into CNL

CNL used in speech undertanding

GUI that flags non CNL parts in a NL text

Visio

qualitative physics

interchange language: n3

common sense

RuleBurst

2010-09-11

Search, but did not find:

maven give hint about repository for Downloading far

{?S <p> ?V } => {?S <q> ?V }.

should be translated in CHR like this:

triple(S, '<p>', V) ==> triple(S, '<q>', V).

--no-qvars

Re-installing Prova from Subversion

I 'm stiil looking at Prova for a backward chaining engine , more adapted to reason on databases (SPARQL or SQL ).

After weeks, I redo it on my laptop:

 svn co https://mandarax.svn.sourceforge.net/svnroot/mandarax/prova3/prova-compact/trunk/ prova-compact
cd prova-compact
mvn test 

Alas it stays forever here with 100% CPU:

Timeout detected: [[[sensor1,async,0,data,[temp,101.0]]]]
Order order2 cancelled
Timeout elapsed for order order1
Proceed with the order as timeout for cancel is elapsed order1
Timeout elapsed for order order3
Proceed with the order as timeout for cancel is elapsed order3
Order order1 cannot be cancelled

2010-09-10

EulerGUI: New N3 project file: populating Project object through rules

Committed revision 1817

refactoring branch:

- read a new N3 Project file with extension .n3p.n3 or .owl from command line

- N3 sources are now opened in the editor relative to project; Euler and Drools runs are correct;

tested with examples/BloodPressure.n3p.n3

TODO:

- test open BloodPressure.n3p.n3 from the File menu;

- open an OWL file from Protégé

- implement sub-Projects and post-processing projects

2010-09-09

EulerGUI: New N3 project file: populating Project object through rules

Revision 1814

Modified Thu Sep 9 08:12:25 2010 UTC (113 minutes, 34 seconds ago) by jmvanel

project-java-rules.n3 : WIP : add on the LHS:

?ONTO a java:eulergui-project-Project .

But this does not yet compile in Drools on the RHS:

?N3S a java:eulergui-project-N3Source .
?N3S java:URI ?IMPORT. # <<<
?ONTO javam:addN3Source ?N3S .

The N3 rule is now :

{
  ?ONTO a java:eulergui-project-Project .
  ?ONTO owl:imports ?IMPORT.
  ?IMPORT log:uri ?IMPORT_URI .
} => {
  ?N3S a java:eulergui-project-N3Source .
  ?N3S java:URI ?IMPORT_URI .
  ?ONTO javam:addN3Source ?N3S .
}.

TODO: enhance the translator; this is wrong translation :

( N3S_reference ) . setURI( $IMPORT_URI_reference );

Committed revision 1815

refactoring branch:

- Now project-java-rules.n3 compiles in Drools

- updated the class N3JavaMappingBuiltin : Now we store the Java type (String) of the subject of log:uri.

- now when opening a .n3p.n3 file, the N3 sources appears in the GUI ! :)

but TODO: when trying to open an N3 source in the editor:

java.net.MalformedURLException: no protocol: <./catch_allQ.n3>
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at eulergui.project.N3Source.getLocation(N3Source.java:49)
at eulergui.project.N3Source.prepare(N3Source.java:341)
at eulergui.project.N3Source.setProject(N3Source.java:306)
at eulergui.project.Project.addN3Source(Project.java:296)
at eulergui.project.Project.addN3Source(Project.java:291)
at n3_project.helpers0.Rule_project_java_rules_n3_3_0.consequence(
  Rule_project_java_rules_n3_3_0.java:14)

2010-09-08

EulerGUI: New N3 project file: populating Project object through rules

DONE:

- copied the class N3JavaMappingBuiltin from trunk

- in method Project.save() , reestablish the XML format save ( TestProject was broken )

I updated the class N3JavaMappingBuiltin from the trunk,reading projects in N3 get better, but still not good :

INFO: Rule Compilation error : [Rule name='project-java-rules.n3 1']
n3_project/helpers0/Rule_project_java_rules_n3_1_0.java (12:847) : $IMPORT_reference cannot be resolved
n3_project/helpers0/Rule_project_java_rules_n3_1_0.java (13:870) : $ONTO_reference cannot be resolved

The problem is that ?IMPORT and ?ONTO are ordinary URI's on the antecedent side, and Java objects on the right side :

rule "project-java-rules.n3 1"
when
  $Triple_1 : Triple( $ONTO : subject, predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>", object == "<http://www.w3.org/2002/07/owl#Ontology>" )
  $Triple_2 : Triple( subject == $ONTO, predicate == "<http://www.w3.org/2002/07/owl#imports>", $IMPORT : object )
then
  Triple newTriple;
  TripleResult newTripleResult;
  String N3S = Triple.resource("N3S") ;
  eulergui.project.N3Source N3S_reference = new eulergui.project.N3Source ();
  insert( new Assignment( N3S.toString(), N3S_reference ));
  (  N3S_reference ) . setURI( $IMPORT_reference );
  (  $ONTO_reference ) . addN3Source( N3S_reference );
end

One could leverage on the Java object creation that happens in another rule. The criterium in green could be applied on the antecedent side when the predicate is a Java predicate; problems with project-java-rules.n3 : a criterium

Assignment( $ONTO : String, $ONTO_reference : Object,
            reference.class == $ONTO_class ) 

could be applied on the antecedent side when the predicate is a Java prédicate.

rule "project-java-rules.n3 0"
when
  $Triple_1 : Triple( $ONTO : subject, predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>", object == "<http://www.w3.org/2002/07/owl#Ontology>" )
then
  Triple newTriple;
  TripleResult newTripleResult;
  eulergui.project.Project $ONTO_reference = new eulergui.project.Project ();
  insert( new Assignment( $ONTO.toString(), $ONTO_reference ));
end

The N3 rule is:

{ ?ONTO a owl:Ontology .
  ?ONTO owl:imports ?IMPORT.
} => {
  ?N3S a java:eulergui-project-N3Source .
  ?N3S java:URI ?IMPORT.
  ?ONTO javam:addN3Source ?N3S .
}.

2010-09-07

EulerGUI: New N3 project file: populating Project object through rules

// ---------- N3 rule 1 ----------
/* {
?ONTO <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology>.
?ONTO <http://www.w3.org/2002/07/owl#imports> ?IMPORT.
}
 => {
_:N3S <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://java.sun.com/class#eulergui-project-N3Source>.
_:N3S <http://java.sun.com/class#URI> ?IMPORT.
?ONTO <http://java.sun.com/method#addN3Source> _:N3S.
}
 .
 */

rule "project-java-rules.n3 1"
when
  $Triple_1 : Triple( $ONTO : subject, predicate == "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>", object == "<http://www.w3.org/2002/07/owl#Ontology>" )
  $Triple_2 : Triple( subject == $ONTO, predicate == "<http://www.w3.org/2002/07/owl#imports>", $IMPORT : object )
then
  Triple newTriple;
  TripleResult newTripleResult;
  eulergui.project.N3Source N3S_reference = new eulergui.project.N3Source ();
  insert( new Assignment( N3S.toString(), N3S_reference ));
  (  $N3S_reference ) . setURI( $IMPORT );
  (  $ONTO_reference ) . addN3Source( N3S );

end

2010-09-02

DONE:

Trunk: Upgrade euler to 2010-09-03, pellet to 2.2.1

TODO

create the N3 project file with a <> as RDF subect.

CHR

CHR in EulerGUI & Déductions: ideas

Questions/remarks

"range restricted" rule : i.e. each variable in the conclusion of a rule must also appear in a not negated clause in the premise of this rule.

CHR solver to support cardinality restrictions

persistent CHR ?

TODO mail to Kaarel about CHR

2010-08-28

Running eye in command line

cd /home/jmv/src/eulersharp/trunk/
unzip 2004/01swap/bin/Euler.jar 'eye/linux/**'
chmod u+x eye/linux/bin/yap
eye/linux/bin/yap

consult( 'trunk/2006/02swap/euler.yap' ) .
   ?-  n3_pcl( '/home/jmv/src/eulergui/examples/parents.n3', semantics ).
GET /home/jmv/src/eulergui/examples/parents.n3
yes

CHR summer school

Christiansen thinks that Attempto could benefit from a CHR implementation

Questions about CHR

EulerGUI: fixing regressions in the refactoring branch

Fixed:

following scenario is was buggy:

- Open http://deductions.svn.sourceforge.net/viewvc/deductions/n3/test_person_import.n3p

- Open local examples/koala.n3p

We saw a stack with horus. I did not see a stack, but a display with two projects combined.

NOT fixed: Save As:

Thread [AWT-EventQueue-0] (Suspended (exception MalformedURLException))
URL.<init>(URL, String, URLStreamHandler) line: 567
URL.<init>(URL, String) line: 464
Project.addN3Query(N3Source) line: 357
Project.setN3Query(N3Source) line: 347
ProjectLegacy.setN3Query(N3Source) line: 73
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
Trampoline.invoke(Method, Object, Object[]) line: 37
GeneratedMethodAccessor5.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
MethodUtil.invoke(Method, Object, Object[]) line: 244
Statement.invokeInternal() line: 239
Statement.access$000(Statement) line: 39
Statement$2.run() line: 140
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
Statement.invoke() line: 137
Statement.execute() line: 128
XMLEncoder(Encoder).writeStatement(Statement) line: 253
XMLEncoder.writeStatement(Statement) line: 331
DefaultPersistenceDelegate.invokeStatement(Object, String, Object[], Encoder) line: 235
DefaultPersistenceDelegate.doProperty(Class, PropertyDescriptor, Object, Object, Encoder) line: 229
DefaultPersistenceDelegate.initBean(Class, Object, Object, Encoder) line: 247
DefaultPersistenceDelegate.initialize(Class<?>, Object, Object, Encoder) line: 395
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 100
XMLEncoder(Encoder).writeObject(Object) line: 54
XMLEncoder.writeObject(Object) line: 257
XMLEncoder(Encoder).writeExpression(Expression) line: 279
XMLEncoder.writeExpression(Expression) line: 372
DefaultPersistenceDelegate(PersistenceDelegate).writeObject(Object, Encoder) line: 97
XMLEncoder(Encoder).writeObject(Object) line: 54
XMLEncoder.writeObject(Object) line: 257
XMLEncoder(Encoder).writeObject1(Object) line: 206
XMLEncoder(Encoder).cloneStatement(Statement) line: 219
XMLEncoder(Encoder).writeStatement(Statement) line: 250
XMLEncoder.writeStatement(Statement) line: 331
XMLEncoder.writeObject(Object) line: 260
Project.save(Project) line: 1091
Project.saveAs(Project, File) line: 1113
ProjectFileManagement$4.actionPerformed(ActionEvent) line: 131
JMenu$1(AbstractButton).fireActionPerformed(ActionEvent) line: 1995
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2318
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 387
DefaultButtonModel.setPressed(boolean) line: 242
JMenu$1(AbstractButton).doClick(int) line: 357
BasicMenuItemUI.doClick(MenuSelectionManager) line: 1223
BasicMenuItemUI$Handler.mouseReleased(MouseEvent) line: 1264
JMenu$1(Component).processMouseEvent(MouseEvent) line: 6267
JMenu$1(JComponent).processMouseEvent(MouseEvent) line: 3267
JMenu$1(Component).processEvent(AWTEvent) line: 6032
JMenu$1(Container).processEvent(AWTEvent) line: 2041
JMenu$1(Component).dispatchEventImpl(AWTEvent) line: 4630
JMenu$1(Container).dispatchEventImpl(AWTEvent) line: 2099
JMenu$1(Component).dispatchEvent(AWTEvent) line: 4460
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4577
LightweightDispatcher.processMouseEvent(MouseEvent) line: 4238
LightweightDispatcher.dispatchEvent(AWTEvent) line: 4168
ProjectGUI(Container).dispatchEventImpl(AWTEvent) line: 2085
ProjectGUI(Window).dispatchEventImpl(AWTEvent) line: 2478
ProjectGUI(Component).dispatchEvent(AWTEvent) line: 4460
EventQueue.dispatchEvent(AWTEvent) line: 599
EventDispatchThread.pumpOneEventForFilters(int) line: 269
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174
EventDispatchThread.pumpEvents(int, Conditional) line: 169
EventDispatchThread.pumpEvents(Conditional) line: 161
EventDispatchThread.run() line: 122

2010-08-27

Next week i'll be at First International Summer School on Constraint Handling Rules

Programming and Reasoning with Rules and Constraints

August 30th - September 3rd, 2010

Leuven, Belgium

TODO : upgrade to jEdit 4.3.2, and write a how-to in the manual for upgrading jEdit dependency .

upgrade to Pellet 2.2.1.

Working on multi-value properties for form generation

Attempto sentence:

Every n : PersonList contains at least one person .

OWL syntax:

PersonList subClassOf contain some person

Paraphrase

If there is a n : PersonList X1

then the n : PersonList X1 contains at least 1 person .

And in N3:

    @prefix : <http://www.w3.org/2002/07/owl#> .
    @prefix acetext: <http://attempto.ifi.uzh.ch/acetext#> .
    @prefix multi: <http://deductions.sourceforge.net/ontologies/multi.owl#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    
    acetext:acetext     a :AnnotationProperty .
    
    <http://deductions.sourceforge.net/ontologies/multi.owl>     a :Ontology .
    
    multi:PersonList     a :Class;
         rdfs:subClassOf  [
             a :Restriction;
             :onProperty multi:contain;
             :someValuesFrom multi:person ] .
    
    multi:contain     a :ObjectProperty .
    multi:person     a :Class .

      [      a :Axiom;
             acetext:acetext "Every n: PersonList contains at least one person.";
             <http://purl.org/dc/elements/1.1/date> "2010-08-27 17:23:43";
             :object  [
                 a :Restriction;
                 :onProperty multi:contain;
                 :someValuesFrom multi:person ];
             :predicate rdfs:subClassOf;
             :subject multi:PersonList ].

Rule:

If there is an OWL restriction on class C and property P, with someValuesFrom, or cardinality>1, or minCardinality>1, or maxCardinality>1, then the field for P should be multi-valued.

Idea:

Is there some method to generalize rules, like when having Swing rules, and generalizing to abstract GUI? It is neither abduction or induction I think.

EulerGUI: EulerGUI project in N3 format

Slightly extending the OWL format, see "Interoperability with Protégé" and "Proposal for a new ontology and N3 format for RDF + OWL + rules projects" .

I realize that we must somehow merge the classes N3Source and Project. Indeed an N3Source can contain owl:imports triples, which must be interpreted as sub-projects in the EulerGUI sense. In the other direction, a Project will soon be saved as OWL in N3 format.

One way to merge the classes N3Source and Project is to add a new interface, IN3Source .

As a side benefit, we can now use unlimited properties about the project itself, like Dublin Core, or simply :

<> rdf:label "name of the project".

to be displayed in the GUI.

2010-08-26

EulerGUI: fixing regressions in the refactoring branch

Fixed:

NOT Fixed:

2010-08-25

Merging the refactoring branch in EulerGUI

I discovered that the start of the branch was worng ( too late ). So I try to re-merge the remaining differences not yet applied.

svn merge --dry-run \
https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui@1686 \
https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui@1716 \
src/main/java/eulergui/drools_engine/ParserLink.java

svn merge --dry-run \
https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/main/java/eulergui/drools_engine/ParserLink.java@1686 \
https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/src/main/java/eulergui/drools_engine/ParserLink.java@1716 \
src/main/java/eulergui/drools_engine/ParserLink.java

t=https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui
s=src/main/java/n3_project/helpers/DroolsTripleHandler.java
svn merge --dry-run \
  $t/$s@1686 \
  $t/$s@1716 \
 $s

==> compilation error

t=https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui
s=src
svn merge --dry-run \
  $t/$s@1686 \
  $t/$s@1716 \
 $s
--- Fusion de r1687 à r1716 dans 'src':
   C src/main/java/eulergui/tools/CreateClassFormMouseListener.java
C    src/main/java/eulergui/EulerGUI.java
U    src/main/java/eulergui/gui/controller/ApplicationKB.java
C    src/main/java/eulergui/project/ProjectWithSubProjects.java
C    src/main/java/n3_project/helpers/N3JavaMappingBuiltin.java
C    src/main/java/n3_project/helpers/N3SourcetoDrools.java
C    src/main/java/n3_project/helpers/N3toDroolsUpdater.java
C    src/main/java/unif/Instanciator.java
   C src/main/java/com/hp/hpl/jena/rdf/model
C    src/test/java/eulergui/gui/TestJemmy.java
Résumé des conflits :
  Conflits textuels : 7
  Arborescences en conflit : 2

I merge , but still 2 tests in error:

unning n3_project.helpers.TestDroolsQuery
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 15.353 sec <<< FAILURE!
Running eulergui.gui.TestFacebookSearch
Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 20.616 sec <<< FAILURE!

and also one minor error that is also in the trunk:

//////// Traduction de ./variableSubstitution.n3 ./variableSubstitution.n3 class eulergui.project.N3Source ////////
25 août 2010 17:46:57 n3_project.helpers.N3SourcetoDrools removeRulePackage
INFO: _removeRulePackage(): aucun fait correspondant à file:///home/jmv/src/deductions/n3_new/variableSubstitution.n3
java.lang.NullPointerException
        at n3_project.helpers.DroolsTripleHandler.processLogBuiltin(DroolsTripleHandler.java:370)
        at n3_project.helpers.DroolsTripleHandler.makeDroolsCriterium(DroolsTripleHandler.java:240)
        at n3_project.helpers.DroolsTripleHandler.acceptAntecedent(DroolsTripleHandler.java:207)
        at eulergui.drools_engine.ParserLink.visitAllURI(ParserLink.java:671)

This is due to this pattern :

{?S ?P ?O} :substituteVariable (?V ?VT).
  ?V log:notEqualTo ?S.

COMMITED

Fixed the Failure and 2 Errors, due to rules not been compiled in presence of N3 searches ( bad ruleBase cache management in class Project )

2010-08-24

Merging the refactoring branch in EulerGUI

We first merge the developpements in the main branch onto the refactoring branch. This is because the refactoring branch has more structural changes.

cp -r eulergui_refactoring eulergui_refactoring_merge
cd eulergui_refactoring_merge/eulergui/
svn merge https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui@1716 \
          https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui@HEAD

I typed "p" for postponed on all conflicts. Then we see that there are only 11 conflicts :

ls **/*fusion-droit.r* 
pom.xml.fusion-droit.r1785
src/main/java/eulergui/EulerGUI.java.fusion-droit.r1785
src/main/java/eulergui/drools_engine/ParserLink.java
src/main/java/eulergui/gui/controller/ApplicationKB.java.fusion-droit.r1785
src/main/java/eulergui/project/Project.java.fusion-droit.r1785
src/main/java/eulergui/project/ProjectWithSubProjects.java.fusion-droit.r1785
src/main/java/eulergui/tools/ClassTree.java.fusion-droit.r1785
src/main/java/eulergui/tools/ComboTreeView.java.fusion-droit.r1785
src/main/java/n3_project/helpers/N3SourcetoDrools.java.fusion-droit.r1785
src/main/java/unif/Instanciator.java.fusion-droit.r1785
src/test/java/eulergui/gui/TestJemmy.java.fusion-droit.r1785

Note that ProjectGUI has been merged smoothly. All files in conflict have 1 or 2 conflicts, excepts Project.java which has 10 conflicts.

After almost 1 day of merging manually, here are the test resuls:

Running eulergui.gui.TestEulerGUIInputs
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 84.35 sec <<< FAILURE!
Running deductions.runtime.TestRulesForUserEvents
Tests run: 4, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 26.692 sec <<< FAILURE!
Running n3_project.helpers.TestDroolsQuery
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 35.37 sec <<< FAILURE!
Running n3_project.TestProjectSequence
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.421 sec <<< FAILURE!
Running eulergui.gui.TestFacebookSearch
Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 23.274 sec <<< FAILURE!
 ...
Tests run: 129, Failures: 1, Errors: 7, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 minutes 27 seconds
[INFO] Finished at: Tue Aug 24 20:24:51 CEST 2010
[INFO] Final Memory: 45M/341M

I commit anyway !

QUESTIONS

2010-08-23

Problems with OWL API

oneOf applied to a Class must be a list of individuals :

http://www.w3.org/TR/2004/REC-owl-ref-20040210/#EnumeratedClass

and oneOf applied to a DataRange must be a list of literals:

http://www.w3.org/TR/2004/REC-owl-ref-20040210/#EnumeratedDatatype

so the translation by Gloze from XSD to OWL must not be :

pmxml_:enumResourceType
  a owl:Class ;
  owl:equivalentClass
  [ a owl:DataRange ;
    owl:oneOf (0 1)
  ] .

but:

pmxml_:enumResourceType
  a owl:DataRange ;
  owl:oneOf (0 1) .

23 août 2010 18:58:51 org.coode.owlapi.rdfxml.parser.IndividualListItemTranslator translate
INFO: Cannot translate list item to individual, because rdf:first triple is a literal triple
23 août 2010 18:58:51 org.coode.owlapi.rdfxml.parser.IndividualListItemTranslator translate
INFO: Cannot translate list item to individual, because rdf:first triple is a literal triple
Exception in thread "main" java.lang.NullPointerException
at org.coode.owlapi.rdfxml.parser.OneOfTranslator.translate(OneOfTranslator.java:56)
at org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.translateClassExpression(OWLRDFConsumer.java:1645)
at org.coode.owlapi.rdfxml.parser.AbstractTripleHandler.translateClassExpression(AbstractTripleHandler.java:79)
at org.coode.owlapi.rdfxml.parser.TPEquivalentClassHandler.handleTriple(TPEquivalentClassHandler.java:62)
at org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.handle(OWLRDFConsumer.java:1089)
at org.coode.owlapi.rdfxml.parser.OWLRDFConsumer$1.handleResourceTriple(OWLRDFConsumer.java:1215)
at org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.iterateResourceTriples(OWLRDFConsumer.java:1994)
at org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.endModel(OWLRDFConsumer.java:1213)
at uk.ac.manchester.cs.owl.owlapi.turtle.parser.OWLRDFConsumerAdapter.handleEnd(OWLRDFConsumerAdapter.java:107)
at uk.ac.manchester.cs.owl.owlapi.turtle.parser.TurtleParser.parseDocument(TurtleParser.java:153)
at uk.ac.manchester.cs.owl.owlapi.turtle.parser.TurtleOntologyParser.parse(TurtleOntologyParser.java:60)
at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:165)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:619)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:580)
at org.coode.owlapi.examples.LoadingOntologiesArgument.main(LoadingOntologiesArgument.java:41)

Old an new EulerGUI tasks

Update of Old EulerGUI Tasks ( from april 2010 )

  1. lobbying with Protégé and OWL API teams: we need this to be working:

    <> owl:imports <plants.n3> .

    # KO: IllegalArgumentException: URI is not absolute

    cf my mail on the OWL API list a few months ago (it's NOT corrected today, and I sent a new mail)

    (4h)

  2. N3 Editor : completion; enhance tooltip explaining the properties and classes 3h
  3. Import Java classes from byte code or sources, with method bodies : maybe reuse eclipse parser
  4. Java application objects in the KB along with business objects, see N3 - Java mapping ; an alternative to using the instanciator technology; useful for the internal KB and generated applications (4h)
  5. action to start a Déduction form to enter properties for a new instance (4h):

Dependencies:

Other recent tasks:

  1. presentation brochure for company Deduction
  2. write training program
  3. form generator: implement multi-valued properties, OWL 2 restrictions;
  4. Application examples: wine management, contacts management
  5. generation of all formats from RDF: ideas for a quite generic RDF export ( see just below )
  6. evaluate Prova ; read article by Adrian Paschke
  7. merge Olivier's refactoring
  8. continue refactorings: extract Drools engine, remove package dependencies, etc
  9. introduce plugins within EulerGUI with Felix; on demand download of features
  10. make a Protégé 4.1 plugin with EulerGUI
  11. implement some applicative N3 rules within EulerGUI, cf Rules to extend EulerGUI behavior
  12. EulerGUI project in N3 format, extending the Protégé OWL format
  13. infrastructure for processing N3 rules; translate to Drools, Prova, CHR, SWRL, ... ; use Euler new mode --no-qvar
  14. new translator to Drools

Dependencies:

3->4

8->9

5+13 -> 14

Ideas for a quite generic RDF exporter

On list jena-dev, Thu Jul 8, 2010

I want to write a simple framework to write strings out of RDF graphs, and I want to share ideas about that.

It may , or not, have been done using Jena API.

It is fulfills the same purpose as templating frameworks like FreeMarker, but with more semantics.

As an example, imagine that one wants to write Java classes.

The RDF model has already been prepared, typically by a rule engine, from maybe an RDF Schema.

Then you have something like this:

:C1 a j:Class;
  j:extends :C2;
  j:implements :C3;
  j:hasMethod :m1.
:m1 j:hasArgument :a1 .
:a1 j:hasType :C4 ;
  j:hasName "x".
:m1 j:hasStatements ([]).

which should generate this:

public class C1 extends C2 implements C3 {
  void m1( C4 x ) {
  }
}

So we have "contained" ("owned") properties like j:hasMethod, j:hasArguments, and j:hasStatements, that need to be expanded in place. And we have "reference" ("pointer") properties that somehow point to another structure, like j:extends, j:implements, j:hasType .

First architecture:

interface RDFExporter {
  /** returns : public class C1 */
  String beginTypedObject( String rdfId, String rdfTypeId);

  /** returns : extends C2 */
  String referenceProperty(      String subject, String property, String object);

  /** returns : { */
  String typedObjectContainedPropertySeparator( String rdfId, String rdfTypeId);

  /** returns : void m1( */
  String beginContainedProperty( String subject, String property, String object);
  /** returns : ) { */
  String containedPropertySeparator( String subject, String property, String object);
  /** returns : } */
  String endContainedProperty(   String subject, String property, String object);
  /** returns : } */
  String endTypedObject(   String rdfId, String rdfTypeId);
}

RDFExporter can be implemeted for Java, XML or other formats, or there can be a generic implemetation with plugins for each case. Note that the XXXSeparator mechanism works also for XML.

Second possible architecture: use N3 rules TODO <<<<<<<<<<<<<<???

Third possible architecture: use Prolog DCG .

Here are more use case examples:

  1. generate XML, or classes in PHP or Python, or other Knowledge Representation languages like KIF (Knowledge Interchange Format)
  2. translate RDFS classes to Java classes with public fields
  3. translate a Java AST (e.g. from eclipse compiler) expressed as an N3 graph, into actual Java source
  4. generate property files
  5. generate simple english sentences

In all these cases , white spaces are not significant, and end-of-lines count as white spaces. Also, the "reference" properties are before the "contained" properties.

We suppose that the N3 or RDF has already been transformed by some rule engine, so that (as is the case in the Java source example above):

Any API to walk though an RDF graph is suitable, e.g. Jena's. So one needs to distinguish "contained" property and "reference" property.

In the former case a callback should be called by the framework to close the structure.

EulerGUI: cache for Drools rulebase, etc

But in general, when a Maven plugin has a newer version, can I get a warning ?

COMMITED

Simple cache for Drools compiled RuleBase activated (TESTS PASS); still need to assess the speed gained

- also corrected the fake URL for inner ApplicationKB project

- added forkMode=pertest to avoid cache remanence between tests

- was obliged to explicitely clear the cache in two tests

- maven-surefire-plugin passed to version 2.6 :

now -DPARSER4J_TESTS=no in script quick_tests.sh is taken in account together with

<argLine>-Xms512m etc , in the pom.xml

Tests run: 129, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 minutes 46 seconds
[INFO] Finished at: Mon Aug 23 12:30:37 CEST 2010
[INFO] Final Memory: 61M/348M

2010-08-22

http://conceptbase.sourceforge.net/userManual72/

Arguments for Déductions project

We don't try to develop a complete environment from scratch, we develop the core architecture, fill the gaps, and reuse as much as possible.

So this is an open project in every sense of the word. Open to other frameworks, to import-export to other formats.

The main language, N3, is just a readable and widely used variant of the W3C's RDF format. For rule language, there is really no standard, as W3C's RIF (Rule Interchange Format) is very new.

So we will continue to develop or reuse translators with the main logical languages (KIF, RIF, RuleML, Prolog, TPTP, ...).

We developped a translator for the well-established SWRL, and for Drools to reuse the Drools engine.

Unified approach for models + rules + specifications ;

seamless path from specifications to application, but no closed world implementation , but possibility to integrate existing libraries and code.

2010-08-07

ideas for a quite generic RDF exporter on the Jena list :

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

EulerGUI : better manage Drools WM and RuleBase

WIP: cache Drools RuleBase instead of Packages.

2010-08-06

~/src/eulersharp/ % Actualisé à la révision 3601.

COMMITED:

pom.xml :

- upgrade to Drools 5.1.0 FINAL

- Added maven-bundle-plugin just for a try (OSGi stuff)

Snapshot of EulerGUI

I just uploaded a snapshot of EulerGUI at the usual place:

http://eulergui.sourceforge.net/tmp/

As usual, because of Maven, all tests, unit and functional, (129) have passed.

It embeds Euler.jar from Subversion at today's revision 3601.

It has latest ARQ 2.8.5 ( for SPARQL ), and latest Drools 5.1.0 FINAL (with a bug fix following my report).

The Drools translation is enhanced with better manipulation of RDF lists, less calls to Drools' eval() macro, and above all using Drools' insertLogical() feature in the consequents, activated by default. Drools' insertLogical() does thruth maintenance; it retracts objects automatically when there are no more facts to support the truth of the currently firing rule.

Going hand in hand with the addition of insertLogical() , I stopped adding the negation of the consequent to the antecedent in the Drools translation. This was useless but not harmful before, and with insertLogical() it creates infinite loops.

Other news on the technical side

Other news on the technical side, I 'm looking at Prova for a backward chaining engine , more adapted to reason on databases (SPARQL or SQL ).

I 'm also considering using OSGi and Felix in EulerGUI, for a better modularity and for installing plugins automatically when necessary. Felix is also used in Protégé 4.1 . There are Maven plugins for Felix that may be helpful . An EulerGUI plugin for Protégé 4.1 is planned, but not before ACE View is updated to Protégé 4.1 .

On the business side, I'm still looking for clients being small business developing their own software with domain experts in house. I'm also looking for partnership with classical IT service companies.

I'm also looking for developpers, some Java and some logic-oriented.

I'll attend CNL 2010 in september (http://staff.um.edu.mt/mros1/cnl2010/index.html).

Monday I travel to Mediteranean with 10 or 15 days of rest and cultivating my garden.

EulerGUI : better manage Drools WM and RuleBase

Added in N3SourcetoDrools and TripleStoreDrools the recommanded calls :

((StatefulSession)workingMemory).dispose();

TESTS: 2 minutes gained at 9 minutes, but 7 Mb more at 50M.

Before:

Tests run: 129, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 minutes 15 seconds
[INFO] Finished at: Fri Aug 06 11:05:15 CEST 2010
[INFO] Final Memory: 43M/197M

After:

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 minutes 1 second
[INFO] Finished at: Fri Aug 06 11:16:18 CEST 2010
[INFO] Final Memory: 50M/217M

2010-08-05

COMMITED : upgrade to ARQ 2.8.5

What is the status of the negation by failure in Mercury?

ws.prova.api2.ProvaCommunicatorImpl

Trying apache-felix-maven-bundle-plugin

http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

First I added a completely vanilla configuration in my pom.xml :

  <plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
      <instructions>
      </instructions>
    </configuration>
  </plugin>

Then , just for a try:

mvn org.apache.felix:maven-bundle-plugin:manifest
 ...
[INFO] [bundle:manifest {execution: default-cli}]
[WARNING] Warning in manifest for eulergui:eulergui:jar:1.7-SNAPSHOT : Superfluous export-package instructions: [com, net.sf.parser4j, net.rhizomik, eulergui.parser.n3, eulergui.infrastructure, eulergui.parser.n3.impl, eulergui.gui, eulergui.parser, org.gjt.sp, org.gjt, org, net, net.sf.parser4j.parsetreeinspector, eulergui.parser.umlt, com.hp, net.sf, jdepend, n3_project.exceptions, net.sf.parser4j.parser, eulergui.parser.n3.impl.parser4j, eulergui.n3model.service]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL

This created :

target/classes/META-INF/MANIFEST.MF

I like the warning, it looks smart, these packages indeed not suitable for export.

Now to go further, I should learn more about OSGi and Felix.

Maven SCR Plugin

The Apache Felix Maven SCR Plugin is a great tool to ease the development of OSGi components and services. Components and services are defined through annotations and the plugin creates the necessary descriptors for the OSGi Declarative Services, Config Admin and Metatype services.

Reading about Prova

Differences with Prolog of the Prolog subset of Prova.

Differences are far greater than similarities. Prova is a system for reactive agents, workflows, and event processing, as well as a number of specialized reasoning modes, like deontic logic and ontology derived typing. Prova allows you to work directly with Java datatypes and classes so you can write algorithms that are very awkward to write in Prolog. You have annotations, reaction groups, reactivity bassed on direct continuations. Prova keeps lists in arrays. The differences are so many that pretty much you can say, there is very little in common with Prolog proper in terms of WHAT you can write with Prova.

Differences with Mercury.

???

Would it make sense to implement the JSR 94 API with ProvaCommunicator?

I'm not sure about the value of this. We discussed this with Mark Proctor of JBoss and he had really cold feet about the need for it. Prova is a reactive agent language. We use it in an OSGi container or behind ESB and interact with it by sending and receiving messages. Every Prova goal is a message and goal execution is a reaction so Prova is not a rule language, it is a reactive agent language.

Are gards in Prova the same as guards in CHR ?

@author(dev22) r2(X):-q(X).
@author(dev32) r2(X):-s(X).

trusted(dev1).
trusted(dev22).

% Author dev22 is trusted but dev32 is not, so one solution is found: X1=2
p1(X):-
       @author(A)
       r2(X) [trusted(A)].
:-solve(p1(X1)).

It is clear that the guard is attached to a body literal rather than

the body. You can use annotation variables together with it. You can

use CUT inside for splicing in a dynamic CUT.

Typo in manual 2.0 : commas and point instead of semicolon, % instead of // , no import for Map, missing public for class, incorrect signature for main

class test_collections {
 int main() {
  Map map = new java.util.HashMap(), % HashMap Constructor
  map.put(0,"false"),   % Instance method calls
  map.put(1,"true"),
  System.out.println("Map="+map).  % Built-in printing
 }
}

Using Maven Surefire 2.6 snapshot

Surefire is the Maven plugin for tests.

http://maven.apache.org/guides/development/guide-testing-development-plugins.html

Upgrade this in the pom.xml:

<version>2.6-SNAPSHOT</version>

Add this in ~/.m2/settings.xml :

<profiles>
    <profile>
      <id>apache</id>
      <pluginRepositories>
        <pluginRepository>
          <id>apache.snapshots</id>
          <name>Maven Plugin Snapshots</name>
          <url>http://repository.apache.org/snapshots/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

Then you can start Maven this way:

DISPLAY=:1 LANG=en mvn -Papache -DPARSER4J_TESTS=no test
 ...
Tests run: 129, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 minutes 56 seconds
[INFO] Finished at: Thu Aug 05 10:02:09 CEST 2010
[INFO] Final Memory: 38M/193M

<jmv> In maven-surefire-plugin, when I add <argLine> tag inside <configuration> , this disactivates the -D command line argument ; bug or feature ?

<bentmann> this is not related to a single plugin but applies to maven in general, i.e. explicit POM configuration is dominant over CLI args

<bentmann> whether this is really nice/intended, is indeed a good question

<bentmann> but one can always just use the project's <properties> to reach the same effect for those params

<jmv> bentmann, well, is this case I'm adding -D arguments that are not Maven specific, I think they should pass.

<bentmann> I can't follow

<jmv> I mean, when it's a Maven parameter like -DforkMode=pertest , it is good that the POM forkMode applies, but in my case it's a system variable that is not known to Maven .

<bentmann> do you mean http://jira.codehaus.org/browse/SUREFIRE-121 ?

<jmv> bentmann, yes, so this has been fixed 3 days ago :)

<jmv> is there any inconvenient to migrate to Maven 2.1.0 ?

<bentmann> Maven 2.1.0 and 2.2.0 aren't really recommended due to issues with checksum generation upon deployment

<bentmann> so if you consider upgrading, you should aim for Maven 2.2.1

<bentmann> I can't remember any major breaking change between 2.0.x and 2.2.1, so upgrading should generally be rather smooth, you could check the release notes for details

<bentmann> in any case, you want to make sure you have all your plugin versions locked down, otherwise newer default versions used by Maven 2.2.1 might cause surprises

<jmv> bentmann, well in fact in already use 2.2.1 (rdebian-1) ; so the the -DmyArg=bla should be active in mvn test ?!

<jmv> I already use 2.2.1

<bentmann> if you use the surefire plugin from SVN trunk

<jmv> I thought that Maven was updating itself, can I do this updating of surefire that without recompiling myself surefire ?

<bentmann> maven doesn't update itself

<bentmann> and no, you would have to build surefire yourself

<jmv> bentmann, Ok, so Maven takes exactly the versions of plugins that are in the POM; it doesn't update itself, it just dowloads what is not already in the local repo , correct ?

<bentmann> yes

<jmv> But in some cases, can't Maven download a bug fix at the same version level ?

<bentmann> nope, in fact automatic plugin updates (in case the POM doesn't specify a version) are considered a danger to the build which is why this behavior is scheduled for removal

<bentmann> besides, the new surefire plugin isn't released yet, so there's nothing to download

<jmv> thanks bentmann , any clue about a date for surefire 2.6 ?

<bentmann> no

2010-08-04

http://deductions.svn.sourceforge.net/svnroot/deductions/n3_new/foaf_import2.n3p

I tried semanticreports.com and created my own :

http://semanticreports.com/reports/2e534985-efc9-4912-b338-b68e79f1a23d

I see the potential .

I'd like to add that to my EulerGUI tool, if that 's open source .

Is there a code sample showing how one can reuse the Maven core to enable an application to load dependencies as needed?

I think to embed a Maven kernel to load dependencies as and when required, as Maven does itself. I guess I must, at each start of each feature, add a call to some method to load needed dependencies. Apart from that, there are other things to develop?

2010-08-03

Subscribed to http://lists.owldl.com/mailman/listinfo/pellet-users

To post to this list, send your email to: pellet-users@lists.owldl.com

Trying Smart Cache

Smart Cache Manual

2010-08-02

Trying Prova

svn co https://mandarax.svn.sourceforge.net/svnroot/mandarax mandarax
Révision 689 extraite.
cd mandarax/prova2/trunk/
mvn compile 
 ...
mvn test
 ...
mvn install
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to create assembly: File to filter not found: /src/main/assembly/prova3.bat (No such file or directory)

Using the compiled distribution:

~/src/prova-3.0.1/bin/ % ./prova3.sh ../rules/test001_args.prova anticoagulant
Parent=molecular_function

Response by Adrian:

Unfortunately, we have not found time yet to port the Semantic Web built-ins from Prova 2.0 to Prova 3.0.

You can find them documented in Prova 2.0

http://www.ag-nbi.de/lehre/0809/V_NBI/uebung5/NBI_Prova.pdf

http://www.prova.ws/etc/provauserguide_2_0.pdf

Links to logic engines: Thea, Lambda Prolog, Prova

Open Source Rule Engines Written In Java on manageability.org ( asked for EulerGUI to be included )

http://wiki.github.com/vangelisv/thea/

Lambda Prolog

Mentionned by Nicolas P.: Lambda Prolog:

http://www.lix.polytechnique.fr/~dale/lProlog/

http://www.lix.polytechnique.fr/Labo/Dale.Miller/lProlog/docs.html

http://www.irisa.fr/lande/ridoux/LPAZ/lpaz_html.html

http://www.lix.polytechnique.fr/Labo/Dale.Miller/lProlog/faq/faq.html

Search for "prova backward chaining database" :

[PDF] Please Pass the Rules: A Rule Interchange Demonstration

LNCS 4254 - Prova: Rule-Based Java Scripting for Distributed Web ...

Chapter 2 QUERYING SEMANTIC WEB CONTENTS

http://www.mail-archive.com/user@mule.codehaus.org/msg00802.html

http://www.pathf.com/blogs/2006/06/prova_son_of_ma/

Wanderings of the Mind: Full Opportunistic Backward Chaining ...

2010-08-01

HTTP header Last-Modified in Sourceforge's Subversion depot

I'm surprised that ViewVC / Subversion HTTP URL's from SourceForge have to header field "Last-Modified" :

http://deductions.svn.sourceforge.net/viewvc/deductions/n3_new/gui_generic.n3

conn.getHeaderFields()

 (java.util.Collections$UnmodifiableMap<K,V>) {
null=[HTTP/1.1 200 OK], ETag=["299"], 
 Date=[Sun, 01 Aug 2010 18:18:58 GMT], 
 Transfer-Encoding=[chunked], Vary=[Accept-Encoding, User-Agent], Expires=[Sun, 01 Aug 2010 18:28:58 GMT], 
 Content-Type=[text/plain; charset=UTF-8], Connection=[keep-alive], Server=[nginx/0.7.63], 
 Cache-Control=[max-age=600]}
Evaluation failed. Reason(s):
com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred invoking method..getLastModified()

I used the regular Subversion URL's instead of ViewVC; the regular Subversion server sends the HTTP header Last-Modified.

2010-07-31

Test of eulergui_refactoring

After updating Euler to 2010-08-13 :

Failed tests: 
  testLocalImportSwrlWithDrools(eulergui.gui.TestImportSwrl)
  testRemoteImportSwrlWithDrools(eulergui.gui.TestImportSwrl)
  testLocalImportSwrlWithEuler(eulergui.gui.TestImportSwrl)
  testRemoteImportSwrlWithEuler(eulergui.gui.TestImportSwrl)

Tests in error: 
  testXMLOutputFromRDF(eulergui.gui.TestEulerGUIOutputs)
  testXMLOutputFromN3(eulergui.gui.TestEulerGUIOutputs)
  testRunDrools(eulergui.drools_engine.RETETest)
  testParserLink(eulergui.drools_engine.RETETest)

In fact , TestImportSwrl runs fine within eclipse. This was because the Euler jar was 2010-04-25 in my project.

COMMITED: revision 1768:

eulergui_refactoring branch : upgrade Euler to 2010-08-13

(and copy TestImportSwrl.java from trunk, as the format of rules translated from SWRL by EYE has changed )

COMMITED: revision 1769:

eulergui_refactoring branch : TestN3JavaMapping was failing

an assertEquals is commented out in TestN3JavaMapping, as in the trunk .

CAUTION: these reports by Maven were wrong, the test in error was another test !!!!

2010-07-30

Just by curiosity, has someone tried to compile and run Drools with gcj , the java to native code compiler ?

This may allow to call Drools from C applications.

2010-07-29

http://datao.net/

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

Drools question

I have a variable $V assigned to a List in the LSH . This works :

$V : java.util.List( this contains "my string" ) from accumulate( ... )

Instead if I do it in another element it does not work :

$V : java.util.List() from accumulate( ... )
java.util.List( this == $V, this contains "my string" ) 

Bug or feature ?

2010-07-28

Drools question

I have a variable $V assigned to a List in the LSH . How can I say eval ( $V.contains( "my string") ) without using eval() ?

<etirelli> jmv:

$V : java.util.List( this contains "my string" ) from accumulate( ... )

Instead if I do it in another element it does not work :

$V : java.util.List() from accumulate( ... )
java.util.List( this == $V, this contains "my string" ) 

2010-07-27

Rifle RIF tool

cd rifle  
hg pull  
hg update --verbose
cd trunk/apps/rifle-psparser
mvn package
[INFO] Building jar:
 ...
/home/jmv/src/rifle/trunk/apps/rifle-psparser/target/psparser-1.0-SNAPSHOT.jar
cd ../rifle-dtb
mvn test
Failed tests: 
  testEvaluate(org.fundacionctic.rifle.dtb.impl.divide_yearMonthDuration_fpTest)

cd ../rifle-validator
mvn test

Articles on user interface generation

http://portal.acm.org/citation.cfm?id=291108

Towards a general computational framework for model-based interface development systems

Full text Pdf (2.18 MB)

SourceInternational Conference on Intelligent User Interfaces archive

Proceedings of the 4th international conference on Intelligent user interfaces table of contents

Los Angeles, California, United States

Pages: 171 - 178

Year of Publication: 1998

ISBN:1-58113-098-8

Authors

Angel Puerta Stanford University, 251 Campus Drive - MSOB x215, Stanford, CA

Jacob Eisenstein Stanford University, 251 Campus Drive - MSOB x215, Stanford, CA

2010-07-26

http://community.jboss.org/wiki/DroolsLanguageEnhancements

My introduction on the Drools IRC:

I'm Jean-Marc Vanel from Versailles France, and I'm using the Drools API in my Semantic Web application, EulerGUI, where I generate Drools code from other rule langages.

EulerGUI architecture TODO

N3 rules for form generation with Drools insertLogical

Pave the way for using Drools' insertLogical() feature in the GUI by default

- switch in class RunDroolsAction

- not activated yet because of tests and examples of form generation not updated

added an update of swing-rules3.n3p for use with Drools' insertLogical() feature (activable in EulerGUI in class RunDroolsAction).

https://deductions.svn.sourceforge.net/svnroot/deductions/n3_logical

conan, Good news!

After good advice from Edson, my form generator works fine with insertLogical() in most places.

It actually simplifies the Drools code generation.

But there is still a problem with the GUI callback.

It seems that 3 things play baldly together:

With these ingredients I get an infinite loop. The object that has been logically inserted is updated to the same (equal) value, but it triggers the rule anyway.

...

sure, but my point is that The object that has been logically inserted is updated to the same (equal) value; that should not triggers the rule, because of AssertBehaviour.EQUALITY option.

jmv> conan, adding no-loop to the relevant places only (that is, the rules with update or retract, works ! :)

2010-07-25

Test of eulergui_refactoring

Note that I wanted to use -DforkMode=pertest because I had OutOfMemory : PermGen space on Linux 64 bit , but not on Windows.

http://maven.apache.org/plugins/maven-surefire-plugin/examples/forking.html

Running one process per test solves some problems:

DISPLAY=:1 LANG=en mvn -DargLine="-DPARSER4J_TESTS=no" \
  -DforkMode=pertest test

Running eulergui.gui.TestImportSwrl
Tests run: 5, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 21.866 sec <<< FAILURE!
 ...
Running eulergui.drools_engine.TestN3JavaMapping
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.492 sec <<< FAILURE!

This is a new error :

Test set: eulergui.drools_engine.TestN3JavaMapping
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.723 sec <<<