skip to main content
10.5555/2157654.2157671acmconferencesArticle/Chapter ViewAbstractPublication PagesfmcadConference Proceedingsconference-collections
research-article

Automated error localization and correction for imperative programs

Published: 30 October 2011 Publication History

Abstract

In this paper, we present a novel debugging method for imperative software, featuring both automatic error localization and correction. The input of our method is an incorrect program and a corresponding specification, which can be given in form of assertions or as a reference implementation. We use symbolic execution for program analysis. This allows for a wide range of different trade-offs between resource requirements and accuracy of results. Our error localization method rests upon model-based diagnosis and SMT-solving. Error correction is done using a template-based approach which ensures that the computed repairs are readable. Our method can handle all sorts of incorrect expressions, not only under a single-fault assumption but also for multiple faults. Finally, we present experimental results, where an implementation for C programs is used to debug mutants of the TCAS case study of the Siemens suite.

References

[1]
A. Arcuri. On the automation of fixing software bugs. In 30th International Conference on Software Engineering (ICSE'08), pages 1003--1006. ACM, 2008.
[2]
J. Burnim and K. Sen. Heuristics for scalable dynamic test generation. In 23rd International Conference on Automated Software Engineering (ASE'08), pages 443--446. IEEE, 2008.
[3]
K.-H. Chang, I. L. Markov, and V. Bertacco. Fixing design error with counterexamples and resynthesis. In Asia and South Pacific Design Automation Conference (ASP-DAC'07), pages 944--949, 2007.
[4]
E. M. Clarke, D. Kroening, and F. Lerda. A tool for checking ANSI-C programs. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS'04), pages 168--176, 2004.
[5]
L. A. Clarke. A system to generate test data and symbolically execute programs. IEEE Trans. Software Eng., 2(3):215--222, 1976.
[6]
M. Colón, S. Sankaranarayanan, and H. Sipma. Linear invariant generation using non-linear constraint solving. In Proc. Computer Aided Verification (CAV'03), pages 420--432. Springer, 2003. LNCS 2725.
[7]
L. Console, G. Friedrich, and D. Theseider Dupré. Model-based diagnosis meets error diagnosis in logic programs. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI'93), pages 1494--1499. Morgan-Kaufmann, 1993.
[8]
V. Debroy and W. E. Wong. Using mutation to automatically suggest fixes for faulty programs. In Third International Conference on Software Testing, Verification and Validation (ICST'10), pages 65--74. IEEE, 2010.
[9]
H. Do, S. G. Elbaum, and G. Rothermel. Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. Empirical Software Engineering, 10(4):405--435, 2005.
[10]
B. Dutertre and L. M. de Moura. A fast linear-arithmetic solver for DPLL(T). In Proc. Computer Aided Verification (CAV'06), pages 81--94. Springer, 2006. LNCS 4144.
[11]
A. Felfernig, G. Friedrich, D. Jannach, and M. Stumptner. Consistency-based diagnosis of configuration knowledge bases. Artificial Intelligence, 152:213--234, 2004.
[12]
S. Forrest, T. Nguyen, W. Weimer, and C. Le Goues. A genetic programming approach to automated software repair. In Genetic and Evolutionary Computation Conference (GECCO'09), pages 947--954. ACM, 2009.
[13]
G. Friedrich and K. M. Shchekotykhin. A general diagnosis method for ontologies. In International Semantic Web Conference, pages 232--246. Springer, 2005. LNCS 3729.
[14]
G. Friedrich, M. Stumptner, and F. Wotawa. Model-based diagnosis of hardware designs. Artificial Intelligence, 111(1--2):3--39, 1999.
[15]
P. Godefroid, N. Klarlund, and K. Sen. DART: Directed automated random testing. In Conference on Programming Language Design and Implementation (PLDI'05), pages 213--223. ACM, 2005.
[16]
R. Greiner, B. A. Smith, and R. W. Wilkerson. A correction to the algorithm in Reiter's theory of diagnosis. Artificial Intelligence, 41(1):79--88, 1989.
[17]
A. Griesmayer, R. Bloem, and B. Cook. Repair of Boolean programs with an application to C. In 18th Conference on Computer Aided Verification (CAV'06), pages 358--371, 2006. LNCS 4144.
[18]
A. Griesmayer, S. Staber, and R. Bloem. Fault localization using a model checker. Software Testing, Verification and Reliability, 20(2):149--173, 2010.
[19]
B. Jobstmann, A. Griesmayer, and R. Bloem. Program repair as a game. In 17th Conference on Computer Aided Verification (CAV'05), pages 226--238. Springer, 2005. LNCS 3576.
[20]
B. Jobstmann, S. Staber, A. Griesmayer, and R. Bloem. Finding and fixing faults. Journal of Computer and System Sciences, 2011. In Press.
[21]
M. Jose and R. Majumdar. Cause clue clauses: error localization using maximum satisfiability. In Conference on Programming Language Design and Implementation (PLDI'11), pages 437--446. ACM, 2011.
[22]
U. Junker. QUICKXPLAIN: Preferred explanations and relaxations for over-constrained problems. In Proc. National Conference on Artificial Intelligence (AAAI'04), pages 167--172. AAAI Press/MIT Press, 2004.
[23]
J. C. King. Symbolic execution and program testing. Communications of the ACM, 19(7):385--394, 1976.
[24]
J. de Kleer and B. C. Williams. Diagnosing multiple faults. Artificial Intelligence, 32:97--130, 1987.
[25]
R. Koenighofer, G. Hofferek, and R. Bloem. Debugging unrealizable specifications with model-based diagnosis. In Proc. Haifa Verification Conference (HVC'10), pages 29--45. Springer, 2010. LNCS 6504.
[26]
C. Mateis, M. Stumptner, D. Wieland, and F. Wotawa. Model-based debugging of Java programs. In Proc. Fourth International Workshop on Automated Debugging (AADEBUG'00), 2000.
[27]
R. Reiter. A theory of diagnosis from first principles. Artificial Intelligence, 32:57--95, 1987.
[28]
K. Sen, D. Marinov, and G. Agha. CUTE: A concolic unit testing engine for C. In Proc. 10th European Software Engineering Conference and 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering (ESEC/FSE'05), pages 263--272. ACM, 2005.
[29]
A. Solar-Lezama. The sketching approach to program synthesis. In Programming Languages and Systems, 7th Asian Symposium (APLAS'09), pages 4--13. Springer, 2009. LNCS 5904.
[30]
A. Solar-Lezama, L. Tancau, R. Bodik, V. Saraswat, and S. A. Seshia. Combinatorial sketching for finite programs. In Proc. Architectural Support for Programming Languages and Operating Systems (ASPLOS'06), pages 404--415. ACM, 2006.
[31]
S. Srivastava, S. Gulwani, and J. S. Foster. From program verification to program synthesis. In Symposium on Principles of Programming Languages (POPL'10), pages 313--326. ACM, 2010.
[32]
M. Stumptner and F. Wotawa. Debugging functional programs. In Proceedings on the 16th International Joint Conference on Artificial Intelligence (IJCAI'99). Morgan Kaufmann, 1999.
[33]
A. Zeller and R. Hildebrandt. Simplifying and isolating failure-inducing input. IEEE Transactions on Software Engineering, 28(2):183--200, 2002.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
FMCAD '11: Proceedings of the International Conference on Formal Methods in Computer-Aided Design
October 2011
240 pages
ISBN:9780983567813

Sponsors

In-Cooperation

Publisher

FMCAD Inc

Austin, Texas

Publication History

Published: 30 October 2011

Check for updates

Qualifiers

  • Research-article

Conference

FMCAD '11
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)1
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media