132 research outputs found
Tortoise: Interactive System Configuration Repair
System configuration languages provide powerful abstractions that simplify
managing large-scale, networked systems. Thousands of organizations now use
configuration languages, such as Puppet. However, specifications written in
configuration languages can have bugs and the shell remains the simplest way to
debug a misconfigured system. Unfortunately, it is unsafe to use the shell to
fix problems when a system configuration language is in use: a fix applied from
the shell may cause the system to drift from the state specified by the
configuration language. Thus, despite their advantages, configuration languages
force system administrators to give up the simplicity and familiarity of the
shell.
This paper presents a synthesis-based technique that allows administrators to
use configuration languages and the shell in harmony. Administrators can fix
errors using the shell and the technique automatically repairs the higher-level
specification written in the configuration language. The approach (1) produces
repairs that are consistent with the fix made using the shell; (2) produces
repairs that are maintainable by minimizing edits made to the original
specification; (3) ranks and presents multiple repairs when relevant; and (4)
supports all shells the administrator may wish to use. We implement our
technique for Puppet, a widely used system configuration language, and evaluate
it on a suite of benchmarks under 42 repair scenarios. The top-ranked repair is
selected by humans 76% of the time and the human-equivalent repair is ranked
1.31 on average.Comment: Published version in proceedings of IEEE/ACM International Conference
on Automated Software Engineering (ASE) 201
A Fast Compiler for NetKAT
High-level programming languages play a key role in a growing number of
networking platforms, streamlining application development and enabling precise
formal reasoning about network behavior. Unfortunately, current compilers only
handle "local" programs that specify behavior in terms of hop-by-hop forwarding
behavior, or modest extensions such as simple paths. To encode richer "global"
behaviors, programmers must add extra state -- something that is tricky to get
right and makes programs harder to write and maintain. Making matters worse,
existing compilers can take tens of minutes to generate the forwarding state
for the network, even on relatively small inputs. This forces programmers to
waste time working around performance issues or even revert to using
hardware-level APIs.
This paper presents a new compiler for the NetKAT language that handles rich
features including regular paths and virtual networks, and yet is several
orders of magnitude faster than previous compilers. The compiler uses symbolic
automata to calculate the extra state needed to implement "global" programs,
and an intermediate representation based on binary decision diagrams to
dramatically improve performance. We describe the design and implementation of
three essential compiler stages: from virtual programs (which specify behavior
in terms of virtual topologies) to global programs (which specify network-wide
behavior in terms of physical topologies), from global programs to local
programs (which specify behavior in terms of single-switch behavior), and from
local programs to hardware-level forwarding tables. We present results from
experiments on real-world benchmarks that quantify performance in terms of
compilation time and forwarding table size
ADsafety: Type-Based Verification of JavaScript Sandboxing
Web sites routinely incorporate JavaScript programs from several sources into
a single page. These sources must be protected from one another, which requires
robust sandboxing. The many entry-points of sandboxes and the subtleties of
JavaScript demand robust verification of the actual sandbox source. We use a
novel type system for JavaScript to encode and verify sandboxing properties.
The resulting verifier is lightweight and efficient, and operates on actual
source. We demonstrate the effectiveness of our technique by applying it to
ADsafe, which revealed several bugs and other weaknesses.Comment: in Proceedings of the USENIX Security Symposium (2011
Do Machine Learning Models Produce TypeScript Types That Type Check?
Type migration is the process of adding types to untyped code to gain
assurance at compile time. TypeScript and other gradual type systems facilitate
type migration by allowing programmers to start with imprecise types and
gradually strengthen them. However, adding types is a manual effort and several
migrations on large, industry codebases have been reported to have taken
several years. In the research community, there has been significant interest
in using machine learning to automate TypeScript type migration. Existing
machine learning models report a high degree of accuracy in predicting
individual TypeScript type annotations. However, in this paper we argue that
accuracy can be misleading, and we should address a different question: can an
automatic type migration tool produce code that passes the TypeScript type
checker?
We present TypeWeaver, a TypeScript type migration tool that can be used with
an arbitrary type prediction model. We evaluate TypeWeaver with three models
from the literature: DeepTyper, a recurrent neural network; LambdaNet, a graph
neural network; and InCoder, a general-purpose, multi-language transformer that
supports fill-in-the-middle tasks. Our tool automates several steps that are
necessary for using a type prediction model, (1) importing types for a
project's dependencies; (2) migrating JavaScript modules to TypeScript
notation; (3) inserting predicted type annotations into the program to produce
TypeScript when needed; and (4) rejecting non-type predictions when needed.
We evaluate TypeWeaver on a dataset of 513 JavaScript packages, including
packages that have never been typed before. With the best type prediction
model, we find that only 21% of packages type check, but more encouragingly,
69% of files type check successfully.Comment: Published at the 37th European Conference on Object-Oriented
Programming (ECOOP 2023
Making High-Performance Robots Safe and Easy to Use for an Introduction to Computing
Robots are a popular platform for introducing computing and artificial
intelligence to novice programmers. However, programming state-of-the-art
robots is very challenging, and requires knowledge of concurrency, operation
safety, and software engineering skills, which can take years to teach. In this
paper, we present an approach to introducing computing that allows students to
safely and easily program high-performance robots. We develop a platform for
students to program RoboCup Small Size League robots using JavaScript. The
platform 1) ensures physical safety at several levels of abstraction, 2) allows
students to program robots using the JavaScript in the browser, without the
need to install software, and 3) presents a simplified JavaScript semantics
that shields students from confusing language features. We discuss our
experience running a week-long workshop using this platform, and analyze over
3,000 student-written program revisions to provide empirical evidence that our
approach does help students.Comment: 8 pages, 7 figures, 4 table
- …