[m-rev.] for post-commit review: fix and extend mdb's ambiguity command

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Mar 2 21:27:28 AEDT 2006


On Thu, 2 Mar 2006, Zoltan Somogyi wrote:

> Fix some bugs in the mdb "ambiguity" command, and add an enhancement to it.
>
> doc/user_guide.texi:
> 	Document the enhancement: users can now restrict the set of modules
> 	in which the debugger looks for ambiguity.
>
> tests/debugger/ambiguity.{m,inp,exp}:
> 	A new test case to check the new functionality and the bug fix.
>
> tests/debugger/Mmakefile:
> 	Enable the new test.
>
> trace/mercury_trace_tables.[ch]:
> 	Fix two bugs in the implementation of the function that implements
> 	the ambiguity command. One was that we neglected to differentiate
> 	between predicates and functions of the same name and arity. Another
> 	was that for functions, we used the wrong arity: the one after the
> 	addition of the result as an argument, not the one before.
>
> 	Add the ability to restrict the search to a list of named modules.
>
> trace/mercury_trace_internal.c:
> 	Update the parsing of the command line for ambiguity commands to allow
> 	users to specify lists of module names.
>
> 	Fix an old bug, and make sure it never happens again. We used to
> 	pass the category and name of the current command every time we
> 	reported a syntax error, or called an option parsing routine (since it
> 	may have to report a syntax error). Since much of this code is best
> 	done via cut-and-paste, we often passed the wrong strings. For example,
> 	before this fix, a syntax error in an ambiguity command lead to a
> 	suggestion to do "help class_decl"!
>
> 	The fix is simply to record the category and name of the current
> 	command in a pair of variables, and refer to these variables when
> 	reporting syntax errors.
>
> 	Note that there are still mismaches in the names of categories
> 	between mercury_trace_internal.c and user_guide.texi. These should
> 	be fixed, but for now things are fine, since our current error messages
> 	don't include the category name.
>

That all looks okay.

Julien.
--------------------------------------------------------------------------
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