Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VIATRA/Releases/MigrationTo1.6"

(Created page with " === 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 transitiv...")
 
Line 1: Line 1:
 +
=== Recommended new indexing option for handling dangling edges ===
 +
As said in the relevant [https://wiki.eclipse.org/VIATRA/Releases/NewAndNoteworthy1.6#Model_Query_Evaluation 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.
 +
 +
<source lang="java">
 +
BaseIndexOptions options = new BaseIndexOptions().withDanglingFreeAssumption(false);
 +
ResourceSet rSet = new ResourceSetImpl();
 +
EMFScope scope = new EMFScope(rSet, options);
 +
ViatraQueryEngine engine = ViatraQueryEngine.on(scope);
 +
</source>
  
 
=== API break in Transitive Closure Library ===
 
=== API break in Transitive Closure Library ===

Revision as of 07:49, 12 June 2017

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.

Not affected:

  • 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.

Back to the top