Model-Oriented Programming; code generation for UML class diagrams and state machines