Recommended new indexing option for handling dangling edges
As said in the relevant New and Noteworthy section, we have introduced a new filter option regarding dangling edges (i.e. references pointing to objects outside the scope of the query engine). The old version made the assumptions that there are no such dangling edges whatsoever, and thus did not apply a filter to reject query matches that would involve such a dangling edge. This led to surprising results in some cases. For more predictable results and more straightforward semantics, we now allow the user to turn off this assumption, so that the appropriate checks will be performed (at a slight cost in performance).
For new code, and for any existing users that experienced problems with the unpredictability of dangling edges, we suggest to use the newly introduced option to drop the dangling-free assumption. In a future VIATRA release this will be the new default.
BaseIndexOptions options = new BaseIndexOptions().withDanglingFreeAssumption(false); ResourceSet rSet = new ResourceSetImpl(); EMFScope scope = new EMFScope(rSet, options); ViatraQueryEngine engine = ViatraQueryEngine.on(scope);
API break in Transitive Closure Library
This API breaking change affects users of the org.eclipse.viatra.query.runtime.base.itc Java library for incremental transitive closure computation over custom graph data sources.
- users of the transitive closure language element in vql.
- users of TransitiveClosureHelper providing transitive closure of EMF references.
- users of the graph representation org.eclipse.viatra.query.runtime.base.itc.graphimpl.Graph.
Details: We have changed the way how the multiset of incoming/outgoing graph edges is represented in interfaces org.eclipse.viatra.query.runtime.base.itc.igraph.IGraphDataSource and org.eclipse.viatra.query.runtime.base.itc.igraph.IBiDirectionalGraphDataSource. The old interface used a java.util.List of vertices (parallel edges represented as multiple entries in the list), while the new interface uses java.util.Map with vertices as keys, and positive integers representing the count of parallel edges as values. The graph observer interface is unchanged.
In the Oxygen release train, multiple versions of Guava are available. In order to ensure VIATRA uses a single Guava version, all framework projects now import Guava with package imports, and set the corresponding uses constraints for all packages where Guava packages are exported.
For projects using the VIATRA framework everything should work as before. However, if there are issues with multiple Guava versions colliding, check whether any of your classes have Guava types on its API (e.g. check superclasses, parameter and return types; most common candidates are Predicate and Function instances). If any such case is available, the following steps are required to ensure the single Guava version:
- Replace required bundle declarations of `com.google.guava` with appropriate package imports declarations.
- For each package export declaration that includes Guava classes on its API, add a uses constraints as follows:
For more details about the issue, and uses constraint violations in general, look at http://blog.springsource.com/2008/10/20/understanding-the-osgi-uses-directive/