  Dealing with context dependent knowledge has led to different formalizations
of the notion of context. Among them is the Contextualized Knowledge Repository
(CKR) framework, which is rooted in description logics but links on the
reasoning side strongly to logic programs and Answer Set Programming (ASP) in
particular. The CKR framework caters for reasoning with defeasible axioms and
exceptions in contexts, which was extended to knowledge inheritance across
contexts in a coverage (specificity) hierarchy. However, the approach supports
only this single type of contextual relation and the reasoning procedures work
only for restricted hierarchies, due to non-trivial issues with model
preference under exceptions. In this paper, we overcome these limitations and
present a generalization of CKR hierarchies to multiple contextual relations,
along with their interpretation of defeasible axioms and preference. To support
reasoning, we use ASP with algebraic measures, which is a recent extension of
ASP with weighted formulas over semirings that allows one to associate
quantities with interpretations depending on the truth values of propositional
atoms. Notably, we show that for a relevant fragment of CKR hierarchies with
multiple contextual relations, query answering can be realized with the popular
asprin framework. The algebraic measures approach is more powerful and enables
e.g. reasoning with epistemic queries over CKRs, which opens interesting
perspectives for the use of quantitative ASP extensions in other applications.
