1. A method of transforming graphical models, comprising: providing a graphical model; converting the graphical model into an intermediate representation (IR), the IR suitable for conversion to a target language; altering the IR of the graphical model; and converting the altered IR into a graphical model.