[m-dev.] main as an exported predicate

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed May 6 14:54:35 AEST 1998


Fergus wrote:
> There are a few reasons (profiling, benchmarking, low-level debugging)
> but I think they're all historical.

Tom wrote:
> Profiling would be simpler if main was just a "normal" call from C to
> Mercury. Zoltan, how about the other cases?

I haven't used low-level debugging (i.e. debug_goto and friends) for a long
time, probably more than two years, and I don't think anyone else has either.
I don't think anyone will want it in the future either, since tracing is
a superior alternative, and I just got the compiler to bootstrap successfully
with interface tracing.

As for benchmarking, the only thing the entry-point infrastructure gives us
is the ability to execute the *same* binary two different ways, one producing
output whose correctness can be verified, and any silent whose performance
can be measured. This was somewhat important when the compiler's correctness
was in significant doubt. Now that it isn't, we can simply have two versions
of the program.

So overall, I don't think there is any compelling reason to stay with the
current arrangement.

Zoltan.



More information about the developers mailing list