Hacker News new | ask | show | jobs
by turbobutton 20 days ago
I believe there's a hard distinction between abstract, mathematical correctness in software and functioning in the real world. Any software that's processing inputs and provides complex workflows to humans has to necessarily deal with the endless vagaries of reality.

That's not to say there isn't value in formal correctness, but the important part is identifying when it's useful and when its more trouble than its worth...

16 comments

For me it seems more like modern software has built away from using formal mathematical models in the first place, not the necessarily the problem people want to solve have to have such a fuzzy definition of domain, but that the primitives of operating systems and software development have gone in the other direction.

Think about the filesystem, the big issue with formalizing a program spec that operates on a file system is simply the fact it is essentially a shared object amongst all the programs running on the system. Add to that the fact that (though this changes with modern containerization systems, namespaces, pledge what ever) a program may at any point gain access to root permissions if it makes the system call to do so providing the correct credentials it becomes very difficult formally be able to remove any possible states from the system.

All this could be different but we would radically need to redesign are systems and the way we think about the problems.

A challenge in high-reliability software is that the systems they are running on top of have few reliable properties. Even if you formally verify some code, you have to write vastly more code to deal with the possibility that the invariants suddenly change at runtime due to an idiosyncratic failure of the environment where that formally verified code runs.

This is one of the real limits of formal verification. Defects or subtle inconsistencies in hardware are not that uncommon. This is mitigated to a some extent by using assertions in release builds but this has significant limitations.

yeah, I find when I write most software and am careful with testing that most of the bugs break down like this:

* 49% : specification error - wrong thing built in the right way

* 49% : bug involving something the software integrates with (e.g. 3rd party library, UI, database, API endpoint)

* 2% : code bugs

formal verification won't eliminate that 2%. it might get it down to 1%. there are still two enormous elephants in the room.

this is why everyone talks about it and nobody does it.

> * 49% : specification error - wrong thing built in the right way

This is why experienced devs says they spent half their time trying to get concrete requirements. You don't need to code something to know that the change request is incomplete and need more details.

> * 49% : bug involving something the software integrates with (e.g. 3rd party library, UI, database, API endpoint)

That's the reason there's a lot of books written about architecture and the necessity to push the dependencies to the edges of your code. Easy to patch stuff that way.

> * 2% : code bugs

With good tests, you can get this down quite low.

> A challenge in high-reliability software is that the systems they are running on top of have few reliable properties.

I don't dispute this, and is infact related directly to my point, it seems that people are reading my comment as formal verification is a Panacea, I was only trying to point out that are primitives and abstractions provided by operating systems as well as programming languages are one major area that stops one from writing a formal spec.

Real formal verification is very very hard.

You do seem to miss the point that I am saying many of these subtle inconsistencies can be still complex but encoded into a formal model and I was showing how the file system abstraction adds it's own complexities.

Operating systems probably would be one thing that could be a massive project to undertake but would be worth it. We already have a formally verified micro kernel sel4 that proves lots of useful features and as you point out hardware issues an important thing at this level of correctness and sel4 simply assumes certain models for this.

> Operating systems probably would be one thing that could be a massive project to undertake but would be worth it

I don't think so. Even if you take small embedded project, there's a lot of unreliability that could creep in. You're not really sure what you got from a sensor is good or noise. Which is why you got all those error checking and ack in the protocols. You can make assumptions and try to verify your own code, but that's only if it brings enough benefits (mostly give you a clear sense of how likely something could go wrong). And that holds only for one version of the software.

You can do reliability study on hardware because it stays mostly in one configuration. But all bets are off if you're constantly modifying stuff inside.

The example you gave is maybe one of the ones where this is least applicable. For systems with MMU's one would tend to use microkernels (like sel4) and then write driver servers for different components and the driver servers should be where hardware errors are handled. sel4 is only for systems with MMU and it's pointless outside of it.
Regarding formally verified OSes, IIRC an early version of CICS (what we would call application server today) has been formally verified in the 1980s.
I think data centric system and data centric OS is the way to go, and we should move away from file centric system and filesystem oriented OS, even more so now with AI and agentic systems are on the rise [1].

Please check the data centric OS proposed by Stonebreaker and his team from Stanford, MIT, Google and VMware, and the pre-cursors to it namely TabulaROSA by the MIT team and also Twizzer from UC Santa Cruz [2],[3],[4].

These are excellent books by Dave McComb on the subject of data-centric software paradigm and why we need this new paradigm shift [5].

[1] Why We Need A Data-Centric OS For AI:

https://www.nextplatform.com/control/2025/05/27/why-we-need-...

[2] DBOS: A DBMS-oriented Operating System [PDF]:

https://vldb.org/pvldb/vol15/p21-skiadopoulos.pdf

[3] TabulaROSA: Tabular Operating System Architecture for Massively Parallel Heterogeneous Compute Engines:

https://dspace.mit.edu/entities/publication/69c8906b-440f-49...

[4] Twizzler: A Data-centric OS for Non-volatile Memory:

https://dl.acm.org/doi/10.1145/3454129

[5] Software Wasteland and The Data-Centric Revolution:

https://technicspub.com/software_wasteland/

There is also my very much related open source product that takes a practical approach, and is inspired by this research. Kind of a modern equivalent for Transaction Processing monitors that mainframes use, based on transactional, hierarchical state machines. It has built-in verification system. Not tested under production use yet.

https://voucha.net

Basic problems such as change over time and interoperability are reasons why formal methods break.

Formal specification presumes a priori a great deal of control over the world in general, especially the more you move away "from nature" and more towards what a human might want to instantiate themselves. Formal methods often try not to deal with things they don't "understand", or try to abstract the parts that "don't matter" away. But inevitably it changes, and the repsonse to that change is to subsume more and more into your own ontology so you understand the nuances. Or you simply control all interoperable endpoints, and so the nuances vanish away, because you're in control.

This is great when the battle is against nature. "Nature", for all its ambiguities, we generally can assume to be stable. What about with human society?

In some sense, there might not be much to formal methods if you could solve the underlying capability of getting everybody to agree on the semantics in the first place, and have no desire for change at all. But that is an absurdly strong requirement. Formal methods is constantly a race to try and find good abstractions and then breaking them.

I don't think there really is a way out of this, but I'm not that creative :/

Capsicum did this for the POSIX model, and they have rigorous analyses (and maybe proofs). But of course the first thing they did was remove the filesystem namespaces from the process, requiring significant rearchitectures of existing software. You can still use file descriptor passing to give file and even directory access, but it still requires some significant work.

Linux never accepted the Capsicum patches, but they eventually added process descriptors and some important openat flags so that almost all the difficult pieces are effectively in place.

I don't know how far along they've gotten (presumably not as nearly far as OpenBSD has gotten with pledge+unveil refactorings), but FreeBSD reworked many of their utilities and services to utilize Capsicum.

Capsicum was an amazing project. I am not familiar with where it is at the moment and not freeBSD user (though looks more and more tempting) and I thought a lot of it went largely unused, if you have any links on how they built stuff around it I would be very interested.

> OpenBSD pledge+unveil This was one of those things that now seem obvious, and is elegant albeit in that unixy way. From what I can tell one could built something on linux with seccomp or openbsds pledge to implement a runtime that could allow for implementing such structures all in usersapce not just process isolation but creating IPC that allows for determinism and other things. (I think it's more seccomp with filtering syscalls though where this becomes feasible I don't know if anyone has done this before)

Customer request: make a software that makes drawings that look good/my style/...

Where do you start for formalizing this?

You start by defining a loss function.
for example here was how some design rules got formalized into a checker during a video editing session of several hours: https://github.com/emberian/vidbox/blob/dev/render/drc.py
I mean would you take that spec as something you could deliver? This is not a real problem spec and is incredibly vague, but the first question would be around building a formal model for the drawing part of the application (and is the main aspect of the program) that might be easier then it first seems. There are various ways you could model the draw window depending on if it's a rasterizing program or a vector program either way not challenging, then formalize the operations of the program (various effects will necessary be well defined mathematical functions in the first place) and then prove what ever you feel you have to prove about the system. This is not to say it is easy or especially in this case you should even do it and my point was more about the system aspect of things or things that one would want to be able to reason about.

An example of a spread sheet program might have been more productive example or a http API server or some kind of middle where program. I feel like you picked the most obtuse example possible even though my point was not to cover all possible programs that one might want to write.

> I mean would you take that spec as something you could deliver?

Yes, that's the kind of contract we take on regularly. My point is that the exact thing the customer wants/needs is the one part that can't be formalized meaningfully - it's good when we show them something and they tell us is good. Everything else doesn't matter - could be the worst UI, maybe you have to reboot the computer once before starting it and once after exiting it, maybe it leaks enough memory that you have to reboot every day anyways - what matters for them to pay you is "do they like the drawing quality" and really nothing else

> Yes, that's the kind of contract we take on regularly. My point is that the exact thing the customer wants/needs is the one part that can't be formalized meaningfully

I think that's fine though. The exact fuzzy thing the customer wants is typically still built on top of a ton of stuff that can be verified. I'm not sure it needs to be either-or. You formalize what you can, and do your best with what you can't. Ideally (if we could find a way to make formalized software cheaper/easier to build) it would reduce time wasted on the stuff that can be formalized, and allow spending more time on the stuff that can't be.

I don't write these sort of programs but my thinking is that 'draw nice' is vague and I would not know what that means and indeed that is a fuzzy spec I would have only thought you needed more clarification on what good or nice here means and it sounds like what you do is actually work out most of what the program has to do and really they have asked you to make them a drawing program with them giving you input along the way.

This indeed could not be formalized by it's very nature. I was not making a claim on the applicability or even the desirability for all programs and I think many people who have not look at it properly overestimate it's applicability.

What I was trying to say is for the subset of programs that one would want to formalize (such as the examples I gave) the task could be much easier if we have formal primitives, including operating system primitives and networking primitives to provide guarantees.

My other point would be that a lot of developers and projects are writing code that could potentially prove properties and benefits could be derived from proving these properties. I would look at middleware programs as some of the obvious ones that could massively benefit from such techniques and formalization (though things like streams can be much more easily formalized and modeled correctly).

I don't write those sorts of programs either. There is evidence that some people do write that sort of program with varying amount of success in "draw nice". I'm sure such people could write books on what draw nice means. I would refuse such a job because I don't have the right expertise, and you probably wouldn't hire me for it even if I would accept it. However hire the right expert and you can probably get what you want even though at the start you don't even know what you really want - the other option is the expert will quickly realize is what you want is not what they can do and either tell you not to waste your money or warn you that you are going to spend a lot of money on an open ended research project that may or may not produce results.
The contract may be that, but then as part of that contract you work together with the client, using your experience and foresight to actually create a more detailed "spec". That is still not completely formalized, but your developers/colleagues using their experience in other projects can "draw the rest of the owl" from that semi-vague spec -- and the final delivered software is the spec itself in a way.

It's absolutely not impossible to simply add one more layer in-between the developers "drawing the rest" and delivery. They just not formalize it as software in one go, but "in two".

That is very common for something given in the industry. It is our job as programmers to first figure out what the customer really wants, and then create enough of the requirements/spec to deliver it. That is one of the reasons for Agile vs Waterfall processes: nobody really knows what they want in the first place so you deliver something that you think is close and work with them to come up with something acceptable (acceptable covers both it does what they want, and also the cost to make it better). Any formal spec needs to be adjustable as we figure out requirements.

OTOH, we can probably call a much less formal spec good enough. Just that it doesn't write past the end of buffers would be very helpful. We can also throw a bounds in - if we can't prove it in X iterations then call it false (expect to adjust X to very large)

Not that vague first you need to know what the customer means by good. I was not making claims on the applicability of formal methods any way, only the point I was making about the primitives.
Inductively, in which case data labels are the spec and having good data is still the hardest part ;-)
That is not the hard part at all of formalizing a program spec on a file system. You just conditionalize your proof based on sane/desired usage of the file system.

The problem is even formalizing a file system at all. It is nearly impossible to even effectively prove something as simple as:

1. Program A creates a file, F, that only program A writes and writes some data.

2. Program B writes file G which correctly modifies untold amounts of arbitrary file system data structures.

3. Program A reads file F and sees the contents are unchanged.

If you could easily prove that for arbitrary programs that follow those very basic rules, then you would be able to formalize like 90% of file system usage.

The weaknesses and difficultys of formal methods are at a far, far lower level than people think.

My point was that file systems don't lend themselves to being able to easily reason about in such a way. I used to try and illustrate how many considerations have to be made when interacting with these sort of operating system services and when deploying the program you need to make sure the assumptions hold.

The sort of model you suggested does not map every possible state of the file system to a model state structure so one could have various problems with results of the proof.

I guess the difficulty of formal methods depends on how much and what you want to prove, there is no real formal definition as to when something becomes formal methods is a spectrum and includes algo/c type type systems to CoC proofs and extracted programs.

The model I suggested is intentionally as simple and trivial as possible to point out how we can not even reasonably solve the simplest and most trivial problems even if we get to just assume that complicated considerations do not apply.

You are doing the metaphorical equivalent of arguing how using antimatter for power is hard because we can not efficiently harness gamma rays when the harder and more immediate problem is that we do not have antimatter.

The problem is part of the domain of the program is the file system. It seems you agree with me in your previous point but only say that you don't want to consider it then claim it is fair easier.

My point is exactly file systems are the problem you layout as much, the thing is simpler models would not be. Consider a simple look up table with the key being a name and the content being a resizable array that the program can fork off to other processes by value and not reference (kind of like let binding in common lisp) this is much easier to reason about and simpler.

What you can not do is start with something as complex as a file system and then say 'I am going to draw up simplified model and just assume my program will behave as so' You have to show that your program will treat the more complex thing in a way such that you can draw a mapping between the the state of the file system and the simplified model.

I don't think this is just me being overly pedantic, if I just assume my simplified models apply I scarcely prove anything.

I am also saying the solution is to use something simpler then a file system (from an interface point of view).

A “simple” lookup table is also nearly impossible. Any “service” in another process more complex than a array pointing at non-moving data where the client interacts with it exclusively using integer handles is extremely hard and strains the limits of modern proof systems.
I don't think it has to be radically different... type systems are one example of formal models which languages have been moving towards recently. Especially with how they synergize with AI. Mainstream type systems are limited, but AI can use esoteric type systems with stronger guarantees, like capability permissions systems, which solve some of the issues you're highlighting.
> type systems Indeed types systems are usually the way formal verification is done, I am not denying that. The problem I am claiming is not the tools of formal verification but the domain one has to model and capture.

What I was trying to show is the nightmare of modeling accurately and in a way that matters lots of operating system primitives and further reasoning about when the assumptions have been violated by the program set up.

Indeed this does not effect the stuff outside the interaction of the program with the operating system and my point when it came to modern programming primitives is that not all data structures or methods of programming lend themselves to being able to write formal proofs about them.

You might be able to have a type BigInterfaceTypeThatDoesLotsOfThings<a> but this might be impossible to formalize in any meaningful way and AI is not the panacea and this stuff is not easy and require hard thinking.

Additionally a lot of formally verified programs are done via constructive proofs where you build up the correct program from primitives and extract the program and prove it that way. This requires generally requires a type system that has a complete inference algorithm like ML type-systems and are much harder to work with and you have to set up knowing you want to do this sort of thing.

Capability systems indeed make a lot of sense for operating system level constraints and I agree this is a sensible direction and combined with type systems you can build some very powerful permission systems. But these do not solve formally verifying lots of behaviors and good capability system in my opinion (and something I worked on previous as a side project that is completely unfinished and abandoned.) need mathematical primitives and structures that lend themselves to proofs and being restricted by capabilities.

Note capabilities become a program themselves and types can become programs, so getting your types right has the same issues in the first place when talking about this level of formalization.

I agree with you that for most software, verification was historically less of the requirement, however some software always needed to have abstract, mathematical correctness -- think military, medical, industrial automation.

While these areas were main premise of an article when it was written, I think the article really aged well into current time of mass AI/LLM deployment. It shows fundamental limitations of token based systems / symbolic reasoning that LLM espouses internally, while writing correct software. These limitations also apply to humans, however humans mental modelling, being not fully based on symbolic processing, have been historically shown capable of writing correct software systems, while AI/LLM systems have not been proven to be able to do that, and as article shows that with current token based technology it's unlikely they will ever be.

> however some software always needed to have abstract, mathematical correctness -- think military, medical, industrial automation.

I think those domains has more stringent requirement and a more focused usage, making the classes of inout narrower. A lot of software for B2B and B2C tries to be a kitchen sink and in the result get turned into a ball of mud. Some stuff should just be separate software.

Most modern software is 5-10% algorithmic and mathematical precision, and 90-95% sticky glue. Most software developers write glue their whole life, importing the precision in the libraries, database engines, languages, or system calls.

Verifying a bunch of glue is more trouble than worth, though i think still a worthwhile exercise to explore. Even static code analysis engines are basically free bug hunting yet not used by most projects.

> I believe there's a hard distinction between abstract, mathematical correctness in software and functioning in the real world.

Sure, but people (perhaps including you) don't understand that it's foundational.

That is, it's not enough to be correct, but if your program isn't even correct there's basically no chance it does what you intended.

What I've learned this year is that we should be verifying the fridges..
Or thought more carefully about putting them on any LAN directly.
We should think hard before putting anything on the internet.
Well actually... home fridges sure; but having the fridges connected may be legally required to grantee the safety of the food they hold. Imagine a fridge thermostat dropping below legal fridge level for 3 hours each night, causing a 3 costumers to contract food poisoning

Now imagine being able to point to a monitoring system that report no errors from their ISO certified fridge fleet instead; they ate old leftovers on their own.

One could argue the fridge should just expose their temperature over a MQTT or Bluetooth mesh publisher protocol to a local data aggregator, rather than be connected directly to the local notwork with a out-of-date Linux computer.

But the contractor firm probably had a cheap development rate when they submitted their application for the work package and won the contract.

> not to say there isn't value in formal correctness, but the important part is identifying when it's useful and when its more trouble than its worth...

We ought to be able to build high-confidence software.

Unless you have bamboozled your customers completely, they should expect a product that you provide to be a) fit for purpose, b) fit for use, and c) secure.

We know of course that very little commercial software is (d) proven correct. Software Correctness (d) is hard, no question.

Just getting to ONE of { a, b, c } appears to be a bridge too far. But that's where professional rigour and diligence is required.

btw good article, u/turbobutton.

>We ought to be able to build high-confidence software.

We are, it's just incredibly expensive.

As a witty person once said, good software is expensive to make... and so is bad software.

Cheers!

This is just gratuitous platitude which for some reason people keep on repeating without much thought.

Mathematical Modeling is foundational. That is how the Scientific Method operates, whether you understand it or not. Your entire hardware and software stack is built upon mathematical structures and logic. Hence any use of those to solve any problem can and should use the same mathematical tools.

The only thing you can argue about is how much of "Formal Methods" application is necessary and enough to get "good" results in the real world. The formal methods community has solid advice for this too viz. learn to reason in a formal manner while writing code whether using formal specification/verification tools or not. It is the learning to think in mathematically formal terms that is important.

See my comment here for some resources and background - https://news.ycombinator.com/item?id=50478624

Note that the problem of mapping "Real world Expectations" to "System Requirements" which can then be expressed as "Specifications for a Mathematical Model" is a different one. But this is more of a philosophical problem viz. how much of reality can be modeled in mathematical terms? The answer so far when we really get down to it is "almost" everything. The qualifier is due to problems in ontology/epistemology, fundamental logic i.e. Deductive vs. Constructive, what to accept as truth etc.

The whole progress of Science and Technology is a testament to the above truth.

There is a wide range of software that exists in a "adversarial" environment, including anything facing a network or processing outside data. At a minimum, this software should should not allow an attacker to execute code of their choice on a system handling private data.

This does not require proving systems complete correct, but it does involve proving many properties of these systems.

I think part of the idea is to model all possible inputs and internal states. But your point is well taken, it's easy for your model to be incomplete and thus any proofs of its correctness veer off into irrelevance. That being said... modeling is useful because it allows you to reason about both the problem you're trying to solve and the process you're using to solve the problem. If you write outlines of correctness proofs beforehand, you can hit upon misunderstandings of the problem domain early when it's less expensive to change.

It's sort of like doing test-first and discovering, after writing a few tests, that your mental model of how data structures or processes might work was wrong. Seems better to discover these things earlier rather than later.

It's a classical scientific confusion how scientist proof their theories. There are basically two approaches. One is proving them correct, which works for a narrow set of theories (mostly mathematical ones). And another is by failing to falsify the theory. Which is what most scientist that aren't mathematicians have to do because their problem is too big/impractical to squeeze into mathematical theorem. For example Einstein had lots of theories and predicted their impact. Many of his theories predicted certain things that have since been demonstrated in the real world. But some of his other theories have been been proven not fully correct through experiments that falsified parts of his theories. The best you can say of his theories is that quite a few of them have withstood many attempts to falsify his theories, so far. Any replacement theory would be subjected to the same tests and objectively would not be better unless those all passed. As it turns out, there are several competing theories that each have their strengths and weaknesses on what tests they fail. None of them is fully correct for everything. But typically they are for most of the stuff we care about like orbital mechanics working more or less as Newton predicted.

Software verification in practice works more like physics than like mathematics. When you are testing software, you aren't trying to prove correctness but verifying that all your known ways of proving the software would be incorrect in some way are incorrect. I.e. the theory that the software is broken in a particular way is false. That doesn't mean it's not broken in a different way. And you can never get to full correctness this way because of the combinatorial explosion of inputs, parameters, etc. means the number of tests you'd have to run quickly goes to infinity. But if you cover most of the stuff you care about, you can at least build up some confidence over time that it probably does what it's supposed to mostly. Of course when LLMs then find new theories about breaking the software that are correct, you still have some issues to clear up.

Formal proofs have their place in things that are small enough in scope and high enough in value to justify using them and have that be feasible. That has been shifting a bit in recent years thanks to better tools, AI, and more compute. But it's still not very practical for large categories of software. If people want to unleash Lean on their vibe coded React thingy, good luck!

> Any software that's processing inputs and provides complex workflows to humans has to necessarily deal with the endless vagaries of reality.

Somebody really needs to draft some consensus specifications for users, so we can finally get them standardized.

> important part is identifying when it's useful

I would say it is important when ... other systems

1. Depend on the "correctness" of our system.

2. Depend on the correctness of the assumptions the other system's spec makes about its environment

I don't think there is a hard dichotomy (and I also think the original article is mostly wrong).

The software is always interpreted in the real world, and you can always convert the software plus the interpreter into a mathematical proof (via Curry-Howard isomorphism) that given input gives a given output. It is mathematically equivalent to running a program, up to the reliability of the interpreter and correctness of the mathematical model of the interpreter.

What might be a bit harder, to show, that a set of inputs causes a set of outputs. But that's just partial interpretation and depending on properties, in practical programs quite doable.

And frankly, existence of LLMs shows that you can quite easily prove most program properties. When LLM creates a program it translates a program description in natural language together with formal version of natural language (which it has from training) into a computer program. In other words, LLM doesn't work with the real world, but with a model of the real world. Although LLM's world model is not sound (in the sense that logical fragment of its reasoning has not been proven sound), many people are mostly happy with the results. This shows that LLM can preserve properties between the description of the program in natural language and the world model embedded in LLM (these often include implicit desirable properties), and the resulting source code to be executed. And if you're able to preserve the properties, the actual sound proofs transfer by construction, too (up to the few cases where LLM slips and reasons unsoundly, but AI labs are trying hard to reduce these cases to minimum).

You can combine both sometimes in application logic.

Some API:s can be perfect. But then the real world adaptation needs to happen inside the module serving the API.

Having been downvoted, I like to clarify that this comes from the experience working in finance with developers with a strong academic background that emphasized on the necessity of formal proof to a point where complexity made actual progress nearly impossible- while simultaneously basing the proof repeatedly on assumptions that did not uphold in practice.
Nah I don't disagree with you. Thing is even if you formally prove that for every input you produce a valid output. In safety certified software, there's the problem that if that input comes from a sensor, a sensor is an inherently probabilistic thing, and it may be that you will have false positives. The best you can do is build a safety case that even if you get false positives you end up in a safe state, but you can't guarantee that they won't ever increase operational costs.
I once had a sensor that rounded the data, so the output unwittingly fitted into a grid. The equations that had to be used on that data gave infinite results because the grid sometimes rounded slopes into vertical lines.

So I had to reconstruct a signal that fitted the data for the equations to work at all. But the reconstruction was no longer measured data. It was made up, and there was no single solution for fitting the data. That meant I could claim to "respect the data" while producing any result I wanted.

Reminds me of that von Neumann quote "With four parameters I can fit an elephant, and with five I can make him wiggle his trunk."
> "With four parameters I can fit an elephant, and with five I can make him wiggle his trunk."

Indeed: here are two papers on this topic:

Jürgen Mayer; Khaled Khairy; Jonathon Howard. Drawing an elephant with four complex parameters. 2010. https://pubs.aip.org/aapt/ajp/article-abstract/78/6/648/1042... Article without paywall : https://publications.mpi-cbg.de/Mayer_2010_4314.pdf

Dian Jin; Junze Yuan. Fitting an Elephant with Four non-Zero Parameters. 2024. https://arxiv.org/abs/2407.07909v1

Given that information can be encoded in a string of digits of infinite length, there is no limit to how precisely the elephant can be drawn. Any image file is a string of bits, a single parameter.
In cases like that you also will generally have three (or some odd number) of sensors and require a majority of them to agree to determine what your input is. Still not guaranteed to be correct, but the odds are better.
“3 B’s make a D” :D
what were some categories of such assumptions, can you name some examples?

a fun one that immediately comes to mind is asserting something holds for reals, but not evaluating whether it holds for IEEE floats, though maybe that's not really a thing in finance due to rounding related rules anyways

One of the arguments for formalizing it anyway is that when you inevitably make changes due to the real world, you can see exactly what else might need to change.

The same argument goes for type safety in general: would you rather "know" how it all works all the time and make the changes without assistance (ample evidence this is generally not possible beyond toy scale) and discover later what you missed, or encode expectations into types so a significant chunk of it is "chase compiler errors"?

No location on that continuum is ideal in all cases, there's plenty of room for variety.

I heard/read that the mRNA vaccine (component?) is programable. If correct and since it's hard to write a correct program the first time, then something that is inside you and inside you could be disastrous.
It's "programmable" as in you pass in a single constant. It's not a hard problem to verify constant c == constant c.