1. A method comprising: receiving one or more input source code files of an n-tier input application, the input source code files comprising a plurality of programming code constructs in one or more input grammars of a source programming language; receiving one or more target grammars of an output application that constrain a target architecture of the output application; receiving an architectural specification corresponding to the n-tier input application; receiving a target architectural specification corresponding to the target architecture of the output application; generating an annotated abstract syntax tree representing at least one programming code construct in the one or more input grammars of the source programming language from at least one input source code file, the annotated abstract syntax tree being generated based at least on one or more target grammars of a target programming language, the architectural specification of the n-tier input application, and the target architecture specification, wherein at least one annotation of the annotated abstract syntax tree comprises a transformation rule to map the programming code construct in the one or more input grammars of the source programming language from the at least one input source code file represented in the annotated abstract syntax tree to the target architecture of the output application; and generating target source code for the output application based at least on the annotated abstract syntax tree, the target source code being semantically equivalent to input source code in the one or more input source code files while comprising at least one mobile component and at least one server component.