Foundations of knowledge engineering