Patent attributes
The invention relates to a method for compiling a source code to a program code, the method comprising: providing a pattern graph based on the source code, the pattern graph corresponding to an intermediate representation of the source code according to a set of rules in a first programming language, wherein the set of rules comprises a specific replacement rule directing a pattern graph to be replaced by a corresponding replacement graph assigned to the pattern graph, replacing the pattern graph by the replacement graph assigned to the pattern graph, and generating the program code based on the replacement graph.