This paper, presented at JISBD 2006, provides a formal framework for ensuring that Model-Based User Interfaces (MBUI) actually work as intended before they are deployed. By translating interface models into Coloured Petri Nets, the authors enable automated "stress-testing" of UI logic to find deadlocks, unreachable screens, and navigation errors.
The Problem: Complexity in Model-Based Development
In Model-Based User Interface (MBUI) development, the UI is defined by high-level models rather than manual coding. While this speeds up development across different platforms (mobile, web, desktop), it introduces a critical risk: if the model is wrong, the generated code is wrong.
Most existing MBUI methodologies lack a formal way to answer two questions:
- Validation: Are we building the right system (does it meet user needs)?
- Verification: Are we building the system right (is the logic consistent and error-free)?
As UIs become more complex and concurrent, manual "click-testing" is insufficient to find deep logic errors, such as a specific sequence of actions that might lock the user out of a necessary screen.
Methodology: Leveraging Coloured Petri Nets
The authors leverage two primary technologies: UsiXML (User Interface eXtensible Markup Language) to describe UIs at various levels of abstraction, and Coloured Petri Nets (CPN) to model the concurrent logic. Unlike standard Petri Nets, "Coloured" tokens can carry data (like user IDs or window states), making them powerful enough to simulate complex software.
The Workflow: 1. Transformation: The "Concrete User Interface" (CUI) model from UsiXML is automatically mapped to a CPN. 2. Simulation: The CPN acts as a "virtual machine" that executes the UI logic. 3. State Space Analysis: Using CPNTools, the system generates a "reachability graph"—a map of every possible state the UI can ever be in. 4. Property Checking: The tool analyzes this graph to find "Dead Markings" (deadlocks) or "Home Properties" (the ability to always return to a starting state).
Key Insights and Results
The authors demonstrated their tool on a sample multi-window interface case study, yielding several key insights:
- UI as a Formal System: The core innovation is treating a UI not just as a visual layout, but as a state machine that can be mathematically verified.
- Automated Bug Finding: By calculating the state space, the system can find "unreachable windows"—screens that exist in the design but can never actually be seen by a user due to faulty navigation logic.
- Efficiency: The tool analyzed a state space of 232 nodes and 307 arcs in less than a second, proving its viability for rapid development cycles.
- User-Specific Verification: Because the Petri Nets are "Coloured," the model can distinguish between different user roles (e.g., verifying if an Admin can reach a button that a Guest cannot).
Limitations and Future Work
Despite its strengths, the authors acknowledge the need to bridge the gap between formal Petri Net simulations and the "Final UI" (the actual running code). A major goal is to translate the highly technical output of CPNTools back into "designer-friendly" language within the UsiXML environment. Future work also involves creating a high-level language for designers to specify usability requirements (e.g., "The user must always be able to cancel an action") which can then be automatically converted into Petri Net properties for verification.
Summary updated