Return to Video

Automate Deduction - Software Debugging

  • 0:00 - 0:05
    What you could get out of that is an automatic cause-effect chain
  • 0:05 - 0:11
    isolating the causes for different places during the program execution.
  • 0:11 - 0:17
    For instance, at the beginning s had a value of double quote and <,
  • 0:17 - 0:24
    then c became a double quote again are well-defined in the failing room,
  • 0:24 - 0:31
    then quote became true, and then out became <, which caused this version to fail.
  • 0:31 - 0:36
    This cause-effect chain is what you get when you apply delta debugging
  • 0:36 - 0:40
    on state differences at various places during the execution.
  • 0:40 - 0:45
    In producing such a cause-effect chain automatically is your homework.
  • 0:45 - 0:49
    This is a very cool outcome but is also a pretty tricky homework.
  • 0:49 - 0:54
    In particular, setting variables while the program is executing
  • 0:54 - 1:00
    is a feature that's very rarely used, very rarely tested, and therefore full of surprises.
  • 1:00 - 1:04
    On the web page, you will find a number of hints and code templates
  • 1:04 - 1:07
    that help you in accomplishing this task.
  • 1:07 - 1:11
    Having such a cause-effect chain and getting it automatically
  • 1:11 - 1:13
    sounds like a great promise for debugging
  • 1:13 - 1:19
    In particular because it very neatly tells you the story of how the failure came to be.
  • 1:19 - 1:25
    In particular the relationship of c having a double quote and then the quote variable becoming true
  • 1:25 - 1:29
    points you directly to the condition, which is at fault at this point.
  • 1:29 - 1:31
    It should--oh, sorry.
  • 1:31 - 1:36
    This is already the closest to a fully automatic debugging tool we can get at this point.
  • 1:36 - 1:40
    However, it is worth to very much consider the limitations.
  • 1:40 - 1:43
    First and foremost you need to similar runs.
  • 1:43 - 1:50
    The higher the similarity, the higher the chances of finding a small set of failure-inducing differences.
  • 1:50 - 1:54
    Even in our homework implementation, there is many things we don't handle.
  • 1:54 - 1:57
    We'll only handle scalar values and strings.
  • 1:57 - 2:04
    We won't go into details of how to find differences between say, this or dictionaries
  • 2:04 - 2:10
    or graph structures, and finally, all of these are still very experimental,
  • 2:10 - 2:14
    but the fact that it's experimental calls for many ways to extend this,
  • 2:14 - 2:17
    and this again can be part of your homework.
  • 2:17 - 2:23
    Again, on the web page, you will find a number of ways of how to further expand this.
  • 2:23 -
    So go and build fully automatic debugging for Python programs. Enjoy.
Title:
Automate Deduction - Software Debugging
Team:
Udacity
Project:
CS259 - Software Debugging
Duration:
02:30
Udacity Robot edited English subtitles for 01ps-01 Automate Deduction
Fran Ontanaya edited English subtitles for 01ps-01 Automate Deduction
Amara Bot added a translation

English subtitles

Revisions Compare revisions