TY - GEN
T1 - Error-correcting source code
AU - Ajiro, Yasuhiro
AU - Ueda, Kazunori
AU - Cho, Kenta
N1 - Publisher Copyright:
© Springer-Verlag Berlin Heidelberg 1998.
PY - 1998
Y1 - 1998
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=84957647540&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84957647540&partnerID=8YFLogxK
U2 - 10.1007/3-540-49481-2_5
DO - 10.1007/3-540-49481-2_5
M3 - Conference contribution
AN - SCOPUS:84957647540
SN - 3540652248
SN - 9783540652243
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 40
EP - 54
BT - Principles and Practice of Constraint Programming – CP 1998 - 4th International Conference, CP 1998, Proceedings
A2 - Puget, Jean-Francois
A2 - Maher, Michael
PB - Springer Verlag
T2 - 4th International Conference on Principles and Practice of Constraint Programming, CP 1998
Y2 - 26 October 1998 through 30 October 1998
ER -