To realize the vision of SDN - -an "app store" for network-management services - -we need a way to compose applications developed for different controller platforms. For instance, an enterprise may want to combine a firewall written on OpenDaylight with a load balancer on Ryu and a monitoring application on Floodlight. To make this vision a reality, we propose a new kind of hypervisor that allows multiple applications to collaborate in processing the same traffic. Inspired by past work on Frenetic, our hypervisor supports a flexible configuration language that can combine packet-processing rules from different applications using sequential and parallel composition. A major challenge is efficiently combining updates to each prioritized list of OpenFlow rules, based on the hypervisor policy. Our key insight is that rule priorities form a convenient algebra that allows the hypervisor to compute the correct relative priorities of new rules incrementally, without shifting or rewriting the priorities of existing rules. We prove the correctness of our algorithms and show experimentally that these techniques can reduce computational overhead by 4X and the number of rule updates by 5X, compared to existing techniques.