comparison src/main/gov/nasa/jpf/vm/ChoiceGenerator.java @ 1:f6886b2bda4a

first set of post v7 patches general part of extendTransition optimization, which skips transition breaks (and hence state matching) if vm.extend_transitions is set, and the next CG has only a single choice that does not require a break (e.g. context switch). This is mainly meant to be a state space optimization, and complements the null return on the CG creator side, which is extension/domain specific and also cuts into observability from listeners (no CG - no CG notifications). Note this is only the first part of the patch and probably too general in most cases. The second part extends this with an interface that can control breaks dynamically (e.g. from listeners). Added a ChoiceGenerator.setCurrent() (empty by default) that can be used as a CG type specific hook to expand/modify choices once the CG becomes active Added the first part of the patch that allows SUT context expansion of EventChoiceGenerators, which is required to make the new event system work in situations that need to add additional events based on the current SUT state (e.g. statemachines with timeout events). Fix for INVOKEDYNAMIC causing a NPE for recycled/restored function objects (Nastaran's patch)
author Peter Mehlitz <Peter.C.Mehlitz@nasa.gov>
date Fri, 23 Jan 2015 11:08:46 -0800
parents 61d41facf527
children fdc263e5806b
comparison
equal deleted inserted replaced
0:61d41facf527 1:f6886b2bda4a
32 32
33 Class<T> getChoiceType(); 33 Class<T> getChoiceType();
34 34
35 boolean hasMoreChoices(); 35 boolean hasMoreChoices();
36 36
37 /**
38 * to be called before the first advance(). Can be used in implementors to
39 * initialize choices from context (similar to what listeners can do from
40 * choiceGeneratorSet() notifications)
41 */
42 void setCurrent();
43
37 /** 44 /**
38 * advance to the next choice. This is the only method that really 45 * advance to the next choice. This is the only method that really
39 * advances our enumeration 46 * advances our enumeration
40 */ 47 */
41 void advance(); 48 void advance();