1: \begin{abstract}
2: We exhibit an algorithm to compute the strongest polynomial (or
3: algebraic) invariants that hold at each location of a given affine
4: program (i.e., a program having only non-deterministic (as opposed
5: to conditional) branching and all of whose assignments are given by
6: affine expressions). Our main tool is an algebraic result of
7: independent interest: given a finite set of rational square matrices
8: of the same dimension, we show how to compute the Zariski closure of
9: the semigroup that they generate.
10: \end{abstract}
11: