|
|
|
|
|
by dataflow
592 days ago
|
|
>> If you come up with processes and tooling that is difficult to use widely, > That's an unfounded assumption. The tooling and processes I have developed are no more difficult to use than unit testing. My assumption was just founded on the reality of how few developers use model-checking tools, and how they difficult they find them. If your tools are radically better, and they work for C++, that's obviously amazing. Could you give us an idea of what the equivalent of this simple C++ code would look like, so we can see how it looks in comparison? You know, with whatever bells and whistles you need to add to it for the model checker to verify its correctness: #include <string>
#include <unordered_map>
template<class Char>
auto make_map(size_t argc, const Char *const argv[]) {
using S = std::basic_string<Char>;
std::unordered_map<S, S> map;
for (size_t i = 0; i + 2 <= argc; i += 2) {
map[S(argv[i])] = S(argv[i + 1]);
}
return map;
}
int process(const std::unordered_map<std::string, std::string> &);
int main(int argc, char *argv[]) {
return process(make_map(argc, argv));
}
|
|
These tools aren't difficult to use. They just aren't well documented.
I've got better things to do with my afternoon than model check random bits of code in a forum. You wouldn't ask someone talking about a unit testing framework to unit test an example that you write up. If you're curious, I'm writing a book on model checking C, which will be going off to the publisher sometime in 2025. There are also examples online.