Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Enumeration;
- import java.util.List;
- import java.util.Properties;
- import joeq.Class.jq_Method;
- import joeq.Compiler.Quad.BasicBlock;
- import joeq.Compiler.Quad.ControlFlowGraph;
- import chord.program.Program;
- public class PrintBB {
- public static void main(String[] args) {
- printSysProperties();
- // chord.project.Config
- Program program = Program.g();
- for (jq_Method m : program.getMethods()) {
- if (!m.isAbstract()) {
- ControlFlowGraph cfg = m.getCFG();
- List<BasicBlock> bbs = cfg.reversePostOrder();
- for (BasicBlock b : bbs) {
- System.out.println("DUMP::");
- System.out.println(b.fullDump());
- }
- }
- }
- }
- public static void printSysProperties() {
- Properties p = System.getProperties();
- Enumeration keys = p.keys();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- String value = (String) p.get(key);
- System.out.println(key + ": " + value);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement