A Formal Semantics and Axiomatization for Specifying the Dynamics of Knowledge-based Systems