Our middleware approach, Context-Oriented Software Middleware (COSM),
supports context-dependent software with self-adaptability and dependability in
a mobile computing environment. The COSM-middleware is a generic and
platform-independent adaptation engine, which performs a runtime composition of
the software's context-dependent behaviours based on the execution contexts.
Our middleware distinguishes between the context-dependent and
context-independent functionality of software systems. This enables the
COSM-middleware to adapt the application behaviour by composing a set of
context-oriented components, that implement the context-dependent functionality
of the software. Accordingly, the software dependability is achieved by
considering the functionality of the COSM-middleware and the adaptation
impact/costs. The COSM-middleware uses a dynamic policy-based engine to
evaluate the adaptation outputs and verify the fitness of the adaptation output
with the application's objectives, goals and the architecture quality
attributes. These capabilities are demonstrated through an empirical evaluation
of a case study implementation