Cassette.jl only on "high"-level / own defined module functions

I’m wondering whether I can overdup only on functions defined in a module. Basically if my module has the functions a and b, … which do a lot of work I only want to access the calls from one of those functions to another and not all the base computations like +, * in between :smiley:

I know I’m bad at explaining this so this is my use cases are:

  • Building a call graph of my module for visualization
  • Checking if a function behaves differently than before by saving the input and output of before and compare it to the new version. (A bit like unit tests without needing to write them)
  • Doing micro benchmarks on those functions in a more automatic way using the same strategy.

Is this something Cassette.jl can be used for or are there maybe better suited packages for it?

1 Like

Yes, I think Cassette could be used for such things, especially since it can be set up so that overdubbing stops at some point instead of recursively exploring function calls. If you go this way, you should definitely read the entire Cassette documentation, but pay special attention to “contextual primitives”.

1 Like

Thanks. Yeah I only had a brief look into it yesterday.
“Cassette users are expected to have a working understanding of Julia’s compiler, type system and metaprogramming facilities.” - https://jrevels.github.io/Cassette.jl/stable/disclaimers.html This punched me into the face. :smile:
So wanted to make sure that this can be the right path for my goal first.