Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #870
| From | "Rafael R. Sevilla" <dido@imperium.ph> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Unit testing a compiler |
| Date | 2013-03-13 11:50 +0800 |
| Organization | Compilers Central |
| Message-ID | <13-03-009@comp.compilers> (permalink) |
I am currently writing a simple byte compiler for a simple dialect of Lisp, and am wondering what is the best practice for testing such a compiler. It is certainly possible to run the compiler on some test code and then compare the code it generates with some reference code, but as the code samples become more complicated that rapidly becomes unwieldy. Would it instead be better to test the compiler by actually running the code it generates, and then comparing the results with what the code snippet is supposed to evaluate to? Any other ideas on how to go about testing the code generator? What about when optimizations are being performed?
Back to comp.compilers | Previous | Next — Next in thread | Find similar | Unroll thread
Unit testing a compiler "Rafael R. Sevilla" <dido@imperium.ph> - 2013-03-13 11:50 +0800 Re: Unit testing a compiler BGB <cr88192@hotmail.com> - 2013-03-13 02:59 -0500 Re: Unit testing a compiler Robert A Duff <bobduff@shell01.TheWorld.com> - 2013-03-13 18:58 -0400 Re: Unit testing a compiler Walter Banks <walter@bytecraft.com> - 2013-03-19 18:02 -0500
csiph-web