Knowledge engineering technology and its application to factory automation