SWI-Prolog
Screencast: Experimental Prolog integration in Bioclipse
Wed, 2010-03-03 20:51 | by samlI wanted to test out some screen casting, so I chose to demo the (still experimental) SWI-Prolog integration into Bioclipse, showing how Prolog code (or a "Prolog knowledge base") can conveniently be stored inside Bioclipse's JavaScript environment (in a JS variable), loaded into the prolog engine, and then queried, all from the JS environment, and finally the results can be returned as well to the Javascript environment for further processing or output.
Note that this is still at the experimental stage, so things are a bit rough around the edges!
A usage strategy emerges
A strategy for how to work with the Bioclipse/JPL/Prolog/Blipkit combination I'm setting up, is becoming clear.
The main idea with Bioclipse, as well as with having a prolog engine available in it, is for flexible and "interactive" knitting together of knowledge. One of the main questions regarding how to use a Bioclipse/JPL/Prolog/Blipkit combination, has been where to put the bulk of knowledge integration/reasoning code? There would in principle be three options for that:
- Bioclipse (Javascript environment)
- The Blipkit-Prolog/Bioclipse integration plugin (Java code, a.k.a. "Manager methods")
- The prolog engine (As a prolog file)
Converting RDF predicates to Prolog convenience methods with RegEx
Using SWI-Prolog's semweb package, I had extracted all predicates in a RDF source, containing some 1 million triples, into the following list:
Nice intro to RDF in Prolog (by Pellet author)
Wed, 2009-11-04 11:00 | by samlI found a nice introduction to the use of RDF in Prolog (SWI-Prolog). It contains short primers for both RDF and Prolog, so it should be accessible to anyone with a minimal programming background:
Accessing BLIPKIT from command line Java or Eclipse Plug-in in Ubuntu
For my own documentation I went ahead and summarized all the steps I had to take
- In order to start blipkit from java commandline, and
- In order to start blipkit from an Eclipse plugin.
Got blipkit started from inside Eclipse
I now also managed to start blipkit from inside Eclipse.
The trick was to start the whole eclipse (The eclipse using for building Bioclipse) preceded with LD_PRELOAD=...the path to libjpl.so , and before that adding the paths to where libjava.so and libjvm.so are located.
Finally got blipkit started from java via jpl
Finally got blipkit started from java via jpl :)
- (Thanks to Andrew Koster on the SWIPL mailing list, who made me continue researching the LD_PRELOAD trick!)
In order to get the jpl java examples to work, LD_LIBRARY_PATH has to contain:
/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/lib/i386/client/:/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/jre/lib/i386/Furthermore, CLASSPATH has to be:
/usr/local/lib/pl-5.7.15/lib/jpl.jar:/home/samuel/install/swi-prolog/pl57/packages/jpl/examples/java/TestNow firing up blipkit works, when calling Java from commandline!!!
SWI-Prolog JPL up running inside Bioclipse - Thinking about next steps
So, today I finally got the jpl (Java / Prolog API) up running inside Bioclipse, succeeding with compiling a simple test prolog program (The "test 0" in the "Test" example supplied with SWI-Prolog). Only talking to swi-prolog so far though, not blipkit. Starting blipkit includes loading prolog files etc. as specified in the blipkit startup script, so will have to study that in more detail.
[SOLVED] How to set java.library.path for an Eclipse/Bioclipse plugin?
EDIT: Se solution at the bottom of the page
I'm trying to set the java.library.path system setting for my Bioclipse manager/Eclipse plugin.
Normally, if running java from command line, this variable should be set like so (According to what I've googled up):
java -Djava.library.path=/usr/local/lib/pl-5.7.15/lib/i686-linux/JavaClassNameso I have tried to add the line
-Djava.library.path="/usr/local/lib/pl-5.7.15/lib/i686-linux/"to the arguments in "Run" > "Run configurations" for my plugin's product file, under the "arguments" tab.
[SOLVED] "Could not find library -lXpm" when building The SWI-Prolog XPCE package
Wed, 2009-10-07 20:09 | by samlWhen trying to build swi-prolog packages from source, the xpce package complains:
Recent comments
18 hours 44 min ago
6 days 7 hours ago
6 days 9 hours ago
1 week 2 hours ago
1 week 10 hours ago
1 week 15 hours ago
1 week 22 hours ago
1 week 2 days ago
2 weeks 3 days ago
2 weeks 4 days ago