1 / 11

A New Parsing Language for GUI and Visually Structured Documents

A New Parsing Language for GUI and Visually Structured Documents. David Lehavi HP Labs Israel. Why bother ?. universal interface for all graphical applications. Standard Approach: use the DOM. And if there is no dom , or a hybrid environment ?.

gilead
Download Presentation

A New Parsing Language for GUI and Visually Structured Documents

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A New Parsing Language for GUI and Visually Structured Documents David Lehavi HP Labs Israel

  2. Why bother ? universal interface for all graphical applications Standard Approach: use the DOM And if there is no dom, or a hybrid environment ? New GUI for legacy apps (additional functionality, hiding sensitive data). Software testing (record and replay). Accessibility (speech activated apps). Mobile Devices Web 2.0 (Flash, fragmented toolkit environment) Hybrid environments • DOM inspector • Object type • Set/Get properties

  3. Visual Languages What images do we need to understand ? A two dimensional pixel word: bit map A two dimensional picture word (constructed from graphical tokens) Formal presentation: A•→(B•↓C) We only parse objects which are “cut by lines”. Less restrictive than it seems at first: we may generalize and parse objects which are “cut by curves” (overcome the X) B A C

  4. Intermezzo: using language constructs Following Ken Thompsons work on regular expressions Visual lexer tokens characters requests Universal machine Compiler Language definition bytecode

  5. Challenges in GUI parsing Finding useful language constructs Expressability • Regular languages are too weak to describe recursive structures. Decidability & performance • Context free languages are too strong – they are undecidable. Ease of maintenance: Many GUI’s, and constantly changing. Robust to “lexing noise”: Input may originate from screenshot analysis.

  6. Radio-button-set example A Naïve representation: (Radio•→Text)*↓ Problems: alignment, distances. RTitled_E<Object X> = [ X C 0..50 Text ] RTitled_M<Object X> = [ X C 0..50 Text L L 0..50 X C 0..50 Text] RBS := V{RTitled_M<Radio>*RTitled_E<Radio>}

  7. Using a visibly pushdown meta language EBNF for regular expression VPL = regex + function calls and definitions Adding distances and alignments <RE>=<union>|<simple> <union>=<RE>"|"<simple> <simple>=<concat>|<basic> <concat>=<simple><basic> <basic>=<star>|<elementary> <star>=<elementary>"*" <elementary>= <group>|<token>  <group>="("<RE> ")“ <group>=[V>]"("<RE> ")" <name>= standard <call>=<name>"<"<values>">" <values> = comma separated <value> <value>= <call>|<token>|<name> <rule>= <name>"<"<params>">=" (<group>|<col>|<call>) <params>= comma separated <param> <param>="Object" <name> <elementary>=<group>|<call>|<col>|<token> <range>= <int>".."<int> <west>= [TBC]<range> (<call>|<token>|<name>) <row>= (<call>|<token>|<name>) <west>? <south>= [RLC][RLC]?<range><row> <col>= "["<row><south>?"]"

  8. Language & compilation - example RTitled_M<Radio > = [ Radio C 0..50 Text L L 0..50 Radio C 0..50 Text] RTitled_E<Radio > = [ Radio C 0..50 Text ] RBS := V{RTitled_M<Radio>*RTitled_E<Radio>} Each node is a function Concat Kleene-* Col Row Text Radio

  9. Running the VPL code - example Concat Kleene-* Col Universal VPL machine RBS Line Text Radio

  10. Global Robustness to local ambiguities • Visual lexer returns atoms. • Lexer assigns likelihood to any pair (atom, bounding box). • We use conditional likelihood to avoid consistent errors. • A “compound object” has heuristic “likelihood” • VPL graph vertices are no longer functions, but co-routines (user space threads). • sit on (heuristic based) priority queue, and paused when their priority is low. • can be forked when they get multiple return values. 50 % LO, 50 % scroller

  11. Questions ?

More Related