Qualitative Reasoning: Theory and Applications