Introduction
Historically, sketch recognition systems have been "one-offs." Developing a system to recognize specific diagrams, such as circuits or flowcharts, required hard-coding geometry and logic for every individual component. This labor-intensive process hindered the creation of new sketch-based interfaces.
LADDER (Language to Describe Drawing, Display, and Editing in Sketch Recognition) addresses this by providing a domain-independent language. It allows developers to describe the "what" (geometry), the "how" (editing behavior), and the "look" (display style) of a sketch, moving away from rigid, hard-coded recognizers toward a flexible, grammar-based approach.
The LADDER Framework
LADDER is built on several key pillars that allow it to handle the messiness of human drawing while maintaining structural integrity:
- Hierarchical Shape Definition: Shapes are constructed from primitives like Points, Lines, Arcs, and Spirals.
- Constraint-Based Logic: Instead of using rigid templates, LADDER employs geometric constraints (e.g.,
coincident,perpendicular,acute-meet). This ensures recognition is rotation-invariant and robust. - Editing & Display Triggers: Unique to LADDER, the language includes "triggers" and "actions" that define how a shape should react to user input. For example, a developer can specify that dragging the "shaft" of an arrow moves the entire object, while dragging the "head" stretches it.
Object-Oriented Principles and Hierarchies
LADDER utilizes an inheritance hierarchy to manage complexity. "Abstract shapes" allow developers to define shared properties once—such as common drag behaviors for all UML association types—and have specific shapes inherit those properties. This object-oriented approach simplifies the creation of large, complex shape libraries.
Recognition and Context
The LADDER system parses code into Java and Jess (a rule-based reasoning engine). When a user draws, the system simplifies strokes into primitives and uses Jess rules to verify if they satisfy the constraints of a defined shape. To handle ambiguity, LADDER introduces "Shape Groups" for contextual recognition (e.g., identifying an arrow because it is attached to a UML box) and "soft constraints" to rank potential matches based on common drawing patterns.
Key Results and Versatility
The authors evaluated LADDER by implementing grammars for diverse domains, including:
- UML Class Diagrams
- Mechanical Engineering Diagrams
- Military Course of Action Diagrams
- Stick Figures and Alphabets
In total, over 100 different shapes were successfully described. The functional prototype demonstrated "chain-reaction" editing, where moving a parent shape (like a UML box) automatically adjusted connected shapes (like association arrows) according to the grammar's rules.
Limitations and Future Directions
While LADDER is highly versatile, the authors note that the primitive library may need expansion to support more complex curves or textures. Future work focuses on improving usability for non-expert programmers and developing automated tools that can generate LADDER code directly from visual examples, further lowering the barrier to entry for sketch-based interface design.
Summary updated