Traversals

Traversing functions or expressions for analysing or rewriting them.

rewrite_with() rewrite() analyse() analyse_with() rewrite_expr() rewrite_expr_with() analyse_expr() analyse_expr_with()

Functions for applying a sequence of rewrites.

Callbacks

Modifying the list of callbacks used in a traversal.

rewrite_callbacks() analysis_callbacks() with_atomic_callback() with_pairlist_callback() with_symbol_callback() with_primitive_callback() with_call_callback() with_topdown_pairlist_callback() with_topdown_call_callback()

Default expression-transformation callbacks.

add_call_callback()

Add a function-specific callback to the call callbacks.

add_topdown_callback()

Add a function-specific callback to the top-down callbacks.

identity_rewrite_callback() identity_analysis_callback()

A callback that does not do any transformation.

nop_topdown_callback()

Top-down analysis callback.

Function annotation transformations

Notation for rewriting as part of a function definition.

rewrites

Object for setting up a transformation pipeline when defining functions

`[`(<foolbox_rewrite_spec>)

Provide list of rewrite transformations.

`<`(<foolbox_pipe>)

This operator is used together with rewrites to transform a function after it is defined and before it is assigned to a name.

Information processing

Propagating information between callbacks.

merge_bottomup()

Merge the results of several bottomup results.

collect_from_args()

Collect attributes set in the arguments to a call expression.

Formals

Manipulations of the formal parameters of a function.

remove_formal_()

Remove a parameter from the formal parameters of a function.

remove_formal()

Remove a parameter from the formal parameters of a function.

Warnings

Controling which warnings are raised when traversing a function.

warning_flags() set_warn_on_unknown_function() unset_warn_on_unknown_function() set_warn_on_local_function() unset_warn_on_local_function()

Collection of warning flags used when traversing expressions.