Towards a Scientific Foundation for Engineering Cognitive Systems