[m-rev.] for review: allow preds to be trusted during decl debugging session

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Jan 5 14:54:09 AEDT 2005


On Thu, 30 Dec 2004, Ian MacLarty wrote:

> For review by anybody.
>
> Estimated hours taken: 2
> Branches: main
>
> Allow `trust' as declarative debugger question response.  The user may respond
> with simply `trust' in which case the current predicate or function will be
> trusted, or `trust module' in which case the module the current question
> relates to will be trusted.
>
> browser/declarative_oracle.m
> 	If the user response is trust_predicate or trust_module then
> 	add the predicate/function or module to the list of trusted objects
> 	and return an `ignore' response to the analyser.
>
> browser/declarative_user.m
> 	Handle `trust' command and add it to the help messgae.
>
> doc/user_guide.texi
> 	Document `trust' and `trust module' declarative debugger commands.
>
> tests/debugger/declarative/trust.exp
> tests/debugger/declarative/trust.inp
> 	Test the `trust' and `trust module' commands.
>
...

> @@ -516,6 +529,13 @@
>  		"\tn\tno\t\tthe node is incorrect\n",
>  		"\ti\tinadmissible\tthe input arguments are out of range\n",
>  		"\ts\tskip\t\tskip this question\n",
> +		"\tt [module]\ttrust [module]\tTrust the predicate/function ",
> +		"about\n",
> +		"\t\twhich the currect question is being asked.  If the word\n",

s/currect/current/

I think it would be better as just:

	If `module' is given as an argument then trust ....


> +		"\t\t`module' is given as an argument then trust all the\n",
> +		"\t\tpredicates/functions in the same module as the\n",
> +		"\t\tpredicate/function about which the currect question is\n",
> +		"\t\tbeing asked.\n",

s/currect/current/

>  		"\tb [<n>]\tbrowse [<n>]\tbrowse the atom, or its nth argument\n",
>  		"\tb io <n>\tbrowse io <n>\tbrowse the atom's nth I/O action\n",
>  		"\tp <n>\tprint <n>\tprint the nth argument of the atom\n",


> Index: doc/user_guide.texi
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
> retrieving revision 1.404
> diff -u -r1.404 user_guide.texi
> --- doc/user_guide.texi	20 Dec 2004 01:15:48 -0000	1.404
> +++ doc/user_guide.texi	30 Dec 2004 05:28:38 -0000
> @@ -3767,6 +3767,17 @@
>  @sp 1
>  @item inadmissible
>  Answer that the call is inadmissible.
> + at sp 1
> + at item trust
> +Answer that the predicate or function the question is about does not contain
> +any bugs.  However predicates or functions called by this predicate/function
> +may contain bugs.  The debugger will not ask you anymore questions about the
> +predicate or function the current question is about.

I suggest s/anymore/further/

Also, s/the current question is about/in the current question/?

> + at sp 1
> + at item trust module
> +Answer that the module the current question relates to doesn't contain any

s/doesn't/does not/

> +bugs.  No more questions about any predicates or functions from this module
> +will be asked.
>  @item skip
>  Skip this question and ask a different one if possible.
>  @sp 1
> @@ -3982,7 +3993,7 @@
>  is a good idea to trust standard library modules imported by a program being
>  debugged.
>
> -The declarative debugger must be told which predicates/functions it can trust
> +The declarative debugger can be told which predicates/functions it can trust
>  before the @samp{dd} command is given.  This is done using the @samp{trust},
>  @samp{trusted} and @samp{untrust} commands at the mdb prompt (see
>  @ref{Declarative debugging mdb commands} for details on how to use these
> @@ -3992,6 +4003,12 @@
>  settings for mdb (see @ref{Mercury debugger invocation}).  Trusted
>  predicates will also be exported with a @samp{save} command (see
>  @ref{Miscellaneous commands}).
> +
> +During the declarative debugging session the user may tell the
> +declarative debugger to trust the predicate or function the current question
> +is about or to trust all predicates and functions in the same module as the
> +predicate or function the current question is about.  See the @samp{trust}
> +command in @ref{Declarative debugging commands}.

That would be better as two separate sentences.

	During the declarative debugging session the user may tell the
	declarative debugger to trust the predicate or function the
	current question is about.  Alternatively, the user may tell
	the debugger to trust all of the predicates and functions in the
	same module ...

Also, is there a better way to express the concept, "predicate or
function the current question is about"?

That's all for now.

Cheers,
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