Title | JavaUI: Effects for controlling UI object access |
Publication Type | Conference Paper |
Year of Publication | 2013 |
Authors | Gordon CS, Dietl W, Ernst MD, Grossman D |
Conference Name | ECOOP 2013 –- Object-Oriented Programming, 27th European Conference |
Pagination | 179–204 |
Date or Month Published | July |
Conference Location | Montpellier, France |
Abstract | Most graphical user interface (GUI) libraries forbid accessing UI elements from threads other than the UI event loop thread. Violating this requirement leads to a program crash or an inconsistent UI\@. Unfortunately, such errors are all too common in GUI programs. \par We present a polymorphic type and effect system that prevents non-UI threads from accessing UI objects or invoking UI-thread-only methods. The type system still permits non-UI threads to hold and pass references to UI objects. We implemented this type system for Java and annotated 8 Java programs (over 140KLOC) for the type system, including several of the most popular Eclipse plugins. We confirmed bugs found by unsound prior work, found an additional bug and code smells, and demonstrated that the annotation burden is low. \par We also describe code patterns our effect system handles less gracefully or not at all, which we believe offers lessons for those applying other effect systems to existing code. |
Downloads | https://homes.cs.washington.edu/~mernst/pubs/gui-thread-tr20130401.pdf technical report (PDF)
https://checkerframework.org/manual/#guieffect-checker JavaUI implementation
https://github.com/csgordon/javaui older implementation and annotated subject programs
https://homes.cs.washington.edu/~mernst/pubs/gui-thread-ecoop2013.pdf PDF
https://homes.cs.washington.edu/~mernst/pubs/gui-thread-ecoop2013-slides... slides (PDF)
|
Citation Key | GordonDEG2013 |