AbstractDetecting information flows inside a program is useful to check non-interference or independence of program variables, an important aspect of software security. In this paper we present a new abstract domain C expressing constancy of program variables. We then apply Giacobazzi and Scozzari’s linear refinement to build a domain C→C which contains all input/output dependences between the constancy of program variables. We show that C→C is optimal, in the sense that it cannot be further linearly refined, and condensing, in the sense that a compositional, input-independent static analysis over C→C has the same precision as a non-compositional, input-driven analysis. Moreover, we show that C→C has a natural representation in terms of Boo...