Skip to main content
Top

2016 | OriginalPaper | Chapter

A Sketching-Based Approach for Debugging Using Test Cases

Authors : Jinru Hua, Sarfraz Khurshid

Published in: Automated Technology for Verification and Analysis

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Manually locating and removing bugs in faulty code is often tedious and error-prone. Despite much progress in automated debugging, developing effective debugging techniques remains a challenge. This paper introduces a novel approach that uses a well-known program synthesis technique to automate debugging. As inputs, our approach takes a program and a test suite (with some passing and some failing tests), similar to various other recent techniques. Our key insight is to reduce the problem of finding a fix to the problem of program sketching. We translate the faulty program into a sketch of the correct program, and use off-the-shelf sketching technology to create a program that is correct with respect to the given test cases. The experimental evaluation using a suite of small, yet complex programs shows that our prototype embodiment of our approach is more effective than previous state-of-the-art.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literature
2.
go back to reference Boyapati, C., Khurshid, S., Marinov, D.: Korat: automated testing based on Java predicates. In: ISSTA, pp. 123–133 (2002) Boyapati, C., Khurshid, S., Marinov, D.: Korat: automated testing based on Java predicates. In: ISSTA, pp. 123–133 (2002)
3.
go back to reference Chandra, S., Torlak, E., Barman, S., Bodík, R.: Angelic debugging. In: ICSE (2011) Chandra, S., Torlak, E., Barman, S., Bodík, R.: Angelic debugging. In: ICSE (2011)
4.
go back to reference Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)MATH Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)MATH
5.
go back to reference Debroy, V., Wong, W.E.: Using mutation to automatically suggest fixes for faulty programs. ICST 2010, 65–74 (2010) Debroy, V., Wong, W.E.: Using mutation to automatically suggest fixes for faulty programs. ICST 2010, 65–74 (2010)
6.
go back to reference Demsky, B., Ernst, M.D., Guo, P.J., McCamant, S., Perkins, J.H., Rinard, M.C.: Inference and enforcement of data structure consistency specifications. ISSTA 2006, 233–244 (2006)CrossRef Demsky, B., Ernst, M.D., Guo, P.J., McCamant, S., Perkins, J.H., Rinard, M.C.: Inference and enforcement of data structure consistency specifications. ISSTA 2006, 233–244 (2006)CrossRef
7.
go back to reference Feser, J.K., Chaudhuri, S., Dillig, I.: Synthesizing data structure transformations from input-output examples. PLDI 2015, 229–239 (2015) Feser, J.K., Chaudhuri, S., Dillig, I.: Synthesizing data structure transformations from input-output examples. PLDI 2015, 229–239 (2015)
8.
go back to reference Gopinath, D.: Systematic techniques for more effective fault localization and program repair. Ph.D. thesis, University of Texas at Austin (2015) Gopinath, D.: Systematic techniques for more effective fault localization and program repair. Ph.D. thesis, University of Texas at Austin (2015)
9.
go back to reference Gopinath, D., Khurshid, S., Saha, D., Chandra, S.: Data-guided repair of selection statements. ICSE 2014, 243–253 (2014) Gopinath, D., Khurshid, S., Saha, D., Chandra, S.: Data-guided repair of selection statements. ICSE 2014, 243–253 (2014)
10.
go back to reference Gopinath, D., Malik, M.Z., Khurshid, S.: Specification-based program repair using SAT. TACAS 2011, 173–188 (2011)MATH Gopinath, D., Malik, M.Z., Khurshid, S.: Specification-based program repair using SAT. TACAS 2011, 173–188 (2011)MATH
11.
go back to reference Jeon, J., Qiu, X., Foster, J.S., Solar-Lezama, A.: JSketch: sketching for Java. ESEC/FSE 2015, 934–937 (2015) Jeon, J., Qiu, X., Foster, J.S., Solar-Lezama, A.: JSketch: sketching for Java. ESEC/FSE 2015, 934–937 (2015)
12.
go back to reference Jha, S., Gulwani, S., Seshia, S.A., Tiwari, A.: Oracle-guided component-based program synthesis. ICSE 2010, 215–224 (2010) Jha, S., Gulwani, S., Seshia, S.A., Tiwari, A.: Oracle-guided component-based program synthesis. ICSE 2010, 215–224 (2010)
13.
go back to reference Jones, J.A., Harrold, M.J.: Empirical evaluation of the tarantula automatic fault-localization technique. In: (ASE 2005), pp. 273–282 (2005) Jones, J.A., Harrold, M.J.: Empirical evaluation of the tarantula automatic fault-localization technique. In: (ASE 2005), pp. 273–282 (2005)
14.
go back to reference Kim, D., Nam, J., Song, J., Kim, S.: Automatic patch generation learned from human-written patches. ICSE 2013, 802–811 (2013) Kim, D., Nam, J., Song, J., Kim, S.: Automatic patch generation learned from human-written patches. ICSE 2013, 802–811 (2013)
15.
go back to reference Kneuss, E., Koukoutos, M., Kuncak, V.: Deductive program repair. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9207, pp. 217–233. Springer, Heidelberg (2015)CrossRef Kneuss, E., Koukoutos, M., Kuncak, V.: Deductive program repair. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9207, pp. 217–233. Springer, Heidelberg (2015)CrossRef
16.
go back to reference Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: GenProg: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2012)CrossRef Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: GenProg: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2012)CrossRef
17.
go back to reference Long, F., Rinard, M.: Staged program repair with condition synthesis. ESEC/FSE 2015, 166–178 (2015) Long, F., Rinard, M.: Staged program repair with condition synthesis. ESEC/FSE 2015, 166–178 (2015)
18.
go back to reference Malik, M.Z., Ghori, K., Elkarablieh, B., Khurshid, S.: A case for automated debugging using data structure repair. In: ASE, pp. 620–624 (2009) Malik, M.Z., Ghori, K., Elkarablieh, B., Khurshid, S.: A case for automated debugging using data structure repair. In: ASE, pp. 620–624 (2009)
19.
go back to reference Mechtaev, S., Yi, J., Roychoudhury, A.: Angelix: scalable multiline program patch synthesis via symbolic analysis. In: ICSE 2016 (2016) Mechtaev, S., Yi, J., Roychoudhury, A.: Angelix: scalable multiline program patch synthesis via symbolic analysis. In: ICSE 2016 (2016)
20.
go back to reference Nguyen, H.D.T., Qi, D., Roychoudhury, A., Chandra, S.: SemFix: program repair via semantic analysis. ICSE 2013, 772–781 (2013) Nguyen, H.D.T., Qi, D., Roychoudhury, A., Chandra, S.: SemFix: program repair via semantic analysis. ICSE 2013, 772–781 (2013)
21.
go back to reference Pei, Y., Furia, C.A., Nordio, M., Wei, Y., Meyer, B., Zeller, A.: Automated fixing of programs with contracts. IEEE Trans. Softw. Eng. 40(5), 427–449 (2014)CrossRef Pei, Y., Furia, C.A., Nordio, M., Wei, Y., Meyer, B., Zeller, A.: Automated fixing of programs with contracts. IEEE Trans. Softw. Eng. 40(5), 427–449 (2014)CrossRef
22.
go back to reference Qi, Z., Long, F., Achour, S., Rinard, M.C.: An analysis of patch plausibility and correctness for generate-and-validate patch generation systems. In: ISSTA (2015) Qi, Z., Long, F., Achour, S., Rinard, M.C.: An analysis of patch plausibility and correctness for generate-and-validate patch generation systems. In: ISSTA (2015)
23.
go back to reference Saha, R.K., Lease, M., Khurshid, S., Perry, D.E.: Improving bug localization using structured information retrieval. ASE 2013, 345–355 (2013) Saha, R.K., Lease, M., Khurshid, S., Perry, D.E.: Improving bug localization using structured information retrieval. ASE 2013, 345–355 (2013)
24.
go back to reference Singh, R., Gulwani, S., Solar-Lezama, A.: Automated feedback generation for introductory programming assignments. In: PLDI 2013, pp. 15–26 (2013) Singh, R., Gulwani, S., Solar-Lezama, A.: Automated feedback generation for introductory programming assignments. In: PLDI 2013, pp. 15–26 (2013)
25.
go back to reference Smith, E.K., Barr, E.T., Le Goues, C., Brun, Y.: Is the cure worse than the disease? overfitting in automated program repair. ESEC/FSE 2015, 532–543 (2015) Smith, E.K., Barr, E.T., Le Goues, C., Brun, Y.: Is the cure worse than the disease? overfitting in automated program repair. ESEC/FSE 2015, 532–543 (2015)
26.
Metadata
Title
A Sketching-Based Approach for Debugging Using Test Cases
Authors
Jinru Hua
Sarfraz Khurshid
Copyright Year
2016
DOI
https://doi.org/10.1007/978-3-319-46520-3_29

Premium Partner