mistupv / JavaSlicer

A program slicer for Java, based on the system dependence graph (SDG).
https://mist.dsic.upv.es/JavaSlicer/demo/
GNU Affero General Public License v3.0
54 stars 18 forks source link

Switch to a better graph library #14

Closed jacosro closed 4 years ago

jacosro commented 4 years ago

The library currently used for building graphs (graphlib) is deprecated. We should switch to a better and updated library like JGraphT, which would give us the following improvements:

However, this implies a big refactoring of the whole project, removing completely all graphlib stuff and replacing it for the new library, which is a big time-consuming task. We should consider if it 's worth it.

@cargaji

cargaji commented 4 years ago
  • No bugs, as it's maintained

The bugs are known and patched. Switching to a new library means finding new bugs. If we switch, we have to be extra careful with the implementation of hashcode and equals.

  • Optimized and better designed

The optimizations sound useful, specially if we used the default implementations.

  • Provides graph visualization and interoperability with DOT

Our implementation for dot is more extensible, specially considering different kinds of edges with special styles, which is a bit less straightforward in JGraphT.

The refactoring time may not be that high, specially if we adapt the graph classes (graphs, nodes and nodes) to the new library, without changing their public API, and then migrate their API with an IDE. However, I think there are some design decisions that we'd need to discuss.

jacosro commented 4 years ago

Current state:

Bugs detected: