|
From: <fra...@us...> - 2009-05-16 19:56:14
|
Revision: 1525
http://javapathfinder.svn.sourceforge.net/javapathfinder/?rev=1525&view=rev
Author: frankrimlinger
Date: 2009-05-16 19:56:04 +0000 (Sat, 16 May 2009)
Log Message:
-----------
details of BackupAlg.phase1 migration.
Prior to calling the SCANNER, the BackupAlg instance is created. In particular, the Instructions BadPlace, AbstractUconPlace, and OSplace are set up. I have decided not to use all caps for synthetic instruction classes anymore.
The solution for one-pass graph construction is to use MethodInfo and Instruction objects as proxies for src and destination vertices in the call and total graphs, respectively. This allows the old Branch class to be retired, as edges are created immediately.
Since updateTotalGraph is really doing a lot more than just the total graph, it is now called updateMangoModel
So updateMangoModel is now only passed the src vertex, and provides one-stop shopping for all instructions. in particular, the Mango routines processReturn, processThrow, and processNativeCall now just bounce to updateTotalGraph
The SCANNER pass must accomplish the equivalent functionality of BackupAlg.phaseI.CreateVertices() and LinkVertices(). So Mango. updateMangoModel does the following, only for src vertex.
1. if necessary, call BackupAlg.Method_2_vertices for the corresponding MethodInfo
2. call BackupAlg.instruction_2_vertices() for the src vertex, which becomes the peerVertex member of the src instruction.
3. call buildFormalPeer, creating the state transition and exit edges. Because we create the edges immediately, there is no need for a link phase. Instead of instantiating branches, just fold in the equivalent functionality of BackupAlg.instruction_link and BackupAlg.branch_link.
If all goes well, the graphs we create should be acceptable input for phase2. But you will have to hotwire the 2d graph command so they can at least be inspected.
Modified Paths:
--------------
branches/mango/MangoJPF/Mango/src/mango/worker/Mango.java
branches/mango/MangoJPF/Mango/src/mango/worker/Worker.java
branches/mango/MangoJPF/Mango/src/mango/worker/mangoModel/backupAlg/BackupAlg.java
branches/mango/MangoJPF/Mango/src/mango/worker/msg/NewWorkerMsg.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/BranchChoiceGenerator.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/InvocationUtil.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/GOTO.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/GOTO_W.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/JSR.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/JSR_W.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/RET.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|