|
From: <fra...@us...> - 2009-06-12 03:27:07
|
Revision: 1615
http://javapathfinder.svn.sourceforge.net/javapathfinder/?rev=1615&view=rev
Author: frankrimlinger
Date: 2009-06-12 03:27:03 +0000 (Fri, 12 Jun 2009)
Log Message:
-----------
Solved the MangoJPF rewriter bug. The trouble was I decided that "manual block mode" had not been used in years and so could be dropped from support in the MangoJPF gui. Since this broke some code, I just happily deleted all code that referred to the corresponding boolean flag. But the devil came knocking at my door. Because UnifyEvent calls isManuallyBlocked, which calls manualBlockMode(), which in Mango always returns false. This causes isManuallyBlocked to return false. Trouble is, pulling this code out of MangoJPF just caused control flow to go on to the rest of the routine. The idea is that when manual block mode is on, UconSym and PathSym won't interpret. This was helpful long ago when debugging certain composition issues. But now it just stops the rewriter dead in its tracks.
How it could possibly be that this failure mode did not occur while rewriting the ItsAWrap loop is a tremendous mystery that will never be investigated.
To solve the problem, just reinstated manualBlockMode(), so that it always returns false, and restored calls to this routine. This way, if I ever *want* this feature again, the hook is in place.
Anticipating other damage caused by the initial reckless act, also reinstated semiAutoBlockMode() and autoBlockMode. In Mango, all three of these routines always return false, because the actual flag is an unblockStateCode_t that is always null, as it was never hooked up to the vestigial gui.
There were no calls to semiAutoBlockMode() in Mango, so no harm no foul. The calls to autoBlockMode() have been reinstated.
In the legacy code, semiAutoBlockMode is the default, so even though it is never called, it returns true in MangoJPF. manualBlockMode and autoBlockMode return false.
Lesson learned: A firm grasp of what is view and what is model is essential to success. Happily, with these repairs in place, the initial rewritten predicate transformer for ItsAWrap.clear looks good. So, onward.
Modified Paths:
--------------
branches/mango/Mango/Mango/src/mango/worker/engine/unifier/UnifyEvent.java
branches/mango/MangoJPF/Mango/src/mango/ruleAction/simpleSubstitution/SUBRautomatic.java
branches/mango/MangoJPF/Mango/src/mango/worker/Mango.java
branches/mango/MangoJPF/Mango/src/mango/worker/engine/sym/InterpretableSym.java
branches/mango/MangoJPF/Mango/src/mango/worker/engine/unifier/UnifyEvent.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|