Skip to main content

2016 | OriginalPaper | Buchkapitel

A Sketching-Based Approach for Debugging Using Test Cases

verfasst von : Jinru Hua, Sarfraz Khurshid

Erschienen in: Automated Technology for Verification and Analysis

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche um passende Fachinhalte oder Patente zu finden.

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.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

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!

Literatur
2.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat 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.
Zurück zum Zitat Solar-Lezama, A.: Program sketching. STTT 15(5–6), 475–495 (2013)CrossRef Solar-Lezama, A.: Program sketching. STTT 15(5–6), 475–495 (2013)CrossRef
Metadaten
Titel
A Sketching-Based Approach for Debugging Using Test Cases
verfasst von
Jinru Hua
Sarfraz Khurshid
Copyright-Jahr
2016
DOI
https://doi.org/10.1007/978-3-319-46520-3_29