From interpreter to compiler: a representational derivation