for automated grading of assignments I'm trying to develop a test that checks whether a c++ function is implemented recursively.
My current ideas are:
1) parse the function code and check for the keywords {for, while, goto}
2) somehow monitor the call stack. Maybe from a different thread, or by scripting GDB.
I'm curious about other ideas or maybe somebody has already implemented one of the above.