We define a reduction system Ë¿ which preserves the stable semantics. This system includes two types of transformation rules. One type (which we call ˾) preserves the stable semantics regardless of the EDB (extensional database). So, it can be used at compilation time. The other (which we call ˽) does not preserve the stable semantics across changes to the EDB. Thus, it should be used at run time. Nonetheless ˽ can reduce the program size considerably and is quadratic time computable. Sometimes Ë¿ can transform a cyclic program into an acyclic one. At these times, a satisfiability solver can be used to obtain the stable models.