dom: towards a formal specification
DESCRIPTION
DOM: Towards a Formal Specification. Author: Mark Wheelhouse Supervisor: Dr. Philippa Gardner Thanks to: Gareth Smith, Uri Zarfaty, Ian Hodkinson. Current Spec. English Verbose Ambiguous Automated Verification Not Possible Extensions Hard Time-consuming. What We Want Formalism - PowerPoint PPT PresentationTRANSCRIPT
DOM:DOM:Towards a Formal Towards a Formal
SpecificationSpecification
Author: Mark Wheelhouse
Supervisor: Dr. Philippa Gardner
Thanks to: Gareth Smith, Uri Zarfaty, Ian Hodkinson
DOMDOM(Document Object Model)(Document Object Model)
Current Spec.Current Spec. EnglishEnglish
VerboseVerbose AmbiguousAmbiguous
Automated VerificationAutomated Verification Not PossibleNot Possible
ExtensionsExtensions HardHard Time-consumingTime-consuming
What We WantWhat We Want FormalismFormalism
Data StructureData Structure Logical FrameworkLogical Framework
Automated VerificationAutomated Verification PossiblePossible
ExtensionsExtensions EasierEasier QuickerQuicker
What is DOM?What is DOM?DOM Tree
High Level XML UpdateHigh Level XML Update
W3CW3C
Aimed at Object Aimed at Object
Orientated ProgrammersOrientated Programmers
Stores XML in Tree StructureStores XML in Tree Structure
Minimal DOMMinimal DOM
DOM Core Level 3
DOM Core Level 2
DOM Core Level 1
Application Based
Consider Structural Behaviour Only
Minimal DOMMinimal DOM
createNodecreateNode
getNodeNamegetNodeName
getChildNodesgetChildNodes
appendappend
getLengthgetLength
getItemgetItem
getParentNodegetParentNode
insertBeforeinsertBefore
removeChildremoveChild
Minimal DOMMinimal DOM
createNodecreateNode
getNodeNamegetNodeName
getChildNodesgetChildNodes
appendappend
getLengthgetLength
getItemgetItem
getParentNodegetParentNode
insertBeforeinsertBefore
removeChildremoveChild
Context LogicContext Logic
Local Reasoning Tool for Tree UpdateLocal Reasoning Tool for Tree Update
Proved CorrectProved Correct
Used on Toy ExamplesUsed on Toy Examples
Provides Compositional ReasoningProvides Compositional Reasoning
First Real-World TestFirst Real-World Test
Context Logic - ApplicationContext Logic - Application
Pre: P Command: C Post: Q
Context Logic – Right Context Logic – Right TriangleTriangle
K = (P Q)
Data StructureData Structure
Command AxiomsCommand Axioms
{ Pre-condition }
{ Post-condition }
Command
Specifying the Local Behaviour of the commands:
getNodeNamegetNodeName
tag’ = getNodeName(id);
tag’ = tag
getNodeName - Small getNodeName - Small AxiomAxiom
Weakest Pre-conditionWeakest Pre-condition
Weakest Pre-conditionWeakest Pre-condition
Weakest Pre-conditionWeakest Pre-condition
Weakest Pre-conditionWeakest Pre-condition
insertBeforeinsertBefore
insertBefore(parent, newChild, ref);
Ancestor IssueAncestor Issue
insertBefore - AxiominsertBefore - Axiom
Why not Small ?
Weakest Pre-conditionWeakest Pre-condition
Weakest Pre-conditionWeakest Pre-condition
Axiom CompositionAxiom Composition- insertAfter- insertAfter
insertBefore(parent, newChild, ref);
insertBefore(parent, ref, newChild);
Axiom CompositionAxiom Composition- insertAfter- insertAfter
More than Minimal DOMMore than Minimal DOM
cloneNodecloneNode
replaceChildreplaceChild
hasChildNodeshasChildNodes
insertAfter
nodeEquality
DOM Core Level 1:
ConclusionConclusion
Complete Spec. for Minimal DOMComplete Spec. for Minimal DOM
Complete Spec. for Structural DOM Core Complete Spec. for Structural DOM Core Level 1Level 1
Highly ExtendableHighly Extendable
Automated Verification now possibleAutomated Verification now possible
Future WorkFuture Work Automated Verification ToolAutomated Verification Tool
Getting it SmallGetting it Small
The Rest of Core Level 1The Rest of Core Level 1
Higher Levels of DOMHigher Levels of DOM
Concurrent DOMConcurrent DOM