Formalising Design Patterns as Model Transformations