Copying and Swapping: Influences on the Design of Reusable Software Components
IEEE Transactions on Software Engineering
The C++ programming language (2nd ed.)
The C++ programming language (2nd ed.)
Static detection of dynamic memory errors
PLDI '96 Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation
A Framework for Detecting Interface Violations in Component-Based Software
ICSR '98 Proceedings of the 5th International Conference on Software Reuse
A specification-based approach to reasoning about pointers
SAVCBS '05 Proceedings of the 2005 conference on Specification and verification of component-based systems
Computer tutoring for programming education
Proceedings of the 44th annual Southeast regional conference
Which pointer errors do students make?
Proceedings of the 38th SIGCSE technical symposium on Computer science education
Dereferee: exploring pointer mismanagement in student code
Proceedings of the 40th ACM technical symposium on Computer science education
Precise garbage collection for C
Proceedings of the 2009 international symposium on Memory management
A type system for static and dynamic checking of C++ pointers
Computer Languages, Systems and Structures
Hi-index | 0.00 |
Pointer errors are stumbling blocks for student and veteran programmers alike. Although languages such as Java use references to protect programmers from pointer pitfalls, the use of garbage collection dictates that languages like C++ will still be used for real-time mission-critical applications. Pointers will stay in the classroom as long as they're used in industry, so as educators, we must find better ways to teach them. This paper presents checked pointers, a simple wrapper for C++ pointers that prevents pointer arithmetic and other common sources of pointer errors, and detects all dereferencing and deallocation errors, including memory leaks. The syntax of checked pointers is highly faithful to raw C++ pointers, but provides run-time error detection and debugging information. After debugging, changing one #include is all that is required to substitute a non-checking implementation that is as fast as raw C++.