A (possibly paramterized) Tuple.
An optimizer that combines several optimizations in an optimal way.
Inherit from this class using CRTP, if your Pass does not need state and a fixed-point iteration.
Helper class to retrieve Infer::arg if present.
Data constructor for a Sigma.
This pass is the heart of AD.
Ref augment_var(const Var *, Lam *, Lam *)
helper functions for augment
Ref derive_(Ref)
Additionally to the derivation, the pullback is registered and the maps are initialized.
Ref augment_lit(const Lit *, Lam *, Lam *)
Ref augment_tuple(const Tuple *, Lam *, Lam *)
Ref augment_lam(Lam *, Lam *, Lam *)
Ref augment_(Ref, Lam *, Lam *)
Rewrites the given definition in a lambda environment.
Ref augment(Ref, Lam *, Lam *)
Applies to (open) expressions in a functional context.
Ref augment_app(const App *, Lam *, Lam *)
Ref rewrite(Ref) override
Detect autodiff calls.
AutoDiffEval(PassMan &man)
Ref derive(Ref)
Acts on toplevel autodiff on closed terms:
Ref augment_pack(const Pack *pack, Lam *f, Lam *f_diff)
Ref augment_extract(const Extract *, Lam *, Lam *)
The automatic differentiation Plugin
DefMap< const Def * > Def2Def