My advice is that when you haven’t got a clue you should shut up rather than broadcast your cluelessness.
“Running valgrind for example is for detecting memory leaks in software.”
Valgrind does detect leaks (or at least, the memcheck tool does). That is not the most important thing that it does - so much so that leak reporting is not even turned on by default.
The two most important things that it does is check memory addressability and initialisedness. Errors of those kind are Undefined Behaviour (in some cases a more recent official classification is Erroneous Behavior). Other tools like Dr Memory and address/memory sanitizers also perform similar verification.
Once an application has encountered UB or EB you can no longer reason about its behaviour. From the perspective of a formal proof tool that would be a big problem.
> My advice is that when you haven’t got a clue you should shut up rather than broadcast your cluelessness.
Good advice. Lean doesn’t have such a thing as undefined behaviour or erroneous behaviour. As a language it’s much more like haskell than C/C++ (eg it doesn’t have pointers exposed directly, you can do dynamic memory things using arrays but that’s really for FFI and wouldn’t be used in a proof). If you’re using lean as a proof assistant, many/most of the types of things you might do to check a conventional program for bugs are not relevant.
Approaching a proof validation like you’re approaching a software audit is very unlikely to yield any sort of useful result. If you want to audit lean in the normal software way, the thing to do would be to audit the lean kernel - you may well get results. It’s very unlikely but not impossible that these would affect the validity of any proof except where a proof was “dishonest” ie deliberately constructed in such a way as to exploit the bug.
“Running valgrind for example is for detecting memory leaks in software.”
Valgrind does detect leaks (or at least, the memcheck tool does). That is not the most important thing that it does - so much so that leak reporting is not even turned on by default.
The two most important things that it does is check memory addressability and initialisedness. Errors of those kind are Undefined Behaviour (in some cases a more recent official classification is Erroneous Behavior). Other tools like Dr Memory and address/memory sanitizers also perform similar verification.
Once an application has encountered UB or EB you can no longer reason about its behaviour. From the perspective of a formal proof tool that would be a big problem.
Replies (1)
Good advice. Lean doesn’t have such a thing as undefined behaviour or erroneous behaviour. As a language it’s much more like haskell than C/C++ (eg it doesn’t have pointers exposed directly, you can do dynamic memory things using arrays but that’s really for FFI and wouldn’t be used in a proof). If you’re using lean as a proof assistant, many/most of the types of things you might do to check a conventional program for bugs are not relevant.
Approaching a proof validation like you’re approaching a software audit is very unlikely to yield any sort of useful result. If you want to audit lean in the normal software way, the thing to do would be to audit the lean kernel - you may well get results. It’s very unlikely but not impossible that these would affect the validity of any proof except where a proof was “dishonest” ie deliberately constructed in such a way as to exploit the bug.