Experiment Using Partial Evaluation for Transformational Debugging

To identify the source of runtime errors, techniques such as “debug-by-execution” are widely used, e.g., steppers. Although this technique can be useful for non-runtime errors, it has been less extensively explored because of the inherent difficulties in stepping through programs with such errors. In this new ideas and emerging results paper, we focus on debugging type errors in statically typed languages. We explore “transformational debugging,” a method that transforms erroneous code to provide users with an alternative perspective on the source code, thereby facilitating the debugging process. The proposed approach comprises three phases: In the first phase, we use the error messages from the compiler's type inferencer to “freeze” parts of the program. In the second phase, the type inferencer is used to reduce the number of “frozen” parts. In the third phase, a partial evaluator evaluates the partially “frozen” program. During partial evaluation, the frozen parts are treated as dynamic and therefore remain as code without being evaluated, whereas the other parts are treated as static and are evaluated. This study proposes the generic algorithms for our debugging method and two heuristic strategies for the algorithms. We obtain promising results using a prototype for a subset of OCaml. We explore a novel avenue for debugging: Transformational debugging and partial evaluation as helpful debugging tools.

Authors

Institutions

Publication Details

Published
2024-10-07
DOI
https://doi.org/10.1109/scam63643.2024.00033
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Experiment Using Partial Evaluation for Transformational Debugging

Kanae Tsushima, Robert Glück
Logic, programming, and type systems
article

Experiment Using Partial Evaluation for Transformational Debugging

Kanae Tsushima, Robert Glück
article en

Abstract

To identify the source of runtime errors, techniques such as “debug-by-execution” are widely used, e.g., steppers. Although this technique can be useful for non-runtime errors, it has been less extensively explored because of the inherent difficulties in stepping through programs with such errors. In this new ideas and emerging results paper, we focus on debugging type errors in statically typed languages. We explore “transformational debugging,” a method that transforms erroneous code to provide users with an alternative perspective on the source code, thereby facilitating the debugging process. The proposed approach comprises three phases: In the first phase, we use the error messages from the compiler's type inferencer to “freeze” parts of the program. In the second phase, the type inferencer is used to reduce the number of “frozen” parts. In the third phase, a partial evaluator evaluates the partially “frozen” program. During partial evaluation, the frozen parts are treated as dynamic and therefore remain as code without being evaluated, whereas the other parts are treated as static and are evaluated. This study proposes the generic algorithms for our debugging method and two heuristic strategies for the algorithms. We obtain promising results using a prototype for a subset of OCaml. We explore a novel avenue for debugging: Transformational debugging and partial evaluation as helpful debugging tools.

University of Copenhagen (DK), Research Organization of Information and Systems (JP)
Openalex Percentile: Top 79%
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.