The type-checker 708 implements an algorithm or procedure for applying one or more rule sets 710 to each stage of the compilation process, and therefore to each representation of the IR. The rule sets 710 are selected based upon varying properties, such as the source language, stage of compilation, what strength of typing; etc.