Skip to content

Analysis of ConExp's Source Code

Eugen Kiss edited this page May 22, 2013 · 2 revisions

The following is an analysis of ConExp's source code. Since we aim to reproduce the functionality of ConExp without rewriting everything from scratch by drawing on ConExp's source code, this analysis will serve as an essential survival guide to the undocumented and seemingly incomprehensible jungle of ConExp's packages, classes & interfaces.

Setting up the environment: If you want to take a walk through the jungle yourself do what follows. Checkout ConExp's source code with the command svn checkout http://subversion.assembla.com/svn/pcj/conexp. Import this folder into eclipse. In order to run ConExp right click on the imported "conexp" project, select "Run As -> Run Configurations". Create a new run configuration unter "Java Application" and set the Main class to conexp.frontend.ConceptExplorer. Right-click build.xml and select "Run As -> Ant Build" to create an executable jar. Click "Project -> Generate JavaDoc" to create browsable JavaDoc from the source code.


Notes

In general, the code contains a lot of tests which are always located one level under the package that they are testing. These tests use a lot of libraries in libs/testing.

Libraries in libs/distr:

  • commons-collections.jar: These are additional collection classes that are afaik not as relevant today for modern java versions. If possible we should only use the collections that come with the JDK.
  • contingencytable.jar: This library contains almost nothing. It should be possible to replace it with source code.
  • cream.jar: Can be found on http://bach.istc.kobe-u.ac.jp/cream/: "Cream is a class library helping Java programmers to develop intelligent programs requiring constraint satisfaction or optimization on finite domains". I don't really know what this means but nothing speak against continuing to use this library (maybe a newer version, though).
  • crimson.jar: A library for parsing XML that is retired as of 2010. Apparently (http://stackoverflow.com/a/5059411/283607) the JDK itself allows parsing of XML files so this library can be dismissed.
  • gsbase-2.0.1.jar: Some utility classes (http://gsbase.sourceforge.net/)? Can be dismissed if ConExp uses e.g. only the test stuff. If not this library sits in the central maven repository so it won't be problem to add it as a dependency.
  • jdom.jar: Again an XML library. Should not be necessary for us.
  • trace.jar: "visibleworkings"? Seems to be a library for displaying better stack traces? Definitely not needed.
  • util.jar: As far as I can understand this is the creator's personal utility library? I suppose only a small fraction is used in ConExp. In any case the source code should be reverse-engineerable if needed and could be put under a util package.

The code is divided into the following high-level sections:

  • canvas: Apparently contains abstractions for drawing figures. These abstractions could in general be mapped to Batik.
  • cefacade: Apparently contains code for context reduction?

ConExp-NG

Clone this wiki locally