1 / 11

Debugging an Operation

This session discusses debugging an operation using a failed proof of correctness as a guide. It covers topics such as implementing the operation, creating a testing harness, receiving unexpected output, and using genetic algorithms for code mutations.

donitaw
Download Presentation

Debugging an Operation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using a Failed Proof of Correctness as a Guide Debugging an Operation Joan Krone – Denison University Joseph Hollingsworth – Indiana University Southeast SIGCSE 2013 Special Session

  2. What Went Wrong? • Student implements an operation • Student creates a testing harness a small client program • Student runs the testing harness • Receives unexpected output • The operation doesn’t seem to do anything! SIGCSE 2013 Special Session

  3. Invert The outgoing Q equals the reverse of the incoming Q • #Q – incoming • Q – outgoing P_Queue is a preemptable queue • Has one additional operation – Inject SIGCSE 2013 Special Session

  4. String Theory Used for mathematically modeling a Queue •  - is the alphabet, e.g.,  = Z SIGCSE 2013 Special Session

  5. String Theory Used for mathematically modeling a Queue •  - is the alphabet, e.g.,  = Z • Example strings: • α = <4,22,3,17> string of 4 integers • β = < > empty string SIGCSE 2013 Special Session

  6. String Theory Used for mathematically modeling a Queue •  - is the alphabet, e.g.,  = Z • Example strings: • α = <4,22,3,17> string of 4 integers • β = < > empty string • Concatenation, Length, Reverse • <-5> o α o <101> = <-5,4,22,3,17,101> • |α| = 4 • Reverse(α) = <17,3,22,4> • Reverse(αo <101>) = <101,17,3,22,4> SIGCSE 2013 Special Session

  7. Testing Harness for Invert Output: q before Invert = <3,2,1> q after Invert = <3,2,1> SIGCSE 2013 Special Session

  8. How to Debug?I Could Try … • Using one of those genetic algorithms to make random mutations to my code … SIGCSE 2013 Special Session

  9. Or Maybe I Should … • Do that proof of correctness thingy that my professor showed us. SIGCSE 2013 Special Session

  10. Accessing theRESOLVE Web Interface SIGCSE 2013 Special Session

  11. Accessing Components SIGCSE 2013 Special Session

More Related