-
How to Write a C/C++ Compiler That Respects Volatile
The volatile type qualifier in C/C++ means roughly that accesses to the qualified object happen on the actual machine as they do in the abstract machine. I’ve written about volatile pretty extensively, so won’t repeat myself. An interesting problem with volatile is that in practice, compilers fail to respect it: they add, remove, and reorder…
-
Life With BibTeX
For a while I’ve had a blog post about BibTeX on the back burner, but now I don’t need to write it because Dan Wallach has done so. It’s a great post, but for emphasis I’ll repeat a handful of points that I tell students (and would like to tell authors of some papers I…
-
Differential Whitebox Testing Is Good
[This post is based on data gathered by Chad Brubaker and Peng Li, respectively an undergrad and grad student in CS at Utah.] Two courses I’ve taught at Utah, CS 4400 and CS 5785, have assignments where students write short integer functions for which we — the instructors — have automatic graders. In 4400 the…
-
Quality Not Quantity?
The perverse incentives for academics to maximize publication and citation counts, as opposed to maximizing the quality and impact of the underlying research, are well-known. Stan Trimble’s recent letter to Nature suggests a partial solution: academic institutions should limit the number of publications that are part of a tenure or promotion case. This is simple…
-
Visualizing A Few More Math Bugs
As a followup to last night’s post, here are some saturating signed subtraction functions I’ve received. Hopefully the correct one is obvious.
-
Visualizing Math Bugs
After getting too tired to work tonight, I realized I had no Netflix and that I’m bored with the books I’m reading. Therefore, I present visualizations of several solutions I’ve received to my saturating arithmetic homework over the years. This is what a correct saturating signed add looks like, where the z-axis is the output:…
-
A Few Thoughts About Path Coverage
Klee isn’t the only tool in its class, nor was it the first, but it’s open source and well-engineered and it works. Klee’s goal is to generate a set of test inputs that collectively induce path coverage in a system under test. One of the scenarios I was curious about is the one where Klee…
-
Undefined Integer Behaviors in Student Code, Part 1
[This post is based on material from Chad Brubaker, a really smart CS undergrad at Utah who did all the work getting these data. The integer undefined behavior checker was created by my student Peng Li.] Integer undefined behaviors in C/C++, such as INT_MAX+1 or 1<<-1, create interesting opportunities for compiler optimizations and they also…
-
Should Software Evolve?
Weimer, Nguyen, Le Goues, and Forrest wrote a paper Automatically Finding Patches Using Genetic Programming that proposes and evaluates this approach for fixing a buggy software system: A failure-inducing test case is found The system code is mutated randomly, but using smart heuristics to increase the probability that the part of the program that is…
-
Random Testing Gets No Respect
A funny thing about random testing is that it gets little respect from most computer scientists. Here’s why: Random testing is simple, and peer reviewers hate simple solutions. Random testing does not lend itself to formalization and proofs, which peer reviewers love. Random testing provides no guarantees. Peer reviewers love guarantees — regardless of whether…