Module aya.base

Interface EndoTerm

All Superinterfaces:
Function<Term,Term>, UnaryOperator<Term>
All Known Subinterfaces:
BetaExpander, DefVisitor, DeltaExpander, EndoTerm.NoMeta, Expander
All Known Implementing Classes:
CallResolver, EndoTerm.Elevator, EndoTerm.MetaBind, EndoTerm.Renamer, EndoTerm.Substituter, Expander.ConservativeWHNFer, Expander.Normalizer, Expander.Tracked, Expander.WHNFer, Zonker

public interface EndoTerm extends UnaryOperator<Term>
A convenient interface to obtain an endomorphism on `Term`. This is desirable when you need to transform a `Term` into another `Term`. One can specify the `pre` and `post` method which represents a recursive step in pre- and post-order respectively. The overall operation is obtained by recursively transforming the term in pre-order followed by a post-order transformation. Note that the derived `accept` attempts to preserve object identity when possible, hence the implementation of `pre` and `post` can take advantage of this behavior.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A lift but in American English.
    static final record 
    subst all binding to corresponding MetaPat
    static interface 
    A traversal that disallow Pat.Meta
    static final record 
    Not an IntelliJ Renamer.
    static final record 
    Performs capture-avoiding substitution.
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NotNull Pat
    apply(@NotNull Pat pat)
     
    default @NotNull Term
    apply(@NotNull Term term)
     
    default @NotNull Pat
    post(@NotNull Pat pat)
     
    default @NotNull Term
    post(@NotNull Term term)
     
    default @NotNull Pat
    pre(@NotNull Pat pat)
     
    default @NotNull Term
    pre(@NotNull Term term)
     

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • pre

      @NotNull default @NotNull Term pre(@NotNull @NotNull Term term)
    • post

      @NotNull default @NotNull Term post(@NotNull @NotNull Term term)
    • pre

      @NotNull default @NotNull Pat pre(@NotNull @NotNull Pat pat)
    • post

      @NotNull default @NotNull Pat post(@NotNull @NotNull Pat pat)
    • apply

      @NotNull default @NotNull Term apply(@NotNull @NotNull Term term)
      Specified by:
      apply in interface Function<Term,Term>
    • apply

      @NotNull default @NotNull Pat apply(@NotNull @NotNull Pat pat)