Designing Constraint Maintainers for User Interaction - PowerPoint PPT Presentation

About This Presentation
Title:

Designing Constraint Maintainers for User Interaction

Description:

Designing Constraint Maintainers for User Interaction Lambert Meertens Kestrel Institute, Palo Alto, CA & Utrecht University Examples of Maintained Constraints 1 ... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 17
Provided by: lamb186
Learn more at: https://www.kestrel.edu
Category:

less

Transcript and Presenter's Notes

Title: Designing Constraint Maintainers for User Interaction


1
Designing Constraint Maintainersfor User
Interaction
  • Lambert Meertens
  • Kestrel Institute, Palo Alto, CA
  • Utrecht University

2
Examples of Maintained Constraints 1
  • Spreadsheet
  • Constraints
  • Cost Qty Item Cost
  • Total Cost SUM Cost

Qty Item Cost Cost 2 12.99 25.98 3
6.35 19.05 -----
45.03
Qty Item Cost Cost 2 12.99 25.98 33
6.35 209.55 ------
235.53
edit
3
Examples of Maintained Constraints 2
  • UNIX make
  • Constraints
  • .dvi .tex .bib
  • latex
  • bibtex
  • latex (unidirectional )

4
Examples of Maintained Constraints 3
  • Rename file
  • Constraint
  • prez.name prez.file.name

  • (bidirectional!)

5
Maintained Constraints General Case
  • A constraint is a relation between objects
  • Structured documents
  • Presentations are also structured documents
  • External agents (user editing, mail delivery,
    clock) may change the value of some object
  • A value change may violate a constraint
  • A violated constraint must be restored by
    changing the value of some other linked object
  • If that is not possible, the original change was
    unlawful

6
Issue At Most Constraint
  • Physical embodiment
  • For any given value of A, there are many values B
    such that A ? B
  • Which one to choose?

7
Designing Constraint Maintainers
  • Constraints operate like the Laws of Physics of a
    virtual universe
  • For a constraint-driven system to be usable, it
    must behave in a predictable way
  • The way in which constraints are restored must
    follow from simple principles
  • Potential bonus automatic derivation for
    declaratively specified constraints

8
Semi-Maintainers
  • We define a (unidirectional) semi-maintainer a
    (bidirectional) maintainer is then just a pair of
    semi-maintainers, one for each direction
  • For now, ignore unlawful changes and constraints
    involving more than two objects
  • Call the object that was changed by an external
    agent the source, and the linked object is target
  • The semi-maintainer knows the new value of the
    source and the old value of the target

9
Definition of Semi-Maintainer
  • For a relation R S T, a semi-maintainer is a
    function
  • ? S?T ? T
  • satisfying, for all x S and y T,
  • (EST) x R (x ? y)
  • (SKIP) x R y ? x ? y ? y
  • EST states that after an update x ? x ? y the
    constraint x R y holds
  • SKIP states that an update x ? x ? y has no
    effect if the constraint x R y already holds

10
The Principle of Least Change
  • Dont make a larger change than is needed
  • to restore the constraint

11
In Symbols
  • From the EST requirement x R (x ? y) we have
    that x ? y is an element of the set
  • F(x) ?def y' x R y'
  • The Principle of Least Change means that among
    all elements y' ? F(x) we pick one as close as
    possible to the old value y of the target
  • Note that the SKIP requirement
  • x R y ? x ? y ? y
  • is a special case of PLC when y ? F(x)

12
Distance
  • To give meaning to as close as possible we need
    to define a metric on each type of interest
  • For numeric types this is obvious
  • For structured types in general, the edit
    distance is a reasonable choice
  • For sets, we can take the size of the symmetric
    set difference
  • s ? t ?def (s t ) U (t s)

13
Example Is Subset Of Constraint
  • Relation ? Set(a) Set(a)
  • We want to determine t' ? s ? t
  • Put d ? t ? t' , so that t' ? t ? d
  • EST is then s ? t ? d
  • The smallest solution of EST is d ? s t
  • This gives us
  • s ? t ? t' ? t ? d ? t ? (s t ) ? s U
    t

14
Tie Breaking
  • What if there are several solutions of EST that
    are all as close as possible to the old value
    of the target?
  • Suggested approach
  • for each type of interest, define a well-ordering
    (i.e., a total linear ordering such that each
    non-empty set has a least element)
  • using as ordering principles that small comes
    before large, left before right and positive
    before negative
  • and pick the least allowed element

15
Example Converse Abs Constraint
  • Relation abs? Z N , where
  • n ?abs?? i ?? abs ( i ) ? n
  • We want to determine i' ? n ? i
  • The possible values are n, n
  • Normally one is closer to i than the other, but
    if i 0 while n ? 0 there is a tie
  • Positive before negative in that case pick
  • i' ? n

16
Further Reading
  • Steven Pemberton. The VIEWS Application
    Environment. CWI Report CS-R9257, 1992.
    http//www.cwi.nl/ftp/CWIreports/AA/CS-R9257.pdf
  • Lambert Meertens, Steven Pemberton. The
    Ergonomics of Computer Interfaces ? Designing a
    System for Human Use. CWI Report CS-R9258, 1992.
    http//www.cwi.nl/ftp/CWIreports/AA/CS-R9258.pdf
  • Lambert Meertens. Designing Constraint
    Maintainers for User Interaction.
    http//www.kestrel.edu/home/people/meertens/dcm.ps
Write a Comment
User Comments (0)
About PowerShow.com