Patent ID: 8074208

Claim:
A method of detecting recursive instantiation loops in a wireless application, the method comprising steps of: constructing, in an analysis step separate from application execution, a digraph including a respective node for each data component in the wireless application, and a respective edge for each relationship between a pair of data components, wherein the wireless application comprises application logic written in one or more imperative programming languages and wherein each of said data components is at least one of a data structure or object implemented in at least one of said imperative programming languages; searching the digraph to identify any cycles; and for each identified cycle, identifying each data component that participates in the cycle, wherein the step of searching the digraph comprises a step of recursively following a path of successive edges and, if an edge is found for which the destination node is a node that is already part of the path, asserting that a cycle has been found, and wherein the step of recursively following a path of successive edges comprises: maintaining a stack of nodes visited; pushing a node on to the stack of nodes visited when said node is visited; and popping said node from the stack of nodes visited when all outgoing edges from said node have been followed, popping said node from the stack of nodes visited when all outgoing edges from said node have been followed, wherein determining whether a destination node is already part of the path comprises checking if the stack of nodes visited contains said destination node.