3 ms·
The reason Xsmith is a fresh project is because the PhD student doing most of the implementation wanted to be able to make extensive use of Racket's macro syste
by DonaldPShimoda 6y ago
The reason Xsmith is a fresh project is because the PhD student doing most of the implementation wanted to be able to make extensive use of Racket's macro system. Using metaprogramming allows for all the DSL forms to be first-class instead of, say, needing to run a program to generate the program that will then produce the program to create the language's test cases. Of course, this style of metaprogramming has downsides (for example, the start-up time is pretty lengthy, and adding new forms to Xsmith can be tricky if you're not familiar with the Racket macro capabilities), but overall it seems the benefits may outweigh the detriments.
However, Xsmith's core is built upon RACR [0], a Scheme library for building what are called attribute grammars. This isn't quite what you were talking about, but at least it shows that not all of Xsmith is 100% novel implementation. :)
[0] https://github.com/christoff-buerger/racr https://github.com/christoff-buerger/racr
- touisteur 6y agoHi thanks for the details, I didn't know racket that much before and I went diving into your links and that looks very interesting. I wasn't disparaging the approach at all, sorry if it came across like this. Research is research, anyone willing to spend years of their life digging into such a subject should use the most appropriate tech and follow their intuition. I'm just sad in general about the effort expected of developers (me!) or testers (me!), e.g. to write grammars in 3 or 4 dialects to be able to leverage new cool tools ;-) I know they all have their specificities, I wish there was a way to express them in one place/format. I hope this work allows some time in the future to test language parsers, compilers, interpreters, pretty-printers, so I can finally get some kind of answer to 'how do you test it'.