Module aya.base
Package org.aya.terck

Record Class CallResolver

java.lang.Object
java.lang.Record
org.aya.terck.CallResolver
Record Components:
targets - only search calls to those definitions
All Implemented Interfaces:
Consumer<org.aya.syntax.core.term.Term.Matching>, Stateful

public record CallResolver(@NotNull TyckState state, @NotNull org.aya.syntax.core.def.FnDef caller, @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets, @NotNull kala.value.MutableValue<org.aya.syntax.core.term.Term.Matching> currentClause, @NotNull org.aya.util.terck.CallGraph<org.aya.syntax.core.term.call.Callable.Tele,org.aya.syntax.core.def.TyckDef> graph) extends Record implements Stateful, Consumer<org.aya.syntax.core.term.Term.Matching>
Resolve calls and build call graph of recursive functions, after StmtTycker.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CallResolver(@NotNull TyckState state, @NotNull org.aya.syntax.core.def.FnDef caller, @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets, @NotNull kala.value.MutableValue<org.aya.syntax.core.term.Term.Matching> currentClause, @NotNull org.aya.util.terck.CallGraph<org.aya.syntax.core.term.call.Callable.Tele,org.aya.syntax.core.def.TyckDef> graph)
    Creates an instance of a CallResolver record class.
    CallResolver(@NotNull TyckState state, @NotNull org.aya.syntax.core.def.FnDef fn, @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets, @NotNull org.aya.util.terck.CallGraph<org.aya.syntax.core.term.call.Callable.Tele,org.aya.syntax.core.def.TyckDef> graph)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(org.aya.syntax.core.term.Term.Matching matching)
     
    @NotNull org.aya.syntax.core.def.FnDef
    Returns the value of the caller record component.
    void
     
    @NotNull kala.value.MutableValue<org.aya.syntax.core.term.Term.Matching>
    Returns the value of the currentClause record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull org.aya.util.terck.CallGraph<org.aya.syntax.core.term.call.Callable.Tele,org.aya.syntax.core.def.TyckDef>
    Returns the value of the graph record component.
    final int
    Returns a hash code value for this object.
    @NotNull TyckState
    Returns the value of the state record component.
    @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef>
    Returns the value of the targets record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.function.Consumer

    andThen

    Methods inherited from interface org.aya.tyck.tycker.Stateful

    freezeHoles, solve, whnf
  • Constructor Details

    • CallResolver

      public CallResolver(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.syntax.core.def.FnDef caller, @NotNull @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets, @NotNull @NotNull kala.value.MutableValue<org.aya.syntax.core.term.Term.Matching> currentClause, @NotNull @NotNull org.aya.util.terck.CallGraph<org.aya.syntax.core.term.call.Callable.Tele,org.aya.syntax.core.def.TyckDef> graph)
      Creates an instance of a CallResolver record class.
      Parameters:
      state - the value for the state record component
      caller - the value for the caller record component
      targets - the value for the targets record component
      currentClause - the value for the currentClause record component
      graph - the value for the graph record component
    • CallResolver

      public CallResolver(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.syntax.core.def.FnDef fn, @NotNull @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets, @NotNull @NotNull org.aya.util.terck.CallGraph<org.aya.syntax.core.term.call.Callable.Tele,org.aya.syntax.core.def.TyckDef> graph)
  • Method Details

    • check

      public void check()
    • accept

      public void accept(@NotNull org.aya.syntax.core.term.Term.Matching matching)
      Specified by:
      accept in interface Consumer<org.aya.syntax.core.term.Term.Matching>
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • state

      @NotNull public @NotNull TyckState state()
      Returns the value of the state record component.
      Specified by:
      state in interface Stateful
      Returns:
      the value of the state record component
    • caller

      @NotNull public @NotNull org.aya.syntax.core.def.FnDef caller()
      Returns the value of the caller record component.
      Returns:
      the value of the caller record component
    • targets

      @NotNull public @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets()
      Returns the value of the targets record component.
      Returns:
      the value of the targets record component
    • currentClause

      @NotNull public @NotNull kala.value.MutableValue<org.aya.syntax.core.term.Term.Matching> currentClause()
      Returns the value of the currentClause record component.
      Returns:
      the value of the currentClause record component
    • graph

      @NotNull public @NotNull org.aya.util.terck.CallGraph<org.aya.syntax.core.term.call.Callable.Tele,org.aya.syntax.core.def.TyckDef> graph()
      Returns the value of the graph record component.
      Returns:
      the value of the graph record component