Logic-based algorithms for data interpretation with application to robotics