Drosophila segmentation is a well-established paradigm for developmental pattern formation. However, the later stages of segment patterning, regulated by the "pair-rule" genes, are still not well understood at the systems level. Building on established genetic interactions, I construct a logical model of the pair-rule system that takes into account the demonstrated stage-specific architecture of the pair-rule gene network. Simulation of this model can accurately recapitulate the observed spatiotemporal expression of the pair-rule genes, but only when the system is provided with dynamic "gap" inputs. This result suggests that dynamic shifts of pair-rule stripes are essential for segment patterning, and provides a functional role for the observed posterior-to-anterior gap domain shifts that occur during cellularisation. The model also suggests revised patterning mechanisms for the parasegment boundaries, and accounts for the even-skipped null mutant phenotype. Strikingly, a slightly modified version of the model is able to pattern segments in either simultaneous or sequential modes, depending only on initial conditions. This suggest that fundamentally similar mechanisms may underlie segmentation in short-germ and long-germ arthropods.