David,
On Wednesday 21 Jul 2004 3:47 pm, David Matthews wrote:
Rob,
Rob Arthan wrote:
... Unfortunately PolyML.exception_trace almost never gives me useful results. I think this maybe because I'm nearly always executing code via PolyML.compiler. Does that sound right? And is there a work-around?
The most likely reason is that the function that is raising the exception has been inserted inline into a calling function. This can happen through several levels so it may not be obvious which source function raised the exception. You can try reducing PolyML.Compiler.maxInlineSize and recompiling. ...
How about the following?
(**** ML BEGINS ****) PolyML.Compiler.maxInlineSize := 0;
fun g1 () : int = ( raise Div );
fun g2 () = ( g1 () );
fun g3 () = ( g2() );
fun g4() = ( g3() );
PolyML.exception_trace g4; (**** ML ENDS ****)
Even if I run this on the ML compiler database (i.e., without any of my ProofPower code in the way), I get an empty stack trace.
Regards,
Rob.