A KNOWLEDGE-BASED SYSTEM FOR