Failure detection is a difficult and often expensive task. The principle of self-healing addresses this cost issue, but poses new research questions. This work focuses on detecting nontrivial failures that are hard to specify and difficult to detect within the context of self-healing software. Typical failures in this class would be problems arising at the component integration level. In this paper we discuss general requirements for failure detection in self-healing software, propose an approach to automatically map system level specifications to run-time checkable code-level assertions, and illustrate our technique through an example. Categories and Subject Descriptors D.2.1 [Software Engineering]: Requirements/Specifications; D.2.4 [Software Engineering]: Software/Program Verification—Programming by contract General Terms design, reliability Keywords failure detection, self-healing, model driven engineering