[m-rev.] for review: display the reason why a question was asked in the dd

Ian MacLarty maclarty at cs.mu.OZ.AU
Sun Mar 13 20:13:32 AEDT 2005


On Sun, Mar 13, 2005 at 04:20:31PM +1100, Julien Fischer wrote:
> 
> On Sat, 12 Mar 2005, Ian MacLarty wrote:
> 
> > For review by anyone.
> >
> > Estimated hours taken: 14
> > Branches: main
> >
> > Include the reason why a question was asked in the information provided by the
> > `info' command.  This includes the place where a marked subterm was bound if
> > the user marked a subterm in the previous question.
> >
> > browser/declarative_analyser.m
> > 	Add a new type to record the reason why a question was asked.  Keep
> > 	this information with the last question asked in the analyser state, in
> > 	case the user issues an `info' command.  Display the reason when the
> > 	user issues an `info' command.
> >
> > 	Change the behaviour of subterm dependency tracking slightly: if the
> > 	binding node was previously skipped then ask about it anyway.
> >
> Briefly mention why here.
> 

Okay:
	The user can then see in which node the sub-term was bound, which may
	help them in answering the previously skipped question.

> > Index: browser/declarative_analyser.m
> > ===================================================================
> > RCS file: /home/mercury1/repository/mercury/browser/declarative_analyser.m,v
> > retrieving revision 1.21
> > diff -u -r1.21 declarative_analyser.m
> > --- browser/declarative_analyser.m	12 Mar 2005 04:46:29 -0000	1.21
> > +++ browser/declarative_analyser.m	12 Mar 2005 11:54:19 -0000
> > @@ -21,8 +21,10 @@
> >  :- import_module mdb.declarative_debugger.
> >  :- import_module mdb.io_action.
> >  :- import_module mdb.declarative_edt.
> > +:- import_module mdbcomp.program_representation.
> > +:- import_module mdbcomp.prim_data.
> >
> > -:- import_module std_util, io.
> > +:- import_module std_util, io, bool.
> >
> >  :- type analyser_response(T)
> >
> > @@ -49,6 +51,35 @@
> >  			% this question and then for analysis to continue.
> >  	;	revise(decl_question(T)).
> >
> > +	% The reason a question was asked.
> > +	%
> I suggest a little more detail there.
> e.g The reason the declarative debugger asked a question.
> 

Okay.

> > +:- type question_reason
> 
> Perhaps, reason_for_question as the typename.
> 

I agree.

I also made the type private (it didn't need to be public) and renamed
question_reason_to_string to just reason_to_string.

> > +				SearchResponse = question(Unknown,
> > +					binding_node_eliminated),
> >  				setup_binary_search(!.SearchSpace,
> >  					Unknown, NewMode)
> >  			;
> 
> 
> > +question_reason_to_string(start) = "this is the node where the `dd' command "
> > +	++ "was given.".
> Perhaps s/given/issued/?
> 

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