Remix.run Logo
▲ The need for a formally verifiable mainstream programming language(blainehansen.me)
16 points by todsacerdoti an hour ago | 2 comments
▲JacobAsmuth 10 minutes ago | parent | next [-]

Sounds like you'd be interested in Qed! The web framework I'm building which compiles lean to native js for the frontend and rust for backend, using prorobuf for communication between the two.

I reimplemented the entirety of the css grammar and fully verified the data model, hydration/dehydration pipeline, and can even formally prove accessibility at compile time (contrast > 4.5).

I'm currently working on reimplementing the full sql grammar to allow you to formally verify your queries (and even row level security policies!) at compile time.

https://github.com/JacobAsmuth/qed

▲hresvelgr 33 minutes ago | parent | prev [-]

"Beware of bugs in the above code; I have only proved it correct, not tried it." — Donald Knuth

Formal correctness does not guarantee desired function. People have written TLA+ specs for their software[1] and not have it materially improve the quality or reliability. You cannot just throw formal verification at a problem.

I am very much of the opinion that crap code is an issue of organisation and aesthetics, and that can be automated. This is something that is enforced by frameworks, and despite the popular consensus that LLMs are good at frameworks because of training data, I make another argument that LLMs are good at them because frameworks massively restrict the possibility space of code that can exist and enforce a consistent organisation and aesthetic. The solution as I see it is to make more restrictive frameworks that have a higher chance of producing desired functionality, then afterward we can worry about correctness.

[1] https://jepsen.io/analyses/particledb-1.1.4