1 / 12

Designing Constraint Maintainers for User Interaction

Designing Constraint Maintainers for User Interaction. 2005.6.6 東京大学 情報理工学系研究科 電子情報学専攻 修士1年 高橋 慧. 発表の流れ. Maintainer の復習 Biased Selector Maintainer の合成 ここまでのまとめ. s. Maintainer の実例. HTML エディタ グラフィカルビューとソースコード タグに関する制約 ( 開きタグ、閉じタグ … ) maintainer の動作

Download Presentation

Designing Constraint Maintainers for User Interaction

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. Designing Constraint Maintainers for User Interaction 2005.6.6 東京大学 情報理工学系研究科 電子情報学専攻 修士1年 高橋 慧

  2. 発表の流れ • Maintainerの復習 • Biased Selector • Maintainerの合成 • ここまでのまとめ s

  3. Maintainerの実例 • HTMLエディタ • グラフィカルビューとソースコード • タグに関する制約(開きタグ、閉じタグ…) • maintainerの動作 • ビューのtable中でenterを押したとき、ソースコードに挿入するのは<tr>か<br />か • ソースで”<t”と入力したとき、補完するのは<td>か<table>か • お節介にならないように、制約も満たすように。 • ユーザーの意志を尊重  → least change • 動作の予測ができるように→ left most / predictable ⇒ビュー / ソースの変化に対し、最適な変化を選択 st

  4. 復習 : maintainer • 制約R:x~yを常に満たしたい • yが変化したら、制約Rを満たすようxを変化→maintainer xy • maintainerの定義 • -EST : [(xy)Ry] • -SKIP : [xRy → (xy)=x] (他にもいくつか同値な定義がある) • maintainerの望ましい動作 • xの候補が複数→今のxからの変化を最小に • 最小な候補が複数→left most (predictable) sty

  5. MaintainerをSelectorとして見ると… • maintainerはRyに対するselectorと見れる • Ryという集合から最適(最小)な要素を選択 • xによって変化する (selector自体がxの関数) • x§ と表すと、maintainer xy の動作はx’ = x§(Ry)と書ける→”Biased Selector”と呼ぶ • Biased Selectorを考えるメリット • Biased Selector自体はR(制約)に依存しない • “よい”maintainerの構成手続きが与えられる styl

  6. Biased Selectorの定義 • 定義 • Selectorの条件を満たす • x§S ∈ S • x§(S∪T) = x§{x§S, x§T} • if x ∈ S : x§S = x • Well-Orderedな集合には必ずx§が存在 • 例えば以下のように構成できる • if x∈S :x§S = x • else : x§S = init(S) style

  7. Biased Selectorとmaintainer • biased selector ⇒ maintainer:[成立] • -EST : [(xy)Ry] • (a.1 : x§S ∈ S) で S=Ryとすればよい • -SKIP : [xRy → (xy)=x] • (b: if x ∈ S : x§S = x) そのもの • maintainer ⇒ biased selector:[不成立] • (a.2:x§(S∪T) = x§{x§S, x§T})が問題 • least changeに関連 styled

  8. “良い”Biased Selectorを構成 • maintainerとしての良い性質を持つ • least change, left most (predictable) • x§Sを構成(Sはwell-ordered) • “xとの近さ”を定義する (編集距離など) • S中でxに最も近い距離を持つ集合をCx(S)とおく • x§S =init(Cx(S))とする (initは元々のwell-orderを構成したmin) • このx§は、Biased Selectorになっている styled b

  9. x§がBiased Selectorになっている証明 • 復習 • Cx(S):Sのうち、xからの距離が最小の要素の集合 • init(S):Sの最小値(みたいなもの) • a.1 :x§S ∈ S • x§の定義: x§S = init(Cx(S)) ⇒ {init(A) ⊆ A, Cx(S) ⊆ S} より x§S ∈ S • a.2 : x§(S∪T) = x§{x§S, x§T} • x§の定義: x§(S∪T) = init(Cx(S∪T)) • init(Cx(S∪T)) ∈ Cx{x§S,x§T} • Cx(S∪T) ⊆ Cx(S) ∪ Cx(T) • init(Cx(S∪T)) ∈ {init(Cx(S)), init(Cx(T))} = Cx{x§S,x§T} • Cx{x§S,x§T} ⊆ Cx(S∪T) • init(Cx(S)) ⊆ Cx(S), init(Cx(T)) ⊆ Cx(T) • {x§S,x§T} ⊆ Cx(S∪T) • Cx(A) ⊆ AよりCx{x§S,x§T} ⊆ Cx(S∪T) ⇒ {initの性質: A⊆B ∧ init(B)∈A ⇒ init(A)=init(B)}より • init(Cx(S∪T)) = init(Cx(x§S∪x§T)), x§(S∪T) = x§{x§S, x§T} • b :if x ∈ S : x§S = x • (x∈S) ⇒ (Cx(S) = {x}) ⇒ (init(Cx(S)) = x) ⇒ (x§S = x) styled by

  10. maintainerの推移的合成 • 制約R:x~yS:y~zを合成 → T:x~z • x Tz はxR (yS z) として構成できる? • 一般にはyを隠すとx~zが構成できない • 例えばx:ある実数 y:実数集合 z:ある実数で、xがyの項数、zがyの正の項数とする。maintainer: x~zは、yを考えないと構成できない • y=f(x)の関係があるとき(#Ry=1)はOK (証明略) • 複雑な制約を分解してmaintainerを構成できる styled by K

  11. maintainerの統合 • R:x~y, S:x~y → T=R∪S:x~y • TをRとSから合成 • T=x§{xRy, xSy}とすればよい • 証明 • xTy = x§((R∪S)y) …x§の定義= x§(Ry∪Sy)…自明ではないが省略= x§{x§(Ry), x§(Sy)} …Selectorの定義= x§{xRy, xSy)}…x§の定義 • x§がR,Sに依存しないのがポイント styled by Ke

  12. 3,4章のまとめ • Maintainerの構成 • 複数の候補から一つを選ぶ→順序の定義が必要 • Well-order : 大小関係が一意に定まる順序 • Selector :”最小値”の必要十分条件 • Biased Selector : xを基準にしたselector • Maintainerの統合・合成 • T=R;S : Rが関数で表せれば合成できる • T=R∪S: 常に合成できる • maintainerの実例に続きます。 styled by Kei

More Related