[m-dev.] Suggestions for mdb

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Fri Sep 1 17:33:20 AEDT 2000


Zoltan Somogyi writes:
> On 25-Aug-2000, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> > We could allow the following options to 'print':
> > 
> > 	-f	portray in "flat" format (it currently does this)
> > 	-p	portray in "pretty" format
> > 	-v	portray in "verbose" format
> 
> > i) Keep the 'set size/depth n' commands, and have them apply to the
> > current format.
> > ii) Add commands like 'set verbose depth 9', etc.
> > iii) Both of the above.
> 
> I agree with Fergus; both proposals are good. I would however suggest that
> instead of 'set verbose depth 9', you should using consider 'set -v depth 9',
> for consistency. The default should probably affect the given parameters in
> all the formats.
> 
> I also suggested to Mark in personal conversation that the debugger should
> have different sets of parameter values for different commands. By this
> I mean that it should be possible to set things up so that for "print *" you
> get e.g. a two-line limit for each variable, but for "browse Var" you get
> ten lines in each display.
> 
> We could have a second set of options to the set command, one drawn from
> the set APB, standing for three sets of parameters values: A applied to
> "print *" (all), P applied to "print Var", and B applied to "browse Var".
> If you specified any of these options, the command is performed on the
> parameter values from the sets you mentioned, otherwise it is performed
> on a default set of sets. If the default set had all three of APB, the
> system would appear simple to novices while still giving experts flexibility.
> 
> (I apologize for the number of different senses in which the word "set"
> is used in that paragraph :-)
> 
> Any opinions?
> 
This sounds good.  Before I go ahead and implement it, though, we should
also discuss the actual parameters.  The current set of parameters is:

	- maximum depth
	- maximum term size (number of functors)
	- clipx (i.e. screen width)
	- clipy (i.e. maximum number of lines allowed)
	- default format (for the interactive browser; the non-interactive
	  one always uses 'flat' format).

There are nine scenarios, corresponding to the possible combinations of
one of {A, P, B} and one of {flat, pretty, verbose}.  However, we would not
want to be able to set all of the parameters independently for each
combination.

The 'clipx' parameter should probably be the same for all scenarios, since
the screen width won't change.  (Hmm, maybe not.  In future the emacs
version of mdb could open a new window when the 'browse' command is used.
But we can cross that bridge if/when we get to it.)

Obviously, the 'default format' parameter should only apply if no format
is explicitly specified.  So there should be one default format for each
of {A, P, B}.

So here's a proposed set of configuration parameters for various scenarios.

Scenario				Configurables
--------				-------------

All scenarios				clipx

	A - print *			default format

		- flat			size, depth, clipy
		- pretty		    "     "
		- verbose		    "     "

	P - print			default format

		- flat			size, depth, clipy
		- pretty		    "     "
		- verbose		    "     "

	B - browse			default format

		- flat			size, depth, clipy
		- pretty		    "     "
		- verbose		    "     "

Any other ideas?

Cheers,
Mark.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list