[Loop Analysis] Investigating the possibility of a new loop analysis tool #67
ArturAssisComp
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
It is very common while developing software to generate bugs on the interface between functions or abstractions. The current visualization of the FireDBG already deals very good with that type of bug because it shows the calling tree of the functions.
However, there is another kind of programming element that is also very error prone: the loop. Although we already may analyze loops using the current visualization, being enough to use the fire::dbg!() macro, I think it would be very interesting if we have a tool that allows someone to generate a loop table with only a simple macro .
Idea
I think it would be very interesting if we have a tool that allows someone to generate a loop table with only a simple macro. It would automatically identify the variables that are changed inside the loop (is it possible using procedural macro?), including the loop variables (indices, etc) and it would create a table with each line showing the value of the variables.
And then, we would run the loop analysis tool and the following table would be printed:
Loop 1
Each line would show the current state of the variables of the loop exactly on the start of the loop (after the loop iterator yields a value). Only the last line would show the result after the last iteration.
It would be possible to add other parameters to the macro too (using a struct for the options). For example, we could add some of the following options:
Initially, this tool may be isolated. But if possible, it could be integrated with the current call visualization tree.
Beta Was this translation helpful? Give feedback.
All reactions