de.cau.cs.kieler.synccharts.ksbase.util
Class FixSyncChartUtils

java.lang.Object
  extended by de.cau.cs.kieler.synccharts.ksbase.util.FixSyncChartUtils

public final class FixSyncChartUtils
extends Object

Utils for optimization.

Rating red

Field Summary
static String DO_NOTHING
          Identifier for doing nothing.
static String FIX_CONDITIONAL_OUTGOING_IMMEDIATE
          Identifier for fixing transitions leaving conditional states.
static String FIX_IDS
          Identifier for fixing the state and region ids.
static String FIX_NORMAL_TERMINATION_LEAVING_COMPLEX_STATE
          Identifier for choosing what to do with normal terminations leaving complex states.
static String FIX_TRANSITION_PRIORITY_BASED_ON_TYPE
          Identifier for fixing the transition priorities.
static String FIX_TRANSITION_PRIORITY_IS_ZERO
          Identifier for fixing transitions with priority zero.
static String FIX_TRANSITION_TYPES_LEAVING_SIMPLE_STATE
          Identifier for fixing transition types of transitions leaving simple states.
static String NORMAL_TERMINATION_WITH_TRIGGER_TO_WEAK_ABORT
          Identifier for turning normal terminations with trigger into weakaborts.
static String PREFIX
          Preference Prefix.
static String REMOVE_DEAD_END_CONDITIONALS
          Identifier for removing dead ending conditionals.
static String REMOVE_DUMMY_REGIONS
          Identifier for removing dummy regions.
static String REMOVE_DUMMY_STATES
          Identifier for removing dummy states.
static String REMOVE_TRIGGER_FROM_NORMAL_TERMINATION
          Identifier for removing the trigger from normal termination transitions.
static String REMOVE_UNUSED_SIGNALS_AND_VARIABLES
          Identifier for removing signals and variables that are not used.
static String REMOVE_WHITE_SPACES
          Identifier for removing white space from trigger and effects.
static String TURN_NORMAL_TERMINATION_INTO_WEAK_ABORT
          Identifier for turning normal terminations into weak aborts.
 
Method Summary
static void clearCache()
          Clear the caches.
static void debug(Object object)
          Debug output for xtend code.
static void fixTransList(Object object)
          Sort the priorities in a list of transitions.
static void generateRegionId(Region region)
          Generate a unique id for the region.
static void generateStateId(State state)
          Generate a unique id for the state.
static String getChoice(String key)
          Get the chosen option for choices.
static List<String> getChoiceKeys()
          Initialize the list of choice keys.
static List<String> getChoices(String key)
          Get the choices for one the keys.
static String getDisplay(String key)
          Getter for the displayable name of the optimization.
static List<String> getKeys()
          Initialize the list of keys.
static List<Region> getRegionList()
           
static List<State> getStateList()
           
static List<String> getStringList()
           
static String getTooltip(String key)
          Getter for the tooltip of the optimization.
static Boolean isEnabled(String key)
          Returns whether or not an optimization should be run.
static void loadConfiguration()
          Load the configuration from the persistent store to the preference store.
static void saveConfiguration()
          Save the configuration in the preference store back to the persistent store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final String PREFIX
Preference Prefix.

See Also:
Constant Field Values

FIX_IDS

public static final String FIX_IDS
Identifier for fixing the state and region ids.

See Also:
Constant Field Values

FIX_CONDITIONAL_OUTGOING_IMMEDIATE

public static final String FIX_CONDITIONAL_OUTGOING_IMMEDIATE
Identifier for fixing transitions leaving conditional states.

See Also:
Constant Field Values

REMOVE_DUMMY_STATES

public static final String REMOVE_DUMMY_STATES
Identifier for removing dummy states.

See Also:
Constant Field Values

REMOVE_WHITE_SPACES

public static final String REMOVE_WHITE_SPACES
Identifier for removing white space from trigger and effects.

See Also:
Constant Field Values

REMOVE_DUMMY_REGIONS

public static final String REMOVE_DUMMY_REGIONS
Identifier for removing dummy regions.

See Also:
Constant Field Values

REMOVE_DEAD_END_CONDITIONALS

public static final String REMOVE_DEAD_END_CONDITIONALS
Identifier for removing dead ending conditionals.

See Also:
Constant Field Values

FIX_TRANSITION_PRIORITY_IS_ZERO

public static final String FIX_TRANSITION_PRIORITY_IS_ZERO
Identifier for fixing transitions with priority zero.

See Also:
Constant Field Values

FIX_TRANSITION_PRIORITY_BASED_ON_TYPE

public static final String FIX_TRANSITION_PRIORITY_BASED_ON_TYPE
Identifier for fixing the transition priorities.

See Also:
Constant Field Values

FIX_TRANSITION_TYPES_LEAVING_SIMPLE_STATE

public static final String FIX_TRANSITION_TYPES_LEAVING_SIMPLE_STATE
Identifier for fixing transition types of transitions leaving simple states.

See Also:
Constant Field Values

NORMAL_TERMINATION_WITH_TRIGGER_TO_WEAK_ABORT

public static final String NORMAL_TERMINATION_WITH_TRIGGER_TO_WEAK_ABORT
Identifier for turning normal terminations with trigger into weakaborts.

See Also:
Constant Field Values

REMOVE_UNUSED_SIGNALS_AND_VARIABLES

public static final String REMOVE_UNUSED_SIGNALS_AND_VARIABLES
Identifier for removing signals and variables that are not used.

See Also:
Constant Field Values

FIX_NORMAL_TERMINATION_LEAVING_COMPLEX_STATE

public static final String FIX_NORMAL_TERMINATION_LEAVING_COMPLEX_STATE
Identifier for choosing what to do with normal terminations leaving complex states.

See Also:
Constant Field Values

REMOVE_TRIGGER_FROM_NORMAL_TERMINATION

public static final String REMOVE_TRIGGER_FROM_NORMAL_TERMINATION
Identifier for removing the trigger from normal termination transitions.

See Also:
Constant Field Values

TURN_NORMAL_TERMINATION_INTO_WEAK_ABORT

public static final String TURN_NORMAL_TERMINATION_INTO_WEAK_ABORT
Identifier for turning normal terminations into weak aborts.

See Also:
Constant Field Values

DO_NOTHING

public static final String DO_NOTHING
Identifier for doing nothing.

See Also:
Constant Field Values
Method Detail

getKeys

public static List<String> getKeys()
Initialize the list of keys.

Returns:
the list of keys

getChoiceKeys

public static List<String> getChoiceKeys()
Initialize the list of choice keys.

Returns:
the list of choice keys

getChoices

public static List<String> getChoices(String key)
Get the choices for one the keys.

Parameters:
key - the key
Returns:
the choices.

saveConfiguration

public static void saveConfiguration()
Save the configuration in the preference store back to the persistent store.


loadConfiguration

public static void loadConfiguration()
Load the configuration from the persistent store to the preference store. This has to be done before the values are accessed the first time. It will have no effect once the store is loaded for the first time.


debug

public static void debug(Object object)
Debug output for xtend code.

Parameters:
object - the message

getStateList

public static List<State> getStateList()
Returns:
a new list of states

getStringList

public static List<String> getStringList()
Returns:
a new list of strings

getRegionList

public static List<Region> getRegionList()
Returns:
a new list of regions

clearCache

public static void clearCache()
Clear the caches.


generateStateId

public static void generateStateId(State state)
Generate a unique id for the state.

Parameters:
state - the state.

generateRegionId

public static void generateRegionId(Region region)
Generate a unique id for the region.

Parameters:
region - the region

isEnabled

public static Boolean isEnabled(String key)
Returns whether or not an optimization should be run.

Parameters:
key - the key
Returns:
true if it should be run

getChoice

public static String getChoice(String key)
Get the chosen option for choices.

Parameters:
key - the key
Returns:
the chosen option

getDisplay

public static String getDisplay(String key)
Getter for the displayable name of the optimization.

Parameters:
key - the key
Returns:
the display name

getTooltip

public static String getTooltip(String key)
Getter for the tooltip of the optimization.

Parameters:
key - the key
Returns:
the tooltip

fixTransList

public static void fixTransList(Object object)
Sort the priorities in a list of transitions.

Parameters:
object - the list of transitions