EtaReduce

scalus.uplc.transform.EtaReduce
See theEtaReduce companion object
class EtaReduce(logger: Logger = ...) extends Optimizer

Performs eta-reduction on a term.

Eta-reduction is the process of removing redundant lambda abstractions from a term. For example, the term λx. f x can be eta-reduced to f but only if

  • x is not free in f
  • f is a pure expression

Purity checking is handled by TermAnalysis.isPure. A term is pure if it does not contain any side effects, such as Error, Force of non-delayed terms, or saturated builtin applications. See TermAnalysis.isPure for comprehensive documentation on purity semantics.

Attributes

See also

TermAnalysis.isPure for purity semantics

Companion
object
Graph
Supertypes
trait Optimizer
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply(term: Term): Term

Applies eta-reduction optimization to a term.

Applies eta-reduction optimization to a term.

Value parameters

term

The UPLC term to optimize

Attributes

Returns

The optimized term

def logs: Seq[String]

Returns the accumulated logs from optimization operations.

Returns the accumulated logs from optimization operations.

Attributes

Returns

Sequence of log messages