Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Application on OS X

I finally manage to run the application on OS X 10.5. I should say it was not easy. First of all I needed macports, the I installed the following packages:

  • boost
  • log4cxx
  • cppunit
  • argp-standalone

The last one was a little bit tricky since argp is part of the is part of the gnu C library, which means that in linux one does not need to do anything for it, just include the header.

Since macports does not install the files in standard folders (like /usr/lib) but in its own "/opt/local/lib" and "opt/local/include" one need to add these directories to the eclipse path. To do that one needs to right click (I'm using a windows mouse) on the project icon in eclipse, select Properties -> C/C++ General -> Paths and Symbols. In the includes tab select GNU C++ and there add the folder "/opt/local/include" then in the library paths tab add the folder "/opt/local/lib" and as I mentioned before, one need to specific add libargp.a to the linker options.

For some reason I still don't understand, I also needed to change the Command line pattern in the linker options. This is the one that worked for me:

${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
And that was pretty much all. I still need to build the link to prolog (I will use eclipse prolog) and GiNaC but I will tell about it when I'm done with that.

The first steps

Finally I was granted a project by my adviser. It finished the last month of not knowing anything that was killing me. Now I am supposed to implement a set of algorithms that perform abduction using neural networks (therefore the logo of this site). I'm pretty sure I can succeed with at least two of the methods I have to implement, however I never understood the third paper and I am a little bit scared about it, however, I would have plenty of time before I reach that stage.

In respect to the tools I'm going to use, I decided to use C++ as the default programming language, why? because I want to become "fluent" in that language, I may like it less than Java, but definitely the jobs that use C++ tend to be much more interesting than those which use java. I will make a strong use of the Boost libraries. Specially I will replace all pointer variables to shared_ptr in order to have some garbage collection and not thinking about memory management. Not to mention that the Boost library has become the defacto standard, along with the stl, in C++ libraries. I will use cppunit in order to provide test cases since I had experience from junit and the change is really easy. My previous experience with java is also the reason why I choose log4cxx as the logging tool, but I know this is also the standard tool in C++. The development will be done in ubuntu linux (intrepid) with eclipse using the cdt plugin. Finally, version control (and backup) will be done using svn and trac for ticketing system. The last two have become my personal work environment for everything I do.

Now about the project per se. I decided to call the engine umbra. Umbra is divided in three subsystems:

Wyld
This is the engine that manages the input of the engine. Its function is to parse a file, which I haven't completely specified but which looks pretty much like a strip down, propositional only version of prolog. Anyway, I sill need to figure out how to manage the abductibles and observations sets. After parsing the file, it creates a representation of a clause that can be use for the rest of the engine. It should also have the possibility to parse files in other languages (like xml).
Weaver
The weaver is probably the mos complete and complicate subsystem of the engine. Its task is to transform the elements generated by the wyld and create the network representation of the logic program using each of the algorithms implemented. Of course scalability is a must.
Wyrm
This subsystem controls the output of the engine. Initially it outputs the files in tikz format so the networks can be painted after a run of the pdflatex command. The direct pdf option is not encourage since the images need to be easily included in LaTeX documents. Again, scalability is a must.

The coding of the project already started with Wyld being the first module to be implemented. The program representation is almost finished and Wyld should be done in no more than 3 days. The next module will be Wyrm and the last would be Weaver.