Class AggregatorConstraint
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.DeferredPConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternCallBasedDeferred
-
- org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint
-
- All Implemented Interfaces:
IMultiQueryReference,IQueryReference,ITypeInfoProviderConstraint,PConstraint,PTraceable
public class AggregatorConstraint extends PatternCallBasedDeferred implements ITypeInfoProviderConstraint
The PSystem representation of an aggregation.- Since:
- 1.4
-
-
Field Summary
Fields Modifier and Type Field Description protected intaggregatedColumnprotected PVariableresultVariable-
Fields inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternCallBasedDeferred
actualParametersTuple, query
-
Fields inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
pBody
-
Fields inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint
COMPARE_BY_MONOTONOUS_ID
-
-
Constructor Summary
Constructors Constructor Description AggregatorConstraint(BoundAggregator aggregator, PBody pBody, Tuple actualParametersTuple, PQuery query, PVariable resultVariable, int aggregatedColumn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDoReplaceVariables(PVariable obsolete, PVariable replacement)intgetAggregatedColumn()BoundAggregatorgetAggregator()protected java.util.Set<PVariable>getCandidateQuantifiedVariables()java.util.Set<PVariable>getDeducedVariables()The set of variables whose potential values can be enumerated (once all non-deduced variables have known values).java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>>getFunctionalDependencies(IQueryMetaContext context)A (preferably minimal) cover of known functional dependencies between variables.java.util.Set<TypeJudgement>getImpliedJudgements(IQueryMetaContext context)Returns type information implied by this constraint.PVariablegetResultVariable()protected java.lang.StringtoStringRest()-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternCallBasedDeferred
checkSanity, doReplaceVariable, getActualParametersTuple, getDeferringVariables, getReferredQuery
-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint
isReadyAt
-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
delete, getAffectedVariables, getBody, getMonotonousID, getPSystem, replaceVariable, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.IQueryReference
getReferredQueries
-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint
checkSanity, delete, getAffectedVariables, getBody, getMonotonousID, replaceVariable
-
-
-
-
Field Detail
-
resultVariable
protected PVariable resultVariable
-
aggregatedColumn
protected int aggregatedColumn
-
-
Constructor Detail
-
AggregatorConstraint
public AggregatorConstraint(BoundAggregator aggregator, PBody pBody, Tuple actualParametersTuple, PQuery query, PVariable resultVariable, int aggregatedColumn)
-
-
Method Detail
-
getAggregatedColumn
public int getAggregatedColumn()
-
getAggregator
public BoundAggregator getAggregator()
-
getDeducedVariables
public java.util.Set<PVariable> getDeducedVariables()
Description copied from interface:PConstraintThe set of variables whose potential values can be enumerated (once all non-deduced variables have known values).- Specified by:
getDeducedVariablesin interfacePConstraint
-
getFunctionalDependencies
public java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context)
Description copied from interface:PConstraintA (preferably minimal) cover of known functional dependencies between variables.- Specified by:
getFunctionalDependenciesin interfacePConstraint- Overrides:
getFunctionalDependenciesin classBasePConstraint- Returns:
- non-trivial functional dependencies in the form of {variables} --> {variables}, where dependencies with the same lhs are unified.
-
doDoReplaceVariables
protected void doDoReplaceVariables(PVariable obsolete, PVariable replacement)
- Specified by:
doDoReplaceVariablesin classPatternCallBasedDeferred
-
getCandidateQuantifiedVariables
protected java.util.Set<PVariable> getCandidateQuantifiedVariables()
- Specified by:
getCandidateQuantifiedVariablesin classPatternCallBasedDeferred
-
toStringRest
protected java.lang.String toStringRest()
- Specified by:
toStringRestin classBasePConstraint
-
getResultVariable
public PVariable getResultVariable()
-
getImpliedJudgements
public java.util.Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context)
Description copied from interface:ITypeInfoProviderConstraintReturns type information implied by this constraint.- Specified by:
getImpliedJudgementsin interfaceITypeInfoProviderConstraint
-
-