Ok so I've been down a rabbit hole (no pun intended) for the past few weeks reading about coalgebraic approaches to program analysis and I genuinely cannot tell if anyone is actually doing this in a practical setting, or if it's purely theoretical fodder. Let me lay out what I mean.
The standard story in abstract interpretation is: you have a collecting semantics defined as the least fixpoint ΞΌF of some monotone operator F on a complete lattice. You approximate it from below, you deal with termination via widening, you cry about precision loss. Fine. We've all been through this. We have a whole dedicated thread about the widening debate.
But here's the thing β not all interesting program properties are least fixpoints. Safety properties in particular have a natural reading as greatest fixpoints. If you think of "nothing bad ever happens" as an invariant that must hold at every step of execution, you're actually carving out the largest set of states consistent with some property β that's Ξ½F, not ΞΌF.
More broadly: the whole tradition of coalgebra / final coalgebra semantics gives you a completely different way to think about program behaviour. Instead of building up from the bottom with inductive data, you're observing from the outside β coinductive codata. Programs-as-coalgebras model state-based behaviour, transitions, streams of outputs. The semantics lives in the final coalgebra of some functor. This is conceptually beautiful but I've never seen it show up in, say, an actual static analyser anyone ships.
So my question: is anyone aware of work that uses coinductive/final coalgebra approaches β not just as a theoretical backdrop, but as a practical computational method for program analysis? I'm thinking things like:
- Greatest-fixpoint-based invariant generation (as opposed to widening toward ΞΌF)
- Bisimulation-based program equivalence checking
- Coinductive type systems that feed into analysis
- Actually computing with final coalgebras / anamorphisms in an analysis tool
References, personal experience, hot takes β all welcome. I'm aware this is very niche even for CGPA. π±