An ASM Semantics for UML Activity Diagrams and UML State Machines