Changes

Jump to: navigation, search

Delta debugging framework

14,618 bytes removed, 14:16, 17 April 2013
m
Reverted edits by Saoagent (Talk) to last revision by Reed
''Name(s) of people casually working on the project, or who have contributed significant help. Include links to personal pages within wiki. <br />NOTE: only Project Leader(s) should add names here. You '''can’t''' add your own name to the Contributor list.''
[[User:Reed|Reed Loden]] - Setup the CVS repository for us with the web front-end. Provided direction in querying Bonsai (a means to extract the output in XML).<br>
[[User:Elichak|Liz Chak]] - Documentation of the subroutines in the svn.pl and makewrapper.pl source files.
The test cases used in this project are located in the [[Delta_debugging_testcases|Delta Debugging Testcases page]].
== Project Task List Roadmap ==
([[#top|&uarr; top]])
<table style="width: 100%;" class="standard-table" border="1" cellpadding="2" cellspacing="0"> <tr><td colspan="4"><strong>Priority Legend</strong></td></tr> <tr style="color: #FFFFFF; font-weight: bold; text-align: center"> <td bgcolor="#8B00FF" style="width: 33%;">High Priority</td> <td bgcolor="#0000FF" style="width: 33%;">Medium Priority</td> <td bgcolor="#008080" style="width: 33%;">Low Priority</td> </tr></table><br /><table style="width: 100%;" class="standard-table" border="1" cellpadding="2" cellspacing="0"> <tr><td colspan="4"><strong>Status Legend</strong></td></tr> <tr style="font-weight: bold; text-align: center"> <td bgcolor="#00FF00" style="width: 33%;">Task completed</td> <td bgcolor="#FFFF00" style="width: 33%;">Task started but not complete</td> <td bgcolor="#FF0000" style="width: 33%;">Task not started</td> </tr></table><br /><table style="width: 100%;" class="standard-table" border="1" cellpadding="0" cellspacing="0"> <tr> <th>Task</th> <th>Description</th> <th>Priority</th> <th>Assigned to</th> <th>Status</th> </tr>[[Delta Debugging Framework Roadmap|Delta Debugging Framework Roadmap]]
<tr> <td colspan="5"><strong>Source Documentation The page outlines our current vision of the delta debugging framework and a roadmap of the work that needs to be completed to accomplish our vision. This roadmap may be subject to change and Licensing</strong> </td> </tr>or expanded as our vision expands through feedback and requests from others, our own ideas, etc.
<tr> <td>Source Documentation</td> <td>Unsurprisingly, the source code is not thoroughly documented. Before the end of this semester, by the time the project is due to be submitted, the source code needs to be well documented. </td> <td bgcolor="#008080" style="color: #FFFFFF; font-weight: bold; text-align: center">Low</td> <td>[[User:Elichak | Liz Chak]]</td> <td bgcolorPartial Class Diagram =="#FFFF00">There is some documentation in the source files but not much. And it's not well documented.</td> </tr>
<tr> <td>Source License</td> <td>As per the requirements, the delta debugging framework will be licensed under an open source license. Which one? we don't know yet. Though, before the due date of the project, we must select one and change the source files header comments as per the selected license's requirements.</td> <td bgcolor="#008080" style="color: #FFFFFF; font-weight: bold; text-align: center">Low</td> <td>([[User:RichardChu#top|Richard Chu&uarr; top]], [[User:Ankuswan|Aditya Nanda Kuswanto]], [[User:Dwwoodsi|Dean William Woodside]]</td> <td bgcolor="#00FF00">Done. Decided to release the source code under the [http://www.opensource.org/licenses/gpl-license.php GPL Version 2 license].</td> </tr>)
<tr> <td colspan="5"><strong>Change set / Change</strong> </td> </tr>Most of the classes in blue exist in the source repository. The classes in pale yellow are classes that won't be completed in the first release.
<tr>
<td>Retrieval of Change / Change set</td>
<td>The Granularity concept. A single revision may consist of hundreds or thousands of lines of code that were changed, yet only a couple lines of the change may be responsible for the regression. Thus, There must be a method to break the change into smaller manageable chunks. The different types of chunks we may breaking up a changeset are: Revision, Directories, Files, Code Blocks, and Lines.</td>
<td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td>
<td>[[User:RichardChu|Richard Chu]]</td>
<td bgcolor="#00FF00">Currently can retrieve change sets of type Revision, Directory, and File. NOT going to complete retrieval of Code Block, Line of Code change set.
</td>
</tr>
<tr> <td>Application of Change / Change set</td> <td>OK. Change sets can be retrieved. Now what? You must be able to apply a change or change set or subset of a change set to the source tree. Your mission is to figure out how to do that.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[UserImage:RichardChu|Richard ChuDd_partialclassdiagram2.PNG]]</td> <td bgcolor="#00FF00">Can apply a changeset (specified by array of indices passed in) for a Revision, Directory, and File Changeset. NOT going to complete application of Code Block or Line changeset. </td> </tr>
<tr>
<td>Unapplication of Change / Change set</td>
<td>Changesets obviously must be able to be applied. But changesets must also be able to be unapplied. Your mission is to figure out how to do that.</td>
<td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td>
<td>[[User:RichardChu|Richard Chu]]</td>
<td bgcolor="#00FF00">Can unapply a changeset (specified by array of indices passed in) for a Revision, Directory, and File Changeset. NOT going to complete unapplication of Code Block or Line changeset.
</td>
</tr>
  <tr> <td colspan="5"><strong>GNU Make</strong> ([http://www.gnu.org/software/make/ http://www.gnu.org/software/make/]) </td> </tr>  <tr> <td>Wrapper around the GNU make utility</td> <td>Mozilla uses the GNU make utility to build their source tree. your mission is to make a wrapper around the GNU make utility so that the make command can be programmatically called to build the source tree.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#00FF00">Wrapper created: ''makewrapper.pl''. Can execute the make command with options specified by the user. </td> </tr>  <tr> <td colspan="5"><strong>Subversion (SVN) Repository</strong> ([http://subversion.tigris.org/ http://subversion.tigris.org/], [http://svnbook.red-bean.com/nightly/en/index.html http://svnbook.red-bean.com/nightly/en/index.html]) </td> </tr>  <tr> <td>Wrapper around the necessary SVN commands</td> <td>For the automated debugging to work, we may need to automatically modify the working copy by reverting to a different revision or updating certain directories and files. It may also need to know the differences between revisions and changesets.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#00FF00">Wrapper created: ''svn.pl''. Currently has subroutines for ''commit'', ''update'', ''diff'', and ''checkout'' commands. May need to wrap other SVN commands.</td> </tr>  <tr> <td>Query SVN repository for differences between two revisions</td> <td>Your mission is to find out the relevant commands that can return the differences between two revisions, the meta-data that is kept with each revision, how differences between two revisions are stored and formatted, and how this data can be parsed into a usable form for our project (wrapper?).</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#00FF00">Done.</td> </tr>    <tr> <td colspan="5"><strong>CVS/Mozilla Bonsai</strong> ([http://www.mozilla.org/bonsai.html http://www.mozilla.org/bonsai.html], [http://cvsbook.red-bean.com/OSDevWithCVS_3E.pdf CVS Book])<br />In my mind, Bonsai may be too bloated for our needs. </td> </tr>  <tr> <td>Wrapper around the necessary CVS commands</td> <td>For the automated debugging to work, we may need to automatically modify the working copy by reverting to a different revision or updating certain directories and files. It may also need to know the differences between revisions and changesets.</td> <td bgcolor="#0000FF" style="color: #FFFFFF; font-weight: bold; text-align: center">Medium</td> <td>[[User:dwwoodsi|Dean Woodside]]</td> <td bgcolor="#FF0000">Just starting out.</td> </tr>  <tr> <td>Query CVS repository for differences between two revisions</td> <td>Your mission is to find out the relevant commands that can return the differences between two revisions, the meta-data that is kept with each revision, how differences between two revisions are stored and formatted, and how this data can be parsed into a usable form for our project (wrapper?).</td> <td bgcolor="#0000FF" style="color: #FFFFFF; font-weight: bold; text-align: center">Medium</td> <td>[[User:dwwoodsi|Dean Woodside]]</td> <td bgcolor="#FF0000">Just starting out.</td> </tr>  <tr> <td colspan="5"><strong>Prerequisites to initial small-scale testing of the delta debugging framework</strong></td> </tr>  <tr> <td>Test Framework</td> <td>We ideally need a way to allow users to specify the test(s) to be run easily without them having to modify the delta debugging module. </td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#00FF00">Framework completed. Based on my simplistic understanding of the design of the JUnit Framework. Except, not SetUp() or TearDown() capabilities.</td> </tr>  <tr> <td>Obtaination of test SVN Repository</td> <td>We have an SVN repository that holds our delta debugging framework source files. We need another SVN repository that we could use to test our framework.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:dwwoodsi|Dean Woodside]]</td> <td bgcolor="#00FF00">Done. The URL to the test SVN repository is: svn://cdot.senecac.on.ca/deltatest</td> </tr> <tr> <td>Description of the test cases</td> <td>The current test case is quite complex. A document is needed to introduce users on how to create test cases and utilize the algorithm.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:Ankuswan|Aditya Nanda Kuswanto]]</td> <td bgcolor="#00FF00">Done. The document and links to the testcases are located [[Delta_debugging_testcases|here]].</td> </tr>  <tr> <td>Obtaination of Testcase 01</td> <td>We need a program that we could use to test the delta debugging framework. Ideally this program will be small but contain multiple source files. We need two versions of the program: a pristine working copy, and a version that has a regression. Need to know how to build the program.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:Ankuswan|Aditya Nanda Kuswanto]]</td> <td bgcolor="#00FF00">Done. HelloWorld program has been created using the test modules ripped from Tinderbox. The test checks whether the program runs successfully by checking the log file it produces. The test has been uploaded to:svn://cdot.senecac.on.ca/deltatest</td> </tr>  <tr> <td>Obtaination of Testcase 02</td> <td>We need a program that we could use to test the delta debugging framework. Ideally this program will be small but contain multiple source files. We need two versions of the program: a pristine working copy, and a version that has a regression. Need to know how to build the program.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#00FF00">Done. Going to use a C++ program I wrote in a course in a previous semester to test out the delta debugging framework. The test has been uploaded to:svn://cdot.senecac.on.ca/deltatest</td> </tr>  <tr> <td>Creation of Test Case(s)</td> <td>We need test case(s) for the test program that can return whether or not the test passes or fails so that we can test the delta debugger.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#00FF00">Done. The test case is real simple. It just tests the return code of a function with the expected return code. returns true/test passed if return code is equal to the expected return code.</td> </tr>  <tr> <td>Creation of the necessary hooks into the framework</td> <td>The framework must be able to automatically build the test program and run the test case(s). So need to create the necessary hooks between the framework and test program.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#00FF00">Done. Made real simple because of Build tree and Test framework.</td> </tr>   <tr> <td colspan="5"><strong>Prerequisites to future large-scale testing of the delta debugging framework</strong></td> </tr>  <tr> <td>Obtaination of test CVS Repository</td> <td>When the CVS version of the framework is completed, it will be useful to have a test CVS repository that we could use to test our framework.</td> <td bgcolor="#0000FF" style="color: #FFFFFF; font-weight: bold; text-align: center">Medium</td> <td>[[User:dwwoodsi|Dean Woodside]]</td> <td bgcolor="#00FF00">The CVS repository has been created. The URL is hera.senecac.on.ca:43900/deltatest. <br />The web interface to the repository is: [http://hera.senecac.on.ca:43080/viewvc.cgi/?root=deltatest here]</td> </tr>  <tr> <td>Creation / Extraction of Test Case(s)</td> <td>In the future, we would like to test our delta debugging framework on the Mozilla source tree. So it would be nice to find test cases that can test some functionality of the source code.</td> <td bgcolor="#0000FF" style="color: #FFFFFF; font-weight: bold; text-align: center">Medium</td> <td>[[User:Ankuswan|Aditya Nanda Kuswanto]]</td> <td bgcolor="#00FF00">Done. Ripped some preliminary test modules from Tinderbox. Test modules are currently used to test the HelloWorld testcase. The same modules can be used to test the success of future Mozilla build by testing the presence of Firefox executable.</td> </tr>  <tr> <td>CVS Version of Delta Debugging Framework</td> <td>In the future, we would like to test our delta debugging framework on the Mozilla source tree. Currently, the Mozilla source tree is in CVS repository. So we need to develop the CVS version of the framework.</td> <td bgcolor="#0000FF" style="color: #FFFFFF; font-weight: bold; text-align: center">Medium</td> <td>Nobody.</td> <td bgcolor="#FF0000">&nbsp;</td> </tr>    <tr> <td colspan="5"><strong>Implementation of Delta Debugging Algorithm</strong> ([http://www.infosun.fmi.uni-passau.de/st/papers/tr-99-01/ Yesterday, my program worked. Today, it does not. Why?])<br /> </td> </tr> <tr> <td>The Algorithm</td> <td>The delta debugging algorithm. Drives the framework to retrieve change sets, apply changes, build source tree, run test case(s) to find the minimal set of failure inducing changes. The intersection of all other parts of the framework to make them work together. Ideally, should be abstract enough for easy extensibility with little impact.</td> <td bgcolor="#8B00FF" style="color: #FFFFFF; font-weight: bold; text-align: center">High</td> <td>[[User:RichardChu|Richard Chu]]</td> <td bgcolor="#FFFF00">Work in progress. Currently, it can theoretically find the failure inducing revision, and the minimal failure inducing set of directories, and the minimal failure inducing set files. It will also easily find the minimal failure inducing set of code blocks and lines of code (if those changeset types ever get done) with only minor additions to one subroutine. Works in theory. Untested in practice.</td> </tr></table> == Partial Class Diagram Project News ==
([[#top|&uarr; top]])
Most ''This is where your regular updates will go. In these you should discuss the status or your work, your interactions with other members of the classes in blue exist in community (e.g., Seneca and Mozilla), problems you have encountered, etc. Put detailed technical information into the source repositoryProject Details page (i.e. The classes in pale yellow are classes that won't be completed , update it as you go), and save this section for news about participation in the first releaseproject.''
=== Dec. 22, 2006 ===
[[Image:Dd_partialclassdiagram2I haven't posted an update in a while.PNG]]So what's been done?
I finally had some time to do a second round of testing & debugging of the delta debugging framework. And guess what? It ''seems'' to work now. The problem? Combination of logical errors when applying and unapplying changes in the framework and a bad test case. Go figure.
== Project News ==However, before I get ahead of myself and officially tag and release the delta debugging framework as version 0.1, I would like to test it out on another test program. Hopefully, this can be done this weekend. And if all goes well, version 0.1 will be officially released before the end of the year.
([[#top|&uarr; top]])
''This is where your regular updates will go. In these you should discuss the status or your work, your interactions with other members of the community (e.g., Seneca and Mozilla), problems you have encountered, etc. Put detailed technical information into the Project Details page (i.e., update it as you go), and save this section for news about participation in the project.''
=== Dec. 13, 2006 ===
A roadmap of our vision of the direction of the project will be heading in the future will be created and posted soon.
 
=== Dec. 11, 2006 ===
 
Uploaded testcase for '''HelloWorld''' binary at '''deltatest svn'''. The test simulates the error that may occur when compilation fails due to syntax error. The exalted HelloWorld program is located on the HelloWorld directory, while the test definition is at HelloTestCase1.pm. The algorithm detects failed test and reverts the affected file to the version where the test passes.
Note for the future: improve user feedback functions!
 
=== Dec. 10, 2006 ===
 
Where is the CVS/Bonsai work heading? Here is a breakdown of the past 3-4 weeks:
* Initially was going for a straight wrapper around CVS ala the style Richard used for SVN.
=== Dec. 09, 2006 ===
 
What has been done since last week?
* Got a test program and uploaded it to svn://cdot.senecac.on.ca/deltatest. The pristine working version is revision 4. The latest committed copy is revision 8. The regressive code was committed somewhere in between.
=== Dec. 03, 2006 ===
 
Committed some updated to the SVN repository.
* The test framework. There are a couple of files to the framework: Test.pl, TestCase.pl, TestSuite.pl, TestResult.pl, TestRunner.pl. It is loosely based off of the design of the JUnit framework. Why such an elaborate design just for the need of users to define the test case that can determine whether or not a piece of functionality works or not to be run? For a few reasons that I may be adamant about:
=== Nov. 26, 2006 ===
 
Committed some updates to the SVN repository.
* Updated the delta debugging algorithm module. I didn't realize this yesterday but the algorithm to find the minimal set of failure inducing files (and code block and line of code changes if those changeset types ever gets dones) is the same (with minor modifications) as the algorithm that can find the minimal set of failure inducing directories. Thus I generalized that algorithm to remove the directory changeset specific code so that it will work with all other types of changesets.
* Removed the debugging/test related code from the source files.
CVS Repository Setup (thanks to [[user:reed|Reed Loden!]]): '''hera.senecac.on.ca:43900/deltatest'''
*[http://hera.senecac.on.ca:43080/viewvc.cgi/?root=deltatest ViewVC Web Repository Browser]
*If you want commit access for whatever reason, email one of the project members
* Even though the test framework is incomplete, I think we can go ahead and begin the initial testing of the delta debugger on a real regressive program as I think we are ready. Coincidentally, exactly 2 months after the first project news posting on Sept. 26, 2006.
=== Nov. 25, 2006 ===
=== Nov. 25, 2006 ===
I haven't posted an update in a while so here goes. What's been done since then?
=== Nov. 19, 2006 ===
 
The earlier crash case we had (see the update directly below) was a non-regressive bug--there was no former build that worked with it.
=== Nov. 18, 2006 ===
 
*<strike>Found a suitable crash case thanks to the people of [irc://irc.mozilla.org#qa #qa] (in particular, asqueella and Aleksej). For full details on the bug, see [https://bugzilla.mozilla.org/show_bug.cgi?id=354300 Bug #354300].</strike>
==Future of the Project==
Here are some of the ideas related to the continuation of this project. Included are some personal ideas of the team members, tasks to reach the overall objective (a working, robust, Delta Debugging Framework for Mozilla), and additional features/functionality that would enhance the framework. This is subject to change, and a project roadmap will be written in the near future.
===CVS Support via Bonsai===
===Enhancement of the Algorithm===
Richard's great algorithm can be further enhanced using a binary search-like approach that splits the revision from the current, all the way back to when the regression was first noticed (or, alternatively, when the crash case last known to have worked). Currently it works in a sequential manner, testing all previous revisions in order.
 
:'''More Granularity'''
:For this course, Richard's algorithm supported down to the file-level of change. In the future, it could go as far as evaluating changes in lines of code.
===Fleshed Out Test Suite Design===
===Unit Tests===
A debugging framework, more so than other projects, should have its code quality tested and scrutinized heavily.  ===Code Review===Perhaps some manual audits could be performed by hand from outside contributors in the future.
3
edits

Navigation menu