Formal Reliability Analysis of Engineering Systems