java.lang.Object
java.lang.Record
org.aya.terck.CallResolver
- Record Components:
targets- only search calls to those definitions
- All Implemented Interfaces:
Function<Term,,Term> UnaryOperator<Term>,DefVisitor,EndoTerm
public record CallResolver(PrimDef.Factory factory, @NotNull FnDef caller, @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull kala.value.MutableValue<Term.Matching> currentMatching, @NotNull org.aya.util.terck.CallGraph<Callable,Def,Term.Param> graph)
extends Record
implements DefVisitor
Resolve calls and build call graph of recursive functions,
after
StmtTycker.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.core.visitor.EndoTerm
EndoTerm.Elevator, EndoTerm.MetaBind, EndoTerm.NoMeta, EndoTerm.Renamer, EndoTerm.Substituter -
Constructor Summary
ConstructorsConstructorDescriptionCallResolver(PrimDef.Factory factory, @NotNull FnDef caller, @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull kala.value.MutableValue<Term.Matching> currentMatching, @NotNull org.aya.util.terck.CallGraph<Callable, Def, Term.Param> graph) Creates an instance of aCallResolverrecord class.CallResolver(PrimDef.Factory factory, @NotNull FnDef fn, @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull org.aya.util.terck.CallGraph<Callable, Def, Term.Param> graph) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(Term.Matching matching) @NotNull FnDefcaller()Returns the value of thecallerrecord component.@NotNull kala.value.MutableValue<Term.Matching>Returns the value of thecurrentMatchingrecord component.final booleanIndicates whether some other object is "equal to" this one.factory()Returns the value of thefactoryrecord component.@NotNull org.aya.util.terck.CallGraph<Callable,Def, Term.Param> graph()Returns the value of thegraphrecord component.final inthashCode()Returns a hash code value for this object.@NotNull Term@NotNull kala.collection.mutable.MutableSet<Def>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.core.visitor.DefVisitor
accept
-
Constructor Details
-
CallResolver
public CallResolver(@NotNull PrimDef.Factory factory, @NotNull @NotNull FnDef fn, @NotNull @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull @NotNull org.aya.util.terck.CallGraph<Callable, Def, Term.Param> graph) -
CallResolver
public CallResolver(@NotNull PrimDef.Factory factory, @NotNull @NotNull FnDef caller, @NotNull @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull @NotNull kala.value.MutableValue<Term.Matching> currentMatching, @NotNull @NotNull org.aya.util.terck.CallGraph<Callable, Def, Term.Param> graph) Creates an instance of aCallResolverrecord class.- Parameters:
factory- the value for thefactoryrecord componentcaller- the value for thecallerrecord componenttargets- the value for thetargetsrecord componentcurrentMatching- the value for thecurrentMatchingrecord componentgraph- the value for thegraphrecord component
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceDefVisitor
-
pre
-
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). -
factory
Returns the value of thefactoryrecord component.- Returns:
- the value of the
factoryrecord component
-
caller
Returns the value of thecallerrecord component.- Returns:
- the value of the
callerrecord component
-
targets
Returns the value of thetargetsrecord component.- Returns:
- the value of the
targetsrecord component
-
currentMatching
Returns the value of thecurrentMatchingrecord component.- Returns:
- the value of the
currentMatchingrecord component
-
graph
Returns the value of thegraphrecord component.- Returns:
- the value of the
graphrecord component
-