frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Why Don't People Use Formal Methods?

https://www.hillelwayne.com/post/why-dont-people-use-formal-methods/
31•Thom2503•1h ago

Comments

s_dev•56m ago
https://blog.janestreet.com/formal-methods-at-jane-street-in...

I thought this article from Jane Street makes a nice complimentary pairing.

SCdF•49m ago
In most industries that need software made for them it's hard enough to get people to care about spending enough time on informal methods let alone formal ones. I simply don't think most of the industry has had the breathing room and respect for engineering for this pattern to develop.
another_twist•44m ago
I think its also about tolerance for failure. For software that must not fail or where reliability commands a premium you would be wise to invest in formal methods. Core systems at aws for example. For throwaway CRUD code its just easier to try iterations on the problem and call it a day. Its not about respect just RoI.
unprovable•42m ago
This blog is actually very useful... There's also the flip side, possibly due to the expense (technically, intellectually, and emotionally), where "IT'S FORMALLY VERIFIED!!" has become some marketing code for "it's safe, secure, and PFAS free..." - just because something is formally verified, doesn't mean it's secure or fit for purpose. It usually just means it conforms to a given spec "and that's that..."
asxndu•37m ago
I think it's the culture is software engineering.

In a good delivery app/social network it seems like a waste of time to use formal methods.

When designing software for aircraft, pacemakers, fintechs, cryptography and DeFi protocols there is a bit of value for formal methods.

The problem is the often people with the food app/social network culture are hired to build DeFi protocols.

Which explains why so much money is being stolen form DeFi protocols of late.

So why people don't use formal methods.

- 95% of the time, the stakes are low

- 5% of the time, the engineers don't understand the value of formal methods.

Leslie Lamport once joked that if software developers were architects, they would first build a skyscraper and then later draw the blue print.

antonvs•29m ago
I enjoyed this quote from the article, which concisely summarizes the first part of the above comment:

> “website isn’t airplane!!!”

kalcode•27m ago
Also you can write a perfect specification get into implementation and have to step back and redesign.

Software is fast to iterate and test that a lot assumptions can be proven by actually writing the code.

Software is closer to gardening or painting. We discover a lot through practice and writing code. Then we can often write more formal specifications.

But formal method is impractical for most software upfront, and instead is likely used for more serious runtime failures or cost of life.

That's just my two cents.

vslira•35m ago
Speaking for myself (and I bought Hillel's recently published Logic for Programmers): It's not clear to me which formal method I should use. I'm certain the answer is "there's a different best one for each situation", but I don't want to know one for each problem I'll face. I'd rather have a definitive answer to what is the second best for all situations, similar to how we can answer "python" to that question when the question is about general programming
antonvs•32m ago
> similar to how we can answer "python" to that question when the question is about general programming

An ironic claim in the context of formal methods.

ndriscoll•34m ago
We do. It's called a type checker. Every "formally verified" system is going to be partially verified. e.g. you might prove your sort procedure sorts, but did you prove its complexity? Under a cost model for integer compares or a cost model for page fetches? Or both? Multi-layer cache page fetch costs? How well you verify just depends on how well you decide to model the problem. Different type checkers have different modeling features.

This is a more useful perspective; it's not "we do/don't use formal methods," but instead "how can I more precisely model my domain?" Helpfully, if you model your domain well, code tends to be obvious/write itself.

yoshuaw•12m ago
One of my favorite quotes on this topic is:

"Type systems are just the parts of formal verification we've figured out how to make fast."

IshKebab•30m ago
I think everyone knows the answer already - it's too hard to be worth it for most problems. The article doesn't disagree with that and was a good read anyway. Don't skip it because you already know the answer.

IMO the reason is way more on the "it's too hard" side than "it isn't worth the effort". Formal verification is extremely common in the silicon hardware design world, despite its extreme cost (the tool licenses cost on the order of $100k per seat, as far as I can tell). And in this domain bugs are really expensive. But I think it would be used in spite of that simply because it is an order of magnitude easier than software formal verification.

I don't know if there is any solution to that. Software itself is an order of magnitude (or more) more complex than hardware... I think the author's suggestion of partial verification is the way to you. You're not going to formally verify your GUI but you could formally verify your LZ4 decoder. Maybe.

malisper•20m ago
I recently came across a use case where formal methods were incredibly helpful. I've been rewriting Postgres in Rust and am currently focusing on correctness. The biggest challenge is that there's so much surface area to cover. Postgres has over 3000 user-facing functions, ranging from regular expression matching to JSON iteration to computing the gamma function. About half of these functions are simple pure functions.

Of the 3000 functions, I've been able to formally verify that the Rust behavior is identical to the Postgres C behavior for over 1000 of them. In the process, I found 4 different Postgres bugs. All of them would not be triggered under ordinary usage, but one, if triggered, would corrupt your database.

I think why formal methods works well for this is I'm testing a large number of small to medium self-contained pieces of code. For each of them the specification is simple: does postgres_fn(args) == pgrust_fn(args). I've been using Kani[0] which works across both Rust and C code so the proofs are based off the actual code and not a translation of the code to another language.

If you want to check out what all the verification look like, you can see them here[1]

[0] https://github.com/model-checking/kani

[1] https://github.com/malisper/pgrust/tree/main/proofs

excitedrustle•12m ago
> I found 4 different Postgres bugs.

Bugs in the upstream Postgres C implementations? Did you report them or submit patches? I'm curious to see what you found!

dirkc•14m ago
Isn't the problem with formal methods that it isn't clear whether or not most of the useful code we use are actually formally verifiable?

The article mentions NP-complete, but is it actually a solvable problem in general?

> For extremely restricted cases, like propositional logic or HM type-checking, it’s “only” NP-complete.

the__alchemist•13m ago
My 2c I don't understand any of the material I've read describing them. What I do understand makes them sound like it will be a load of work for questionable benefits. If I end up writing safety-critical code. (Aerospace firmware, big robots etc), I will get over this hump and learn them. If not, I am not yet compelled; rather intimidated.

Maybe this is like Quaternions, that are actually very easy and useful, but suffer from confusing descriptions. Or maybe more like Monads, which are actually very abstract, and may not be suitable unless your the sort who understands Mathematician style mathematics.

More to the point: I'm not even sure how I would get started and evaluate them tacitly.

StilesCrisis•9m ago
Because there is almost never a business need?

Most programs don't need to be rigorously perfect. If they did, LLMs wouldn't be as popular as they are right now.

If you're dealing with medical equipment or space flight, maybe there's a need. But usually the goal is to make errors _inexpensive_ to find and fix, not theoretically impossible.

'VPNs are lawful technical tools,' says EU Court in landmark copyright ruling

https://remysharp.com/links/2026-07-23-35890312
165•speckx•1h ago•52 comments

RFC 8890 – The Internet is for End Users (2020)

https://mnot.net/blog/2020/for_the_users
28•notarobot123•1h ago•7 comments

Why Is Everyone Trying to Build a Solid-State Battery?

https://www.construction-physics.com/p/why-is-everyone-trying-to-build-a
30•crescit_eundo•1h ago•21 comments

How Old Is Ann?

https://quuxplusone.github.io/blog/2026/07/29/how-old-is-ann/
25•ibobev•1h ago•13 comments

Gpiozero Flow

https://bennuttall.com/blog/2026/07/gpiozero-flow/
91•benn_88•3h ago•28 comments

Launch HN: Prized (YC S26) – Let non-engineer staff build secure internal tools

https://prized.dev
10•marinoseliades•43m ago•0 comments

Why Don't People Use Formal Methods?

https://www.hillelwayne.com/post/why-dont-people-use-formal-methods/
33•Thom2503•1h ago•19 comments

Ron Gilbert started production on Thimbleweed Park 2

https://www.grumpygamer.com/twp2_announce/
119•alberto-m•6h ago•42 comments

AI's top startups are barely publishing their research

https://www.science.org/content/article/ai-s-top-startups-are-barely-publishing-their-research
559•YeGoblynQueenne•16h ago•291 comments

Mbodi AI (YC P25) Is Hiring Robotics/Research Engineers

https://www.ycombinator.com/companies/mbodi-ai/jobs
1•chitianhao•2h ago

Agent-Manager: A Tmux TUI for Running Claude Code, Codex and OpenCode

https://github.com/YoanWai/agent-manager
57•yoanwaidev•4h ago•40 comments

I made a game where you build a CPU from logic gates

https://select.supply/game/chipbuilder
29•laurentiurad•2h ago•18 comments

Carolina Cloud pays SOFR on unused prepaid credits

https://docs.carolinacloud.io/organizations/prepaid-interest/
50•bojangleslover•4h ago•29 comments

The coolest use for the Vision Pro

https://christianselig.com/2026/07/vision-pro-house/
766•robbiet480•17h ago•289 comments

3D Pinball for Windows (1995)

https://98.js.org/programs/pinball/space-cadet.html
15•mushstory•2h ago•4 comments

The Glass Famine

https://edconway.substack.com/p/the-glass-famine
54•baud147258•2d ago•21 comments

Go LLM SDK for streaming, tool-calling AI backends (plus frontend React lib)

https://github.com/grafana/ai-sdk
21•matryer•2h ago•5 comments

LLM Honeypot

https://llm2human.pages.dev/
341•8thom•15h ago•94 comments

Google will expand age checks on Android worldwide till the end of the year

https://android-developers.googleblog.com/2026/07/google-play-age-signals-api-safer-experiences.html
192•dmantis•3h ago•220 comments

The first watch featuring computer functions

https://by.seiko-design.com/140th/en/topic/58.html
52•stefanv•4d ago•24 comments

GCC steering committee announces AI policy

https://lwn.net/Articles/1086041/
143•arto•2h ago•153 comments

You can't solve computer use by ignoring the interface

https://steelmanlabs.com/blog/computer-use-is-far-from-solved
18•mpavlov•2h ago•1 comments

The Productivity Mirage

https://frantic.im/mirage/
305•msephton•14h ago•135 comments

Azulejo

https://en.wikipedia.org/wiki/Azulejo
96•Amorymeltzer•1d ago•33 comments

Are We Stuck with Lean?

https://mathoverflow.net/questions/513742/are-we-stuck-with-lean
13•jjgreen•2h ago•1 comments

CosmosEscape: Taking over Every Database in Azure Cosmos DB

https://www.wiz.io/blog/cosmosescape-taking-over-every-database-in-azure-cosmos-db
13•uvuv•1h ago•5 comments

ChatGPT, Roblox to Fall Under Strictest EU Rules for Platforms

https://www.bloomberg.com/news/articles/2026-07-29/chatgpt-roblox-to-fall-under-strictest-eu-rule...
43•ch_sm•2h ago•28 comments

The Alice and Bob After Dinner Speech (1984)

https://hex.ooo/library/alicebob.html
3•kamma4434•3d ago•1 comments

Anatomy of a Frontier Lab Agent Intrusion: A Timeline of the July 2026 Incident

https://huggingface.co/blog/agent-intrusion-technical-timeline
432•artninja1988•1d ago•234 comments

The Cold Email

https://zachholman.com/posts/cold-email
264•holman•17h ago•102 comments