Algebraic specification of reasoning systems