Download presentation
Presentation is loading. Please wait.
Published bySybil Summers Modified over 9 years ago
1
DOM: Towards a Formal Specification Author: Mark Wheelhouse Supervisor: Dr. Philippa Gardner Thanks to: Gareth Smith, Uri Zarfaty, Ian Hodkinson
2
DOM (Document Object Model) Current Spec. English English Verbose Verbose Ambiguous Ambiguous Automated Verification Automated Verification Not Possible Not Possible Extensions Extensions Hard Hard Time-consuming Time-consuming What We Want Formalism Formalism Data Structure Logical Framework Automated Verification Automated Verification Possible Extensions Extensions Easier Quicker
3
What is DOM? DOM Tree High Level XML Update High Level XML Update W3C W3C Aimed at Object Aimed at Object Orientated Programmers Orientated Programmers Stores XML in Tree Structure Stores XML in Tree Structure
4
Minimal DOM DOM Core Level 3 DOM Core Level 2 DOM Core Level 1 Application Based Consider Structural Behaviour Only
5
Minimal DOM createNodegetNodeNamegetChildNodesappendgetLengthgetItemgetParentNodeinsertBeforeremoveChild
6
createNodegetNodeNamegetChildNodesappendgetLengthgetItemgetParentNodeinsertBeforeremoveChild
7
Context Logic Local Reasoning Tool for Tree Update Local Reasoning Tool for Tree Update Proved Correct Proved Correct Used on Toy Examples Used on Toy Examples Provides Compositional Reasoning Provides Compositional Reasoning First Real-World Test First Real-World Test
8
Context Logic - Application Pre: PCommand: C Post: Q
9
Context Logic – Right Triangle K = (P Q)
10
Data Structure
11
Command Axioms Command Axioms { Pre-condition } { Post-condition } Command Specifying the Local Behaviour of the commands:
12
getNodeName tag’ = getNodeName(id); tag’ = tag
13
getNodeName - Small Axiom
14
Weakest Pre-condition
18
insertBefore insertBefore(parent, newChild, ref);
19
Ancestor Issue
20
insertBefore - Axiom Why not Small ?
21
Weakest Pre-condition
23
Axiom Composition - insertAfter insertBefore(parent, newChild, ref);insertBefore(parent, ref, newChild);
24
Axiom Composition - insertAfter
25
More than Minimal DOM cloneNodereplaceChildhasChildNodes insertAfter nodeEquality DOM Core Level 1:
26
Conclusion Complete Spec. for Minimal DOM Complete Spec. for Minimal DOM Complete Spec. for Structural DOM Core Level 1 Complete Spec. for Structural DOM Core Level 1 Highly Extendable Highly Extendable Automated Verification now possible Automated Verification now possible
27
Future Work Automated Verification Tool Automated Verification Tool Getting it Small Getting it Small The Rest of Core Level 1 The Rest of Core Level 1 Higher Levels of DOM Higher Levels of DOM Concurrent DOM Concurrent DOM
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.