Class MappingTraceCollector
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.MappingTraceCollector
-
- All Implemented Interfaces:
IPTraceableTraceProvider,IRewriterTraceCollector
public class MappingTraceCollector extends java.lang.Object implements IRewriterTraceCollector
Multimap-based implementation to contain and query traces- Since:
- 1.6
-
-
Constructor Summary
Constructors Constructor Description MappingTraceCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTrace(PTraceable original, PTraceable derivative)Mark the given derivative to be originated from the given original constraint.voidderivativeRemoved(PTraceable derivative, IDerivativeModificationReason reason)Indicate that the given derivative is removed from the resulting query, thus its trace information should be removed also.java.util.stream.Stream<PTraceable>getCanonicalTraceables(PTraceable derivative)Find and return the canonicalPTraceables in the original query which are the sources of the given derivativePTraceableaccording to the transformation.java.util.stream.Stream<IDerivativeModificationReason>getRemovalReasons(PTraceable traceable)Returns the reasons for which the traceable element has been removed by the rewriters.java.util.stream.Stream<PTraceable>getRewrittenTraceables(PTraceable source)Find and return thePTraceables in the rewritten query which are the destinations of the given sourcePTraceableaccording to the transformation.booleanisRemoved(PTraceable traceable)Returns whether the given traceable element has been removed by every rewriter for a reason.
-
-
-
Method Detail
-
getCanonicalTraceables
public java.util.stream.Stream<PTraceable> getCanonicalTraceables(PTraceable derivative)
Description copied from interface:IPTraceableTraceProviderFind and return the canonicalPTraceables in the original query which are the sources of the given derivativePTraceableaccording to the transformation.- Specified by:
getCanonicalTraceablesin interfaceIPTraceableTraceProvider- Parameters:
derivative- aPTraceablewhich is contained by thePQueryproduced by the associated rewriter- Since:
- 2.0
-
getRewrittenTraceables
public java.util.stream.Stream<PTraceable> getRewrittenTraceables(PTraceable source)
Description copied from interface:IPTraceableTraceProviderFind and return thePTraceables in the rewritten query which are the destinations of the given sourcePTraceableaccording to the transformation.- Specified by:
getRewrittenTraceablesin interfaceIPTraceableTraceProvider- Parameters:
source- aPTraceablewhich is contained by aPQuerybefore rewriting- Since:
- 2.0
-
addTrace
public void addTrace(PTraceable original, PTraceable derivative)
Description copied from interface:IRewriterTraceCollectorMark the given derivative to be originated from the given original constraint.- Specified by:
addTracein interfaceIRewriterTraceCollector
-
derivativeRemoved
public void derivativeRemoved(PTraceable derivative, IDerivativeModificationReason reason)
Description copied from interface:IRewriterTraceCollectorIndicate that the given derivative is removed from the resulting query, thus its trace information should be removed also.- Specified by:
derivativeRemovedin interfaceIRewriterTraceCollector
-
isRemoved
public boolean isRemoved(PTraceable traceable)
Description copied from interface:IPTraceableTraceProviderReturns whether the given traceable element has been removed by every rewriter for a reason.- Specified by:
isRemovedin interfaceIPTraceableTraceProvider
-
getRemovalReasons
public java.util.stream.Stream<IDerivativeModificationReason> getRemovalReasons(PTraceable traceable)
Description copied from interface:IPTraceableTraceProviderReturns the reasons for which the traceable element has been removed by the rewriters.- Specified by:
getRemovalReasonsin interfaceIPTraceableTraceProvider- Returns:
- the reasons of removal during rewriting
- Since:
- 2.0
-
-