Class GeneratorDistinctnessSource
java.lang.Object
com.darkcollective.relix.processor.generator.GeneratorDistinctnessSource
- All Implemented Interfaces:
DistinctnessSource
A
DistinctnessSource backed by a model's sources and the generator registry: a leaf
relation is duplicate-free iff it is a generator source whose
generator declares Generator.duplicateFree() (e.g. Range). Every
other leaf is conservatively not known distinct.
Lets DistinctEliminationPass apply DIST-001 (`δ(R) → R`) over an
inherently-distinct generator — which, for an unbounded one, also dissolves the
δ unbounded-retained-state hazard.
-
Field Summary
Fields inherited from interface com.darkcollective.relix.cost.DistinctnessSource
NONE -
Constructor Summary
ConstructorsConstructorDescriptionGeneratorDistinctnessSource(Map<String, SourceDeclaration> sources, GeneratorRegistry registry) -
Method Summary
-
Constructor Details
-
GeneratorDistinctnessSource
public GeneratorDistinctnessSource(Map<String, SourceDeclaration> sources, GeneratorRegistry registry) - Parameters:
sources- canonical (lower-cased) relation name → source declaration (as inSemanticModel.sources()); must not be nullregistry- the generator registry; must not be null
-
-
Method Details
-
duplicateFreeLeaf
- Specified by:
duplicateFreeLeafin interfaceDistinctnessSource- Parameters:
relationName- the leaf relation name; never null- Returns:
trueif that leaf is inherently duplicate-free
-