Module aya.base

Record Class RuleReducer.Con

java.lang.Object
java.lang.Record
org.aya.core.term.RuleReducer.Con
All Implemented Interfaces:
Callable, Callable.Common, Callable.Tele, ConCallLike, RuleReducer, Term, AyaDocile, org.aya.guest0x0.cubical.Restr.TermLike<Term>
Enclosing interface:
RuleReducer

public static record RuleReducer.Con(Shaped.Applicable<Term,CtorDef,TeleDecl.DataCtor> rule, int ulift, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs) extends Record implements RuleReducer, ConCallLike
A special ConCall which can be reduced to something interesting.
  • Constructor Details

    • Con

      public Con(@NotNull Shaped.Applicable<Term,CtorDef,TeleDecl.DataCtor> rule, int ulift, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs)
      Creates an instance of a Con record class.
      Parameters:
      rule - the value for the rule record component
      ulift - the value for the ulift record component
      dataArgs - the value for the dataArgs record component
      conArgs - the value for the conArgs record component
  • Method Details

    • head

      @NotNull public ConCallLike.Head head()
      Specified by:
      head in interface ConCallLike
    • update

      @NotNull public RuleReducer.Con update(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs)
    • descent

      @NotNull public @NotNull Term descent(@NotNull @NotNull UnaryOperator<Term> f, @NotNull @NotNull UnaryOperator<Pat> g)
      Description copied from interface: Term
      Descending an operation to the term AST. NOTE: Currently we require the operation `f` to preserve:
      invalid @link
      StructCall
      , DataCall, SortTerm, Shaped.Applicable.
      Specified by:
      descent in interface Term
    • 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 '=='.
      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.
    • rule

      Returns the value of the rule record component.
      Specified by:
      rule in interface RuleReducer
      Returns:
      the value of the rule record component
    • ulift

      public int ulift()
      Returns the value of the ulift record component.
      Specified by:
      ulift in interface Callable.Common
      Specified by:
      ulift in interface Callable.Tele
      Specified by:
      ulift in interface ConCallLike
      Returns:
      the value of the ulift record component
    • dataArgs

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs()
      Returns the value of the dataArgs record component.
      Returns:
      the value of the dataArgs record component
    • conArgs

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs()
      Returns the value of the conArgs record component.
      Specified by:
      conArgs in interface ConCallLike
      Returns:
      the value of the conArgs record component