Module aya.base

Class PatClassifier

All Implemented Interfaces:
org.aya.util.tyck.pat.ClassifierUtil<Subst,Term,Term.Param,Pat,AnyVar>

public final class PatClassifier extends StatedTycker implements org.aya.util.tyck.pat.ClassifierUtil<Subst,Term,Term.Param,Pat,AnyVar>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final @NotNull org.aya.util.error.SourcePos
     

    Fields inherited from class org.aya.tyck.tycker.StatedTycker

    state

    Fields inherited from class org.aya.tyck.tycker.TracedTycker

    reporter, traceBuilder
  • Constructor Summary

    Constructors
    Constructor
    Description
    PatClassifier(@NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder traceBuilder, @NotNull TyckState state, @NotNull org.aya.util.error.SourcePos pos)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    add(Subst subst, AnyVar anyVar, Term term)
     
    static @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>>>>
    classify(@NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull StatedTycker tycker, @NotNull org.aya.util.error.SourcePos pos)
     
    static @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>>>>
    classify(@NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull TyckState state, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.util.error.SourcePos pos, @Nullable Trace.Builder builder)
     
    @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<org.aya.util.Arg<Term>>>
    classify1(@NotNull Subst subst, Term.Param param, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.Indexed<Pat>> clauses, int fuel)
     
    static int[]
    firstMatchDomination(@NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.error.SourceNode> clauses, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.tyck.pat.PatClass<?>> classes)
     
     
    ref(Term.Param param)
     
    subst(Subst subst, Term.Param param)
     

    Methods inherited from class org.aya.tyck.tycker.StatedTycker

    compareRestr, conOwnerSubst, defCall, unifier, whnf

    Methods inherited from class org.aya.tyck.tycker.TracedTycker

    fail, fail, newTycker, traced, tracing

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.aya.util.tyck.pat.ClassifierUtil

    classifyN
  • Field Details

    • pos

      @NotNull public final @NotNull org.aya.util.error.SourcePos pos
  • Constructor Details

    • PatClassifier

      public PatClassifier(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder traceBuilder, @NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.SourcePos pos)
  • Method Details

    • classify

      @NotNull public static @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>>>> classify(@NotNull @NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull @NotNull StatedTycker tycker, @NotNull @NotNull org.aya.util.error.SourcePos pos)
    • classify

      @VisibleForTesting @NotNull public static @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>>>> classify(@NotNull @NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull org.aya.util.error.SourcePos pos, @Nullable Trace.Builder builder)
    • subst

      public Term.Param subst(Subst subst, Term.Param param)
      Specified by:
      subst in interface org.aya.util.tyck.pat.ClassifierUtil<Subst,Term,Term.Param,Pat,AnyVar>
    • normalize

      public Pat normalize(Pat pat)
      Specified by:
      normalize in interface org.aya.util.tyck.pat.ClassifierUtil<Subst,Term,Term.Param,Pat,AnyVar>
    • add

      public Subst add(Subst subst, AnyVar anyVar, Term term)
      Specified by:
      add in interface org.aya.util.tyck.pat.ClassifierUtil<Subst,Term,Term.Param,Pat,AnyVar>
    • ref

      public AnyVar ref(Term.Param param)
      Specified by:
      ref in interface org.aya.util.tyck.pat.ClassifierUtil<Subst,Term,Term.Param,Pat,AnyVar>
    • classify1

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<org.aya.util.Arg<Term>>> classify1(@NotNull @NotNull Subst subst, @NotNull Term.Param param, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.Indexed<Pat>> clauses, int fuel)
      Specified by:
      classify1 in interface org.aya.util.tyck.pat.ClassifierUtil<Subst,Term,Term.Param,Pat,AnyVar>
      Returns:
      Possibilities
    • firstMatchDomination

      public static int[] firstMatchDomination(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.error.SourceNode> clauses, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.tyck.pat.PatClass<?>> classes)