Normative systems and their revision: An algebraic approach