Abstract measurement theory