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.
  • Field Details

  • 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 a AlgebraicSignature record class.
      Parameters:
      interval - the value for the interval record component
      morphism - the value for the morphism record component
      algebraFlags - the value for the algebraFlags record component
      monotonicity - the value for the monotonicity record component
      homomorphismFlags - the value for the homomorphismFlags record component
      isPure - the value for the isPure record component
      isConstantKnown - the value for the isConstantKnown record component
      constantBoolVal - the value for the constantBoolVal record component
      constantIntVal - the value for the constantIntVal record component
      constantFloatVal - the value for the constantFloatVal record component
  • Method Details

    • defaultGeneral

      public static AlgebraicSignature defaultGeneral()
    • ofConstantBool

      public static AlgebraicSignature ofConstantBool(boolean val)
    • ofConstantInt

      public static AlgebraicSignature ofConstantInt(long val)
    • ofConstantFloat

      public static AlgebraicSignature ofConstantFloat(double val)
    • ofMorphism

      public static AlgebraicSignature ofMorphism(RelationStatistics.Multiplicity multiplicity)
    • isIdempotent

      public boolean isIdempotent()
    • isCommutative

      public boolean isCommutative()
    • isAssociative

      public boolean isAssociative()
    • commutesWithMax

      public boolean commutesWithMax()
    • commutesWithMin

      public boolean commutesWithMin()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • interval

      Returns the value of the interval record component.
      Returns:
      the value of the interval record component
    • morphism

      Returns the value of the morphism record component.
      Returns:
      the value of the morphism record component
    • algebraFlags

      public int algebraFlags()
      Returns the value of the algebraFlags record component.
      Returns:
      the value of the algebraFlags record component
    • monotonicity

      public AttributeStatistics.Monotonicity monotonicity()
      Returns the value of the monotonicity record component.
      Returns:
      the value of the monotonicity record component
    • homomorphismFlags

      public int homomorphismFlags()
      Returns the value of the homomorphismFlags record component.
      Returns:
      the value of the homomorphismFlags record component
    • isPure

      public boolean isPure()
      Returns the value of the isPure record component.
      Returns:
      the value of the isPure record component
    • isConstantKnown

      public boolean isConstantKnown()
      Returns the value of the isConstantKnown record component.
      Returns:
      the value of the isConstantKnown record component
    • constantBoolVal

      public boolean constantBoolVal()
      Returns the value of the constantBoolVal record component.
      Returns:
      the value of the constantBoolVal record component
    • constantIntVal

      public long constantIntVal()
      Returns the value of the constantIntVal record component.
      Returns:
      the value of the constantIntVal record component
    • constantFloatVal

      public double constantFloatVal()
      Returns the value of the constantFloatVal record component.
      Returns:
      the value of the constantFloatVal record component