Scenario UI

Critique of the current GRL Strategies

For GRL strategies, the typical workflow is as follows:
  1. Right-Click on GRL Evaluation Strategies and create a strategy group
  2. Right-click on a strategy group and create a strategy.
  3. Select the strategy and activate scenario highlighting.
  4. Navigate the GRL graph to select items and change their properties from there.
  5. Once you select another strategy with highlighting activated, the in-use strategy changes and you can update all the items in the maps.

To me, this has disadvantages:
  • You don't have a bird's eye view of the valuations in a strategy unless they are all on one particular map.
    • Simple workaround to add items in strategy treeview, sorted by name of GRL element
  • You don't necessarily know you can put strategy values on items if you don't activate strategy highlighting. (very bad)
    • Contextual menu on a GRL element would be nice (with something like 100, 75, 50, 25, 0, -25, -50, -75, -100, Other...)
  • No strategy inclusion / re-use.
  • Our properties view default location and size limit its usefulness. Appearance takes up most of the real estate while it is never used. Strategies are at the bottom.
    • This is not the only place where the property the most often changed are at the bottom.
  • Can only change the valuation of a item in one scenario.

However, it has advantages:
  • Quick toggling between strategies gives a very visual feel to the alternatives.
  • It is very flexible; right now we only have valuations on GRL nodes, but in UCM with complex scenario traversals, it is necessary to choose items.

Proposed Changes for UCMs

Please answer TODOs in discussion area.

  • Rename Strategies view to Strategies / Scenarios
  • Add a UCM Scenario high level group at the level of GRL Evaluation Strategies
  • Add a Global Variables high level group at the level of GRL Evaluation Strategies
    • Context menu: add bool, add int (that are then edited in properties), add enumeration (wizard to define valid values; see Visio attachment)
    • Existing enumerations have edit enumeration (same wizard)
    • All new global variables that are created would have unique naming constraints imposed on them.

  • Prefill both with "Default Group" and "Default Scenario"/"Default Strategy"
  • For GRL: add a contextual menu item on a strategy that says "add evaluation". It should pop-up a window explaning how to add these evaluations: use the main window.
  • For UCM: all scenarios have five children folders in the treeview:
    1. Included scenarios
      • If the set (all_scenarios - this_scenario - included_scenarios) is non-empty, has contextual menu item "Add Included Scenario"
        • Pops up wizard to add a new wizard. See Visio attachment.
        • Wizard lists scenarios from the (all_scenarios - this_scenario - included_scenarios) set
        • User uses the properties drop-down list to choose the appropriate scenario.
      • Ordering (TODO: discuss.. felt right but not much thought has been put into it)
        • If not first in list of included scenarios, has contextual menu "Move Up" that would make it be checked before others.
        • If not last in list of included scenarios, has contextual menu "Move Down" that would make it be checked after others.
        • initializations/preconditions done first (can be overridden by other included scenarios or this one ), verifications/postconditions are done after others
          • pseudo-code (start): ScenarioList sl = this.included_scenarios + this; foreach Scenario s in sl { s.declareAndInitVariables(); } foreach Scenario s in sl { s.testPreConditions(); }
          • pseudo-code (end): ScenarioList sl = inverseList(this.included_scenarios + this); foreach Scenario s in sl { s.testPostConditions(); } foreach Scenario s in sl { s.testVariableVerifications(); }
          • note looping twice in previous pseudo-code.
        • User can delete an existing included scenario via the contextual menu.
    2. Start points
      • If the set all_maps.start_points is non-empty, has contextual menu item "Add Start Point" (allow duplicate startpoints)
        • Pops up wizard to add a new wizard. See Visio attachment.
        • Wizard shows list of maps with start points.
        • User selects a map.
        • Wizard shows list of start points in previous map.
        • User selects the start point and finishes the wizard. Can't finish if have not selected a start point; can always cancel.
      • Ordering (TODO: parallellism?)
        • If not first in list of start points, has contextual menu "Move Up" that would make it be run before others.
        • If not last in list of start points, has contextual menu "Move Down" that would make it be checked after others.
      • User can delete an existing included scenario via the contextual menu.
      • If a start point is included by an included scenario, show it grayed out (before others according to previous pseudo-code) and disable context menu.
    3. Preconditions / variable initializations
      • Variable Initializations has a context menu (See Visio attachment)
        • Checkbox list. If checked, is in list and must have a valuation otherwise cannot Finish. Removing the checkbox means deleting the entry.
        • Booleans have true/false dropdown, Enumerations have list dropdown. Integers have textbox.
        • Link to create new variable wizard. Two step process for enumerations, one step for rest. (See Visio attachment)
        • Once created, can be modified in properties view
      • Can create precondition via context menu
        • Creates default condition of value true as child.
        • Properties give a condition editor.
        • Once created, can be modified in properties view
      • Can create preaction via context menu
        • (TODO: discuss if this is now, future or just not necessary; I see it as a way to init a variable to another variable's state)
        • (TODO: should preconditions be responsibilities with an assert function?)
        • Creates default action that does nothing
        • Properties give a responsibility editor.
        • Once created, can be modified in properties view
      • If a start point is included by an included scenario, show it grayed out (before others according to previous pseudo-code) and disable context menu.
    4. End points (list of end points that MUST be reached)
      • Same behaviour as start points
    5. Postconditions
      • Same behaviour as preconditions. (Variable verifications, postconditions, postactions)
  • Responsibility / Condition editor
    • Responsibilities / Conditions will have their code edited in a seperate dialog. This dialog will only allow saving if the syntax is valid. Note that we cannot have the assumption that all responsibilities are valid because we could have deleted a variable used in this responsibility.
  • Upgrade the properties view to use the tabbed properties view (http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html):
    • Have an advanced tab that would list it as it is right now.
    • If item has lots of attributes, have a common tab that would list common attributes (name or definition for example).
      • TODO: To be investigated: we have an show advanced properties button in the property list that comes from the framework. We could use that to filter out some properties... right now it does nothing.
    • If relevant, have a strategies tab: for each strategy group, for each strategy, list valuation.
    • If relevant, have a scenario tab: for each scenario group, for each scenario, list properties such as (using included scenario conflict resolution mechanism described above)
      1. Initial value
      2. Is initial start point?
      3. End point must be reached?
      4. Scenario evaluation properties such as enforce exclusive or, etc. (TODO: investigate)
  • Scenario highlighting would have the same effect as strategy highlighting and use the same button, but with highlighting relevant to UCMs.
    • TODO: Determine specifics. (display number of times path was taken, visualize which paths were never taken, etc. )
  • Context menus
    1. Global Variables
      • Add Boolean
        • Model manipulation
      • Add Integer
        • Model manipulation
      • Add Enumeration
        • Opens wizard
      • Delete
        • Model manipulation - may cause problems in problems view. (Cascade delete)
    2. UCM Scenarios
      • New Scenario Group
        • Model manipulation
      1. ScenarioGroup
        • New Scenario
          • Model manipulation
        • Duplicate
          • Model manipulation
        • (if empty) Delete
          • Model manipulation
        1. Scenario
          • Run
          • Duplicate
            • Model manipulation
          • Delete
            • Model manipulation
          • Can change strategy group via properties.
          1. Included Scenarios
            • Include Scenario
              • Wizard
            1. Scenario
              • Delete
                • Model manipulation
              • (if not first) Move Up
                • Model manipulation
              • (if not last) Move Down
                • Model manipulation
          2. Starts Points
            • Add
              • Wizard
            1. StartPoint
              • Duplicate
                • Model manipulation
              • Delete
                • Model manipulation
              • (if not first) Move Up
                • Model manipulation
              • (if not last) Move Down
                • Model manipulation
          3. Preconditions
            • Add precondition
              • Condition Wizard
            • Add preaction
              • Responsibility Editor
            • Variable initializations
              • Wizard
            1. (if not inherited) Precondition
              • Delete
                • Model manipulation
              • Duplicate
                • Model manipulation
              • Can change scenario via properties
            2. (if not inherited) Preaction
              • Delete
                • Model manipulation
              • Duplicate
                • Model manipulation
              • Can change scenario via properties
            3. (if not inherited) Variable
              • Delete
                • Model manipulation
              • Variable Initializations * Wizard
              • Can change value via properties
          4. End Points
            • Add
              • Wizard
            1. EndPoint
              • Duplicate
                • Model manipulation
              • Delete
                • Model manipulation
              • (if not first) Move Up
                • Model manipulation
              • (if not last) Move Down
                • Model manipulation
          5. Postconditions
            • Add postcondition
              • Condition Wizard
            • Add postaction
              • Responsibility Editor
            • Variable initializations
              • Wizard
            1. (if not inherited) Postcondition
              • Delete
                • Model manipulation
              • Duplicate
                • Model manipulation
              • Can change scenario via properties
            2. (if not inherited) Postaction
              • Delete
                • Model manipulation
              • Duplicate
                • Model manipulation
              • Can change scenario via properties
            3. (if not inherited) Variable
              • Delete
                • Model manipulation
              • Variable Initializations
                • Wizard
              • Can change value via properties

Medium / Future work

    • Language enhancement to reference end points only in conditions (reached endpointa xor reached endpointb) or similar.
    • List GRL evaluations that affect a strategy under it in the treeview or in its properties.
    • Determine how a scenario can be part of multiple scenario groups
    • Allow for duplication of a strategy in treeview, not to start from scratch?
    • Drag & Drop scenario from one group to another. Copy/paste scenario.

Discussion

  • DanielAmyot: You would allow for more than one scenario definition to be included in another? Might lead to conflicting definitions. Limit to one (single inheritance, with overriding of initializations)?
    • JasonKealey: I'm thinking a list that would be passed sequentially, ignoring conflicts if they exist. Values would probably end up being the value setup by the last in the list. Which one is more
natural?

  • JasonKealey: Question: If an error occurs in a scenario evaluation should we
    • Pop up a modal dialog so that the user knows something occurred? Too intrusive or exactly the feedback we are looking for?
    • Show something in the error log... would the user see this?
    • Something other all together? List scenarios in the scenario list that turn up errors in a different color (in the list) and automatically run them all in the background after a change and have a view error(s) contextual-menu item? Too CPU intensive?
    • DanielAmyot: can't have a modal dialog for each, especially as we would like many scenarios to be ran. The error log is useful. Could have a focus on the error log view if any error? Could have feedback on the scenario view itself (à la JUnit)?
      • JasonKealey: I'm thinking problems view + color coding as well.

-- JasonKealey - 13 Jun 2006
Topic attachments
I Attachment Action Size Date Who Comment
scenarios.vsdvsd scenarios.vsd manage 622 K 18 Sep 2006 - 15:46 JasonKealey scenario mockup
Topic revision: r10 - 18 Sep 2006, JasonKealey
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback