Developing applications for smart spaces is a challenging task. Most programming systems narrowly focus on the embedded computer infrastructure and neglect the spatial aspect of this fusion between a physical and a virtual environment. Hence, application logic is not implemented for the smart space but for the embedded network, which is only one aspect of the system. Our programming system supports an abstract model of a smart space. A high-level language is used to implement the application logic for this model. In this paper we show how a compiler translates code written for this abstract model into a distributed application that can be executed by a computer infrastructure. The compiler allows for a clear separation between the application code and its execution in a concrete network. This simplifies the development and maintenance of an application because the application programmer can focus on the actual application logic for the smart space instead of issues related to a concre...