Static Semantics as Program Transformation and Well-Founded Computation