Kiama to rewrite value-of instructions