Skip to content

Preprocess Helper Functions that Transitively Call Ctrlif #24

Description

@LemongrabThree

If an RHS calls a function f that has no nondifferentiabilities, then f does not need to be preprocessed.

However, if f in turn calls a function g that does contain nondifferentiabilities, then f will need (some, minor) preprocessing: The preprocessed g has a new name, so the calls to g inside f need to be updated and equipped with an updateFunctionIndex call.

This mechanism already works (see preprocess_fcnInRhs.m) - but only for one level of function chaining.
Meaning if, instead of f calling g, f calls another function h which calls g and which contains no nondifferentiabilities, then IFDIFF will fail to recognize that f should be included in the preprocessing, and calls to f in the RHS will be left unchanged, leading to disastrous results.

To do: Change the mechanism for handling these transitively-called nondifferentiabilities so that it can handle arbitrarily long chains of function calls.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions