80 likes | 180 Views
TAG. Task Action Grammars. TAGs. Context-Free Grammar Maps tasks to user actions Consists of…. Dictionary Lists simple tasks Rule Schemata: Grammer for language syntax. TAGs. Generate a consistent interaction language. Can be applied to: Command line interface. GUI. TAG Example.
E N D
TAG Task Action Grammars
TAGs • Context-Free Grammar • Maps tasks to user actions • Consists of…. • Dictionary • Lists simple tasks • Rule Schemata: • Grammer for language syntax
TAGs. • Generate a consistent interaction language. • Can be applied to: • Command line interface. • GUI.
TAG Example • A graphics system has a line-drawing function. To select the function the user must select the ‘line’ menu option and choose the type of line to draw. The line-drawing function allows for several types of lines to be drawn. For example: to draw a polyline which is a sequence of line arcs between points. The user selects the points by clicking the mouse button in the drawing area. The user double clicks to indicate the last point of the polyline. See example to the right of a polyline. The BNF (Backus-Nuer-Form) definition of this process at a high level is presented below. draw-line ::= select-line + choose-point | choose-point + last-point. • Assume that the above menu is visible and accessible. From this starting point, develop a TAG which describes a grammar for this process.
DrawALine [LineType] := select-line[LineType]; select-line[Line = Selection of LINETYPE] := MouseMove[location] + Click[1] Trace[]:= TRACE ON SCREEN MouseMove[Location= xy screen position] := move_mouse_to_target xy StartLocation[location=positionOfMouse]:= MouseMove[location] + Click[1] EndLocation[location=positionOfMouse] := MouseMove[location] + Click[2] Click[1 = OneMouseClick] := SingleClickMouse Click[2 = TwoMouseClick] := DoubleClickMouse NormalLine[from = Starting Location, to = Ending Location] := StartLocation[from] + EndLocation[to]; SingleArrow[from = Starting Location, to = Ending Location] := StartLocation[from] + EndLocation[to]; DoubleArrow[from = Starting Location, to = Ending Location] := StartLocation[from] + EndLocation[to];
PolyLine[from = Starting Location, to = Ending Location] := StartLocation[from,1] | StartLocation[location] + EndLocation[to]; ClosedLine[from = Starting Location, to = Ending Location] := StartLocation[from] | StartLocation[location] + EndLocation[to]; FreeForm[from = Starting Location, to = Ending Location] := StartLocation[from] + Trace + EndLocation[to];
Benefits • Interaction is consistent. • User will use the same set of actions to perform all tasks • Known as Action -> Task • Same actions for all Tasks.
Problems • Physically it is difficult to double click a line ending and have it located at the correct spot. • Alternative is to click down for start, and release at end. • Problem is polyline which requires several clicks • Microsoft's solution is to have different lines drawn different ways. • Not consistent but practical given the physical constraints. • When do practical constraints override consistency?