From: <pcm...@us...> - 2008-02-06 22:13:37
|
Revision: 743 http://javapathfinder.svn.sourceforge.net/javapathfinder/?rev=743&view=rev Author: pcmehlitz Date: 2008-02-06 14:13:19 -0800 (Wed, 06 Feb 2008) Log Message: ----------- * added partial wildcard ANYs to scripts, so you can do a ANY { foo, bar, *baz } which still causes alphabet expansion (to get all trigger methods of all active states via reflection), but then filters by matching all found trigger names against the ANY patterns. This is actually more straight than the previous ANY { * }, which is really just a special case * added some 'hasAnyPattern' optimization to StringSetMatcher - no need to burn a lot of cycles on regex matching if we know there is a "matches anything" pattern * first stab on unbounded REPEATs, but there are subtle search termination issues remaining. This introduces 'instructions' (pseudo CGs) into the EventGeneratorFactory queue, which works Ok but should be refactored so that we don't have to call the Jump a ChoiceGenerator. What doesn't work so well is that it creates infinite loops if we never run out of active states (e.g. if triggers do not fire a transition). This is because with unconditional Jumps we never run out of fresh CGs (the next CG is always reset in EventGeneratorFactory.getNextChoiceGenerator()). The JVM nicely recognizes if it has visited a program state, but of course always goes on if the next CG says it still has choices (because it was reset). So we need to make the Jump conditional, i.e. give it it's own state. Once this is done, it should be used as the sole mechanism for REPEATs, and we should ditch the unrolling Modified Paths: -------------- trunk/extensions/statechart/env/jpf/gov/nasa/jpf/sc/StateMachine.java trunk/extensions/statechart/env/jvm/gov/nasa/jpf/jvm/NativeStateMachine.java trunk/extensions/statechart/examples/Repeater.java trunk/extensions/statechart/src/gov/nasa/jpf/jvm/choice/sc/SCEvent.java trunk/extensions/statechart/src/gov/nasa/jpf/jvm/choice/sc/SCEventFromSet.java trunk/extensions/statechart/src/gov/nasa/jpf/jvm/choice/sc/SCEventGenerator.java trunk/extensions/statechart/src/gov/nasa/jpf/jvm/choice/sc/SCEventGeneratorFactory.java trunk/extensions/statechart/src/gov/nasa/jpf/jvm/choice/sc/SCEventSingleChoice.java trunk/extensions/statechart/src/gov/nasa/jpf/tools/sc/SimStateMachine.java trunk/src/gov/nasa/jpf/util/StringSetMatcher.java trunk/src/gov/nasa/jpf/util/script/ESParser.java trunk/src/gov/nasa/jpf/util/script/EventGeneratorFactory.java Added Paths: ----------- trunk/extensions/statechart/examples/Wildcards.es trunk/extensions/statechart/examples/Wildcards.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |