[m-rev.] for review: --dump-hlds-pred-id and --debug-opt-pred-id

Zoltan Somogyi zs at cs.mu.OZ.AU
Sat May 10 14:07:46 AEST 2003


On 09-May-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > +		{ string__replace_all(DumpOptions2, "M", "", DumpOptions3) },
> > +		{ string__replace_all(DumpOptions3, "T", "", DumpOptions) },
> >  		globals__io_set_option(dump_hlds_options, string(DumpOptions))
> 
> What is the meaning of the magic constants "M" and "T"?

They cause the dumping of the mode and type tables respectively. This is
documented in the user guide.

> Why do these need to be deleted from DumpOptions?

So that the dump consists only of the selected predicate's HLDS.

> There should be a comment here explaining what this code is doing and why.

I added:

	% Prevent the dumping of the mode and type tables.

> > +		DumpPredId > 0
> 
> s/>/>=/

Done in both places.

> Also, you didn't post any diff for doc/user_guide.texi
> (although it was mentioned in the log message).

I must have sent a diff from before I did them. Here it is.

Zoltan.

cvs diff: Diffing .
Index: user_guide.texi
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.367
diff -u -b -r1.367 user_guide.texi
--- user_guide.texi	8 May 2003 03:35:28 -0000	1.367
+++ user_guide.texi	9 May 2003 09:56:15 -0000
@@ -4372,6 +4372,12 @@
 Output detailed debugging traces of the optimization process.
 
 @sp 1
+ at item --debug-opt-pred-id @var{predid}
+ at findex --debug-opt-pred-id
+With --debug-opt, restrict the debugging traces
+to the optimization of the predicate or function with the specified pred id.
+
+ at sp 1
 @item --debug-pd
 @findex --debug-pd
 Output detailed debugging traces of the partial
@@ -4702,6 +4708,12 @@
 P - path information,
 T - type and typeclass information,
 U - unify and compare predicates.
+
+ at sp 1
+ at item --dump-hlds-pred-id @var{predid}
+ at findex --dump-hlds-pred-id
+With @samp{--dump-hlds}, restrict the output
+to the HLDS of the predicate or function with the specified pred id.
 
 @sp 1
 @item --dump-mlds @var{stage}
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list