TY - GEN
T1 - CSI
T2 - 35th Symposium on Implementation and Application of Functional Languages, IFL 2023
AU - Gissurarson, Matthías Páll
AU - Applis, Leonhard Herbert
PY - 2023
Y1 - 2023
N2 - In non-strict languages such as Haskell the execution of individual expressions in a program significantly deviates from the order in which they appear in the source code. This can make it difficult to find bugs related to this deviation, since the evaluation of expressions does not occur in the same order as in the source code. At the moment, Haskell errors focus on values being produced, whereas it is often the case that faults are due to values being consumed. For non-strict languages, values involved in a bug are often generated immediately prior to the evaluation of the buggy code. This creates an opportunity for evaluation traces, tracking recently evaluated locations (which can deviate from call-order) to help establish the origin of values involved in faults. In this paper, we describe an extension of GHC's Haskell Program Coverage with evaluation traces, recording recent evaluations in the coverage file, and reporting an evaluation trace alongside the call stack on exception. This lets us reconstruct the chain of events and locate the origin of faults. As a case study, we applied our initial implementation to the nofib-buggy data set and found that some runtime errors greatly benefit from trace information.
AB - In non-strict languages such as Haskell the execution of individual expressions in a program significantly deviates from the order in which they appear in the source code. This can make it difficult to find bugs related to this deviation, since the evaluation of expressions does not occur in the same order as in the source code. At the moment, Haskell errors focus on values being produced, whereas it is often the case that faults are due to values being consumed. For non-strict languages, values involved in a bug are often generated immediately prior to the evaluation of the buggy code. This creates an opportunity for evaluation traces, tracking recently evaluated locations (which can deviate from call-order) to help establish the origin of values involved in faults. In this paper, we describe an extension of GHC's Haskell Program Coverage with evaluation traces, recording recent evaluations in the coverage file, and reporting an evaluation trace alongside the call stack on exception. This lets us reconstruct the chain of events and locate the origin of faults. As a case study, we applied our initial implementation to the nofib-buggy data set and found that some runtime errors greatly benefit from trace information.
KW - Errors
KW - Fault-Localization
KW - Laziness
KW - Tracing
UR - http://www.scopus.com/inward/record.url?scp=85204282055&partnerID=8YFLogxK
U2 - 10.1145/3652561.3652562
DO - 10.1145/3652561.3652562
M3 - Conference contribution
AN - SCOPUS:85204282055
T3 - ACM International Conference Proceeding Series
BT - Proceedings of the 2023 35th Symposium on Implementation and Application of Functional Languages, IFL 2023
PB - ACM
Y2 - 29 August 2023 through 31 August 2023
ER -