Squashed Bugs, with Failure Rate Heatmaps
pingcap.com
pingcap.com
The best protection against bugs is still not found in debugging fast or automatically but by reducing scope right at the design stage, the smaller the scope the easier it is to find bugs. This is one of the reasons why I think in the very long term functional languages will win out, they reduce scope in a very natural way because they tend to be almost side effect free unless you explicitly code that in.
Languages that make it easy to access stuff that is out of scope tend to feel very productive in the beginning of a project but you get bogged down quickly because everything starts to interact with everything else and soon it is too much to keep in your head at once.
Then I run it interactively with source debugging and when anything goes wrong, I do some editing and more than half the time I don't even have to restart the program from the beginning.
And the more subtle the things I "assert" the more direction I get when they are violated. It eliminates a lot of effort in sorting out incorrect ideas when I can just encode my incorrect ideas and let the computer find the problem.
I've always shied away from Lisp and similar, but I'm definitely reminded of how advocates describe the benefits of developing in an interpreted environment. When I was a kid, I always had the sense that only compiled languages were prestigious, industrial strength, professional, whatever.
The dividing line between compiled and interpreted languages has become permeable these days anyway. Perhaps the better dividing line is between languages that are designed to compile to efficient code, vs. languages whose design precludes that. In some cases this may just mean we need smarter compilers. And this is where I really like this kind of language fuzzing: it's a great way to test compilers, and can be extremely helpful at firming up implementations of complicated optimizations.
The environment I was working in is compiled also, but like you say, you can modify it while running.
It's hard to implement a bot to do auto-debugging. The purpose of this Hackathon project was to develop a tool to improve debugging efficiency. Check out our progress on https://github.com/fuzzdebugplatform/fuzz_debug_platform.
Ideally, one would like to adjust the fuzzer based on that information to steer executions to lesser covered parts of the code (or, possibly, toward parts you want to focus your testing on.)
The fuzzer we implemented is driven by BNF expressions. We can adjust the inputs of the fuzzer based on the statistics.
As a simple example, maybe your system handles select queries fine, and it handles all legal field names, but some bug causes it to do the wrong thing when the third field in your select list is called "ape" because that matches the name of some internal bookkeeping structure you have. Does the code have to be badly designed for that to even be possible? Yes, but that is also the type of code we tend to find bugs in.