Detecting Conflicts Among Declarative UI Extensions Benjamin Lerner Brown University Dan Grossman UW Computer Science & Engineering.

Slides:



Advertisements
Similar presentations
Jeremy S. Bradbury, James R. Cordy, Juergen Dingel, Michel Wermelinger
Advertisements

WS Choreography v.0-1 Overview This is work-in-progress David Burdett, Commerce One 18 June 2003.
EFRONT V4 EXTENSIONS ARCHITECTURE. The goal  To offer more flexibility to 3 rd party users to modify eFront functionality  To further extend eFront.
Semantics Static semantics Dynamic semantics attribute grammars
XHTML Basics. What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit.
Anne McGrath 16 th February  Review of what we have learned so far.  Angled brackets surround HTML tags.  The words between the angled brackets.
Stacks & Their Applications COP Stacks  A stack is a data structure that stores information arranged like a stack.  We have seen stacks before.
1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
XHTML Basics.
WEAVING CODE EXTENSIONS INTO JAVASCRIPT Benjamin Lerner, Herman Venter, and Dan Grossman University of Washington, Microsoft Research.
LIBRARIES AS LANGUAGES: TYPECHECKING JQUERY PROGRAMS Benjamin Lerner Liam Elberty Jincheng Li Shriram Krishnamurthi.
Language Support for Extensible Web Browsers Benjamin Lerner and Dan Grossman.
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
UCD Yong Choi BPA. What is UCD? A use case is a set of scenarios that describing an interaction between a user and a system. – What a system does…rather.
Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the five essential properties of an algorithm.
Chapter 10 Algorithmic Thinking. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives List the five essential.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
INTERPRETER Main Topics What is an Interpreter. Why should we learn about them.
Basic Scientific Writing in English Lecture 3 Professor Ralph Kirby Faculty of Life Sciences Extension 7323 Room B322.
Cs164 Prof. Bodik, Fall Symbol Tables and Static Checks Lecture 14.
Developing a Basic Web Page Posting Files on UMBC
BY: KYLE ROGAHN COMPUTER SCIENCE SEMINAR UW PLATTEVILLE 4/3/2012 Web Browser Automation - Geb.
{ Etiquette Handbook. Feature Creating an Font, colour and sizes etc Sending an Sending using Cc Sending using Bcc Creating a signature.
Data Structures 1- Course Syllabus. 2- Introduction about Data Structures.
HTML and Designing Web Pages. u At its creation, the web was all about –Web pages were clumsily assembled –Web sites were accumulations of hyperlinked.
Using Styles and Style Sheets for Design
XP 1 HTML: The Language of the Web A Web page is a text file written in a language called Hypertext Markup Language. A markup language is a language that.
XML: The Changing Phase of e-Documentation Jyothi Jandhyala.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Review IDIA 619 Spring 2013 Bridget M. Blodgett. HTML A basic HTML document looks like this: Sample page Sample page This is a simple sample. HTML user.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
Chapter Twenty-ThreeModern Programming Languages1 Formal Semantics.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Computers and Scientific Thinking David Reed, Creighton University Functions and Libraries 1.
Formal Semantics Chapter Twenty-ThreeModern Programming Languages, 2nd ed.1.
Declaratively Producing Data Mash-ups Sudarshan Murthy 1, David Maier 2 1 Applied Research, Wipro Technologies 2 Department of Computer Science, Portland.
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
Microsoft ® Office Excel 2003 Training Using XML in Excel SynAppSys Educational Services presents:
A Lap Around Windows Presentation Foundation. Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
U NIVERSAL D ESIGN P LAN A NTICIPATING S TUDENTS NEEDS Jackie Powers.
Semantic Clipboard User Interface is integrated in the Browser Architecture of the Semantic Clipboard Illustration of a license incompliant content reuse.
Chapter 2 The Mechanism behind Extensions. How “Extensions” are implemented.
SUPPORTING DYNAMIC, THIRD-PARTY CODE CUSTOMIZATIONS IN JAVASCRIPT USING ASPECTS Benjamin Lerner, Herman Venter, and Dan Grossman University of Washington,
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004.
Headings are defined with the to tags. defines the largest heading. defines the smallest heading. Note: Browsers automatically add an empty line before.
Unit 13 –JQuery Basics Instructor: Brent Presley.
SWE 4743 Abstract Data Types Richard Gesick. SWE Abstract Data Types Object-oriented design is based on the theory of abstract data types Domain.
Evaluating Requirements
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
CSE 130 : Winter 2009 Programming Languages Lecture 11: What’s in a Name ?
Getting ready. Why C? Design Features – Efficiency (C programs tend to be compact and to run quickly.) – Portability (C programs written on one system.
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
3/18/2002AIM AB Review of WSRP/WSIA Adaptation Description Language, Past and Present Directions. Ravi Konuru, IBM.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Requirements Specification
HTML5 Basics.
Chapter 4: Business Process and Functional Modeling, continued
Chapter 8: Concurrency Control on Relational Databases
Introduction to Parsing (adapted from CS 164 at Berkeley)
KnockoutJs online Training at GoLogica in Pune
Chapter 9 TURING MACHINES.
The Metacircular Evaluator (Continued)
Cs212: Data Structures Computer Science Department Lecture 6: Stacks.
Proposal for Resolving Comments on Intra-Mesh Congestion Control
Website Testing EIT, Author Gay Robertson, 2018.
Tutorial 10: Programming with javascript
Presentation transcript:

Detecting Conflicts Among Declarative UI Extensions Benjamin Lerner Brown University Dan Grossman UW Computer Science & Engineering

How many browsers do you see? 2 Each one defined by an extension

What are extensions? 3

Why extensions? Experiment with new features – Even after the application ships User-specific customization – Without bloating it for everyone 4

Scope of the challenge Popular! – 3+ billion downloads Diverse – Firefox extensions – Written by 3 rd party developers, worldwide Combinatorial blowup What could possibly go wrong? 5

DESIGNING EXTENSION SYSTEMS 6

What can extensions do? Modify or add behavior Modify or add UI 7

How to build a UI? extension system Hard-code the UI – Tedious to implement – Inflexible to change Use a UI description language – General-purpose, works for many UIs – Easy to modify as needed Pick your language: HTML, XUL, XAML, … 8

How to build a UI extension system? Hard-code the UI extension points – Tedious to implement – Inflexible to change Use a UI description language – General-purpose, works for many UIs – Easy to modify as needed 9

Overlays General-purpose UI extension mechanism Intuition: “tree-structured patch” 10 Hello, World + Overlay! Overlay! Overlay! Base documentOverlay

Overlays “Tree-structured patch” Find positions in the document tree Insert new content or modify existing nodes 11 Hello, World + Overlay! Base documentOverlay = Hello, World Overlay! Composite

What can go wrong? * Given a base document And overlay What should happen when Ctrl+L is pressed? ( * adapted from real-world example) <KeyBinding Modifiers="Ctrl" Key="L" Command="GoToLocation" /> 12

What can go wrong? * Given a base document And overlay Where should this modification go? ( * adapted from real-world example)......New content... 13

Recap: overlays problem space Design choices: – How expressive is the selector language? – What actions can extensions take? Erroneous behaviors: – Structural errors, semantic errors, others? How to detect all errors, for various designs? …Idea: use declarative structure for analysis 14

DETECTING EXTENSION CONFLICTS 15

Abstracting away overlay details Overlay Means… Can we simplify some of these details? <KeyBinding Modifiers="Ctrl" Key="L" Command="GoToLocation" /> ( Append to, assuming {Require existence of InputBindings, No one else uses Key "Ctrl+L"}) 16

A core language of overlays 17 (Append to, assuming { Require existence of InputBindings, No one else uses Key "Ctrl+L" } ) (Take some action, Resource1 Resource2 Guarded Insert new content X into Y, Append new content X after Y Insert new content X into Y, Append new content X after Y Assert something be Defined, Assert something be Undefined, Assert something be Clean, Assert something be Frozen Assert something be Defined, Assert something be Undefined, Assert something be Clean, Assert something be Frozen Elements by Name and ID, Key bindings, Form elements, … Elements by Name and ID, Key bindings, Form elements, …

When do extensions conflict? 18 Extension 1: (Insert Resource #2 in Resource #1, assuming { No one else uses Resource #1 } ) Extension 2: (Do something to Resource #2, assuming { No one else uses Resource #2 } ) Extension 3: (Do something to Resource #1, assuming { No one else uses Resource #1 } ) Ext1 can’t follow Ext2: It defines Resource2 that Ext2 uses Ext1 can’t follow Ext3: Ext3 prevents Ext1 from using Resource1 Ext3 can’t follow Ext1, either CONFLICT

Creating the dependency graph Summarize the state S of the document by 4 sets: Summarize each extension as a state transformer: document in state S in  document in state S out Create a “cannot-follow” dependency graph with: – One node per extension – An edge from N 1  N 2 if S 2 out contradicts S 1 in {Defined : resources that must exist, Undefined : resources that must not yet exist, Clean : resources that have not been extended, Frozen : resources that must never be extended} 19

Supporting the base document Treat the base document as an extension too: Action: defines each element in the document Guards: reject prior definitions of those elements Result: base document must precede all extensions 20 Main document: (Insert Every element into the empty document, assuming { No one has defined Every Element } )

Hotkeys example: Different keys, No conflict Overlay #1:  {Defined : { InputBindings }, Undefined : { Key(Ctrl+L) }} {Defined : { InputBindings, Key(Ctrl+L) }, Frozen : { Key(Ctrl+L) }} Base document:  {Undefined : { InputBindings }} {Defined : { InputBindings }} Document needs InputBindings to be Undefined, but overlay asserts it’s Defined Document needs InputBindings to be Undefined, but overlay asserts it’s Defined 21 Overlay #2:  {Defined : { InputBindings }, Undefined : { Key(Alt+M) }} {Defined : { InputBindings, Key(Alt+M) }, Frozen : { Key(Alt+M) }} #1 #2 #3

Overlay #2:  {Defined : { InputBindings }, Undefined : { Key(Alt+M) }} {Defined : { InputBindings, Key(Alt+M) }, Frozen : { Key(Alt+M) }} Overlay #2:  {Defined : { InputBindings }, Undefined : { Key(Ctrl+L) }} {Defined : { InputBindings, Key(Ctrl+L) }, Frozen : { Key(Ctrl+L) }} Hotkeys example: Same keys, Conflict Defines Ctrl+L, which other overlay says is Frozen 22 Base document:  {Undefined : { InputBindings }} {Defined : { InputBindings }} Document needs InputBindings to be Undefined, but overlay asserts it’s Defined Document needs InputBindings to be Undefined, but overlay asserts it’s Defined Overlay #1:  {Defined : { InputBindings }, Undefined : { Key(Ctrl+L) }} {Defined : { InputBindings, Key(Ctrl+L) }, Frozen : { Key(Ctrl+L) }} CONFLICT

Experimental results Examined snapshot of top 350 Firefox extensions 261 define overlays for main browser UI: – 1120 individual actions – ~15,000 “semantic requirements” – This is too big for manual checking Conflicts found: – 6 inter-extension conflicts – 50 imprecise overlays – 20 incorrectly declared overlays – 150 missing dependencies – All these errors are silently ignored by Firefox 23

Useful feedback Feedback to developers: – “Your extension conflicts with extension X, because of Y.” Feedback to end-users: – “Extensions A, B and C conflict; you cannot install them all at once.” Actionable 24

EXPRESSIVENESS AND ANALYSIS PRECISION 25

Design choice: Increasing selector expressiveness Flexible matching of multiple items – “all tweets in the page…” – “all-but-the-first list item…” – “3 rd element after 2 nd heading…” These all might describe same thing! Essentially, “may alias” analysis: – When might two selectors pick the same nodes? Precision of analysis depends on flexibility of selectors 26

Takeaway Lessons Overlays are powerful, flexible way to structure extensible UI – Rich design space of expressiveness – (see paper for details) Declarative language  clear notion of conflicts Simple overlays  efficient conflict detection Complex overlays  more power, more problems 27