lundi 16 décembre 2019

c++ test to check if a function is implemented recursively


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.

Aucun commentaire:

Enregistrer un commentaire