High-confidence medical device software and systems