Summary form only given. Cyber-Physical Systems (CPS) consist of computational components interconnected by computer networks that monitor and control switched physical entities interconnected by physical infrastructures. Ensuring stability and correctness (both logical and temporal) of a Cyber-Physical System (CPS) as a whole is a major challenge in CPS design. Any incorrectness or instability in one component can impact the same features of other components. The fundamental challenge in developing a design framework that unifies the various components is the heterogeneity of the component types, resulting in semantic gaps that must be bridged. For example, while the physical entities in a smart grid are electric devices whose stability and correctness may be expressed in terms of Lyapunov and Lyapunov-like functions, the notion of correctness in the context of the cyber devices are best expressed in the form of a conjunction of logical operators on system parameters. In our work, we employ a fundamentally different approach than much existing work; our work composes correctness instead of functionality. The basic idea, is to express the stability and correctness constraints of all components in the form of logical invariants and ensure that system actions are performed only if and when they are guaranteed not to violate the conjunction of these invariants. In recent work, we developed invariants that must be satisfied by the physical system to ensure its stability. However, the state of the physical system and, hence, its stability, is dependent on power transfers (migrations) initiated by the cyber algorithm within each node in the system and by the state of the communication network that carries messages between the cyber nodes to signal initiation and acknowledgement of physical power migrations. The state and stability of the communication network is in turn affected by the number of migration messages in transit at any given time. In this poster, we present a distributed, adaptive algorithm for scheduling power migrations between nodes in a smart grid in such a way that the overall stability of the system, including physical and network stability, is maintained. The results show that preserving the system invariant preserves system stability.