Module aya.base

Interface EndoTerm

All Superinterfaces:
Function<Term,Term>, UnaryOperator<Term>
All Known Subinterfaces:
BetaExpander, DeltaExpander, Expander
All Known Implementing Classes:
EndoTerm.Elevator, EndoTerm.Renamer, EndoTerm.Substituter, 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 
    Not an IntelliJ Renamer.
    static final record 
    Performs capture-avoiding substitution.
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NotNull Term
    apply(@NotNull Term term)
     
    default @NotNull Term
    post(@NotNull Term term)
     
    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)
    • apply

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