5 research outputs found

    Compositional explanation of types and algorithmic debugging of type errors

    Get PDF

    Debugging Type Errors with a Blackbox Compiler

    Get PDF
    Type error debugging can be a laborious yet necessary process for programmers of statically typed functional programming languages. Often a compiler compounds this by inaccurately reporting the location of a type error, a problem that has been a subject of research for over thirty years. However, despite its long history, the solutions proposed are often reliant on direct modifications to the compiler, often distributed in the form of patches. These patches append another level of arduous activity to the task of debugging, keeping them modernised to the ever-changing programming language they support. This thesis investigates an additional option; the blackbox compiler. Split into three central parts, it shows the individual solutions involved in using a blackbox compiler to debug type errors in functional programming languages. First is a demonstration of how the combination of a blackbox compiler and a generic debugging algorithm can successfully locate type errors. Next tackled is a side-effect of this new combination, the introduction of extra errors, combated with a new speed boosted algorithm, evaluated with a proposed framework based on Data Science techniques to quantify the quality of a type error debugger. Lastly, the algorithms employed throughout this thesis, along with the blackbox compiler, have agnostic properties, they do not need language-specific knowledge. Thus, the final part presents utilising the agnostic abilities for an agnostic debugger to locate type errors

    A Visualisation of Polymorphic Type Checking

    No full text
    The understanding of polymorphic typechecking and type errors is poorly supported by contemporary functional language implementations. Here, a novel visualisation of functions and their types is presented based on the generation of function specific icons with graphical type representations which change dynamically as functions are applied. This visualisation has been implemented for a Standard ML subset within a visual programming environment in which function combinations are constrained by type matching. Keywords: functional programming; polymorphic typechecking; visualisation; Standard ML 1 Introduction The benefits of static parametric polymorphic typechecking based on the Hindley-Milner scheme, in minimising semantic errors while optimising component generality, are well known. Indeed, a central strength of modern functional languages lies in the ease with which they incorporate polymorphic typechecking. However, systems based on the W algorithm and its variants tend to offer po..
    corecore