Re: "US, Canada finally ground 737 Max jets..."
Avionics software have to meet very strong requirements (DO-178 for real software and DO-254 for "firmware" code like FPGA), with separate development and verification teams, tracing all requirements, software AND test software (including all scripts and tools), and lots of documents registering who did what. Quite like the mechanical parts, then.
Now there are several levels of certification (DAL), including the lowest level where (almost) nothing is certified.
And on top of that, you're just certifying that you designed / coded what was requested, not that what was requested made any sense. So you clearly can certify that 2+2 makes 5, you "only" have to write it in a such a way that all teams from specs, coding, verification and the like will not realize that it doesn't actually make sense.
For example like certifying that releasing the brakes of the plane if their pedal is pressed "too strongly" should make a perfectly complete and usable ABS system, saving the tires from blowing because of getting stuck (an interesting goal). But without ever asking any system anywhere to start braking again later...