This project is focused on building long-lived, survivable software systems that can automatically adapt to new environments. To do so requires the ability to automatically recognize failures in existing devices, detect changes in the operation of existing devices, and adapt to new devices (e.g., sensors) that replace existing devices. We will address this problem by automatically constructing a rich semantic model of input and output data that is manipulated by the system devices. This model will be built using machine learning techniques to recognize and distinguish between various data types and automatic service composition techniques to adapt new devices to support existing functionality and to take advantage of new performance capabilities and features. In this project will develop methods for learning the operations of the existing devices in a system, recognizing the need to adapt due to changes in the operation of a device, and automatically adapting to new devices.