skip to main content
10.1145/2103786.2103794acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
abstract

Semantics for graphical user interfaces

Published:28 January 2012Publication History

ABSTRACT

Graphical user interface (GUI) libraries are one of the most widely-encountered higher-order interfaces. Even in languages (such as Java and C++) where programmers customarily avoid higher-order abstractions, the GUI toolkit interface is invariably higher-order.

The foundation of these libraries is the callback: the display is conceptualized as something evolving over time, and programs register their interest in the changes the display undergoes by passing it functions to invoke whenever a given change happens. Alas, programs making heavy use of callbacks are notoriously dificult to write: they are all three of imperative, concurrent, and higher-order. There are design patterns (such as the model-view-controller pattern~[6])for writing such programs, but verification (and even specification!) of interactive programs written in this style remains very difficult.

One attractive approach for taming this complexity has been functional reactive programming[5]. This model eliminates imperative state from the semantic model of interactive programs by treating time-varying values as first-class datatype, and eliminates concurrency by taking a synchronous view of time, thereby leaving us on the familiar ground of purely functional programming.

Unfortunately, direct implementations of functional reactive programming tend to suffer from poor efficiency, arising from the mismatch between the mathematical abstraction of a stream and their realization in terms of mutable state. The typical response [7] has been to follow the example of synchronous dataflow languages [3, 12], and restrict the definable abstractions.

This talk surveys a recent line of work [8-10] which fully supports the functional style (including full support for higher-order functions and higher-type streams), whilst still permitting efficient implementation. This work draws on a wide array of work ranging from metric-space approaches to denotational semantics [13, 14], step-indexing [1, 4], modal logic [11], to linear logic [2].

In the talk, we will also illustrate functional GUI programming with a series of examples in AdjS, a new programming language based on this model.

References

  1. A. W. Appel, P.-A. Melliès, C. D. Richards, and J. Vouillon. A very modal model of a modern, major, general type system. In M. Hofmann and M. Felleisen, editors, POPL, pages 109--122. ACM, 2007. ISBN 1--59593--575--4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. N. Benton and P. Wadler. Linear logic, monads and the lambda calculus. In LICS, pages 420--431, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Berry and L. Cosserat. The ESTEREL synchronous programming language and its mathematical semantics. In Seminar on Concurrency, pages 389--448. Springer, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. Birkedal, R. E. Møgelberg, J. Schwinghammer, and K. Støvring. First steps in synthetic guarded domain theory: step-indexing in the topos of trees. In LICS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Elliott and P. Hudak. Functional reactive animation. In ICFP, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc. Boston, MA, USA, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Hudak, A. Courtney, H. Nilsson, and J. Peterson. Arrows, robots and functional reactive programming. In Advanced Functional Programming, volume 2638 of LNCS. Springer, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  8. N. R. Krishnaswami and N. Benton. A semantic model for graphical user interfaces. In ICFP, pages 45--57, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. N. R. Krishnaswami and N. Benton. Ultrametric semantics of reactive programs. In LICS, pages 257--266. IEEE Computer Society, 2011. ISBN 978-0--7695--4412-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N. R. Krishnaswami, N. Benton, and J. Hoffmann. Higher-order functional reactive programming in bounded space. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Nakano. A modality for recursion. In LICS, pages 255--266, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Pouzet. Lucid Synchrone, version 3. Tutorial and reference manual. Université Paris-Sud, LRI, 2006.Google ScholarGoogle Scholar
  13. J. J. M. M. Rutten. Elements of generalized ultrametric domain theory. Theor. Comput. Sci., 170 (1--2): 349--381, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Schwinghammer, L. Birkedal, and K. Støvring. A step-indexed kripke model of hidden state via recursive properties on recursively defined metric spaces. In M. Hofmann, editor, FOSSACS, volume 6604 of Lecture Notes in Computer Science, pages 305--319. Springer, 2011. ISBN 978--3--642--19804--5. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Semantics for graphical user interfaces

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      TLDI '12: Proceedings of the 8th ACM SIGPLAN workshop on Types in language design and implementation
      January 2012
      110 pages
      ISBN:9781450311205
      DOI:10.1145/2103786

      Copyright © 2012 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 28 January 2012

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • abstract

      Acceptance Rates

      Overall Acceptance Rate11of26submissions,42%

      Upcoming Conference

      POPL '25

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader