Improving automated error diagnosis for OOP practice with C++ - Novara, Pablo (2014)
This paper describes how to exploit some particular rules about generic programming implementation with C++, to be able to verify at compile-time the existence of symbols such as classes, functions or methods, and the validity of expressions involving those symbols. This validation is done in such a way that the program will always compile and run, even if some expected class or function interface is missing, automatically skipping pieces of code when its compilation is not guaranteed to be successful. This techniques can be easily extended and applied to design and implement programming exercises that will precisely diagnose students errors when are executed, displaying custom run-time messages, and avoiding most compile time errors. This approach produces a selfcontained C++11 code representing a programming assignment, that requires only a standard compliant compiler to be used by the student. No other tool or instrumentation is needed.