1. A method of transforming a source model to a target model, comprising: receiving the source model; accessing a transformation specification comprising a set of rules, each rule of the set of rules comprising a pattern description and a production component, the pattern description comprising a pattern in the source model and the production component comprising an algorithm for generating an output in the target model from the pattern; for each expression in the source model: decomposing the expression into sub-expressions; detecting matching rules in the transformation specification for the expression and the sub-expressions; selecting one of the matching rules having a most specific pattern description; and executing the production component of a selected rule to generate the output in the target model; and creating the target model from generated output.