Foundations of Smart Manufacturing