Title: Implementation Techniques for Petri Net Based Specifications of HumanComputer Dialogues
1Implementation Techniques for Petri Net Based
Specifications of Human-Computer Dialogues
Rémi Bastide, Philippe Palanque L.I.S Université
Toulouse I Toulouse (France)
2Goals 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
3From 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
4Event-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
5Why 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
6Petri 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
7Petri nets in Interactive Applications
Events
Function calls
Methods calls
Application
Dialogue
Presentation
Non interactive
User
Interface
application kernel
Control
Component
Model
UIMS (interactors)
High-level Petri nets (ObCS)
Ctokens
Objectmodel
8Example The "Presentation" component
9Example the Dialogue
10Automatic code generation
ObCS of the ICOS
Marking tree
Transformation
Marking graph
of the OBCS
ATN
State / Transition matrix
State / Service matrix
Code
Application code
Generation
11ATN of the dialogue
state 1
Edit
state 4
Quit
Delete //n0
Add
Quit
States correspond to the following
markings of places
(default, selected, edited, list)
state 1 (1, 0, 0, 0)
state 2
Select // ngt0
Delete/n--/ ngt0
?
)
state 2 (0, 1, 0,
)
state 3 (0, 0, 1,
?
?
Edit
state 4 (0, 0, 0,
)
Registers
n number of tokens in the list place
Add / n
Reset
Replace
Edit
state 3
12Example 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
- ...
13The semi-interpreted environment
14Object model for the abstract interpreter
15The abstract class "Transition"
16A concrete transition and its corresponding
derived class
17Perspectives
- 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
18Thank you for your attention!