Termination techniques and tools from term rewriting literature
are proposed for showing termination of imperative programs
working on numbers. An imperative program is translated to a
constrained rewrite system in which rewrite rules are applicable
only at the top most level. Constraints are simple number
theoretic relations on program variables, expressible in
quantifier-free Presburger arithmetic. A rewriting sequence is
proved to directly mimic computations of an imperative
program. Termination of such rewrite systems is shown by adapting
the dependency pair method and the associated dependency pair
framework to the constrained equational rewrite system modulo
Presburger arithmetic. The proposed approach has been used to
prove termination of a large class of imperative programs.