Many research projects are publicly available but rarely used due to the difficulty of building and installing them. As web browsers have grown in popularity, they have become an excellent platform for offering demos. We propose that researchers compile their projects to JavaScript and put them online to make them more accessible to first-time users and thus facilitate large-scale online usability studies.
Many research projects are publicly available but rarely used due to the difficulty of building and installing them. We propose that researchers compile their projects to JavaScript and put them online to make them more accessible to new users and thus facilitate large-scale online usability studies.
Author(s): Galenson, Joel David | Advisor(s): Bodik, Rastislav; Sen, Koushik | Abstract: Many code fragments are difficult to write. For example, using new and unfamiliar APIs can be a complex task with a steep learning curve. In addition, implementing a complex data structure requires discovering and understanding all of the corner cases. And more and more end users with little to no formal training are trying to write code, whether they be scientists writing simulations or kids writing mobile apps. For all of these reasons and more, programming is a difficult task, which leads to bugs and delays in software.There are many tools that help programmers find code fragments involving complex APIs, but many are somewhat inexpressive and rely on static information. We present a new technique, which we call CodeHint, that generates and evaluates code at runtime and hence can synthesize real-world Java code that involves I/O, reflection, native calls, and other advanced language features. Our approach is dynamic (giving accurate results and allowing programmers to reason about concrete executions), easy-to-use (supporting a wide range of correctness specifications), and interactive (allowing users to refine the candidate code snippets). We evaluate CodeHint and show that its algorithms are efficient and that in two user studies it improves programmer productivity by more than a factor of two.As the second contribution, programmers and end users often find it easy to explain an algorithm on a whiteboard or with pictures in a textbook but struggle to write the code correctly. We propose a new methodology that allows users to program by demonstrating how an algorithm proceeds on concrete inputs. To reduce the burden of these demonstrations on the user, we have developed pruning algorithms to remove ambiguities in the demonstrations and control flow inference algorithms to infer missing conditionals in demonstrations. These two techniques take advantage of the knowledge encoded in the user's partial correctness condition. We show that this approach is effective in practice by analyzing its performance on several common algorithms.
There are many tools that help programmers find code fragments, but most are inexpressive and rely on static information. We present a new technique for synthesizing code that is dynamic (giving accurate results and allowing programmers to reason about concrete executions), easy-to-use (supporting a wide range of correctness specifications), and interactive (allowing users to refine the candidate code snippets). Our implementation, which we call CodeHint, generates and evaluates code at runtime and hence can synthesize real-world Java code that involves I/O, reflection, native calls, and other advanced language features. We have evaluated CodeHint in two user studies and show that its algorithms are efficient and that it improves programmer productivity by more than a factor of two.
We address the problem of writing compilers targeting complex execution environments, such as computer clusters composed of machines with multi-core CPUs. To that end we introduce partial compilers. These compilers can pass sub-programs to several child (partial) compilers, combining the code generated by their children to generate the final target code. We define a set of high-level polymorphic operations manipulating both compilers and partial compilers as first-class values. These mechanisms provide a software architecture for modular compiler construction. This allows the building of a forest of compilers, providing a structured treatment of multistage compilers.
Most research tools are publicly available but rarely used due to the difficulty of building them, which hinders the sharing of ideas. Web browsers have recently become an excellent platform for giving portable demos. Researchers could enable their tools to run in a web browser by compiling them into JavaScript, making the tools more accessible by removing the need to configure and build them. In this paper, we explore ideas to make sharing research easier.
Most programs contain conceptually simple statements that are difficult to write. We propose a new methodology that allows programmers to give partial dynamic specifications of the results of statements in a particular program state, and which uses them to synthesize candidate statements. Building on previous work, these specifications can consist of information about the type or value of a desired expression or can be arbitrary predicates relating the input and output states. We implemented our methodology in a tool named CodeHint and ran a user study where we found that programmers used it when given the choice.
Now that multicore chips are common, providing an approach to parallel programming that is usable by regular programmers has become even more important. This cloud has one silver lining: providing useful speedup on a program is useful in and of itself, even if the resulting performance is lower than the best possible parallel performance on the same program. To help achieve this goal, Yada is an explicitly parallel programming language with sequential semantics. Explicitly parallel, because we believe that programmers need to identify how and where to exploit potential parallelism, but sequential semantics so that programmers can understand and debug their parallel programs in the way that they already know, i.e. as if they were sequential. The key new idea in Yada is the provision of a set of types that support parallel operations while still preserving sequential semantics. Beyond the natural read-sharing found in most previous sequential-like languages, Yada supports three other kinds of sharing. Writeonce locations support a single write and multiple reads, and two kinds of sharing for locations updated with an associative operator generalise the reduction and parallel-prefix operations found in many data-parallel languages. We expect to support other kinds of sharing in the future. We have evaluated our Yada prototype on eight algorithms and four applications, and found that programs require only a few changes to get useful speedups ranging from 2.2 to 6.3 on an 8-core machine. Yada performance is mostly comparable to parallel implementations of the same programs using OpenMP or explicit threads.
Angelic nondeterminism can play an important role in program development. It simplifies specifications, for example in deriving programs with a refinement calculus; it is the formal basis of regular expressions; and Floyd relied on it to concisely express backtracking algorithms such as N-queens. We show that angelic nondeterminism is also useful during the development of deterministic programs. The semantics of our angelic operator are the same as Floyd's but we use it as a substitute for yet-to-be-written deterministic code; the final program is fully deterministic. The angelic operator divines a value that makes the program meet its specification, if possible. Because the operator is executable, it allows the programmer to test incomplete programs: if a program has no safe execution, it is already incorrect; if a program does have a safe execution, the execution may reveal an implementation strategy to the programmer. We introduce refinement-based angelic programming, describe our embedding of angelic operators into Scala, report on our implementation with bounded model checking, and describe our experience with two case studies. In one of the studies, we use angelic operators to modularize the Deutsch-Schorr-Waite (DSW) algorithm. The modularization is performed with the notion of a parasitic stack, whose incomplete specification was instantiated for DSW with angelic nondeterminism.
We empirically investigate whether advertisers are maximizing their return on investment (ROI) across multiple keywords in sponsored search auctions. Because testing for ROI maximization relies on knowledge of advertisers' private true values per click, we instead use necessary (although not sufficient) conditions for ROI maximizing behavior that rely only on advertisers' bids. We classify advertisers based on the extent to which they satisfy the test conditions. Our results indicate that a large fraction of advertisers in the Yahoo Webscope first price data set may be following ROI-based strategies.
We address the problem of writing compilers targeting complex execution environments, such as computer clusters composed of machines with multi-core CPUs. To that end we introduce partial compilers. These compilers can pass sub-programs to several child (partial) compilers, combining the code generated by their children to generate the final target code. We define a set of high-level polymorphic operations manipulating both compilers and partial compilers as first-class values. These mechanisms provide a software architecture for modular compiler construction. This allows the building of a forest of compilers, providing a structured treatment of multistage compilers.
New mobile platforms are exploding in popularity and present both opportunities and challenges. So far, however, the software stacks implemented on these new platforms look essentially the same as those on today's desktops and use operating system kernels not substantially different from UNIX of the 1970s. We think this is a squandered opportu- nity; these mobile devices have the potential to slough off thirty years' worth of accumulated software cruft and start clean with an application platform that is both friendly to developers and conducive to achieving maximum perfor- mance. We believe that the abstractions used to build today's web applications will be the ancestors of this new platform, an idea this paper begins to investigate. What low-level ser- vices does this future platform require? We answer this ques- tion by studying current web browsers, and list the required services. What performance limitations imposed by current browser abstractions can be eliminated through novel oper- ating systems? We answer this by quantifying the significant "tax" imposed by these penalties. What are some features such a new operating system might have? We present ten- tative answers to this question as future work, motivated by our profiling results. We also raise the question of whether virtual memory is necessary in such a system.
Mihai Budiu合作论文数Microsoft Research in Silicon Valley2