Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!news.mathworks.com!news.kei.com!nntp.coast.net!harbinger.cc.monash.edu.au!news.mel.connect.com.au!yarrina.connect.com.au!munnari.OZ.AU!cs.mu.OZ.AU!lee
From: lee@cs.mu.OZ.AU (Lee Naish)
Subject: Re: Prolog Types and Modes ...
Message-ID: <9533418.9835@mulga.cs.mu.OZ.AU>
Originator: lee@munta.cs.mu.OZ.AU
Sender: news@cs.mu.OZ.AU (CS-Usenet)
Reply-To: lee@cs.mu.OZ.AU (Lee Naish)
Organization: Computer Science, University Of Melbourne, Australia
References: <DII5Iv.DpI.0.-s@cs.vu.nl> <9532918.8821@mulga.cs.mu.OZ.AU>
Date: Thu, 30 Nov 1995 07:48:24 GMT
Lines: 14


In article <9532918.8821@mulga.cs.mu.OZ.AU>, fjh@munta.cs.mu.OZ.AU (Fergus Henderson) writes:

> NU-Prolog comes with a type checker.  However, the NU-Prolog type checker
> has a fundamental flaw - it doesn't catch all the type errors.

That of course begs the question: what is a type error?

For many, the answer is "those things detected by my favourite type checker".
There are errors detected by the Mercury type checker which are not detected by the NUDE type checker.  There are also errors detected by the NUDE type checker which are not detected by the Mercury type checker.  Fergus didn't mention this because in his eyes these are not type errors, by definition.  However, the bottom line is we want to detect *all* errors *somehow*.  The philosophy behind the NUDE type checker is to define a (possibly very large) class of errors then attempt to detect as many errors as


 possible in that class without using too much time or space.  The class of errors may be undecidable (as in NUDE), computable in exponential time (as in ML-style type systems which support overloading or subtypes), computable in polynomial time (as in ML-style systems without overloading) or computable in constant time (as in conventional Prolog, ie, type checking is trivial because the class of type errors is empty).

	lee
