Interface PConstraint
-
- All Superinterfaces:
PTraceable
- All Known Subinterfaces:
ITypeConstraint,ITypeInfoProviderConstraint
- All Known Implementing Classes:
AbstractTransitiveClosure,AggregatorConstraint,BasePConstraint,BaseTypeSafeConstraint,BinaryReflexiveTransitiveClosure,BinaryTransitiveClosure,ConstantValue,DeferredPConstraint,EnumerablePConstraint,Equality,ExportedParameter,ExpressionEvaluation,Inequality,KeyedEnumerablePConstraint,NegativePatternCall,PatternCallBasedDeferred,PatternMatchCounter,PositivePatternCall,RelationEvaluation,TypeConstraint,TypeFilterConstraint,VariableDeferredPConstraint
public interface PConstraint extends PTraceable
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<PConstraint>COMPARE_BY_MONOTONOUS_IDA comparator that orders constraints by theirmonotonous identifiers.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckSanity()voiddelete()java.util.Set<PVariable>getAffectedVariables()All variables affected by this constraint.PBodygetBody()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.intgetMonotonousID()Returns an integer ID that is guaranteed to increase strictly monotonously for constraints within a pBody.voidreplaceVariable(PVariable obsolete, PVariable replacement)
-
-
-
Field Detail
-
COMPARE_BY_MONOTONOUS_ID
static final java.util.Comparator<PConstraint> COMPARE_BY_MONOTONOUS_ID
A comparator that orders constraints by theirmonotonous identifiers. Should only used for tiebreaking in other comparators.- Since:
- 2.0
-
-
Method Detail
-
getBody
PBody getBody()
- Returns:
- the query body this constraint belongs to
- Since:
- 2.1
-
getAffectedVariables
java.util.Set<PVariable> getAffectedVariables()
All variables affected by this constraint.
-
getDeducedVariables
java.util.Set<PVariable> getDeducedVariables()
The set of variables whose potential values can be enumerated (once all non-deduced variables have known values).
-
getFunctionalDependencies
java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context)
A (preferably minimal) cover of known functional dependencies between variables.- Returns:
- non-trivial functional dependencies in the form of {variables} --> {variables}, where dependencies with the same lhs are unified.
- No Reference:
- Use
QueryAnalyzerinstead to properly handle dependencies of pattern calls.
-
delete
void delete()
-
checkSanity
void checkSanity()
-
getMonotonousID
int getMonotonousID()
Returns an integer ID that is guaranteed to increase strictly monotonously for constraints within a pBody.
-
-