DOC PREVIEW
Stanford CS 295 - Homework Assignment

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS295 Assignment 4Due on: Thursday, May 12, 11:59 PMObjectiveThe objective of this assignment is to use the Cooperative Bug Isolation (CBI) tool to find bugsin jpegtran, an image processing program.ResourcesDownload the tarball http://www.stanford.edu/class/cs295/asgns/asgn4/asgn4.tar.gzwhich when uncompressed should produce a directory named asgn4 containing:• testimg.jpg, a test image,• a directory src containing the source code of a buggy version of jpegtran, and• a directory analysis containing the results of running CBI on jpegtran.SetupFirst build jpegtran as follows:cd asgn4/srcbashCC=’gcc -g’ ./configuremakeexitYou will now have (among other things) a jpegtran executable that is compiled with debuggingsupport. Later in the assignment, you will run this executable to discover test cases that causethe program to crash, as well as run this executable under gdb.We ran the CBI tool on jpegtran using numerous test image files as input. One such imagefile, testimg.jpg, is provided with this assignment. The output produced by the CBI tool isprovided in the asgn4/analysis directory. Your starting point of inspection of these resultsshould be the file all_hl_corrected-exact-complete.xml in this directory, which may beviewed in a web browser.1Problems1. Examining just the CBI results, how many bugs do you believe are represented by thisreport? Justify your answer. You may find it helpful to look at the affinity lists of theselected predictors (recall that the affinity lists show other predicates that are highlycorrelated with the selected predicates, with the most highly correlated predicates listedfirst).2. For each bug represented in the CBI results, construct a failing test case that exhibits thatbug. A “test case” is a selection of switches to pass to jpegtran. The base test case is:{PATH TO EXECUTABLE}/jpegtran -outfile testout.jpg testimg.jpgUse the copy of jpegtran that you compiled with debugging support. You can create othertest cases by adding additional switches to jpegtran. A complete list of switches can beobtained by executing jpegtran -h. The manual page (man jpegtran) also provides agood summary of the interface to jpegtran.Your failing test cases should use only the supplied test image testimg.jpg as the inputdata. Report the command line that you use to reproduce each bug and the result of theexecution.Note: jpegtran might be pre-installed on your system. You must specify the completepath to the executable that you compiled to prevent running the pre-installed version.3. Give a succinct description of the cause of the bug associated with the top-ranked (first)predictor for each bug: what does the program do wrong that eventually causes the failure?To answer this question you will probably need to refer to the CBI results, your failingtest case for the bug, and the program source. You may also find it useful to step throughparts of the execution of your test case in a debugger such as gdb (the binaries have beencompiled with -g).Submission InstructionsCreate a directory containing writeup.txt and run the following command in that directoryon any bramble machine (the script has not been tested on other machines):/usr/class/cs295/bin/submitThe assignment name is


View Full Document

Stanford CS 295 - Homework Assignment

Download Homework Assignment
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Homework Assignment and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework Assignment 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?