Synthesis and Repair for Functional Programming: A Type- and Test-Driven Approach
Doctoral thesis, 2024

Modern programs in languages like Haskell include a lot of information beyond what is strictly required for compilation, such as unit tests, property-based tests, and type annotations more specific than those necessary to resolve ambiguity. This additional specification is usually only used for post-compilation verification, by running the tests to verify that the code-as-written matches the specification provided by the types and properties. In this thesis, we explore ways of going beyond verification, and how this additional information can aid the developer during development.

This can be done in multiple ways, for example by helping the programmer write an implementation that matches the specification, by helping the programmer track down the source of a bug in the implementation, and even automatically repairing the implementation when it doesn't match the specification.

In the first part, I explore the integration of program synthesis into GHC compiler error messages using typed-hole suggestions to aid completion of partial programs during development. In the second part, we present PropR, an automatic repair tool. PropR is based on type-driven synthesis, guided by property-based testing and fault localization in conjunction with genetic algorithms. A rich specification is required for these approaches to be effective. This motivates third part, where we present Spectacular, a tool that uses ECTA-based synthesis to automatically infer properties of programs, and lets us bootstrap specifications from previous versions. In the fourth and fifth part of this thesis, we explore how to localize program faults, and present CSI: Haskell and TastySpectrum, lightweight trace-based and spectrum-based fault localization tools that help programmers and repair tools understand likely sources of a bug.

Types

Program Repair

Program Synthesis

Tests

Compilers

EC in EDIT-huset, Elektrovägen 1.
Opponent: Claire Le Goues, Carnegie Mellon University, USA

Author

Matthías Páll Gissurarson

Chalmers, Computer Science and Engineering (Chalmers), Information Security

Spectacular: Finding Laws from 25 Trillion Terms

Proceedings - 2023 IEEE 16th International Conference on Software Testing, Verification and Validation, ICST 2023,; (2023)p. 293-304

Paper in proceeding

PropR: Property-Based Automatic Program Repair

Proceedings - International Conference on Software Engineering,; Vol. 2022-May(2022)

Paper in proceeding

Suggesting valid hole fits for typed-holes (experience report)

Haskell 2018 - Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell, co-located with ICFP 2018,; (2018)p. 179-185

Paper in proceeding

CSI: Haskell - Tracing Lazy Evaluations in a Functional Language

IFL '23: Proceedings of the 35th Symposium on Implementation and Application of Functional Languages,; Vol. 1(2024)p. 1-13

Paper in proceeding

Applis, L., Gissurarson, M.P., Panichella, A. Functional Spectrums - Exploring Spectrum-Based Fault Localization in Functional Programming

When writing programs, programmers don't only write code. They also write tests and types that help the computer check whether the program is correct before it is run. However, this extra information is usually only used to give a "yes or no" answer. In this thesis, we explore how we can take this additional information and use it to help the programmer write the program, by providing hints and suggestions to the programmer as they write the code, giving better descriptions of what went wrong when the program fails, and even automatically fixing wrong code without requiring the programmers help!

Subject Categories

Computer and Information Science

Software Engineering

ISBN

978-91-8103-079-2

Doktorsavhandlingar vid Chalmers tekniska högskola. Ny serie: 5537

Publisher

Chalmers

EC in EDIT-huset, Elektrovägen 1.

Online

Opponent: Claire Le Goues, Carnegie Mellon University, USA

More information

Latest update

7/27/2024