Download presentation
Presentation is loading. Please wait.
Published byRalph Jenkins Modified over 8 years ago
1
Compiler Testing Lavinder Singh CSS 548 Autumn 2012
2
Compiler Testing – Why? General assumption Compilers just work correctly all the time. Practical world Compilers are not perfect programs. They do have bugs. Compiler code to support new features, platforms, languages must work correctly. How can it be ensured? http://gcc.gnu.org/bugzilla/query.cgihttp://gcc.gnu.org/bugzilla/query.cgi, http://bugs.sun.com/bugdatabase/home.dohttp://bugs.sun.com/bugdatabase/home.do
3
Compiler Testing - Challenges Compiler programming is hard. Testing on top of it is not easy either!! Infinite domain of source as input. Compliance with standards (implementation defined behavior) New target machines / platforms / languages. Reduction of test steps to analyze / fix a bug. C99, C++11 ECMA-334 (C#) X86, AMD64, ARM
4
Compiler Testing – Common techniques Code generation (inherent attribute of Grammar) Intermediate Representation code Source code Input mutation Modeling Comparing against reference implementation Comparing structural equivalence of IR from source and object code (reverse engineer or decompile)
5
Compiler Testing – Anything missing? Lack of literature on formal techniques Published techniques yet to be proven on modern languages Test patterns yet to emerge to apply on a new compiler.
6
Q & A (while you enjoy little humor) Error messages by Apple’s MPW C compiler (http://www.netfunny.com/rhf/jokes/91q3/cerrors.html)http://www.netfunny.com/rhf/jokes/91q3/cerrors.html "This struct already has a perfectly good definition“ "Too many errors on one line (make fewer)“ "can't go mucking with a 'void *'"
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.