Software Safety: Foundations and Experience