28 research outputs found
Constraining application behaviour by generating languages
Writing a platform for reactive applications which enforces operational
constraints is difficult, and has been approached in various ways. In this
experience report, we detail an approach using an embedded DSL which can be
used to specify the structure and permissions of a program in a given
application domain. Once the developer has specified which components an
application will consist of, and which permissions each one needs, the
specification itself evaluates to a new, tailored, language. The final
implementation of the application is then written in this specialised
environment where precisely the API calls associated with the permissions which
have been granted, are made available.
Our prototype platform targets the domain of mobile computing, and is
implemented using Racket. It demonstrates resource access control (e.g.,
camera, address book, etc.) and tries to prevent leaking of private data.
Racket is shown to be an extremely effective platform for designing new
programming languages and their run-time libraries. We demonstrate that this
approach allows reuse of an inter-component communication layer, is convenient
for the application developer because it provides high-level building blocks to
structure the application, and provides increased control to the platform
owner, preventing certain classes of errors by the developer.Comment: 8 pages, 8th European Lisp Symposiu
Frame-Based Editing: Easing the Transition from Blocks to Text-Based Programming
Block-based programming systems, such as Scratch or Alice, are the most popular environments for introducing young children to programming. However, mastery of text-based programming continues to be the educational goal for stu- dents who continue to program into their teenage years and beyond. Transitioning across the significant gap between the two editing styles presents a difficult challenge in school- level teaching of programming. We propose a new style of program manipulation to bridge the gap: frame-based edit- ing. Frame-based editing has the resistance to errors and approachability of block-based programming while retaining the flexibility and more conventional programming seman- tics of text-based programming languages. In this paper, we analyse the issues involved in the transition from blocks to text and argue that they can be overcome by using frame- based editing as an intermediate step. A design and imple- mentation of a frame-based editor is provided
Recommended from our members
Towards helping end-user programmers’ information foraging by manipulating information features in a patch
Software maintenance tasks often require finding information within existing code, which is time-consuming and difficult even for professional programmers. For example, programmers may need to know what code implements certain functionality or what is the purpose of certain code. In response, researchers have developed tools to help programmers find information during programming tasks. The empirical success of these tools can be explained by Information Foraging Theory (IFT), which predicts how people will seek information by navigating through virtual patches in an information system. In the case of programming, these patches are often chunks of code (e.g., functions), with navigable links for moving among methods. IFT predicts people will perceive cues (such as words or symbols) associated with navigable links, select links that seem relevant to their information needs, and attempt to obtain the needed information by maximizing the rate of information gained relative to the cost of navigating and understanding patches. Many existing tools accelerate foraging by decreasing the cost associated with navigating from one patch to another.
IFT suggests that the visual weight of the information features in a patch can have a strong effect on a predator’s foraging choices and, consequently, on how well the predator succeeds in maximizing the rate of information gain. In an ideal situation, visual weight will efficiently lead the predator to the needed information; on the other hand, if visual weight leads the predator astray, then this could lead the predator to process more patches than necessary (increasing cost and reducing the rate of information gain). Therefore, it is anticipated that increasing the relative weight of important information features with respect to unimportant information features will aid an end-user programmer’s foraging effort. Towards this end, two prototypes were implemented: each of these uses an existing algorithm to identify the most important lines of code in a function. One prototype increases the relative weight of important information features by highlighting important lines of code; the other prototype decreases the relative weight of unimportant information features by hiding unimportant lines of code. This research's focus is end-user programmers, who have
received minimal attention in prior work.
An empirical study evaluated the effectiveness of the prototypes relative to the baseline (no information feature modification). These results indicate that increasing the relative weight of important information features by highlighting important statements had a significant effect on the amount of information foraged and the rate of information gained; on the other hand, decreasing the relative weight of unimportant information features by hiding unimportant statements had a significant effect on the rate of information gained, but not on the amount of information foraged. Neither approaches seemed to have any effect on the amount of time spent on information foraging or patch-to-patch navigation
Ur/Web: A Simple Model for Programming the Web
The World Wide Web has evolved gradually from a document delivery platform to an architecture for distributed programming. This largely unplanned evolution is apparent in the set of interconnected languages and protocols that any Web application must manage. This paper presents Ur/Web, a domain-specific, statically typed functional programming language with a much simpler model for programming modern Web applications. Ur/Web's model is unified, where programs in a single programming language are compiled to other "Web standards" languages as needed; modular, supporting novel kinds of encapsulation of Web-specific state; and exposes simple concurrency, where programmers can reason about distributed, multithreaded applications via a mix of transactions and cooperative preemption. We give a tutorial introduction to the main features of Ur/Web, formalize the basic programming model with operational semantics, and discuss the language implementation and the production Web applications that use it.National Science Foundation (U.S.) (Grant CCF-1217501