logoalt Hacker News

So You Want to Build a Mainstream Formally Verifiable Language

36 points • by mpweiher • today at 11:37 AM • 14 comments • view on HN

Comments

smj-edison • today at 3:48 PM

I think there's a pretty big conceptual difference between programming and math, which is that in programming we think about building up something over time by applying successive steps. In math though we have to think about the whole thing simultaneously, forwards and backwards. So when we prove a program, we're actually proving it forwards and backwards, with all possible inputs and outputs, at the same time. And either it's all true, or it blows up in your face.

Another difficulty is with programming, we succeed by making abstractions that don't leak, where with math we're constantly opening up mathematical objects and messing around with their internals, chaining together the internals with theorems to get to our desired outcome.

Since we so often need access to the guts of the objects we're working with to prove facts, it makes it really hard to interoperate with other systems, because either we have to make assumptions about those systems which can compromise correctness or we have to be able to plug in all the way.

Signed, an undergrad in math with decent coding experience.

tiffanyh • today at 1:44 PM

I’m surprised SPARK programing language was never mentioned.

https://en.wikipedia.org/wiki/SPARK_(programming_language)

https://www.adacore.com/languages/spark

kccqzy • today at 2:29 PM

> I believe that one crucial distinction is preventing the meteoric ascent of AI in software of the formally verified kind: the everpresence of change.

This is actually also what I realized after a year or so in industry. (I was quite enamored of formal verification in college.)

rrook • today at 2:32 PM

I'd boil away all of the article's thoughts on "object" vs "meta" languages, and instead point out that all languages are expression of graphs. Once the language is built from this perspective, object language and meta language (using the articles terms) can exist happily together. This is actually the core thesis of my language project; all computation is situated in a global hypergraph.

➕ show 1 reply
Ericson2314 • today at 3:42 PM

Lean has already gone mainstream.

➕ show 1 reply