Record Class ScmFixpoint

java.lang.Object
java.lang.Record
org.impulsegraph.compiler.ast.ScmFixpoint
All Implemented Interfaces:
ImpScmNode

public record ScmFixpoint(String relationName, int relationId, ScmWalk.Direction direction, int maxIterations, List<ImpScmNode> bodySteps) extends Record implements ImpScmNode
Fixed-point transitive closure / Kleene star walk step (opcode 0x88 OP_FIXPOINT_KLEENE_STAR or delta-BFS loop).
  • Constructor Details

    • ScmFixpoint

      public ScmFixpoint(String relationName, int relationId, ScmWalk.Direction direction, int maxIterations, List<ImpScmNode> bodySteps)
      Creates an instance of a ScmFixpoint record class.
      Parameters:
      relationName - the value for the relationName record component
      relationId - the value for the relationId record component
      direction - the value for the direction record component
      maxIterations - the value for the maxIterations record component
      bodySteps - the value for the bodySteps record component
    • ScmFixpoint

      public ScmFixpoint(ScmProgram body)
  • Method Details

    • body

      public ScmProgram body()
    • ofRelation

      public static ScmFixpoint ofRelation(String relationName, ScmWalk.Direction direction, int maxIterations)
    • withRelationId

      public ScmFixpoint withRelationId(int id)
    • toScmString

      public String toScmString()
      Specified by:
      toScmString in interface ImpScmNode
    • accept

      public <R> R accept(ImpScmVisitor<R> visitor)
      Specified by:
      accept in interface ImpScmNode
    • 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.
    • relationName

      public String relationName()
      Returns the value of the relationName record component.
      Returns:
      the value of the relationName record component
    • relationId

      public int relationId()
      Returns the value of the relationId record component.
      Returns:
      the value of the relationId record component
    • direction

      public ScmWalk.Direction direction()
      Returns the value of the direction record component.
      Returns:
      the value of the direction record component
    • maxIterations

      public int maxIterations()
      Returns the value of the maxIterations record component.
      Returns:
      the value of the maxIterations record component
    • bodySteps

      public List<ImpScmNode> bodySteps()
      Returns the value of the bodySteps record component.
      Returns:
      the value of the bodySteps record component