Module aya.base
Package org.aya.unify

Record Class Synthesizer

java.lang.Object
java.lang.Record
org.aya.unify.Synthesizer
All Implemented Interfaces:
Contextful, Stateful

public record Synthesizer(@NotNull org.aya.generic.NameGenerator nameGen, @NotNull AbstractTycker tycker) extends Record implements Stateful, Contextful
  • Constructor Summary

    Constructors
    Constructor
    Description
    Synthesizer(@NotNull org.aya.generic.NameGenerator nameGen, @NotNull AbstractTycker tycker)
    Creates an instance of a Synthesizer record class.
    Synthesizer(@NotNull AbstractTycker tycker)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    inheritPiDom(@NotNull org.aya.syntax.core.term.Term ty, @NotNull org.aya.syntax.core.term.SortTerm expected)
     
    boolean
    isTypeMeta(org.aya.syntax.ref.MetaVar.Requirement req)
     
    @NotNull org.aya.syntax.ref.LocalCtx
     
    @NotNull org.aya.generic.NameGenerator
    Returns the value of the nameGen record component.
    @NotNull org.aya.syntax.ref.LocalVar
    putIndex(@NotNull org.aya.syntax.core.term.Term type)
     
    @NotNull org.aya.syntax.ref.LocalCtx
    setLocalCtx(@NotNull org.aya.syntax.ref.LocalCtx ctx)
    Update localCtx with the given one
    @NotNull TyckState
     
    @NotNull org.aya.syntax.core.term.Term
    synth(@NotNull org.aya.syntax.core.term.Term term)
     
    @NotNull org.aya.syntax.core.term.Term
    synthDontNormalize(@NotNull org.aya.syntax.core.term.Term term)
     
    final String
    Returns a string representation of this record class.
    @Nullable org.aya.syntax.core.term.Term
    trySynth(@NotNull org.aya.syntax.core.term.Term term)
     
    Returns the value of the tycker record component.

    Methods inherited from class java.lang.Object

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

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

    freshMeta, generatePi, mockTerm, subscoped, with

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

    freezeHoles, solve, whnf
  • Constructor Details

    • Synthesizer

      public Synthesizer(@NotNull @NotNull AbstractTycker tycker)
    • Synthesizer

      public Synthesizer(@NotNull @NotNull org.aya.generic.NameGenerator nameGen, @NotNull @NotNull AbstractTycker tycker)
      Creates an instance of a Synthesizer record class.
      Parameters:
      nameGen - the value for the nameGen record component
      tycker - the value for the tycker record component
  • Method Details

    • inheritPiDom

      public boolean inheritPiDom(@NotNull @NotNull org.aya.syntax.core.term.Term ty, @NotNull @NotNull org.aya.syntax.core.term.SortTerm expected)
    • trySynth

      @Nullable public @Nullable org.aya.syntax.core.term.Term trySynth(@NotNull @NotNull org.aya.syntax.core.term.Term term)
    • synth

      @NotNull public @NotNull org.aya.syntax.core.term.Term synth(@NotNull @NotNull org.aya.syntax.core.term.Term term)
    • synthDontNormalize

      @NotNull public @NotNull org.aya.syntax.core.term.Term synthDontNormalize(@NotNull @NotNull org.aya.syntax.core.term.Term term)
    • putIndex

      @NotNull public @NotNull org.aya.syntax.ref.LocalVar putIndex(@NotNull @NotNull org.aya.syntax.core.term.Term type)
    • state

      @NotNull public @NotNull TyckState state()
      Specified by:
      state in interface Stateful
    • localCtx

      @NotNull public @NotNull org.aya.syntax.ref.LocalCtx localCtx()
      Specified by:
      localCtx in interface Contextful
    • setLocalCtx

      @NotNull public @NotNull org.aya.syntax.ref.LocalCtx setLocalCtx(@NotNull @NotNull org.aya.syntax.ref.LocalCtx ctx)
      Description copied from interface: Contextful
      Update localCtx with the given one
      Specified by:
      setLocalCtx in interface Contextful
      Parameters:
      ctx - new LocalCtx
      Returns:
      old context
    • isTypeMeta

      public boolean isTypeMeta(@NotNull org.aya.syntax.ref.MetaVar.Requirement req)
    • 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.
    • nameGen

      @NotNull public @NotNull org.aya.generic.NameGenerator nameGen()
      Returns the value of the nameGen record component.
      Returns:
      the value of the nameGen record component
    • tycker

      @NotNull public @NotNull AbstractTycker tycker()
      Returns the value of the tycker record component.
      Returns:
      the value of the tycker record component