java.lang.Object
java.lang.Record
org.aya.terck.CallResolver
- Record Components:
targets- only search calls to those definitions
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
ConstructorsConstructorDescriptionCallResolver(@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 aCallResolverrecord 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 TypeMethodDescriptionvoidaccept(org.aya.syntax.core.term.Term.Matching matching) @NotNull org.aya.syntax.core.def.FnDefcaller()Returns the value of thecallerrecord component.voidcheck()@NotNull kala.value.MutableValue<org.aya.syntax.core.term.Term.Matching> Returns the value of thecurrentClauserecord component.final booleanIndicates 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> graph()Returns the value of thegraphrecord component.final inthashCode()Returns a hash code value for this object.@NotNull TyckStatestate()Returns the value of thestaterecord component.@NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets()Returns the value of thetargetsrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aCallResolverrecord class.- Parameters:
state- the value for thestaterecord componentcaller- the value for thecallerrecord componenttargets- the value for thetargetsrecord componentcurrentClause- the value for thecurrentClauserecord componentgraph- the value for thegraphrecord 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) -
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
state
Returns the value of thestaterecord component. -
caller
@NotNull public @NotNull org.aya.syntax.core.def.FnDef caller()Returns the value of thecallerrecord component.- Returns:
- the value of the
callerrecord component
-
targets
@NotNull public @NotNull kala.collection.Set<org.aya.syntax.core.def.TyckDef> targets()Returns the value of thetargetsrecord component.- Returns:
- the value of the
targetsrecord component
-
currentClause
@NotNull public @NotNull kala.value.MutableValue<org.aya.syntax.core.term.Term.Matching> currentClause()Returns the value of thecurrentClauserecord component.- Returns:
- the value of the
currentClauserecord 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 thegraphrecord component.- Returns:
- the value of the
graphrecord component
-