An unofficial, read-only Hacker News reader. Join the beta →

The need for a formally verifiable mainstream programming language (opens external site)

335 points by todsacerdoti 1 day ago | blainehansen.me | 308 comments on HN

View full thread · View on Hacker News

Comment thread (2)

  1. Can you not do this with normal tests?
    Replies (1)
    1. Define "normal test".

      Property test can state general properties about the signature being tested. E.g. let's say you're proving correctness of addition in an abelian group. You can state Associativity, Commutativity, Identity Element (0), Additive Inverse, Closure, Cancellation Property, as properties of the signature, in the Property Testing framework you're using (Haskell: QuickCheck, Python: Hypothesis, and so on). The framework will generate test cases using a specially-crafted random distribution (one crafted to maximize the chance of catching a bug), then if it finds a failing case, it will shrink it, so your counterexample is minimal.

      It is a "normal test" except that you use a powerful framework to give you these mechanisms.

      It still depends on randomness, so it's still inferior to a theorem, which gives you 100% correctness.