Results 1 -
7 of
7
Compositional Explanation of Types and Algorithmic Debugging of Type Errors
, 2001
"... The type systems of most typed functional programming languages are based on the Hindley-Milner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core ..."
Abstract
-
Cited by 22 (0 self)
- Add to MetaCart
The type systems of most typed functional programming languages are based on the Hindley-Milner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core of this problem is the difficulty of explaining why a given expression has a certain type. The type system is not defined compositionally. We propose to explain types using a variant of the Hindley-Milner type system that defines a compositional type explanation graph of principal typings. We describe how the programmer understands types by interactive navigation through the explanation graph. Furthermore, the explanation graph can be the foundation for algorithmic debugging of type errors, that is, semi-automatic localisation of the source of a type error without even having to understand the type inference steps. We implemented a prototype of a tool to explore the usefulness of the proposed methods.
Kima – an Automated Error Correction System for Concurrent Logic Programs
- AADEBUG 2000
, 2000
"... We have implemented Kima, an automated error correction system for concurrent logic programs. Kima corrects near-misses such as wrong variable occurrences in the absence of explicit declarations of program properties. Strong moding/typing and constraint-based analysis are turning to play fundamenta ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
We have implemented Kima, an automated error correction system for concurrent logic programs. Kima corrects near-misses such as wrong variable occurrences in the absence of explicit declarations of program properties. Strong moding/typing and constraint-based analysis are turning to play fundamental roles in debugging concurrent logic programs as well as in establishing the consistency of communication protocols and data types. Mode/type analysis of Moded Flat GHC is a constraint satisfaction problem with many simple mode/type constraints, and can be solved efficiently. We proposed a simple and efficient technique which, given a non-well-moded/typed program, diagnoses the “reasons” of inconsistency by finding minimal inconsistent subsets of mode/type constraints. Since each constraint keeps track of the symbol occurrence in the program, a minimal subset also tells possible sources of program errors. Kima realizes automated correction by replacing symbol occurrences around the possible sources and recalculating modes and types of the rewritten programs systematically. As long as bugs are near-misses, Kima proposes a rather small number of alternatives that include an intended program. Search space is kept small because the minimal subset confines possible sources of errors in advance. This paper presents the basic algorithm and various optimization techniques implemented in Kima, and then discusses its effectiveness based on quantitative experiments.
A Visual Programming Environment for Functional Languages
, 2002
"... I declare that this thesis is my own account of my research and contains as its main content work which has not previously been submitted for a degree at any tertiary education institution. Joel Kelso ii The purported advantages of Visual Programming, as applied to general purpose programming langua ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
I declare that this thesis is my own account of my research and contains as its main content work which has not previously been submitted for a degree at any tertiary education institution. Joel Kelso ii The purported advantages of Visual Programming, as applied to general purpose programming languages, have remained largely unfulfilled. The essence of this thesis is that functional programming languages have at least one natural visual representation, and that a useful programming environment can be based upon this representation. This thesis describes the implementation of a Visual Functional Programming Environment (VFPE). The programming environment has several significant features. • The environment includes a program editor that is inherently
Evaluating Environments for Functional Programming
- International Journal of Human-Computer Studies
, 2000
"... Functional programming presents new challenges in the design of programming environments. In a strongly typed functional language, such as ML, much conventional debugging of runtime errors is replaced by dealing with compile time error reports. On the other hand, the cleanness of functional progr ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Functional programming presents new challenges in the design of programming environments. In a strongly typed functional language, such as ML, much conventional debugging of runtime errors is replaced by dealing with compile time error reports. On the other hand, the cleanness of functional programming opens up new possibilities for incorporating sophisticated correctness-checking techniques into such environments. C Y NTHIA is a novel editor for ML that both addresses the challenges and explores the possibilities. It uses an underlying proof system as a framework for automatically checking for semantic errors such as non-termination. In addition, C Y NTHIA embodies the idea of programming by analogy --- whereby users write programs by applying abstract transformations to existing programs. This paper investigates C Y NTHIA's potential as a novice ML programming environment. We report on two studies in which it was found that students using C Y NTHIA commit fewer er...
Polymorphic Type Reconstruction Using Type Equations
, 2003
"... The W algorithm of Milner [Mil78] and its numerous variants [McA98,LY98,YTMW00] implement type reconstruction by building type substitutions. We define an algorithm W centered around building type equations rather than substitutions. The design of W is motivated by the belief that reasoning ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
The W algorithm of Milner [Mil78] and its numerous variants [McA98,LY98,YTMW00] implement type reconstruction by building type substitutions. We define an algorithm W centered around building type equations rather than substitutions. The design of W is motivated by the belief that reasoning with substitutions is awkward.
Source-tracking Unification using semi-Dyck labeled reachability
, 2004
"... We propose a path-based framework for deriving and simplifying source-tracking information for first-order term unification in the empty theory. Such a framework is useful for diagnosing unification-based systems, including debugging of type errors in programs and the generation of success and failu ..."
Abstract
- Add to MetaCart
We propose a path-based framework for deriving and simplifying source-tracking information for first-order term unification in the empty theory. Such a framework is useful for diagnosing unification-based systems, including debugging of type errors in programs and the generation of success and failure proofs in logic programming. The objects of source-tracking are deductions in the logic of term unification. The semantics of deductions are paths over a unification graph whose labels form the suffix language of a semi-Dyck set. Based on this framework, two algorithms for generating proofs are presented: the first uses context-free labeled shortest-path algorithms to generate optimal (shortest) proofs in time O(n³), for a fixed signature, where n is the number of vertices of the unification graph. The second algorithm integrates easily with standard unification algorithms, entailing an overhead of only a constant factor, but generates non-optimal proofs. These non-optimal proofs may be further simplified by group rewrite rules.
Automated Programming Framework Using Constraint-Based Static Analysis
, 2002
"... We propose an automated programming framework using a constraintbased, static type system. Our framework infers a correct form of a program from an almost correct but incomplete version of it. This is done with the guideline of the consistency of several program properties imposed by the type sy ..."
Abstract
- Add to MetaCart
We propose an automated programming framework using a constraintbased, static type system. Our framework infers a correct form of a program from an almost correct but incomplete version of it. This is done with the guideline of the consistency of several program properties imposed by the type system. Furthermore, thanks to the simplicity of the type system, the framework is compatible with other automation techniques such as programming by examples, which can also be used for the specification of types. There are

