Using abstract syntax tree as the basis of static analysis of Java program have many difficulties. The paper defines a XML data structure for Java bytecode, instead of abstract syntax tree as the basis of static analysis of Java program. The XML data structure is formally defined by using Java bytecode specification and XML schema specification. Comparing with the method that converts Java source code to the XML data structure directly, the paper analyzes advantages of the bytecode-based conversion method and difference of the XML data structure between bytecode-based method and source code based method. Using the XML data structure for Java bytecode, the paper defines the method that splits the declaration part and implementation part of Java program. It also emphasizes the importance of splitting process. Finally, the paper demonstrates the XML data structure of the example program.
展开▼