We are happy to announce the release of two things:<br><br> * Technical report HW-MACS-TR-0079 "A constraint system for a SML<br> type error slicer" which explains how our type error<br> slicing software works.<br>
* The new version 0.6 of our type error slicing software for the SML<br> programming language.<br><br>The abstract of the technical report is:<br><br> Existing compilers for many languages have confusing type error<br>
messages. Type error slicing (TES) helps the programmer by<br> isolating the part of a program contributing to a type error, but<br> unfortunately TES was initially done for a tiny toy language.<br> Extending TES to a full programming language is extremely<br>
challenging, and for SML we needed a number of innovations and<br> generalisations. Some issues would be faced for any language, and<br> some are SML-specific but representative of the complexity of<br> language-specific issues likely to be faced for other languages.<br>
We solve both kinds of issues and present a simple, general<br> constraint system for providing type error slices for ill-typed<br> programs. Our constraint system elegantly and efficiently handles<br> features like the intricate "open" SML feature. We show how the<br>
simple clarity of type error slices can demystify language<br> features known to confuse users.<br><br> We also provide in an appendix a case study on how to use TES to<br> help modifying user data types, and extend the core language<br>
presented in the main body of this report to handle more of the<br> implementation of our system. These extensions allow handling<br> local declarations, type declarations and some uses of signatures.<br><br><br>
Regarding the software, major improvements over the previous release<br>include:<br> * The slicer is 10 to 100 times faster in many cases, and can<br> reasonably be used on programs containing 10 thousand lines of<br>
code.<br> * We support some uses of functors (that is, we report some type<br> errors involving functors).<br> * We report more kinds of errors and the error messages have been<br> improved.<br> * We provide a source archive (that is, a .tar.gz file which you<br>
unpack and run “./configure; make; make install” in the unpacked<br> directory).<br><br>Other less important improvement is:<br> * The slicer now quickly sends non-minimal error slices to the user<br> interface and then sends a minimal replacement error slice after<br>
doing more time-consuming work.<br> * We partially support fixity declarations in that we parse and type<br> check programs using them correctly. Highlighting of infix<br> declarations and identifiers in error slices is not yet correct.<br>
<br>Even more changes are documented in the ChangeLog file.<br><br>The aim of our type error slicer is to provide useful type error<br>reports for pieces of code written in SML:<br> * It identifies all of the program points that contribute to a type<br>
error, including the spot with the actual programming error that<br> caused the type error.<br> * It highlights these program points in the original, unchanged<br> source code.<br> * It avoids showing internal details of the operation of the type<br>
inference machinery.<br><br>A new source archive and new Ubuntu (Debian based) and Fedora (Red-Hat<br>based) packages of our type error slicer can be found at this URL:<br> <a href="http://www.macs.hw.ac.uk/ultra/compositional-analysis/type-error-slicing/">http://www.macs.hw.ac.uk/ultra/compositional-analysis/type-error-slicing/</a><br>
<br>The technical report can be found at this URL:<br> <a href="http://www.macs.hw.ac.uk:8080/techreps/view_record.jsp?id=0079">http://www.macs.hw.ac.uk:8080/techreps/view_record.jsp?id=0079</a><br><br>Known limitations:<br>
* We have not yet built the software for other operating systems<br> than Linux.<br> * The currently supported user interfaces are via a terminal window,<br> GNU Emacs (or our web demo). We are currently developing a Vim<br>
interface.<br> * Some type errors are not yet discovered (the user will need to<br> rely on their usual type checker in these cases). Notable spots<br> where the implementation is incomplete are equality types and<br>
sharing constraints.<br> * The details of the SML basis library are incomplete (fortunately<br> the user can add any additional details they are using).<br><br><br>Best wishes,<br><br>Vincent Rahli and Joe Wells<br>