|
From: <fra...@us...> - 2009-05-26 21:07:06
|
Revision: 1554
http://javapathfinder.svn.sourceforge.net/javapathfinder/?rev=1554&view=rev
Author: frankrimlinger
Date: 2009-05-26 21:07:04 +0000 (Tue, 26 May 2009)
Log Message:
-----------
Realized that the mango.scanner.bytecodeSythetic package was a really bad idea, because MangoInstructionFactory was not picking up all the bytecodes. This almost certainly led to the weirdness noted in previous comment. Moved these bytecodes to mango.scanner.bytecode.
However, still not out of the woods. The new problem is that the invocation bytecodes are extensions of gov.nasa.jpf.jvm.bytecode_mango_formal_language.InvokeInstruction instead of gov.nasa.jpf.jvm.bytecode.InvokeInstruction. This was done to insert the MangoInstruction class at a lower lever in the inheritance chain. But this is a non-starter because certain jpf routines, like MethodInfo.creatDirectCallStub cast to InvokeInstruction and won't accept any substitutions.
Well, even if you rewrote the jpf codebase with more interfaces, these kinds of problems always come up. My solution is to create MangoInterface and MangoFormalInterface, and have MangoInstruction and MangoFormalLanguage implement these interfaces. I am then free to write other implementations and put them at strategic points in the inheritance chain so that I don't cut off the classes that jpf wants to be able to see. This regrettably involves some code duplication but it is the path of least resistance.
TRICK: when something is given as a MangoInterface, and I need it as a jpf Instruction, just call the asInstruction() method. This is implemented with the following weird code:
Instruction asInstruction(){
return this;
}
Modified Paths:
--------------
branches/mango/MangoJPF/Mango/src/mango/ruleAction/coreRewriter/classModel/BuildAbstractUcon.java
branches/mango/MangoJPF/Mango/src/mango/worker/engine/hash/symbolHash/SymbolHashEngine.java
branches/mango/MangoJPF/Mango/src/mango/worker/mangoModel/BackupAlg.java
branches/mango/MangoJPF/Mango/src/mango/worker/mangoModel/sym/ucon/MethodEntrySym.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/gov/nasa/jpf/jvm/JPF_mango_scanner_ScannerMJI.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/ExceptionHandlerUtil.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/Invocation.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/MangoInstruction.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/MangoInstructionFactory.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/MethodUtil.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/INVOKEINTERFACE.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/INVOKESPECIAL.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/INVOKESTATIC.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/INVOKEVIRTUAL.java
Added Paths:
-----------
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/ACATCHHANDLER.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/ATHROWCREATOR.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/ATHROWHANDLER.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/AbstractUconPlace.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/BadPlace.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/BeginningOfTime.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/INVOKECLINIT.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/INVOKETARGET.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/OSplace.java
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecode/SyntheticInstruction.java
Removed Paths:
-------------
branches/mango/MangoJPF/javapathfinder-mango-bridge/mango/scanner/bytecodeSynthetic/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|