Representing Control Knowledge as Abstract Tasks and Metarules