Semantic Analysis and Consistency Checking of UML Sequence Diagrams