org.tigris.mbt
Class Keywords

java.lang.Object
  extended by org.tigris.mbt.Keywords

public class Keywords
extends Object

Handles the common constants for the org.tigris.mbt package. This includes reserved key words, and text strings used for storing custom data as UserDatum in graphs, vertices and edges.


Field Summary
static String ACTIONS_KEY
          This datum contains the actions used by an edge in EFSM models.
static String BACKTRACK
          An edge with the key word BACKTRACK is used to enable a simple logic that enables a end user to backtrack in the graph to the previous vertex.
static String BLOCKED
          A vertex or an edge with the key word BLOCKED, will not participate in the resulting (merged) graph, end thus be excluded.
static int CONDITION_EDGE_COVERAGE
           
static int CONDITION_NEVER
           
static int CONDITION_REACHED_EDGE
           
static int CONDITION_REACHED_REQUIREMENT
           
static int CONDITION_REACHED_STATE
           
static int CONDITION_REQUIREMENT_COVERAGE
           
static int CONDITION_STATE_COVERAGE
           
static int CONDITION_TEST_DURATION
           
static int CONDITION_TEST_LENGTH
           
static String DIJKSTRA
          This datum contains the dijkstra object used to find the shortest path in models.
static String FILE_KEY
          When merging graphs, the source file of each graph is noted, so that in the event of an error, the correct graph file can be used in meaningful error messages to the end user.
static String FULL_LABEL_KEY
          This datum contain the complete text hold by a label.
static int GENERATOR_LIST
           
static int GENERATOR_RANDOM
           
static int GENERATOR_REQUIREMENTS
           
static int GENERATOR_SHORTEST
           
static int GENERATOR_STUB
           
static String GUARD_KEY
          This datum contains the label guard used by an edge in EFSM models.
static String HEIGHT_KEY
          The graph editor yEd, can use images to depict vertices, which normally gets lost during merging.
static String ID_KEY
          The id taken from the graphml file.
static String IMAGE_KEY
          The graph editor yEd, can use images to depict vertices, which normally gets lost during merging.
static String INDEX_KEY
          The datum provides the edge or vertex a unique integer number, uniquely identifying the object.
static String LABEL_KEY
          The name of the vertex or edge, that will result in a method or function call in the executing test tool.
static String MERGE
          This datum is used by MBT when merging graphs.
static String MERGED_BY_MBT
          Used internally by MBT.
static String MOTHER_GRAPH_START_VERTEX
          Used internally by MBT.
static String NO_MERGE
          This datum is used by MBT when merging graphs.
static String PARAMETER_KEY
          This datum contains the label parameter used by an edge in EFSM models.
static String REQTAG_KEY
          This datum contains the requirement tag which can be set in a vertex or edge.
static String START_NODE
          Each graph has a start (entry) vertex, and that vertex holds this datum.
static String STOP_NODE
          The stop (exit) vertex denotes an exit point in a graph.
static String SUBGRAPH_START_VERTEX
          Used internally by MBT.
static String WEIGHT_KEY
          Used by MBT during random walks during test sequence generation.
static String WIDTH_KEY
          The graph editor yEd, can use images to depict vertices, which normally gets lost during merging.
static String VISITED_KEY
          This datum contains a counter for each vertex and edge.
 
Constructor Summary
Keywords()
           
 
Method Summary
static int getGenerator(String generator)
           
static Set getGenerators()
           
static int getStopCondition(String stopCondition)
           
static Set getStopConditions()
           
static boolean isGenerator(String presumedGenerator)
           
static boolean isKeyWord(String wordToCheck)
          Returns true if the wordToCheck is a pre-defined key word.
static boolean isStopCondition(String presumedCondition)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_NODE

public static final String START_NODE
Each graph has a start (entry) vertex, and that vertex holds this datum.
There is only one vertex in a graph, holding this datum.
Used by MBT when merging graphs, and when generating test sequences.

See Also:
Constant Field Values

STOP_NODE

public static final String STOP_NODE
The stop (exit) vertex denotes an exit point in a graph.
There can only be one vertex in a graph, holding this datum.
Only sub-graphs can have a stop vertex.
Used by MBT only when merging graphs.

See Also:
Constant Field Values

ID_KEY

public static final String ID_KEY
The id taken from the graphml file. TODO Investigate if this datum is deprecated

See Also:
Constant Field Values

IMAGE_KEY

public static final String IMAGE_KEY
The graph editor yEd, can use images to depict vertices, which normally gets lost during merging. So, when writing merged graphs back to file, this datum holds the path and file of that image.

See Also:
Constant Field Values

WIDTH_KEY

public static final String WIDTH_KEY
The graph editor yEd, can use images to depict vertices, which normally gets lost during merging. So, when writing merged graphs back to file, this datum holds the width of that image.

See Also:
Constant Field Values

HEIGHT_KEY

public static final String HEIGHT_KEY
The graph editor yEd, can use images to depict vertices, which normally gets lost during merging. So, when writing merged graphs back to file, this datum holds the height of that image.

See Also:
Constant Field Values

FILE_KEY

public static final String FILE_KEY
When merging graphs, the source file of each graph is noted, so that in the event of an error, the correct graph file can be used in meaningful error messages to the end user.

See Also:
Constant Field Values

LABEL_KEY

public static final String LABEL_KEY
The name of the vertex or edge, that will result in a method or function call in the executing test tool.
* The label of an edge can be empty (or null).
* A vertex must always have a label.
* The label is always defined at the first line in a label.

See Also:
Constant Field Values

FULL_LABEL_KEY

public static final String FULL_LABEL_KEY
This datum contain the complete text hold by a label.

See Also:
Constant Field Values

VISITED_KEY

public static final String VISITED_KEY
This datum contains a counter for each vertex and edge. Used by MBT during a online test. Every time a vertex or an edge is traversed it is visited, thus incremented once.

See Also:
Constant Field Values

WEIGHT_KEY

public static final String WEIGHT_KEY
Used by MBT during random walks during test sequence generation. It holds a real value between 0 and 1, and represents the probability that a specific edge should be chosen. A value of 0.05, would mean a 5% chance of that edge to be selected during a run.
* Only edges uses this datum.

See Also:
Constant Field Values

INDEX_KEY

public static final String INDEX_KEY
The datum provides the edge or vertex a unique integer number, uniquely identifying the object.
Generated by MBT when reading and merging graphs. Also used to provide better info during logging at:
* Parsing graphml files
* Merging
* Generating offline and online test sequences

See Also:
Constant Field Values

MERGE

public static final String MERGE
This datum is used by MBT when merging graphs. It tells MBT that the vertex containing this key word, should be merged with the first occurence of a vertex with the same label.

See Also:
Constant Field Values

NO_MERGE

public static final String NO_MERGE
This datum is used by MBT when merging graphs. It tells MBT that the vertex containing this key word, should not merge this vertex with any subgraph.

See Also:
Constant Field Values

MERGED_BY_MBT

public static final String MERGED_BY_MBT
Used internally by MBT. When graphs are merged, MBT keeps track of which vertices have been merged by MBT.

See Also:
Constant Field Values

MOTHER_GRAPH_START_VERTEX

public static final String MOTHER_GRAPH_START_VERTEX
Used internally by MBT. A vertex in a graph with the label START, and a single empty out edge is defined as the main graph (or Mother Graph)

See Also:
Constant Field Values

SUBGRAPH_START_VERTEX

public static final String SUBGRAPH_START_VERTEX
Used internally by MBT. A vertex in a graph with the label START, and a single non-empty out edge is defined as a subgraph.

See Also:
Constant Field Values

BLOCKED

public static final String BLOCKED
A vertex or an edge with the key word BLOCKED, will not participate in the resulting (merged) graph, end thus be excluded.

See Also:
Constant Field Values

BACKTRACK

public static final String BACKTRACK
An edge with the key word BACKTRACK is used to enable a simple logic that enables a end user to backtrack in the graph to the previous vertex.
This is used only during a online run.

See Also:
Constant Field Values

PARAMETER_KEY

public static final String PARAMETER_KEY
This datum contains the label parameter used by an edge in EFSM models.

See Also:
Constant Field Values

GUARD_KEY

public static final String GUARD_KEY
This datum contains the label guard used by an edge in EFSM models.

See Also:
Constant Field Values

ACTIONS_KEY

public static final String ACTIONS_KEY
This datum contains the actions used by an edge in EFSM models. The datum is a String containing the actions.

See Also:
Constant Field Values

REQTAG_KEY

public static final String REQTAG_KEY
This datum contains the requirement tag which can be set in a vertex or edge. The datum is a String containing one or more requirement tag. Multiple tags are to be separated using commas.

See Also:
Constant Field Values

DIJKSTRA

public static final String DIJKSTRA
This datum contains the dijkstra object used to find the shortest path in models.

See Also:
Constant Field Values

CONDITION_REACHED_EDGE

public static final int CONDITION_REACHED_EDGE
See Also:
Constant Field Values

CONDITION_REACHED_STATE

public static final int CONDITION_REACHED_STATE
See Also:
Constant Field Values

CONDITION_EDGE_COVERAGE

public static final int CONDITION_EDGE_COVERAGE
See Also:
Constant Field Values

CONDITION_STATE_COVERAGE

public static final int CONDITION_STATE_COVERAGE
See Also:
Constant Field Values

CONDITION_TEST_LENGTH

public static final int CONDITION_TEST_LENGTH
See Also:
Constant Field Values

CONDITION_TEST_DURATION

public static final int CONDITION_TEST_DURATION
See Also:
Constant Field Values

CONDITION_REQUIREMENT_COVERAGE

public static final int CONDITION_REQUIREMENT_COVERAGE
See Also:
Constant Field Values

CONDITION_REACHED_REQUIREMENT

public static final int CONDITION_REACHED_REQUIREMENT
See Also:
Constant Field Values

CONDITION_NEVER

public static final int CONDITION_NEVER
See Also:
Constant Field Values

GENERATOR_RANDOM

public static final int GENERATOR_RANDOM
See Also:
Constant Field Values

GENERATOR_SHORTEST

public static final int GENERATOR_SHORTEST
See Also:
Constant Field Values

GENERATOR_LIST

public static final int GENERATOR_LIST
See Also:
Constant Field Values

GENERATOR_STUB

public static final int GENERATOR_STUB
See Also:
Constant Field Values

GENERATOR_REQUIREMENTS

public static final int GENERATOR_REQUIREMENTS
See Also:
Constant Field Values
Constructor Detail

Keywords

public Keywords()
Method Detail

isKeyWord

public static boolean isKeyWord(String wordToCheck)
Returns true if the wordToCheck is a pre-defined key word.


getStopConditions

public static Set getStopConditions()

isStopCondition

public static boolean isStopCondition(String presumedCondition)

getStopCondition

public static int getStopCondition(String stopCondition)
Parameters:
stopCondition -
Returns:
if supplied with a valid stop condition returns its constant value. returns -1 if supplied with false value.

getGenerators

public static Set getGenerators()

isGenerator

public static boolean isGenerator(String presumedGenerator)

getGenerator

public static int getGenerator(String generator)
Parameters:
generator -
Returns:
if supplied with a valid generator returns its constant value. returns -1 if supplied with false value.