Remember the Reader!
In this chapter, we are going to cover how to write a good paper for this course. The material presented here is mostly summaries of the great talks by Simon Peyton Jones and Derick Dreyer.
This chapter is divided into two parts. General advice about how to write coherent and specific advice about how to write a paper.
The most important thing you can do when writing a paper is to write clearly, and coherently. Most readers are pressed for time, and reading your paper is rarely a priority. It is therefore important that you do not waste the interest of the reader by writing convoluted or incoherently.
If you want to write text that is easy to read, make sure that every paragraph has exactly one main point. This point should be expressed as a sentence in the beginning of the paragraph. The rest of the paragraph should be supporting evidence for that point. If you write this way, readers are much more likely to get your point, even when skimming the paper.
When writing a paragraph, you should make sure that every sentence fits into the structure of the paragraph. We call this flow. Flow is broken when a sentence introduces new information at the start of the sentence, so that it seems unrelated to the sentences that came before. A good sentence will start with old information, and end with new information.
Program analysis is one of the most fun disciplines in computer science. After taking this course, we hope that the students will also feel this as well. Concolic execution is a great example of why people should understand program analysis. Sadly, it is not well known.
Program analysis is one of the most fun disciplines in computer science. After taking this course, we hope you will feel that way as well. One example of a program analysis that might entice students to take and enjoy the course is concolic execution. Unfortunately, concolic execution is not well known.
Active voice means every action in a sentence is done by a subject, while passive voice is when it is not. Way too many people try to sound smart or academic by writing in the passive voice. Do not do that. Instead, you should write in the active voice as it is much easier to read. When you do something, use we.
Don't. A thorough investigation of the causes of the inaccuracies in the analysis was done, and no clear cause was found.
Do. We did a thorough investigation of the inaccuracies in the analysis, and we found no clear cause.
Don't. Contained in this paper, are many truths!
Do. This paper contains many truths!
A very useful tool for figuring out if your writing is coherent is to try reading it aloud. You will quickly find out if your sentences make sense.
George Orwell also had these six rules about writing good prose.
Never use a metaphor, simile, or other figure of speech which you are used to seeing in print.
Never use a long word where a short one will do.
If it is possible to cut a word out, always cut it out.
Never use the passive where you can use the active.
Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent.
Break any of these rules sooner than say anything outright barbarous.
In general, your paper should be structured something like this.
Title (1 sentence, 10,000 readers)
Abstract (1-2 paragraphs, 1,000 readers)
Introduction (1-2 pages, 100 readers)
Key Idea (2-3 pages, 50 readers)
Technical Meat (3-5 pages, 10 readers)
Related Work (1-2 pages, 100 readers)
Conclusion (0-1/2 pages, 100 readers)
Some of the parts above cover multiple sections, and these sections might be named something different; however, the structure is often the same.
The title is the most important part of the paper as it is what invites people to read your paper. Try to use keywords that people recognize.
Project 10
Group 10 (Waste of space, your group name is in the author list.)
Program Analysis (Does not tell the reader anything).
Testcase Prediction (Ambiguous and the method is not clear).
Test Case Selection using Static Call-Graph Analysis.
Testing Static Analysis using LLM-Synthesized Code.
Confirming Static Analysis Results using Directed Dynamic Analysis.
The abstract and introduction are the most important parts of the paper. After reading the paper, the censor knows the maximum grade you can get; the rest of the paper is about proving that you deserve it. Therefore, I recommend writing the introduction before writing the rest of the paper, or even finishing the work.
You should use the CGIE model (Context - Gap - Innovation - Evaluation) when writing your abstract and introduction. First you state the context, which is what the reader needs to know to be motivated about the problem. Then you explain the gap, which is why current approaches do not solve the problem completely. Finally, you explain the innovation, which is your key idea and how you set yourself apart from the rest, including how you perform on the problem, and the evaluation how you have shown it works.
In practice, your structure would be something like this:
(Context) The regression test suites of large software projects can contain thousands of tests. Running all of these tests can take multiple days. Selecting which tests to run is therefore crucial to maintain developer productivity. (Gap) Currently, developers manually select which tests to run after a change. This is inefficient and error-prone.
(Innovation) In this paper, we use syntactic static analysis and information logged in an initial run of the test-suite to predict which tests might have changed. Our key insight is... (Evaluation) In a case study, we ran our approach on Maven, which has 8323 tests. Over the last 300 commits we were able to correctly predict 98 % of the changed tests, and were able to on average save 23.2 minutes of test time per commit.
The introduction is essentially an expanded abstract, but there are some notable differences. Essentially, you should:
make references to prior work to highlight the gap (but not all, that's what the related work section is for).
use the extra space for a small motivating example. This will anchor your reader, so they concretely know what you want to do.
include a process diagram. This will make it much easier to understand your idea.
end with a bullet list of contributions including forward references. This will highlight your contributions and indicate where to read about them. Don't ask your reader to guess what you did!
In this section, you should illustrate (a possibly limited version) of your approach, ideally given one or more examples. Write this section so that people with limited knowledge of your field can read it.
A good example is Section 2 and 3 in Kalhauge (2019).
In these sections, you should present the technical meat of your paper. This is what people will read to really understand what you have done. It should contain a theory, implementation, and evaluation part.
Here you argue that your approach is sound using math. Depending on what you have done this can be more or less rigorous.
Here you explain how you have taken your theoretical idea and implemented it. Implementation is often uninteresting to the reader, so do not spend more than a paragraph or two on this. You should focus on how your implementation differs from the theoretical solution you laid out. Hopefully, these differences are relatively small.
The evaluation is the reason for the implementation. Here, you should show that your new technique is better on your problem.
I like to start the evaluation section with a summary of the evaluation, and a list of sub-research questions, which all try to answer part of the main research question.
In this section, we answer our main research question:
Is static analysis better, in terms of speed and accuracy, than dynamic at detecting information flow bugs?
To evaluate this, we choose a benchmark of real java programs with information flow problems (see Section 6.1), and implemented both a static and dynamic version of the information flow algorithm (see Section 6.2). We then asked two questions:
How fast is the analysis?
We ran both algorithms on the benchmark suite, and found that the dynamic analysis was 2.01x faster than the static analysis if limited to 10 inputs, however if we ran the dynamic analysis until the precision matched that of the static analysis it was 5x slower (see Section 6.3).
Can we tune the dynamic analysis?
Inspired by the last experiment, we considered that the dynamic analysis could be tuned to give arbitrary performance...
While our experiments are limited by the scope (see Section 6.5), we conclude that dynamic analysis is faster, but also more imprecise than static analysis, in detecting information flow bugs.
The rest of the evaluation is filling out those sections with the relevant information. Things that are important to consider. Did you,
answer your research question (if not change it)?
analyze your results statically (does your result vary)?
think of threats to validity (otherwise reduce your scope)?
Always include a section about the possible problems of your experiment, called threats to validity. There exist two kinds: internal and external validity. Internal validity is about measuring errors in your experiment that might have caused your analysis to be wrong. External validity is that the scope of your experiment limits the inferences you can make.
Internal: We tried to keep our system under test as quiet as possible, but laptops are inherently noisy. We have corrected for this by taking multiple measurements over time.
External: Our experiment was run on a small set of Java benchmarks. While we tried to choose a representative set, our results might not generalize to other languages or specific use cases of Java.
External: The implementations were both done by us, and while we have done our best to implement both analyses performantly and fairly, better implementations might exist that invalidate our results.
In the related work, you describe how your work is different from the prior work. Do not just list related work, but spend the time explaining why you feel like this related work does not solve your problem.
You can compare with academic papers (use Google Scholar to do searches), known tools, or just techniques described during the course.
Don't. There exist other techniques that also solve our problem, like fuzz testing and symbolic execution.
Do. We could also have used fuzz testing to solve our problem, however it does have two major drawbacks compared to our technique. Firstly, it requires a... The same limitations apply to symbolic execution.
A recap of your project.
Kalhauge, Christian Gram; Palsberg, Jens (2019). Binary reduction of dependency graphs.
doi:10.1145/3338906.3338956