A foundation for a knowledge-base computer integrated manufacturing system