Hình dạng thực tế của các đối tượng được phân bổ (một cây) trở nên rõ ràng khi sơ đồ năng động được coi là. Tuy nhiên, họ không thể được thực hiện một mình, vì họ không đại diện cho tất cả các trường hợp có thể có thể xảy ra trong chương trình. Kiểm tra sơ đồ đối tượng tĩnh cho phép phát hiện | 124 6 State Diagrams Fig. shows the pseudocode of the recovery algorithm. It assumes that an abstract domain for the class variables has already been properly defined. First of all the algorithm determines the initial states in which any object of the given class can be. This is obtained by executing an abstract interpretation of each class constructor starting from an initially empty state see line 3 . The state obtained at the exit of each constructor after abstract interpretation is one of the possible initial states for the objects of this class line 4 . Such a state is also a possible starting point for a further method invocation so that it must be inserted into a set of pending states pend-States that will be considered later by abstract interpretation line 5 . Each available class method will be applied to them. Moreover the state reached after constructor execution is one of the states to be included in the resulting state diagram. Correspondingly it is inserted into the set of all the states in the diagram allStates line 6 . All the edges in the state diagram that end at the initial states recovered in this phase depart from the entry state of the diagram which is conventionally indicated as a small solid filled circle. Then the recovery algorithm repeatedly executes an abstract interpretation of the class methods as long as there are pending states to be considered loop at line 8 . Each pending state is removed from pendStates line 9 and each class method is interpreted using the removed pending state as the initial state line 11 . When the final state obtained by the abstract interpretation has not yet been encountered it is added both to the set of still pending states line 13 and to the set of diagram states line 14 . Recovery of the edges in the state diagram is not explicitly indicated in Fig. . However the related rules are quite simple. As described above the initial states initStates are the targets of edges outgoing from the entry state.