KScript and KSWorld: a time-aware and mostly declarative language and interactive GUI framework

  • Authors:
  • Yoshiki Ohshima;Aran Lunzer;Bert Freudenberg;Ted Kaehler

  • Affiliations:
  • Viewpoints Research Institute, Glendale, CA, USA;Viewpoints Research Institute, Glendale, CA, USA;Viewpoints Research Institute, Glendale, CA, USA;Viewpoints Research Institute, Glendale, CA, USA

  • Venue:
  • Proceedings of the 2013 ACM international symposium on New ideas, new paradigms, and reflections on programming & software
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

We report on a language called KScript and a GUI framework called KSWorld. The goal of KScript and KSWorld is to try to reduce the accidental complexity in GUI framework code and application building. We aim for an understandable, concise way to specify an application's behavior and appearance, minimizing extra details that arise only because of the medium being used. KScript is a dynamic language based on the declarative and time-aware dataflow-style execution model of Functional Reactive Programming (FRP), extended with support for loose coupling among program elements and a high degree of program reconfigurability. KSWorld is built using KScript. The fields, or slots, of graphical widgets in KSWorld are reactive variables. Definitions of such variables can be added or modified in a localized manner, allowing on-the-fly customization of the visual and behavioral aspects of widgets and entire applications. Thus the KSWorld environment supports exploratory application building: a user constructs the appearance interactively with direct manipulation, then attaches and refines reactive variable definitions to achieve the desired overall behavior. We illustrate our use of KSWorld to build an editor for general graphical documents, including dynamic documents that serve as active essays. The graphical building blocks for documents are the same as those used for building the editor itself, enabling a bootstrapping process in which the earliest working version of the editor can be used to create further components for its own interface. As one way of measuring progress on our complexity goal, we provide an overview of the number of lines of code in KSWorld. The total for the KScript compiler, the FRP evaluator, the framework, document model and document editor is currently around 10,000 lines.