Error-correcting source code

Yasuhiro Ajiro, Kazunori Ueda, Kenta Cho

Research output: Chapter in Book/Report/Conference proceedingConference contribution

1 Citation (Scopus)


We study how constraint-based static analysis can be applied to the automated and systematic debugging of program errors. Strongly moding and constraint-based mode analysis are turning to play fundamental roles in debugging concurrent logic/constraint programs as well as in establishing the consistency of communication protocols and in optimization. Mode analysis of Moded Flat GHC is a constraint satisfaction problem with many simple mode constraints, and can be solved efficiently by unification over feature graphs. We have proposed a simple and efficient technique which, given a non-well-moded program, diagnoses the “reasons” of inconsistency by finding minimal inconsistent subsets of mode constraints. Since each constraint keeps track of the symbol occurrence in the program that imposed the constraint, a minimal subset also tells possible sources of program errors. The technique is quite general and can be used with other constraint-based frameworks such as strong typing. Based on the above idea, we study the possibility of automated debugging in the absence of mode/type declarations. The mode constraints are usually imposed redundantly, and the constraints that are considered correct can be used for correcting wrong symbol occurrences found by the diagnosis. As long as bugs are near-misses, the automated debugger can propose a rather small number of alternatives that include the intended program. Search space is kept small because constraints effectively prune many irrelevant alternatives. The paper demonstrates the technique by way of examples.

Original languageEnglish
Title of host publicationPrinciples and Practice of Constraint Programming – CP 1998 - 4th International Conference, CP 1998, Proceedings
EditorsJean-Francois Puget, Michael Maher
PublisherSpringer Verlag
Number of pages15
ISBN (Print)3540652248, 9783540652243
Publication statusPublished - 1998
Event4th International Conference on Principles and Practice of Constraint Programming, CP 1998 - Pisa, Italy
Duration: 1998 Oct 261998 Oct 30

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Other4th International Conference on Principles and Practice of Constraint Programming, CP 1998

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)


Dive into the research topics of 'Error-correcting source code'. Together they form a unique fingerprint.

Cite this