Hook: An Embedded Domain-Specific Language for Fusing Implicit Interactions to Explicit Event Handlers

MATTHEW AHRENS,ROBERT J. K. JACOB

semanticscholar(2021)

引用 0|浏览5
暂无评分
摘要
ions. The host language of our choice, Haskell, influenced the current language design in terms of the relationships between patterns and world transformers. There are indeed other programming languages that could satisfy preconditions for implementing the Hook language compiler. Future work should consider exploring other host language implementations, especially those commonly used for implementing interactive applications, to extend the current language design with abstractions inspired by those implementations. User studies. Lastly, future work should consider conducting a user study to evaluate the current design of the language with programmers from various backgrounds. It would be desirable that the user study finds which groups of programmers based on their skill sets can benefit from the language as well as the economic acceptance of the language. In addition, we hope that user studies motivate researchers to explore what kind of implicit interactions that computers initiate can bring benefits to humans. For this, the Hook language is ready to handle more complex, sophisticated user status patterns than the simple ones shown in this paper. 6.3 Implications for Interaction Algebra This paper showed the two types of interactions, explicit and implicit, are composable. Taking a step forward, we now touch on the feasibility of defining algebraic specifications for “interaction” beyond the semantics of the Hook language. In concept, the Hook language lifts the event handler and user status handler logics to the Interaction type so that programmers can treat them as composable units at the type level. Inspired by Polaris [58] introducing Table Algebra, the following is our early attempt to explain “interaction composition” found in the Hook language, as a part of Interaction Algebra, using the plus (+) operator. 26 Shibata, Ahrens, and Jacob In the Hook language, interaction is an ordered set of pairs of a pattern and world transformer. Therefore, using the vocabularies from Computational Model section, let e be an instance of explicit interaction that has the form s.t. e = {(pe1, te1), ..., (pen, ten)} and let i be an instance of implicit interaction that has the form s.t. i = {(pu1, tu1), ..., (pum, tum)}. For space, let us consider an example case where each of e and i associates with two patterns; that is, e = {(pe1, te1), (pe2, te2)} and i = {(pu1, tu1), (pu2, tu2)}. To explain the application order of the two interactions in using the plus operator, let us define that the left hand side of the operator is the interaction that internally runs first. Then, the interaction compositions, e + i and i + e , will be defined as follows, where the plus operator for world transformers could be defined on top of the Δ algebraic laws and function composition because world transformers are apparently functions. For example, in ((pe1, pu1), (te1+tu1)), we could see (te1+tu1) as λxw .tu1 (te1 (xw)) and (pe1, pu1) as a lexical environment that the λ has access to. e + i = {((pe1, pu1), (te1+tu1)), ((pe1, pu2), (te1+tu2)) , ((pe2, pu1), (te2+tu1)), ((pe2, pu2), (te2+tu2))} i + e = {((pe1, pu1), (tu1+te1)), ((pe1, pu2), (tu2+te1)) , ((pe2, pu1), (tu1+te2)), ((pe2, pu2), (tu2+te2))} At the same time, ex + ey and ix + iy will be defined by simply using the set union. To specify an event pattern in e, let us leverage subscript square brackets ([] ), assume pes ⊆ pe1, and then define the interaction composition as follows. e [pe1 ] + i = {((pe1, pu1), (te1+tu1)), ((pe1, pu2), (te1+tu2)), (pe2, te2)} i + e [pe2 ] = {(pe1, te1), ((pe2, pu1), (tu1+te2)), ((pe2, pu2), (tu2+te2))} e [pes ] + i = {((pes , pu1), (te1+tu1)), ((pes , pu2), (te1+tu2)), (pe1, te1), (pe2, te2)} Similarly, complex compositions will be defined as follows. (e [pe1 ] + i) [pe2 ] + i = {((pe1, pu1), (te1+tu1)), ((pe1, pu2), (te1+tu2)) , ((pe2, pu1), (te2+tu1)), ((pe2, pu2), (te2+tu2))} i + (e [pe1 ] + i) [pe2 ] = {((pe1, pu1), (te1+tu1)), ((pe1, pu2), (te1+tu2)) , ((pe2, pu1), (tu1+te2)), ((pe2, pu2), (tu2+te2))} Lastly, to specify a fusion strategy, let us decorate4 the plus operator and define so that we use <+> (and + as well) for merge, +> for overwrite, and <+ for tweak, where missing < or > indicates throwing away changes made solely by the world transformer placed at that side. e [pe1 ] <+> i = {((pe1, pu1), (te1<+>tu1)), ((pe1, pu2), (te1<+>tu2)), (pe2, te2)} e [pe1 ] +> i = {((pe1, pu1), (te1 +>tu1)), ((pe1, pu2), (te1 +>tu2)), (pe2, te2)} e [pe1 ] <+ i = {((pe1, pu1), (te1<+ tu1)), ((pe1, pu2), (te1<+ tu2)), (pe2, te2)} We acknowledge that there is still room we need to fill in to define “interaction composition” in detail. (e.g., overlaps in patterns, etc.) Yet, we envision that introducing formalism brings two potential benefits in the field of Human-Computer Interaction. First, it may allow us to import theories and tools developed in the field of Programming Language researches. For example, since the presented computational model defines world transformers using the form of functions, we may be able to naturally apply and take advantage of existing tools that analyze properties of functions. Second, it may allow us to expand design spaces beyond the kinds of user interface designs. For example, there exist classes of user interfaces whose interactive behaviors involve explicit interactions. (e.g., GUI, Tangible User Interfaces (TUI) [22], and so on, although eventequivalent tokens, associated with “constraint” [51], in TUI may look different from ones in GUI.) Plus, there exist classes of user interfaces whose interactive behaviors involve implicit interactions. 4Like the winged star (<*>) operator for Applicative apply in Haskell. Hook: An Embedded Domain-Specific Language for Fusing Implicit Interactions to Explicit Event Handlers 27 (e.g., Passive Brain-Computer Interfaces (BCI) [63], Implicit BCI [56], Affective Computing [44], Attentive or Attentional User Interfaces (AUI) [21, 59], and so on.) Consequently, if we can extract explicit and implicit interactions from those user interface designs, then the algebraic specifications for “interaction” may allow us to design a combination of two kinds of user interfaces—e.g., (TUI + Implicit BCI)—and further compare two different combinations of user interfaces based on their complexity—e.g., (GUI + Implicit BCI) compared to (TUI + Passive BCI)—systematically, even without having their actual implementations. 7 CONCLUSION As machine capabilities advance, opportunities to design implicit interactions will likely continue to grow beyond explicit ones. As a result, programmers using the current tools to implement combinations of the explicit and implicit interactions will face increasing modularity and clarity problems due to the growing complexity. In this paper, we have introduced the Hook language, wherein programmers using the language can treat explicit and implicit interactions independently and can specify their composition declaratively. The Hook language made this possible by providing the set of abstractions for describing the two types of interactions as parameterized world transformation functions plus the fusion strategies for gluing results of the two interactions. Our case studies demonstrated that theHook language—agnostic to events, user status, and application states—could tackle a range of arbitrary (GUI) applications and that programmers could maintain modularity and clarity of their code when extending interactive behaviors of existing interactive systems with implicit interactions. Lastly, we discussed the design choices we made on achieving separation of concerns and algorithmic precision and the limitations in the current language implementation for future work, as well as the implications beyond the concept of the Hook language toward defining Interaction Algebra. We hope that the Hook language encourages programmers to take a step toward designing more implicit interactions and contributes to making interactive systems more aware of their users. ACKNOWLEDGMENTS We would like to thank Remco Chang, Jeff Foster, Kathleen Fisher from Tufts University, and Jones Yu from Wentworth Institute of Technology for their valuable insights into this work.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要