org.eclipse.viatra.query.runtime.matchers.psystem

## Interface PConstraint

- All Superinterfaces:
    PTraceable
  All Known Subinterfaces:
    ITypeConstraint, ITypeInfoProviderConstraint
  All Known Implementing Classes:
    AggregatorConstraint, BasePConstraint, BaseTypeSafeConstraint, BinaryTransitiveClosure, ConstantValue, DeferredPConstraint, EnumerablePConstraint, Equality, ExportedParameter, ExpressionEvaluation, Inequality, KeyedEnumerablePConstraint, NegativePatternCall, PatternCallBasedDeferred, PatternMatchCounter, PositivePatternCall, TypeConstraint, TypeFilterConstraint, VariableDeferredPConstraint

      public interface PConstraint
      extends PTraceable

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `PConstraint.CompareByMonotonousID` Compares by `getMonotonousID()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkSanity()`
    `void` | `delete()`
    `java.util.Set<PVariable>` | `getAffectedVariables()` All variables affected by this constraint.
    `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.
    `int` | `getMonotonousID()` Returns an integer ID that is guaranteed to increase strictly monotonously for constraints within a pBody.
    `void` | `replaceVariable(PVariable obsolete, PVariable replacement)`

- - ### Method Detail

    - #### 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 `QueryAnalyzer` instead to properly handle dependencies of pattern calls.

    - #### replaceVariable

          void replaceVariable(PVariable obsolete,
                               PVariable replacement)

    - #### delete

          void delete()

    - #### checkSanity

          void checkSanity()
                    throws QueryProcessingException

      Throws:
        `QueryProcessingException`

    - #### getMonotonousID

          int getMonotonousID()

      Returns an integer ID that is guaranteed to increase strictly monotonously for constraints within a pBody.