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 int
aggregatedColumn
protected PVariable
resultVariable
-
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 void
doDoReplaceVariables(PVariable obsolete, PVariable replacement)
int
getAggregatedColumn()
BoundAggregator
getAggregator()
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.PVariable
getResultVariable()
protected java.lang.String
toStringRest()
-
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:PConstraint
The set of variables whose potential values can be enumerated (once all non-deduced variables have known values).- Specified by:
getDeducedVariables
in interfacePConstraint
-
getFunctionalDependencies
public java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context)
Description copied from interface:PConstraint
A (preferably minimal) cover of known functional dependencies between variables.- Specified by:
getFunctionalDependencies
in interfacePConstraint
- Overrides:
getFunctionalDependencies
in 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:
doDoReplaceVariables
in classPatternCallBasedDeferred
-
getCandidateQuantifiedVariables
protected java.util.Set<PVariable> getCandidateQuantifiedVariables()
- Specified by:
getCandidateQuantifiedVariables
in classPatternCallBasedDeferred
-
toStringRest
protected java.lang.String toStringRest()
- Specified by:
toStringRest
in classBasePConstraint
-
getResultVariable
public PVariable getResultVariable()
-
getImpliedJudgements
public java.util.Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context)
Description copied from interface:ITypeInfoProviderConstraint
Returns type information implied by this constraint.- Specified by:
getImpliedJudgements
in interfaceITypeInfoProviderConstraint
-
-