Robot Control Systems as Contextual Logic Programs