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.

The missing thing was to link to the folder where libjpl.so is located. I had to do this in the blipkit.product file, in the vmArgs tag, with the -Djava.library.path=/usr/local/lib/pl-5.7.15/lib/i686-linux

We will (later) need to figure out a good way to package the os/architecture specific (native) libraries so that the correct version is run on each operating system.

One option that someone mentioned (link in separate blog post) is to include the .so file (and the other files, specific for each platform) in the plug-in root folder, and then using the Eclipse-PlatformFilter header in the Manifest to specify a rule for platforms. It seems this rule only specifies which platform is required by the current project's Manifest file, so it seems one needs to create separate fragments for each platform (they are kind of semi-projects, with their own Manifest.MF file). Ola has done that for the Balloon plugin (which is running native c/c++ code), though he doesn't seem to have used the Eclipse-PlatformFilter header, but some other method, to determine which fragment to run. Gotta ask him for hints.

My ideas of next steps (with loose sorting):

  • Figure out how to rename the folder from net.bioclipse.blipkit to bioclipse.blipkit without changing the plugins path.
  • Figure out how to get a blip environment, not just barebones swi-prolog.
    • Maybe replicate the blip startup script with java code?
    • EDIT: One possible first step is to add the prolog code to ~/.plrc, because this file is read even when starting prolog from the jpl api. The only thing that has still to be solved then is the flags that are passed to the Prolog binary on startup.
  • Test more Java/Prolog examples.
  • Figure out how to store data/facts permanently (EDIT: Gotta read this blog post)
  • Figure out how to best work with BLIPKIT. (Scripting/Editor et.c.)
  • Check what methods are already available in the RDF Bioclipse plugin.
    • Especially methods for reading RDF from the web etc.
  • Identify overlapping/unique functionality
    • How is it for example with all the transformatiion scripts available? But they are written in Perl, right? Would it be nice to integrate some of that too (not in this project then I guess)?

Later, if time admits:

  • Read up on Eclipse fragments
  • Make the plugin work on multiple platforms

Comments

Planet Bioclipse

Please tag this one to show up on Planet Bioclipse.

Ok fixed (Have felt unsure

Ok fixed (Have felt unsure about what posts should go in there and which do not, but I guess I'll learn with time :) )