Analysis of modular arithmetic

  • Authors:
  • Markus Müller-Olm;Helmut Seidl

  • Affiliations:
  • Fachbereich Informatik, LS 5, Universität Dortmund, Dortmund, Germany;Institut für Informatik, I2, TU München, München, Germany

  • Venue:
  • ESOP'05 Proceedings of the 14th European conference on Programming Languages and Systems
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

We consider integer arithmetic modulo a power of 2 as provided by mainstream programming languages like Java or standard implementations of C. The difficulty here is that the ring ℤm of integers modulo m = 2w, w 1, has zero divisors and thus cannot be embedded into a field. Not withstanding that, we present intra- and inter-procedural algorithms for inferring for every program point u, affine relations between program variables valid at u. Our algorithms are not only sound but also complete in that they detect all valid affine relations. Moreover, they run in time linear in the program size and polynomial in the number of program variables and can be implemented by using the same modular integer arithmetic as the target language to be analyzed.