Université Toulouse I 1 CADUI' June FUNDP Namur Implementation Techniques for Petri Net Based Specifications of Human-Computer Dialogues Rémi Bastide, Philippe Palanque L.I.S Université Toulouse I Toulouse (France)
Université Toulouse I 2 CADUI' June FUNDP Namur Goals of the ICO formalism Describe the dialogue structure of event-driven interfaces with high-level Petri nets Integrate cleanly with current software engineering practice –UIMS to build the interface –Object-oriented modelling for the design of the application
Université Toulouse I 3 CADUI' June FUNDP Namur From Specification to Implementation –The specification work must not be thrown away at the implementation stage. –First option : generating code from the specification Advantage : conventional implementation tools and languages. –Second option : directly interpret the specification (embedded models) Advantage : rapid prototyping is made easier Use the embedded model at run-time, e.g. for debugging or for providing contextual help
Université Toulouse I 4 CADUI' June FUNDP Namur Event-driven vs. "hard" reactive systems Easier : –No true concurrency, "cooperative multitasking", no interrupts, critical sections, etc. Tougher : –The internal state must always be perceptible by the user –Each user action must have an immediate feedback
Université Toulouse I 5 CADUI' June FUNDP Namur Why use Petri nets –State and event on an equal basis –Structuring mechanisms hierarchical refinement (macros) composition mechanisms (client-server protocol) –Easy description of parallelism –Timed-Petri nets for temporals aspects (timed places and timed transitions) –Formal validation available
Université Toulouse I 6 CADUI' June FUNDP Namur Petri nets and objects formalism –Places are the state variables of the system system state = current marking marking of a place = set of object references –Arcs are labeled by variables, stating the flow of object references in the net –Transitions are the state changing operators featuring a precondition, testing the values of the objects of the incoming places an action, triggering methods on the selected objects
Université Toulouse I 7 CADUI' June FUNDP Namur Petri nets in Interactive Applications Presentation Dialogue Application User Component Control Interface Model Non interactive application kernel Events Function callsMethods calls UIMS (interactors) High-level Petri nets (ObCS) C++ tokens Object model
Université Toulouse I 8 CADUI' June FUNDP Namur Example : The "Presentation" component
Université Toulouse I 9 CADUI' June FUNDP Namur Example : the Dialogue
Université Toulouse I 10 CADUI' June FUNDP Namur Automatic code generation Generation Transformation of the OBCS ObCS of the ICOS Marking tree Marking graph State / Transition matrix ATN State / Service matrix Code Application code
Université Toulouse I 11 CADUI' June FUNDP Namur ATN of the dialogue Registers state 1 state 2 States correspond to the following markings of places (default, selected, edited, list): state 1 : (1, 0, 0, 0) state 2 : (0, 1, 0, ) state 3 : (0, 0, 1, ) state 4 : (0, 0, 0, ) n : number of tokens in the list place state 3 state 4 Delete //n=0 Replace Edit Add / n++ Add Select // n>0Delete/n--/ n>0 Reset Quit Edit
Université Toulouse I 12 CADUI' June FUNDP Namur Example of a generated event- handler Callback procedure ADD; Switch (CurrentState) { // test of the state variable case state1 : // no pre-condition to test // semantic action Create New Customer; // add the tuple o to the table // state changing CurrentSate = State2 // change the current state // feedback of the commands available in the new state disable(PushButtonAdd) disable(PushButtonReset) disable(PushButtonReplace) enable(PushButtonClose_Box) enable(PushButtonDelete) enable(PushButtonListBox) case state2 :...
Université Toulouse I 13 CADUI' June FUNDP Namur The «semi-interpreted» environment
Université Toulouse I 14 CADUI' June FUNDP Namur Object model for the abstract interpreter
Université Toulouse I 15 CADUI' June FUNDP Namur The abstract class "Transition"
Université Toulouse I 16 CADUI' June FUNDP Namur A concrete transition and its corresponding derived class
Université Toulouse I 17 CADUI' June FUNDP Namur Perspectives Evolution of the tool –Enhance the coupling between the UIMS and the Petri net editor –Take into account distributed (CSCW) interfaces Evolution of the method –Model the user's behaviour (task) as well as the system's –Task model and system model cross-Verification
Université Toulouse I 18 CADUI' June FUNDP Namur Thank you for your attention!