"Fergus Henderson" <fjh@cs.mu.OZ.AU> writes:> Furthermore, whichever choice you make, it is difficult for the system> to presenting accurate results of type inference for the kinds of> incomplete, not yet syntactically correct program fragments that> result when the user is in the middle of making a modification to> their source -- which is usually the point at which such information> is most useful.

I agree with the above. One approach to try and deal with checking
the (static) semantics of program fragments is [Snelting:acta:1991].
It has been a while since I read it so I'm not sure if any of the
examples were of a language that included type-inference or if the
approach would work for such languages.

@article
{ Snelting:acta:1991
, author= "Gregor Snelting"
, title= "The calculus of context relations"
, journal= acta
, volume= 28
, number= 5
, pages= "411--445"
, year= 1991
, refs= 40
, checked= 19960406
, source= "Computer Science Library, University of Manchester"
, abstract= "We present the theory of conext relations. Context
relations are a method for incremental semantic analysis in
language-specific editors, which is able to handle incomplete program
fragments. The algorithm is generated from the definition of a
language's static semantics and is based on inference rules and
order-sorted unification. The paper presents the underlying
mathematical theory, optimal incremental analysis algorithms, handling
of user-defined polymorphism and overloading, and implementation
issues. It is intended as the concluding report on by now mature
concept, which has successfully been used to generate efficient
incremental type inferencers for languages like Ada and Fortran 8x."
, sjb= "Since this is in Acta Informatica it shouldn't come as a
surprise that this is mainly a theoretical paper concentrating on
proofs of the unification system used. There are a few pages of
readable text intermingled though, enough to get an idea of how the
system works."
, reffrom= Grosch:Snelting:plilp:1990
, reffrom= Nipkow:Snelting:fplca:1991
, reffrom= Poetzsch-Heffter:plilp:1993}