We propose a rule-based approach for transforming B abstract machines into UML diagrams. We believe that important insight into the structure underlying a B model can be gained by representing it in UML, for example in order to explain the model to stakeholders that are not experts in the B formalism. We focus on the generation of class diagram and state machines. Our approach does not prescribe a mechanic algorithm for translation, giving the modeler choices to adapt the resulting UML models as appropriate. Categories and Subject Descriptors D.2.1 [Software Engineering]: Requirements / Specifications; D.2.2 [Software Engineering]: Design Tools and Techniques; D.2.4 [Software Engineering]: Software / Program Verification Keywords B method, UML, class diagram, state machine