Formalizing Markup Languages for User Interface
Total Page:16
File Type:pdf, Size:1020Kb
LU´IS GONZAGA MARTINS FERREIRA FORMALIZING MARKUP LANGUAGES FOR USER INTERFACE Dissertac¸ao˜ para Mestrado em Informatica´ Escola de Engenharia UNIVERSIDADE DO MINHO Braga, 2005 LU´IS GONZAGA MARTINS FERREIRA FORMALIZING MARKUP LANGUAGES FOR USER INTERFACE Dissertac¸ao˜ submetida a` Universidade do Minho para obtenc¸ao˜ do grau de Mestre em Informatica,´ ar´ ea de especializac¸ao˜ em Sistemas Distribu´ıdos, Comunicac¸oes˜ por Computador e Arquitectura de Computadores, elabo- rada sob a orientac¸ao˜ do Professor Doutor Jose´ Nuno de Oliveira, Pro- fessor Associado do Departamento de Informatica´ da Universidade do Minho. Dissertac¸ao˜ desenvolvida no ambitoˆ do Projecto EUREKA IKF (E!2235) Escola de Engenharia UNIVERSIDADE DO MINHO Braga, 2005 A` Ana, Aninhas e Ritinha Abstract This document presents a Dissertation theme, as integral part of Masters Degree in Distributed Systems, Computers Architecture and Computers Communication. The work has as primary objective the application of formal methods in the specifi- cation of presentation layer. Even reaching several relevance HCI concerns, the scope focus essentially on the way how formal methods can be explored to specify user in- terfaces described using markup languages. The state-of-the-art analysis of user interface markup languages and UIML - User Interface Markup Language formal specification are main contributions. Therefore the tabular graphical object OLAP main features are formally specified in VDM-SL and animated using UIML. This research should be considered as a contribution towards a definition of a visual component library , with user interfaces components composition and reuse. i Acknowledgements I would like to thank my supervisor Professor Jose´ Nuno Oliveira, member of DI (Department of Informatics, Minho University1), who encouraged all formal methods research and initiatives at the University, for his useful support and advice during this work. I am also grateful to Mark Adams and James Helms Harmonia members, for their enthusiastic support along this research as well for the availability of their UIML supporting tools. To all which improved the English in this thesis, I am also very grateful. Thanks also to all my friends which have made contributions to this work. would like to thank my Ana for her admirable patience and support during this work, and our daughters Aninhas e Ritinha, which were deprived of their father for the best part of these years. 1http://www.di.uminho.pt ii Table of Contents Abstract ii Acknowledgements ii List of Figures ix List of Tables x Listings xi 1 Introduction 1 1.1 Overview . 1 1.2 Problem Statement . 2 1.3 Motivation and Objectives . 5 1.4 Summary of Contributions . 10 1.5 Structure of the Dissertation . 10 1.6 Document support . 11 2 Research Foundations 13 2.1 The context . 13 2.2 User Interface Properties . 14 2.3 User Interface Models . 16 2.3.1 “Ancient” HCI models . 16 2.3.2 XForms Model . 18 2.3.3 The N-Tier Model . 19 2.3.4 MIM Model . 20 2.3.5 Other research in HCI modelling . 21 2.4 User Interfaces Analysis and Specification . 22 2.4.1 Adaptable Interfaces . 23 2.4.2 Formal Methods and Specification . 25 2.4.3 VDM-SL . 29 2.5 User Interface Design . 32 2.5.1 UMLi . 34 2.6 User Interface Programming . 36 2.6.1 UI Programming Methods . 36 2.6.2 N-Layer architecture . 39 2.6.3 Tools and Applications . 41 iii TABLE OF CONTENTS iv 2.7 Data description and manipulation . 44 2.7.1 Multidimensional Analysis . 44 2.7.2 OLAP . 50 2.8 User Interfaces Evaluation . 51 2.9 Conclusions . 51 3 Markup Languages for User Interface description 53 3.1 Presentation . 53 3.2 XIML . 54 3.2.1 Scope . 54 3.2.2 Requirements . 54 3.2.3 Structure . 54 3.2.4 Importance . 55 3.2.5 Remarks . 56 3.3 XUL . 56 3.3.1 Scope . 56 3.3.2 Requirements . 57 3.3.3 Structure . 58 3.3.4 Importance . 59 3.3.5 Remarks . 60 3.4 UIML . 60 3.4.1 Scope . 60 3.4.2 Requirements . 61 3.4.3 Structure . 61 3.4.4 Importance . 63 3.4.5 Remarks . 65 3.5 Relationship between UIML and other UI Markup languages . 65 4 UIML Formal Specification 69 4.1 VDM-SL Specification . 69 4.1.1 Terminologies . 69 4.1.2 Presentation . 71 4.2 UIML Overview . 71 4.2.1 The Structure of an UIML Document . 71 4.2.2 UIML document . 72 4.2.3 UIML Namespaces . 75 4.2.4 UIML Elements . 76 4.3 UIML Formalization . 76 4.3.1 Considerations . 76 4.3.2 VDM-SL Types and common UIML attributes . 78 4.3.3 UIML top elements . 79 4.3.4 Interface description . 81 4.3.5 Peer Components . 106 4.3.6 Templates - Reusable Interface Components . 115 4.4 Invariants . 117 4.4.1 Overview . 117 4.4.2 Auxiliary Data Types . 118 TABLE OF CONTENTS v 4.4.3 The uniqueness of ID’s . 118 4.4.4 Attribute part-name must refer an existing part ID attribute . 142 4.4.5 Auxiliary Functions . 147 4.5 Remarks . 149 5 Case study: Table IO 150 5.1 Overview . 150 5.2 Fundamentals of Table IO Formalization . 150 5.2.1 Considerations . 150 5.2.2 Table model . 152 5.3 Table VDM-SL specification . 157 5.3.1 General table methods . 160 5.3.2 Towards Multidimensional Analysis . 173 5.3.3 Auxiliary functions . 188 5.3.4 Pretty print functions . 196 5.3.5 AST Conversion . 201 5.3.6 UIML visualization . 206 5.4 Summary . 209 6 Prototype and Supporting Tools 210 6.1 Prototype . 210 6.2 Supporting tools . 211 6.2.1 Phase 1 - Transcoding UIML to VDM-SL . 211 6.2.2 Pretty Print . 213 6.2.3 Phase 2 - Verifier . 213 6.2.4 Phase 3 - Abstraction . 214 6.2.5 Phase 4 - Rendering UIML . 214 7 Conclusions and Future Work 216 7.1 Overview . 216 7.2 Discussion and Future Research . 218 7.2.1 UIML formal specification refactoring . 219 7.2.2 Tool support for language refactoring . 227 7.2.3 IO Visualization . 228 7.3 Final Remarks . 231 Bibliography 232 Appendices 242 A VDM-SL Notation 243 B W3C XML 248 C UIML DTD 257 D UIML 3.0 Hierarchy elements 264 TABLE OF CONTENTS vi E Supporting Tools 266 E.1 Transcoding UIML 7! VDM -SL - uiml2vdm stylesheet . 266 E.2 Verifier VDM 7! UIML - vdm2uiml . 279 E.2.1 Auxiliar Data Types . 279 F Prototype 285 G UIML Code examples 288 G.1 Stack UIML Code . 288 G.2 Table UIML Code . 291 H Stack VDM -SL Specification 293 Function/Method Cross-Reference Index 296 Glossary 300 List of Figures 1.1 VBasic visual Components . 6 1.2 Delphi visual Components . 6 1.3 Java AWT/Swing visual Components . 7 1.4 Interfaces development . 8 1.5 Example of multidimensional representation . 9 1.6 Phases of the formalization process . 10 1.7 Stack implemented in Visual Basic . 12 1.8 UIML stack rendered to Java . 12 2.1 The basic software architecture and the corresponding layered model for Human-Computer Interaction (adapted from [JBK89]) . ..