Fail-operational software for next-generation autonomous vehicles, SAE L3-L5, and x-by-wire system