A formalisation of Adaptable Pervasive Flows.