Patent attributes
The disclosure relates to a method for constructing a graph data structure as an intermediate representation of source code for a compiler configured for compiling the source code into executable machine code running on a processor of a computer system, wherein program operations of the source code are represented in an object-oriented programming language by objects of classes that form a hierarchy growing from a base node class of the graph data structure, the method comprising: producing new nodes of the graph data structure by calling factory methods associated with existing nodes of the graph data structure based on a factory method design pattern implemented in the nodes of the graph data structure, wherein the nodes of the graph data structure are identified by symbols; and using the symbols as proxies of the nodes of the graph data structure according to a proxy design pattern.