280 likes | 457 Views
dialogue notations and design. what is dialogue?. Discussion? conversation between two or more parties. structured human dialogue. human-computer dialogue very constrained some human-human dialogue formal too …. Minister: do you man’s name take this woman … Man: I do
E N D
what is dialogue? • Discussion? • conversation between two or more parties
structured human dialogue • human-computer dialogue very constrained • some human-human dialogue formal too … Minister: do you man’s name take this woman … Man: I do Minister: do you woman’s name take this man … Woman: I do Man: With this ring I thee(you) wed(places ring on womans finger) Woman: With this ring I thee(you) wed (places ring ..) Minister: I now pronounce you man and wife
lessons about dialogue • wedding service • sort of script for three parties • specifies order • some contributions fixed – “I do” • others variable – “do you man’s name …” • instructions for ringconcurrent with saying words “with this ring …” • if you say these words are you married? • only if in the right place, with marriage licence • syntax not semantics
… and more • what if woman says “I don’t”? • real dialogues often have alternatives: • the process of the trial depends on the defendants response • focus on standered responses Judge: How do you plead guilty or not guilty? Defendant: either Guilty or Not guilty
graphical notations state-transition nets (STN), state chartsflow charts,
State transition networks (STN) • used for dialog description • We have seen that STNs can be very good at representing the sequential, choice anditerative parts of a dialog • circles – states • Each circle denotes a ‘state’ the system can be in. • Menu is the state where the system is waiting for the user to select either ‘circle’ or ‘line’ from the menu • arcs - actions/events • Between the states are arrows, the transitions. These are labeled with the user actions that triggered the particular transition and the response the system makes
Mouse - based drawing tool • Consider a simple mouse-based drawing tool. • It has a menu with two options, ‘circle’ and ‘line’, and a drawing surface. • If you select circle you are allowed to click on two further points on the drawing surface. • The first of these is the circle’s centerand the second any point on the circumference. After the first point is selected,the system draws a ‘rubber band’ line between the center and the current mouse position. After the second point is chosen, the circle is drawn. • The ‘line’ option in the menu is to draw a polyline. That is, the user can select any number of points on the drawing surface which the system connects with straight lines. The last point is denoted by a double click on the mouse. Again the system ‘rubber bands’ between successive mouse positions
State transition networks - states • labels in circles a bit uninformative: • states are hard to name • but easier to visualise
Hierarchical STNs • managing complex dialogues • named sub-dialogues • the drawing tool may have a main menu, from which we can select one of three submenus: • a graphics menu (asdescribed for circles and lines), a text menu (for adding labels) and a paint menu (forfreehand drawing). • We could describe this complete system using the hierarchicalSTN
Graphics Submenu Text Submenu Paint Submenu select ‘graphics’ MainMenu select ‘text’ select ‘paint’
This is like the previous STNs, but has additional composite states represented as rectangles with a picture of a little STN in them • Each of these rectangles denotes the whole STN for the relevant submenu. • To read this diagram, we start in state Main menu and follow the relevant transition from it as before. • Imagine the user has selected ‘graphics’ from the main menu. The system responds by ‘popping’ the graphics submenu and then going into state Graphics submenu
Concurrent dialogues - Isimple dialogue box • describing a dialog consisting of several concurrent parts • simple dialog box for describing text style as one might find in a word processor
Text Style bold example italic underline
How it works? • The box contains three toggles, one each for bold, italic and underline styles. • A piece of text can be emboldened, italicized, underlined or any combination of these three. • To select, say, emboldening, the user clicks over the bold toggle. To deselect it, the user simply clicks again.
bold italic NO bold NO italic NO u’line click on ‘underline’ click on ‘italic’ click on ‘bold’ bold italic u’line underline Concurrent dialogues - IIthree toggles - individual STNs
Text Style bold example italic underline italic only bold italic click on ‘bold’ Concurrent dialogues - IIIbold and italic combined NO style bold only click on ‘bold’ click on ‘italic’ click on ‘italic’
NO style bold only ‘bold’ Text Style u’line only bold u’line ‘bold’ bold ‘underline’ ‘underline’ italic example ‘italic’ ‘italic’ underline italic u’line italic only bold italic u’line bold italic ‘bold’ ‘bold’ ‘italic’ ‘italic’ ‘underline’ ‘underline’ Concurrent dialogues - IVall together - combinatorial explosion
escapes • we want to add an escape key, which, wherever you are, cancels what you are doing and returns you to the main menu • However, to add it to the STN describing the system would require an arc from every state back to the main menu. • this would make a complete mess of the hierarchical structure of the dialog description
Graphics Submenu Text Submenu Paint Submenu ESC select ‘graphics’ normal finish ESC MainMenu select ‘text’ normal finish ESC normal select ‘paint’ finish escapes • ‘back’ in web, escape/cancel keys • similar behaviour everywhere • end up with spaghetti of identical behaviours • try to avoid this • e.g. on high level diagram • ‘normal’ exit foreach submenu • plus separateescape arc active‘everywhere’ in submenu
help • Help systems are similar to escapes in some ways, in that they may be invoked at any stage during the dialog. • However, unlike escapes, when you have finished using the help system, you expect to return to the same point in the dialog that you left
Help Subsystem Help Subsystem Circle 1 Circle 2 Finish click on centre click on circumference from Menu rubber band draw circle press HELPbutton press HELPbutton help menus • similar problems • nearly the same everywhere • but return to same point in dialogue • could specify on STN … but very messy • usually best added at a ‘meta’ level
State charts • used in UML • extension to STN • hierarchy • concurrent sub-nets • Escapes • History • link marked H goes back to last state on re-entering subdialogue
Tv panel • The controller has five buttons labeled ‘ON’, ‘OFF’, ‘MUTE’, ‘SEL’ and ‘RESET’. • The television can either be on, or in standby mode • Imagine we start at Standby. • Pressing ON or RESET will turn the television on (TV_on); then when it is on, pressing OFF puts it back into standby mode. • When the television is on, the user can control the sound with the MUTE button and the channel with the SEL button. Using MUTE turns the sound on or off, whereas SEL cycles between four channels
Standby ON OFF RESET Channel Sound 1 On SEL 2 MUTE SEL SEL Off 3 SEL 4