for review: make HLDS dumps easier to use

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Sep 22 21:07:19 AEST 1998


Make HLDS dumps easier to use.

Estimated hours taken: 3

compiler/hlds_out.m:
	If dump_hlds_options includes I, print even imported predicates.
	This is useful for e.g. debugging termination analysis, where you
	must have access to the termination info of all procedures, not
	just those defined in the current module.

compiler/options.m:
	Rename the option verbose_hlds_dump to dump_hlds_options. Add a new
	option hlds_dump_alias, and make -D refer to the latter.

compiler/handle_options.m:
	If hlds_dump_alias is set, use its string value as an alias, a
	meaningful shorthand for an otherwise meaningless bunch of
	hlds option letters.

	The initial set of aliases is "ALL", meaning all option letters;
	"all", meaning all option letters except I and U (which cause
	imported and unify procedures to be printed), and two others.
	You can add your own.

compiler/intermod.m:
compiler/mercury_to_c.m:
	Use the new name of the renamed option.

doc/user_guide.texi:
	Update the documentation to conform to the changes to options.m
	and hlds_out.m, and fix some documentation rot.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing bytecode/test
cvs diff: Diffing compiler
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.61
diff -u -u -r1.61 handle_options.m
--- handle_options.m	1998/09/10 06:51:06	1.61
+++ handle_options.m	1998/09/22 10:43:32
@@ -141,24 +141,44 @@
                         { Percent =< 100 }
                     ->
                         { map__lookup(OptionTable, termination_norm,
-                                TermNorm0) },
+                            TermNorm0) },
                         (
                             { TermNorm0 = string(TermNormStr) },
                             { convert_termination_norm(TermNormStr, TermNorm) }
                         ->
                             { map__lookup(OptionTable, trace, Trace) },
                             { map__lookup(OptionTable, require_tracing,
-			    	RequireTracingOpt) },
+                                RequireTracingOpt) },
                             (
                                 { Trace = string(TraceStr) },
                                 { RequireTracingOpt = bool(RequireTracing) },
                                 { convert_trace_level(TraceStr, RequireTracing,
-				    TraceLevel) }
+                                    TraceLevel) }
                             ->
-                                postprocess_options_2(OptionTable,
-                                    GC_Method, TagsMethod, ArgsMethod,
-                                    PrologDialect, TermNorm, TraceLevel),
-                                { Error = no }
+                                { map__lookup(OptionTable, dump_hlds_alias,
+                                    DumpAliasOption) },
+                                (
+                                    { DumpAliasOption = string(DumpAlias) },
+                                    { DumpAlias = "" }
+                                ->
+                                    postprocess_options_2(OptionTable,
+                                        GC_Method, TagsMethod, ArgsMethod,
+                                        PrologDialect, TermNorm, TraceLevel),
+                                    { Error = no }
+                                ;
+                                    { DumpAliasOption = string(DumpAlias) },
+                                    { convert_dump_alias(DumpAlias,
+                                        DumpOptions) }
+                                ->
+                                    { map__set(OptionTable, dump_hlds_options,
+                                        string(DumpOptions), NewOptionTable) },
+                                    postprocess_options_2(NewOptionTable,
+                                        GC_Method, TagsMethod, ArgsMethod,
+                                        PrologDialect, TermNorm, TraceLevel),
+                                    { Error = no }
+                                ;
+                                    { Error = yes("Invalid argument to option `--hlds-dump-alias'.") }
+                                )
                             ;
                                 { Error = yes("Invalid argument to option `--trace'\n\t(must be `minimum', `interfaces', `all', or `default').") }
                             )
@@ -264,15 +284,6 @@
 	% --split-c-files implies --procs-per-c-function 1
 	option_implies(split_c_files, procs_per_c_function, int(1)),
 
-	% -D all is really "all possible flag chars are in VerboseDump"
-	globals__io_lookup_string_option(verbose_dump_hlds, VerboseDump),
-	( { VerboseDump = "all" } ->
-		globals__io_set_option(verbose_dump_hlds,
-			string("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"))
-	;
-		[]
-	),
-
 	% The `.debug' grade (i.e. --stack-trace plus --require-tracing)
 	% implies --use-trail.
 	%
@@ -664,3 +675,20 @@
 char_is_not(A, B) :-
 	A \= B.
 
+%-----------------------------------------------------------------------------%
+
+% This predicate converts a symbolic name for a set of verbosity options
+% (a "dump alias") into the string consisting of those options' characters.
+%
+% The meanings of the option characters are documented by doc/user_guide.texi
+% and by compiler/hlds_out.m. The latter is more authoritative :-)
+%
+% You are welcome to add more aliases.
+
+:- pred convert_dump_alias(string, string).
+:- mode convert_dump_alias(in, out) is semidet.
+
+convert_dump_alias("ALL", "abcdfgilmnprstuvCIMPTU").
+convert_dump_alias("all", "abcdfgilmnprstuvCMPT").
+convert_dump_alias("codegen", "dfnprsu").
+convert_dump_alias("vanessa", "ltuCIU").
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.202
diff -u -u -r1.202 hlds_out.m
--- hlds_out.m	1998/09/18 02:20:04	1.202
+++ hlds_out.m	1998/09/22 09:46:25
@@ -217,7 +217,7 @@
 hlds_out__cons_id_to_string(pred_const(_, _), "<pred>").
 hlds_out__cons_id_to_string(code_addr_const(_, _), "<code_addr>").
 hlds_out__cons_id_to_string(base_type_info_const(_, _, _), "<base_type_info>").
-hlds_out__cons_id_to_string(base_typeclass_info_const(_, _, _, _), 
+hlds_out__cons_id_to_string(base_typeclass_info_const(_, _, _, _),
 	"<base_typeclass_info>").
 
 hlds_out__write_cons_id(cons(SymName, Arity)) -->
@@ -251,7 +251,7 @@
 	{ pred_info_name(PredInfo, Name) },
 	{ pred_info_arity(PredInfo, Arity) },
 	{ pred_info_get_is_pred_or_func(PredInfo, PredOrFunc) },
-	( { special_pred_name_arity(Kind, _, Name, Arity) } ->	
+	( { special_pred_name_arity(Kind, _, Name, Arity) } ->
 		{ special_pred_description(Kind, Descr) },
 		io__write_string(Descr),
 		io__write_string(" for type "),
@@ -378,7 +378,7 @@
 	io__write_string("\n"),
 	hlds_out__write_header(Indent, Module),
 	io__write_string("\n"),
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'T') } ->
 		hlds_out__write_types(Indent, TypeTable),
 		io__write_string("\n"),
@@ -397,7 +397,7 @@
 		hlds_out__write_modes(Indent, ModeTable),
 		io__write_string("\n")
 	;
-		io__write_string("\n")  
+		io__write_string("\n")
 	),
 	hlds_out__write_preds(Indent, Module, PredTable),
 	io__write_string("\n"),
@@ -438,19 +438,21 @@
 :- mode hlds_out__write_preds_2(in, in, in, in, di, uo) is det.
 
 hlds_out__write_preds_2(Indent, ModuleInfo, PredIds0, PredTable) -->
-        globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+        globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	(
 		{ PredIds0 = [PredId|PredIds] }
 	->
 		{ map__lookup(PredTable, PredId, PredInfo) },
-		( 	
-			{ pred_info_is_imported(PredInfo) } 
+		(
+			{ \+ string__contains_char(Verbose, 'I') },
+			{ pred_info_is_imported(PredInfo) }
 		->
 			[]
 		;
 			% for pseudo-imported predicates (i.e. unification
 			% preds), only print them if we are using a local
 			% mode for them
+			{ \+ string__contains_char(Verbose, 'I') },
 			{ pred_info_is_pseudo_imported(PredInfo) },
 			{ pred_info_procids(PredInfo, ProcIds) },
 			{ hlds_pred__in_in_unification_proc_id(ProcId) },
@@ -458,9 +460,9 @@
 		->
 			[]
 		;
-			% We dump unification predicates if suboption 
-			% 'U' is on. We don't really need that 
-			% information to understand how the program has 
+			% We dump unification predicates if suboption
+			% 'U' is on. We don't really need that
+			% information to understand how the program has
 			% been transformed.
 			{ \+ string__contains_char(Verbose, 'U') },
 			{ pred_info_arity(PredInfo, Arity) },
@@ -498,12 +500,12 @@
 	{ pred_info_get_constraint_proofs(PredInfo, Proofs) },
 	{ pred_info_get_purity(PredInfo, Purity) },
 	{ pred_info_get_head_type_params(PredInfo, HeadTypeParams) },
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'C') } ->
-		% Information about predicates is dumped if 'C' 
+		% Information about predicates is dumped if 'C'
 		% suboption is on.
 		mercury_output_pred_type(TVarSet, ExistQVars,
-				qualified(Module, PredName), 
+				qualified(Module, PredName),
 				ArgTypes, no, Purity, ClassContext, Context)
 	;
 		[]
@@ -558,12 +560,12 @@
 			VarTypes, TVarSet),
 
 		% Never write the clauses out verbosely -
-		% disable the verbose_dump_hlds option before writing them,
+		% disable the dump_hlds_options option before writing them,
 		% and restore its initial value afterwards
-		globals__io_set_option(verbose_dump_hlds, string("")),
+		globals__io_set_option(dump_hlds_options, string("")),
 		hlds_out__write_clauses(Indent, ModuleInfo, PredId, VarSet,
 			AppendVarnums, HeadVars, PredOrFunc, Clauses, no),
-		globals__io_set_option(verbose_dump_hlds, string(Verbose))
+		globals__io_set_option(dump_hlds_options, string(Verbose))
 	;
 		[]
 	),
@@ -624,7 +626,7 @@
 		),
 		Indent1 is Indent + 1
 	},
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'm') } ->
 		hlds_out__write_indent(Indent),
 		io__write_string("% Modes for which this clause applies: "),
@@ -713,7 +715,7 @@
 
 hlds_out__write_goal_a(Goal - GoalInfo, ModuleInfo, VarSet, AppendVarnums,
 		Indent, Follow, TypeQual) -->
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'c') } ->
 		{ goal_info_get_context(GoalInfo, Context) },
 		{ term__context_file(Context, FileName) },
@@ -902,13 +904,12 @@
 	;
 		[]
 	),
-	( { string__contains_char(Verbose, 'g') }
-	->	
+	( { string__contains_char(Verbose, 'g') } ->
 		{ goal_info_get_features(GoalInfo, Features) },
 		{ set__to_sorted_list(Features, Flist) },
-		(   { Flist = [] } ->
+		( { Flist = [] } ->
 			[]
-		;   
+		;
 			hlds_out__write_indent(Indent),
 			io__write_string("% Goal features:  "),
 			io__write(Flist),
@@ -974,7 +975,7 @@
 		Indent1, "", TypeQual),
 	hlds_out__write_indent(Indent),
 	io__write_string("else\n"),
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	(
 		{ Verbose \= "" },
 		{ Else = if_then_else(_, _, _, _, _) - _ }
@@ -1005,7 +1006,7 @@
 hlds_out__write_goal_2(conj(List), ModuleInfo, VarSet, AppendVarnums,
 		Indent, Follow, TypeQual) -->
 	( { List = [Goal | Goals] } ->
-		globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+		globals__io_lookup_string_option(dump_hlds_options, Verbose),
 		( { Verbose \= "" } ->
 			{ Indent1 is Indent + 1 },
 			hlds_out__write_indent(Indent),
@@ -1073,9 +1074,10 @@
 hlds_out__write_goal_2(higher_order_call(PredVar, ArgVars, _, _, _, PredOrFunc),
 		_ModuleInfo, VarSet, AppendVarnums, Indent, Follow, _) -->
 		% XXX we should print more info here
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	hlds_out__write_indent(Indent),
-	(	{ PredOrFunc = predicate },
+	(
+		{ PredOrFunc = predicate },
 		( { string__contains_char(Verbose, 'l') } ->
 			io__write_string("% higher-order predicate call\n"),
 			hlds_out__write_indent(Indent)
@@ -1106,7 +1108,7 @@
 hlds_out__write_goal_2(class_method_call(TCInfoVar, _, ArgVars, _, _, _),
 		_ModuleInfo, VarSet, AppendVarnums, Indent, Follow, _) -->
 		% XXX we should print more info here too
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	hlds_out__write_indent(Indent),
 	( { string__contains_char(Verbose, 'l') } ->
 		io__write_string("% class method call"),
@@ -1122,7 +1124,7 @@
 hlds_out__write_goal_2(call(PredId, ProcId, ArgVars, Builtin,
 			MaybeUnifyContext, PredName),
 		ModuleInfo, VarSet, AppendVarnums, Indent, Follow, TypeQual) -->
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'b') } ->
 		(
 			{ Builtin = inline_builtin },
@@ -1202,7 +1204,7 @@
 	},
 	hlds_out__write_unify_rhs_2(B, ModuleInfo, VarSet, AppendVarnums,
 		Indent, Follow, VarType, TypeQual),
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'u') } ->
 		(
 			% don't output bogus info if we haven't been through
@@ -1378,7 +1380,7 @@
 		io__write_string(" ("),
 		mercury_output_vars(ArgVars, VarSet, AppendVarnums),
 		io__write_string(")\n"),
-		globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+		globals__io_lookup_string_option(dump_hlds_options, Verbose),
 		( { string__contains_char(Verbose, 'a') } ->
 			hlds_out__write_indent(Indent),
 			io__write_string("% arg-modes "),
@@ -1460,7 +1462,7 @@
 	;
 		[]
 	),
-        globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+        globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'n') } ->
 		( { NonLocals \= [] } ->
 			hlds_out__write_indent(Indent1),
@@ -1733,6 +1735,8 @@
 :- mode hlds_out__write_var_types(in, in, in, in, in, di, uo) is det.
 
 hlds_out__write_var_types(Indent, VarSet, AppendVarnums, VarTypes, TVarSet) -->
+	hlds_out__write_indent(Indent),
+	io__write_string("% variable types map:\n"),
 	{ map__keys(VarTypes, Vars) },
 	hlds_out__write_var_types_2(Vars, Indent, VarSet, AppendVarnums,
 		VarTypes, TVarSet).
@@ -1767,12 +1771,12 @@
 	hlds_out__write_indent(Indent),
 	io__write_string("% type_info varmap:\n"),
 	{ map__keys(TypeInfoMap, TypeVars) },
-	hlds_out__write_typeinfo_varmap_2(TypeVars, Indent, AppendVarnums, 
+	hlds_out__write_typeinfo_varmap_2(TypeVars, Indent, AppendVarnums,
 		TypeInfoMap, VarSet, TVarSet).
 
-:- pred hlds_out__write_typeinfo_varmap_2(list(tvar), int, bool, 
+:- pred hlds_out__write_typeinfo_varmap_2(list(tvar), int, bool,
 	map(tvar, type_info_locn), varset, tvarset, io__state, io__state).
-:- mode hlds_out__write_typeinfo_varmap_2(in, in, in, in, in, in, di, uo) 
+:- mode hlds_out__write_typeinfo_varmap_2(in, in, in, in, in, in, di, uo)
 	is det.
 
 hlds_out__write_typeinfo_varmap_2([], _, _, _, _, _) --> [].
@@ -1891,7 +1895,7 @@
 	% Write the context
 
 	io__write_char('\n'),
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 'c') } ->
 		{ term__context_file(Context, FileName) },
 		{ term__context_line(Context, LineNumber) },
@@ -2022,7 +2026,7 @@
 		hlds_out__write_class_defn(Indent)),
 	io__nl.
 
-:- pred hlds_out__write_class_defn(int, pair(class_id, hlds_class_defn), 
+:- pred hlds_out__write_class_defn(int, pair(class_id, hlds_class_defn),
 			io__state, io__state).
 :- mode hlds_out__write_class_defn(in, in, di, uo) is det.
 
@@ -2088,7 +2092,7 @@
 
 %-----------------------------------------------------------------------------%
 
-:- pred hlds_out__write_superclasses(int, superclass_table, 
+:- pred hlds_out__write_superclasses(int, superclass_table,
 	io__state, io__state).
 :- mode hlds_out__write_superclasses(in, in, di, uo) is det.
 
@@ -2100,7 +2104,7 @@
 		hlds_out__write_superclass(Indent)),
 	io__nl.
 
-:- pred hlds_out__write_superclass(int, pair(class_id, list(subclass_details)), 
+:- pred hlds_out__write_superclass(int, pair(class_id, list(subclass_details)),
 			io__state, io__state).
 :- mode hlds_out__write_superclass(in, in, di, uo) is det.
 
@@ -2117,7 +2121,7 @@
 	io__write_list(SubClassDetailsList, "\n",
 		hlds_out__write_subclass_details(Indent, ClassId)).
 
-:- pred hlds_out__write_subclass_details(int, class_id, subclass_details, 
+:- pred hlds_out__write_subclass_details(int, class_id, subclass_details,
 			io__state, io__state).
 :- mode hlds_out__write_subclass_details(in, in, in, di, uo) is det.
 
@@ -2156,7 +2160,7 @@
 		hlds_out__write_instance_defns(Indent)),
 	io__nl.
 
-:- pred hlds_out__write_instance_defns(int, 
+:- pred hlds_out__write_instance_defns(int,
 	pair(class_id, list(hlds_instance_defn)), io__state, io__state).
 :- mode hlds_out__write_instance_defns(in, in, di, uo) is det.
 
@@ -2173,7 +2177,7 @@
 	io__write_list(InstanceDefns, "\n",
 		hlds_out__write_instance_defn(Indent)).
 
-:- pred hlds_out__write_instance_defn(int, hlds_instance_defn, 
+:- pred hlds_out__write_instance_defn(int, hlds_instance_defn,
 			io__state, io__state).
 :- mode hlds_out__write_instance_defn(in, in, di, uo) is det.
 
@@ -2308,8 +2312,7 @@
 	hlds_out__write_determinism(InferredDeterminism),
 	io__write_string("):\n"),
 
-	
-	globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
+	globals__io_lookup_string_option(dump_hlds_options, Verbose),
 	( { string__contains_char(Verbose, 't') } ->
 		hlds_out__write_indent(Indent),
 		io__write_string("% Arg size properties: "),
@@ -2482,7 +2485,7 @@
 	hlds_out__write_indent(Indent),
 	io__write_string("% Proofs: \n"),
 	{ map__to_assoc_list(Proofs, ProofsList) },
-	io__write_list(ProofsList, "\n", 
+	io__write_list(ProofsList, "\n",
 		hlds_out__write_constraint_proof(Indent, VarSet)).
 
 :- pred hlds_out__write_constraint_proof(int, varset,
@@ -2503,6 +2506,6 @@
 		io__write_string("super class of "),
 		mercury_output_constraint(VarSet, Super)
 	).
-	
+
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
Index: compiler/intermod.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/intermod.m,v
retrieving revision 1.59
diff -u -u -r1.59 intermod.m
--- intermod.m	1998/08/07 00:48:56	1.59
+++ intermod.m	1998/09/22 08:56:43
@@ -783,8 +783,8 @@
 		[]
 	),
 	% Disable verbose dumping of clauses.
-	globals__io_lookup_string_option(verbose_dump_hlds, VerboseDump),
-	globals__io_set_option(verbose_dump_hlds, string("")),
+	globals__io_lookup_string_option(dump_hlds_options, VerboseDump),
+	globals__io_set_option(dump_hlds_options, string("")),
 	( { WriteHeader = yes } ->
 		{ module_info_get_c_header(ModuleInfo, CHeader) },
 		intermod__write_c_header(CHeader)
@@ -802,7 +802,7 @@
 	intermod__write_insts(ModuleInfo, InstDefns, Insts),
 	intermod__write_pred_decls(ModuleInfo, PredDecls),
 	intermod__write_preds(ModuleInfo, Preds),
-	globals__io_set_option(verbose_dump_hlds, string(VerboseDump)).
+	globals__io_set_option(dump_hlds_options, string(VerboseDump)).
 
 :- pred intermod__write_modules(list(module_name)::in,
 			io__state::di, io__state::uo) is det.
Index: compiler/mercury_to_c.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_to_c.m,v
retrieving revision 1.36
diff -u -u -r1.36 mercury_to_c.m
--- mercury_to_c.m	1998/07/08 20:56:43	1.36
+++ mercury_to_c.m	1998/09/22 08:56:42
@@ -180,12 +180,12 @@
 		{ ClausesInfo = clauses_info(VarSet, _VarTypes, _, HeadVars,
 			Clauses) },
 
-		globals__io_lookup_string_option(verbose_dump_hlds, Verbose),
-		globals__io_set_option(verbose_dump_hlds, string("")),
+		globals__io_lookup_string_option(dump_hlds_options, Verbose),
+		globals__io_set_option(dump_hlds_options, string("")),
 		{ pred_info_get_is_pred_or_func(PredInfo, PredOrFunc) },
 		hlds_out__write_clauses(Indent, ModuleInfo, PredId, VarSet, no,
 			HeadVars, PredOrFunc, Clauses, no),
-		globals__io_set_option(verbose_dump_hlds, string(Verbose)),
+		globals__io_set_option(dump_hlds_options, string(Verbose)),
 
 		io__write_string("****/\n"),
 
Index: compiler/options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.241
diff -u -u -r1.241 options.m
--- options.m	1998/09/16 04:09:06	1.241
+++ options.m	1998/09/22 09:33:43
@@ -97,7 +97,8 @@
 		;	auto_comments
 		;	show_dependency_graph
 		;	dump_hlds
-		;	verbose_dump_hlds
+		;	dump_hlds_alias
+		;	dump_hlds_options
 	% Language semantics options
 		;	reorder_conj
 		;	reorder_disj
@@ -381,7 +382,8 @@
 	auto_comments		-	bool(no),
 	show_dependency_graph	-	bool(no),
 	dump_hlds		-	accumulating([]),
-	verbose_dump_hlds	-	string("")
+	dump_hlds_alias		-	string(""),
+	dump_hlds_options	-	string("")
 ]).
 option_defaults_2(language_semantics_option, [
 	strict_sequential	-	special,
@@ -613,7 +615,7 @@
 short_option('c', 			compile_only).
 short_option('C', 			compile_to_c).
 short_option('d', 			dump_hlds).
-short_option('D', 			verbose_dump_hlds).
+short_option('D', 			dump_hlds_alias).
 short_option('e', 			errorcheck_only).
 short_option('E', 			verbose_errors).
 short_option('G', 			convert_to_goedel).
@@ -711,7 +713,8 @@
 long_option("auto-comments",		auto_comments).
 long_option("show-dependency-graph",	show_dependency_graph).
 long_option("dump-hlds",		dump_hlds).
-long_option("verbose-dump-hlds",	verbose_dump_hlds).
+long_option("dump-hlds-alias",		dump_hlds_alias).
+long_option("dump-hlds-options",	dump_hlds_options).
 
 % language semantics options
 long_option("reorder-conj",		reorder_conj).
@@ -1403,7 +1406,12 @@
 		"\tthe specified stage to `<module>.hlds_dump.<num>-<name>'.",
 		"\tStage numbers range from 1-99.",
 		"\tMultiple dump options accumulate.",
-		"-D, --verbose-dump-hlds <fields>",
+% This option is for developers only
+%		"-D, --dump-hlds-alias <dump-alias>",
+%		"\tWith `--dump-hlds', include extra detail in the dump.",
+%		"\tEach dump alias is shorthand for a set of option letters.",
+%		"\tThe list of aliases is in handle_options.m",
+		"--dump-hlds-options <options>",
 		"\tWith `--dump-hlds', include extra detail in the dump.",
 		"\tEach type of detail is included in the dump if its",
 		"\tcorresponding letter occurs in the option argument",
cvs diff: Diffing compiler/notes
cvs diff: Diffing doc
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.135
diff -u -u -r1.135 user_guide.texi
--- user_guide.texi	1998/09/21 10:40:48	1.135
+++ user_guide.texi	1998/09/22 09:27:32
@@ -1821,7 +1821,7 @@
 
 @sp 1
 @item -D @var{fields}
- at itemx --verbose-dump-hlds @var{fields}
+ at itemx --dump-hlds-options @var{fields}
 With @samp{--dump-hlds}, include extra detail in the dump.
 Each type of detail is included in the dump
 if its corresponding letter occurs in the option argument.
@@ -1831,8 +1831,10 @@
 c - contexts of goals and types,
 d - determinism of goals,
 f - follow_vars sets of goals,
+g - goal feature lists,
 i - instmap deltas of goals,
 l - pred/mode ids and unify contexts of called predicates,
+m - mode information about clauses,
 n - nonlocal variables of goals,
 p - pre-birth, post-birth, pre-death and post-death sets of goals,
 r - resume points of goals,
@@ -1840,11 +1842,12 @@
 t - results of termination analysis,
 u - unification categories,
 v - variable numbers in variable names,
-T - type and typeclass information,
-M - mode and inst information,
 C - clause information,
-U - unify predicates,
-P - path information.
+I - imported predicates,
+M - mode and inst information,
+P - path information,
+T - type and typeclass information,
+U - unify predicates.
 The special argument value ``all''
 will cause the printing of all these fields.
 
cvs diff: Diffing extras
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/exceptions
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/Togl-1.2
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing library
cvs diff: Diffing lp_solve
cvs diff: Diffing lp_solve/lp_examples
cvs diff: Diffing profiler
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/general
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing trial
cvs diff: Diffing util



More information about the developers mailing list