Module aya.base
Package org.aya.tyck

Record Class TyckState

java.lang.Object
java.lang.Record
org.aya.tyck.TyckState

public record TyckState(@NotNull kala.collection.mutable.MutableList<TyckState.Eqn> eqns, @NotNull kala.collection.mutable.MutableList<org.aya.util.error.WithPos<Meta>> activeMetas, @NotNull kala.collection.mutable.MutableMap<@NotNull Meta,@NotNull Term> metas, @NotNull kala.collection.mutable.MutableSet<@NotNull Meta> metaNotProps, PrimDef.Factory primFactory) extends Record
Currently we only deal with ambiguous equations (so no 'stuck' equations).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TyckState(@NotNull kala.collection.mutable.MutableList<TyckState.Eqn> eqns, @NotNull kala.collection.mutable.MutableList<org.aya.util.error.WithPos<Meta>> activeMetas, @NotNull kala.collection.mutable.MutableMap<@NotNull Meta,@NotNull Term> metas, @NotNull kala.collection.mutable.MutableSet<@NotNull Meta> metaNotProps, PrimDef.Factory primFactory)
    Creates an instance of a TyckState record class.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull kala.collection.mutable.MutableList<org.aya.util.error.WithPos<Meta>>
    Returns the value of the activeMetas record component.
    void
    addEqn(@NotNull TyckState.Eqn eqn)
     
    @NotNull kala.collection.mutable.MutableList<TyckState.Eqn>
    Returns the value of the eqns record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull kala.collection.mutable.MutableSet<@NotNull Meta>
    Returns the value of the metaNotProps record component.
    @NotNull kala.collection.mutable.MutableMap<@NotNull Meta,@NotNull Term>
    Returns the value of the metas record component.
    Returns the value of the primFactory record component.
    boolean
    simplify(@NotNull org.aya.util.reporter.Reporter reporter, Trace.Builder tracer)
     
    void
    solveEqn(@NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder tracer, @NotNull TyckState.Eqn eqn, boolean trying)
     
    void
    solveMetas(@NotNull org.aya.util.reporter.Reporter reporter, Trace.Builder traceBuilder)
     
    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
  • Constructor Details

    • TyckState

      public TyckState(@NotNull PrimDef.Factory primFactory)
    • TyckState

      public TyckState(@NotNull @NotNull kala.collection.mutable.MutableList<TyckState.Eqn> eqns, @NotNull @NotNull kala.collection.mutable.MutableList<org.aya.util.error.WithPos<Meta>> activeMetas, @NotNull @NotNull kala.collection.mutable.MutableMap<@NotNull Meta,@NotNull Term> metas, @NotNull @NotNull kala.collection.mutable.MutableSet<@NotNull Meta> metaNotProps, @NotNull PrimDef.Factory primFactory)
      Creates an instance of a TyckState record class.
      Parameters:
      eqns - the value for the eqns record component
      activeMetas - the value for the activeMetas record component
      metas - the value for the metas record component
      metaNotProps - the value for the metaNotProps record component
      primFactory - the value for the primFactory record component
  • Method Details

    • solveEqn

      public void solveEqn(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder tracer, @NotNull @NotNull TyckState.Eqn eqn, boolean trying)
      Parameters:
      trying - whether to solve in a yasashi manner.
    • simplify

      public boolean simplify(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder tracer)
      Returns:
      true if this.eqns and this.activeMetas are mutated.
    • solveMetas

      public void solveMetas(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder traceBuilder)
    • addEqn

      public void addEqn(@NotNull @NotNull TyckState.Eqn eqn)
    • 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.
    • eqns

      @NotNull public @NotNull kala.collection.mutable.MutableList<TyckState.Eqn> eqns()
      Returns the value of the eqns record component.
      Returns:
      the value of the eqns record component
    • activeMetas

      @NotNull public @NotNull kala.collection.mutable.MutableList<org.aya.util.error.WithPos<Meta>> activeMetas()
      Returns the value of the activeMetas record component.
      Returns:
      the value of the activeMetas record component
    • metas

      @NotNull public @NotNull kala.collection.mutable.MutableMap<@NotNull Meta,@NotNull Term> metas()
      Returns the value of the metas record component.
      Returns:
      the value of the metas record component
    • metaNotProps

      @NotNull public @NotNull kala.collection.mutable.MutableSet<@NotNull Meta> metaNotProps()
      Returns the value of the metaNotProps record component.
      Returns:
      the value of the metaNotProps record component
    • primFactory

      @NotNull public PrimDef.Factory primFactory()
      Returns the value of the primFactory record component.
      Returns:
      the value of the primFactory record component