[m-dev.] Suspected non-termination in compiler (and --make problem)

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Nov 21 01:20:19 AEDT 2002

Yes, this looks very much like non-termination in the compiler.
Probably it is due to the compiler not properly handling the
(invalid) cyclic inst definition on line 29 of regex.m:

	:- inst regex == regex.

The correct behaviour would be to report an error for that line,
but the current compiler seems to go into an infinite loop.

On 20-Nov-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Can someone savvy about these things give me a few pointers as to where
> I should start looking for the problem?

I tried the following steps:

	- compiling with "mmc -V ..."
	  This showed that the problem occured when mode-checking
	  func regex/1

	- compiling with "mmc -V --debug-modes"
	  This did not provide any additional output.

	- looking at the source code for regex/1
	  (at which point I spotted the cyclic inst at the top of the file)

My next step would have been to compile the compiler with tracing
enabled, run it under mdb, wait until it appears to be looping
and then hit control-C and examine the stack.

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list