Record Class AlgebraicSignature
java.lang.Object
java.lang.Record
org.impulsegraph.compiler.ast.algebra.AlgebraicSignature
public record AlgebraicSignature(AlgebraicSignature.IntervalBound interval, AlgebraicSignature.MorphismClass morphism, int algebraFlags, AttributeStatistics.Monotonicity monotonicity, int homomorphismFlags, boolean isPure, boolean isConstantKnown, boolean constantBoolVal, long constantIntVal, double constantFloatVal)
extends Record
Universal Algebraic Signature attached to AST nodes during type and property
inference. Encapsulates interval bounds, morphism classifications, monoidal
and lattice axioms.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionAlgebraicSignature(AlgebraicSignature.IntervalBound interval, AlgebraicSignature.MorphismClass morphism, int algebraFlags, AttributeStatistics.Monotonicity monotonicity, int homomorphismFlags, boolean isPure, boolean isConstantKnown, boolean constantBoolVal, long constantIntVal, double constantFloatVal) Creates an instance of aAlgebraicSignaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thealgebraFlagsrecord component.booleanbooleanbooleanReturns the value of theconstantBoolValrecord component.doubleReturns the value of theconstantFloatValrecord component.longReturns the value of theconstantIntValrecord component.static AlgebraicSignaturefinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thehomomorphismFlagsrecord component.interval()Returns the value of theintervalrecord component.booleanbooleanbooleanReturns the value of theisConstantKnownrecord component.booleanbooleanisPure()Returns the value of theisPurerecord component.Returns the value of themonotonicityrecord component.morphism()Returns the value of themorphismrecord component.static AlgebraicSignatureofConstantBool(boolean val) static AlgebraicSignatureofConstantFloat(double val) static AlgebraicSignatureofConstantInt(long val) static AlgebraicSignatureofMorphism(RelationStatistics.Multiplicity multiplicity) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ALG_NONE
public static final int ALG_NONE- See Also:
-
ALG_SEMIGROUP
public static final int ALG_SEMIGROUP- See Also:
-
ALG_MONOID
public static final int ALG_MONOID- See Also:
-
ALG_COMMUTATIVE
public static final int ALG_COMMUTATIVE- See Also:
-
ALG_IDEMPOTENT
public static final int ALG_IDEMPOTENT- See Also:
-
ALG_DISTRIBUTIVE
public static final int ALG_DISTRIBUTIVE- See Also:
-
ALG_ABSORBING
public static final int ALG_ABSORBING- See Also:
-
HOMO_NONE
public static final int HOMO_NONE- See Also:
-
HOMO_COMMUTES_WITH_MAX
public static final int HOMO_COMMUTES_WITH_MAX- See Also:
-
HOMO_COMMUTES_WITH_MIN
public static final int HOMO_COMMUTES_WITH_MIN- See Also:
-
HOMO_COMMUTES_WITH_SUM
public static final int HOMO_COMMUTES_WITH_SUM- See Also:
-
HOMO_DISTRIBUTES_OR
public static final int HOMO_DISTRIBUTES_OR- See Also:
-
HOMO_DISTRIBUTES_AND
public static final int HOMO_DISTRIBUTES_AND- See Also:
-
-
Constructor Details
-
AlgebraicSignature
public AlgebraicSignature(AlgebraicSignature.IntervalBound interval, AlgebraicSignature.MorphismClass morphism, int algebraFlags, AttributeStatistics.Monotonicity monotonicity, int homomorphismFlags, boolean isPure, boolean isConstantKnown, boolean constantBoolVal, long constantIntVal, double constantFloatVal) Creates an instance of aAlgebraicSignaturerecord class.- Parameters:
interval- the value for theintervalrecord componentmorphism- the value for themorphismrecord componentalgebraFlags- the value for thealgebraFlagsrecord componentmonotonicity- the value for themonotonicityrecord componenthomomorphismFlags- the value for thehomomorphismFlagsrecord componentisPure- the value for theisPurerecord componentisConstantKnown- the value for theisConstantKnownrecord componentconstantBoolVal- the value for theconstantBoolValrecord componentconstantIntVal- the value for theconstantIntValrecord componentconstantFloatVal- the value for theconstantFloatValrecord component
-
-
Method Details
-
defaultGeneral
-
ofConstantBool
-
ofConstantInt
-
ofConstantFloat
-
ofMorphism
-
isIdempotent
public boolean isIdempotent() -
isCommutative
public boolean isCommutative() -
isAssociative
public boolean isAssociative() -
commutesWithMax
public boolean commutesWithMax() -
commutesWithMin
public boolean commutesWithMin() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
interval
Returns the value of theintervalrecord component.- Returns:
- the value of the
intervalrecord component
-
morphism
Returns the value of themorphismrecord component.- Returns:
- the value of the
morphismrecord component
-
algebraFlags
public int algebraFlags()Returns the value of thealgebraFlagsrecord component.- Returns:
- the value of the
algebraFlagsrecord component
-
monotonicity
Returns the value of themonotonicityrecord component.- Returns:
- the value of the
monotonicityrecord component
-
homomorphismFlags
public int homomorphismFlags()Returns the value of thehomomorphismFlagsrecord component.- Returns:
- the value of the
homomorphismFlagsrecord component
-
isPure
public boolean isPure()Returns the value of theisPurerecord component.- Returns:
- the value of the
isPurerecord component
-
isConstantKnown
public boolean isConstantKnown()Returns the value of theisConstantKnownrecord component.- Returns:
- the value of the
isConstantKnownrecord component
-
constantBoolVal
public boolean constantBoolVal()Returns the value of theconstantBoolValrecord component.- Returns:
- the value of the
constantBoolValrecord component
-
constantIntVal
public long constantIntVal()Returns the value of theconstantIntValrecord component.- Returns:
- the value of the
constantIntValrecord component
-
constantFloatVal
public double constantFloatVal()Returns the value of theconstantFloatValrecord component.- Returns:
- the value of the
constantFloatValrecord component
-