This paper introduces a novel framework for Ontology-Driven Software Engineering. This framework is grounded on the prior related work that studied the interplay between the modeldriven engineering and the ontological modeling. Our framework makes a contribution by incorporating a more°exible means for ontological modeling that also has a higher performance in processing, and by incorporating a wider range of ontology types into ODSE. As a result, it extends the power and speed of the classi¯cation and the model consistency checking ontological services enabled by the prior work, and brings new ontological services: semantic search in model repositories, three kinds of semi-automated model composition services: task-based, result-based, and opportunistic, and the policy enforcement service. The primary intended use for this framework is to be implemented as part of model-driven engineering tools to support software engineers. We describe our reference implementation of such a tool called Smart Modeller, and report on a performance evaluation of our framework carried out with the help of it.