digitalmars.D - Up to date conformance test suite for compiler correctness?
- Ryan (20/20) Jan 17 2014 Hi all,
- Ryan (4/4) Jan 17 2014 I just pulled the dstress source code down and looked at it in
- bearophile (5/9) Jan 17 2014 Compiler tests are added frequently:
- Ryan (4/14) Jan 17 2014 If I'm reading this correctly then the latest set of unit tests
- Brad Anderson (4/21) Jan 17 2014 Yes.
- John Colvin (9/15) Jan 17 2014 1) The 3 main compilers (dmd, gdc, ldc) share the majority of
Hi all, I am wondering if there is an up to date conformance test (compiler correctness) suite for D2. I located the dstress project on dsource.org, but it appears to be pre D2. With four different compiler implementations, please tell me that people are not insane. If people are insane (and no conformance suite exists), I think the easiest way to create one would be to produce a set of methods, one for each language construct/feature to be tested, that each return a string result. The collective results would constitute a "profile" of a given compiler, which could be saved. We would then pick one of the standard implementations as the "reference" implementation. Testing compliance would then be a matter of comparing your profile to the profile for the reference implementation. If people are insane (part 2): Does anybody have a good starting point? i.e. a collection of methods to begin constructing a D2 conformance suite? Regards, Ryan
Jan 17 2014
I just pulled the dstress source code down and looked at it in TortoiseHg Workbench. I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this.
Jan 17 2014
Ryan:I just pulled the dstress source code down and looked at it in TortoiseHg Workbench. I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this.Compiler tests are added frequently: https://github.com/D-Programming-Language/dmd/tree/master/test Bye, bearophile
Jan 17 2014
On Friday, 17 January 2014 at 14:43:01 UTC, bearophile wrote:Ryan:If I'm reading this correctly then the latest set of unit tests for checking compatibility are integrated into the DMD source project itself. Is this correct?I just pulled the dstress source code down and looked at it in TortoiseHg Workbench. I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this.Compiler tests are added frequently: https://github.com/D-Programming-Language/dmd/tree/master/test Bye, bearophile
Jan 17 2014
On Friday, 17 January 2014 at 15:34:02 UTC, Ryan wrote:On Friday, 17 January 2014 at 14:43:01 UTC, bearophile wrote:Yes. And as John Colvin said, every bug that is fixed requires a relevant test to be added to the test suite.Ryan:If I'm reading this correctly then the latest set of unit tests for checking compatibility are integrated into the DMD source project itself. Is this correct?I just pulled the dstress source code down and looked at it in TortoiseHg Workbench. I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this.Compiler tests are added frequently: https://github.com/D-Programming-Language/dmd/tree/master/test Bye, bearophile
Jan 17 2014
On Friday, 17 January 2014 at 14:18:29 UTC, Ryan wrote:Hi all, I am wondering if there is an up to date conformance test (compiler correctness) suite for D2. I located the dstress project on dsource.org, but it appears to be pre D2. With four different compiler implementations, please tell me that people are not insane.1) The 3 main compilers (dmd, gdc, ldc) share the majority of their frontend code. They aren't independent implementations like e.g. gcc/clang/icc/mvc/dmc etc... 2) All bugs fixed are accompanied by an addition to the test suite to test for regressions, which is also shared between compilers. While this isn't a systematic approach, it's quite a large set these days and is formed of pathological corner cases, which is exactly what you want.
Jan 17 2014