A Structured Logic Programming Approach to Robot Programming