[m-rev.] diff: remove --convert-to-goedel and --generate-prolog

Simon Taylor stayl at cs.mu.OZ.AU
Tue May 22 18:05:51 AEST 2001


Any objections?

Simon.


Estimated hours taken: 0.5

Remove the `--convert-to-goedel' option. It doesn't really work
and it's a hassle to maintain.

Remove the `--generate-prolog' and `--prolog-dialect' options.
They aren't implemented, and now that we have a proper debugger
they probably never will be.

compiler/mercury_to_goedel.m:
	Removed.

compiler/notes/compiler_design.html:
	Remove mercury_to_goedel.m.

compiler/globals.m:
compiler/handle_options.m:
	Remove code dealing with Prolog dialects.	

compiler/options.m:
doc/user_guide.texi:
	Remove the options.

compiler/prog_io.m:
	Delete a comment referring to Mercury-to-Goedel converters.

compiler/mercury_compile.m:
	Don't call convert_to_goedel.

NEWS:
	Document the removal of the `--convert-to-goedel' option.

WORK_IN_PROGRESS:
	Remove a reference to the `--generate-prolog' option.



Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.208
diff -u -u -r1.208 NEWS
--- NEWS	2001/05/16 04:51:04	1.208
+++ NEWS	2001/05/22 07:37:41
@@ -40,6 +40,9 @@
   This change will break some existing programs, but that is easily fixed
   by adding any necessary `:- import_module' or `:- use_module' declarations.
 
+* The `--convert-to-goedel' option has been removed.
+  It never really worked anyway.
+
 NEWS for Mercury release 0.10.1:
 --------------------------------
 
Index: WORK_IN_PROGRESS
===================================================================
RCS file: /home/mercury1/repository/mercury/WORK_IN_PROGRESS,v
retrieving revision 1.16
diff -u -u -r1.16 WORK_IN_PROGRESS
--- WORK_IN_PROGRESS	2001/01/17 01:47:19	1.16
+++ WORK_IN_PROGRESS	2001/05/22 07:56:40
@@ -74,15 +74,3 @@
 
 * Improvements to the debugger's pretty-printer.
 
-Work not in progress
---------------------
-
-The compiler also contains some code for the following features,
-but work on them has stopped, since finishing them off would be
-quite a bit more work, and our current priorities lie elsewhere.
-Still, these would make interesting and worthwhile projects
-if someone has the time for it.
-
-* There is a `--generate-prolog' option for a new back-end
-  that generates Prolog code.
-  Not very much progress has really been made on this.
Index: compiler/globals.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/globals.m,v
retrieving revision 1.42
diff -u -u -r1.42 globals.m
--- compiler/globals.m	2001/05/02 11:36:34	1.42
+++ compiler/globals.m	2001/05/22 07:07:08
@@ -41,11 +41,6 @@
 	;	low
 	;	high.
 
-:- type prolog_dialect
-	--->	default
-	;	nu
-	;	sicstus.
-
 :- type termination_norm
 	--->	simple
 	;	total
@@ -56,7 +51,6 @@
 :- pred convert_foreign_language(string::in, foreign_language::out) is semidet.
 :- pred convert_gc_method(string::in, gc_method::out) is semidet.
 :- pred convert_tags_method(string::in, tags_method::out) is semidet.
-:- pred convert_prolog_dialect(string::in, prolog_dialect::out) is semidet.
 :- pred convert_termination_norm(string::in, termination_norm::out) is semidet.
 
 	% A string representation of the foreign language suitable 
@@ -72,14 +66,13 @@
 	% Access predicates for the `globals' structure.
 
 :- pred globals__init(option_table::di, compilation_target::di, gc_method::di,
-	tags_method::di, prolog_dialect::di, termination_norm::di,
+	tags_method::di, termination_norm::di,
 	trace_level::di, trace_suppress_items::di, globals::uo) is det.
 
 :- pred globals__get_options(globals::in, option_table::out) is det.
 :- pred globals__get_target(globals::in, compilation_target::out) is det.
 :- pred globals__get_gc_method(globals::in, gc_method::out) is det.
 :- pred globals__get_tags_method(globals::in, tags_method::out) is det.
-:- pred globals__get_prolog_dialect(globals::in, prolog_dialect::out) is det.
 :- pred globals__get_termination_norm(globals::in, termination_norm::out) 
 	is det.
 :- pred globals__get_trace_level(globals::in, trace_level::out) is det.
@@ -125,7 +118,7 @@
 	% io__state using io__set_globals and io__get_globals.
 
 :- pred globals__io_init(option_table::di, compilation_target::in,
-	gc_method::in, tags_method::in, prolog_dialect::in,
+	gc_method::in, tags_method::in,
 	termination_norm::in, trace_level::in, trace_suppress_items::in,
 	io__state::di, io__state::uo) is det.
 
@@ -141,9 +134,6 @@
 :- pred globals__io_get_tags_method(tags_method::out,
 	io__state::di, io__state::uo) is det.
 
-:- pred globals__io_get_prolog_dialect(prolog_dialect::out,
-	io__state::di, io__state::uo) is det.
-
 :- pred globals__io_get_termination_norm(termination_norm::out,
 	io__state::di, io__state::uo) is det.
 
@@ -231,20 +221,6 @@
 convert_tags_method("low", low).
 convert_tags_method("high", high).
 
-convert_prolog_dialect("default", default).
-convert_prolog_dialect("nu", nu).
-convert_prolog_dialect("NU", nu).
-convert_prolog_dialect("nuprolog", nu).
-convert_prolog_dialect("NUprolog", nu).
-convert_prolog_dialect("nu-prolog", nu).
-convert_prolog_dialect("NU-Prolog", nu).
-convert_prolog_dialect("sicstus", sicstus).
-convert_prolog_dialect("Sicstus", sicstus).
-convert_prolog_dialect("SICStus", sicstus).
-convert_prolog_dialect("sicstus-prolog", sicstus).
-convert_prolog_dialect("Sicstus-Prolog", sicstus).
-convert_prolog_dialect("SICStus-Prolog", sicstus).
-
 convert_termination_norm("simple", simple).
 convert_termination_norm("total", total).
 convert_termination_norm("num-data-elems", num_data_elems).
@@ -258,22 +234,20 @@
 			target 			:: compilation_target,
 			gc_method 		:: gc_method,
 			tags_method 		:: tags_method,
-			prolog_dialect 		:: prolog_dialect,
 			termination_norm 	:: termination_norm,
 			trace_level 		:: trace_level,
 			trace_suppress_items	:: trace_suppress_items
 		).
 
 globals__init(Options, Target, GC_Method, TagsMethod,
-		PrologDialect, TerminationNorm, TraceLevel, TraceSuppress,
+		TerminationNorm, TraceLevel, TraceSuppress,
 	globals(Options, Target, GC_Method, TagsMethod,
-		PrologDialect, TerminationNorm, TraceLevel, TraceSuppress)).
+		TerminationNorm, TraceLevel, TraceSuppress)).
 
 globals__get_options(Globals, Globals ^ options).
 globals__get_target(Globals, Globals ^ target).
 globals__get_gc_method(Globals, Globals ^ gc_method).
 globals__get_tags_method(Globals, Globals ^ tags_method).
-globals__get_prolog_dialect(Globals, Globals ^ prolog_dialect).
 globals__get_termination_norm(Globals, Globals ^ termination_norm).
 globals__get_trace_level(Globals, Globals ^ trace_level).
 globals__get_trace_suppress(Globals, Globals ^ trace_suppress_items).
@@ -361,17 +335,15 @@
 %-----------------------------------------------------------------------------%
 
 globals__io_init(Options, Target, GC_Method, TagsMethod,
-		PrologDialect, TerminationNorm, TraceLevel, TraceSuppress) -->
+		TerminationNorm, TraceLevel, TraceSuppress) -->
 	{ copy(Target, Target1) },
 	{ copy(GC_Method, GC_Method1) },
 	{ copy(TagsMethod, TagsMethod1) },
-	{ copy(PrologDialect, PrologDialect1) },
 	{ copy(TerminationNorm, TerminationNorm1) },
 	{ copy(TraceLevel, TraceLevel1) },
 	{ copy(TraceSuppress, TraceSuppress1) },
 	{ globals__init(Options, Target1, GC_Method1, TagsMethod1,
-		PrologDialect1, TerminationNorm1, TraceLevel1, TraceSuppress1,
-		Globals) },
+		TerminationNorm1, TraceLevel1, TraceSuppress1, Globals) },
 	globals__io_set_globals(Globals).
 
 globals__io_get_target(Target) -->
@@ -385,10 +357,6 @@
 globals__io_get_tags_method(Tags_Method) -->
 	globals__io_get_globals(Globals),
 	{ globals__get_tags_method(Globals, Tags_Method) }.
-
-globals__io_get_prolog_dialect(PrologDIalect) -->
-	globals__io_get_globals(Globals),
-	{ globals__get_prolog_dialect(Globals, PrologDIalect) }.
 
 globals__io_get_termination_norm(TerminationNorm) -->
 	globals__io_get_globals(Globals),
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.109
diff -u -u -r1.109 handle_options.m
--- compiler/handle_options.m	2001/05/15 07:11:20	1.109
+++ compiler/handle_options.m	2001/05/22 07:07:51
@@ -77,8 +77,6 @@
 						MakeTransOptInt),
 		globals__io_lookup_bool_option(convert_to_mercury,
 			ConvertToMercury),
-		globals__io_lookup_bool_option(convert_to_goedel,
-			ConvertToGoedel),
 		globals__io_lookup_bool_option(typecheck_only, TypecheckOnly),
 		globals__io_lookup_bool_option(errorcheck_only, ErrorcheckOnly),
 		globals__io_lookup_bool_option(target_code_only,
@@ -91,7 +89,7 @@
 		{ bool__or_list([GenerateDependencies, MakeInterface,
 			MakePrivateInterface, MakeShortInterface,
 			MakeOptimizationInt, MakeTransOptInt,
-			ConvertToMercury, ConvertToGoedel, TypecheckOnly,
+			ConvertToMercury, TypecheckOnly,
 			ErrorcheckOnly, TargetCodeOnly,
 			GenerateIL, GenerateJava,
 			CompileOnly, AditiOnly],
@@ -133,14 +131,9 @@
         ->
             { map__lookup(OptionTable, tags, TagsMethod0) },
             (
-                { TagsMethod0 = string(TagsMethodStr) },
-                { convert_tags_method(TagsMethodStr, TagsMethod) }
+                    { TagsMethod0 = string(TagsMethodStr) },
+                    { convert_tags_method(TagsMethodStr, TagsMethod) }
             ->
-                { map__lookup(OptionTable, prolog_dialect, PrologDialect0) },
-                (
-                    { PrologDialect0 = string(PrologDialectStr) },
-                    { convert_prolog_dialect(PrologDialectStr, PrologDialect) }
-                ->
                     { map__lookup(OptionTable,
                         fact_table_hash_percent_full, PercentFull) },
                     (
@@ -178,7 +171,7 @@
                                     ->
                                         postprocess_options_2(OptionTable,
                                             Target, GC_Method, TagsMethod,
-                                            PrologDialect, TermNorm, TraceLevel,
+                                            TermNorm, TraceLevel,
                                             TraceSuppress, Error)
                                     ;
                                         { DumpAliasOption = string(DumpAlias) },
@@ -191,8 +184,8 @@
                                             NewOptionTable) },
                                         postprocess_options_2(NewOptionTable,
                                             Target, GC_Method, TagsMethod,
-                                            PrologDialect, TermNorm,
-                                            TraceLevel, TraceSuppress, Error)
+                                            TermNorm, TraceLevel,
+					    TraceSuppress, Error)
                                     ;
                                         { Error = yes("Invalid argument to option `--hlds-dump-alias'.") }
                                     )
@@ -208,11 +201,8 @@
                     ;
                         { Error = yes("Invalid argument to option `--fact-table-hash-percent-full'\n\t(must be an integer between 1 and 100)") }
                     )
-                ;
-                    { Error = yes("Invalid prolog-dialect option (must be `sicstus', `nu', or `default')") }
-                )
             ;
-                { Error = yes("Invalid tags option (must be `none', `low' or `high')") }
+                    { Error = yes("Invalid tags option (must be `none', `low' or `high')") }
             )
         ;
             { Error = yes("Invalid GC option (must be `none', `conservative' or `accurate')") }
@@ -223,15 +213,15 @@
     
 
 :- pred postprocess_options_2(option_table::in, compilation_target::in,
-    gc_method::in, tags_method::in, prolog_dialect::in, termination_norm::in,
+    gc_method::in, tags_method::in, termination_norm::in,
     trace_level::in, trace_suppress_items::in, maybe(string)::out,
     io__state::di, io__state::uo) is det.
 
 postprocess_options_2(OptionTable, Target, GC_Method, TagsMethod,
-		PrologDialect, TermNorm, TraceLevel, TraceSuppress, Error) -->
+		TermNorm, TraceLevel, TraceSuppress, Error) -->
 	{ unsafe_promise_unique(OptionTable, OptionTable1) }, % XXX
 	globals__io_init(OptionTable1, Target, GC_Method, TagsMethod,
-		PrologDialect, TermNorm, TraceLevel, TraceSuppress),
+		TermNorm, TraceLevel, TraceSuppress),
 
 	% --gc conservative implies --no-reclaim-heap-*
 	( { GC_Method = conservative } ->
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.202
diff -u -u -r1.202 mercury_compile.m
--- compiler/mercury_compile.m	2001/05/16 16:18:10	1.202
+++ compiler/mercury_compile.m	2001/05/22 06:47:13
@@ -69,7 +69,7 @@
 
 	% miscellaneous compiler modules
 :- import_module prog_data, hlds_module, hlds_pred, hlds_out, llds, rl.
-:- import_module mercury_to_mercury, mercury_to_goedel.
+:- import_module mercury_to_mercury.
 :- import_module dependency_graph, prog_util, rl_dump, rl_file.
 :- import_module options, globals, trace_params, passes_aux.
 
@@ -260,7 +260,7 @@
 	globals__get_target(Globals, asm),
 	% even if --target asm is specified,
 	% it can be overridden by other options:
-	OptionList = [convert_to_mercury, convert_to_goedel,
+	OptionList = [convert_to_mercury,
 		generate_dependencies, make_interface,
 		make_short_interface, make_private_interface,
 		make_optimization_interface,
@@ -476,7 +476,6 @@
 	globals__io_lookup_bool_option(make_private_interface,
 						MakePrivateInterface),
 	globals__io_lookup_bool_option(convert_to_mercury, ConvertToMercury),
-	globals__io_lookup_bool_option(convert_to_goedel, ConvertToGoedel),
 	( { Error = fatal } ->
 		{ ModulesToLink = [] }
 	; { Error = yes, HaltSyntax = yes } ->
@@ -497,9 +496,6 @@
 		module_name_to_file_name(ModuleName, ".ugly", yes,
 					OutputFileName),
 		convert_to_mercury(ModuleName, OutputFileName, Items),
-		{ ModulesToLink = [] }
-	; { ConvertToGoedel = yes } ->
-		convert_to_goedel(ModuleName, Items),
 		{ ModulesToLink = [] }
 	;
 		split_into_submodules(ModuleName, Items, SubModuleList),
Index: compiler/options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.321
diff -u -u -r1.321 options.m
--- compiler/options.m	2001/05/15 07:11:22	1.321
+++ compiler/options.m	2001/05/22 06:45:56
@@ -86,7 +86,6 @@
 		;	generate_dependencies
 		;	generate_module_order
 		;	convert_to_mercury
-		;	convert_to_goedel
 		;	typecheck_only
 		;	errorcheck_only
 		;	target_code_only
@@ -103,11 +102,6 @@
 		;	suppress_trace
 		;	stack_trace_higher_order
 		;	generate_bytecode
-		;	generate_prolog		% Currently not used
-				% XXX generate_prolog should probably be
-				% in the "Output options" section rather than
-				% in the "Auxiliary output options" section
-		;	prolog_dialect		% Currently not used
 		;	line_numbers
 		;	auto_comments
 		;	show_dependency_graph
@@ -500,7 +494,6 @@
 	make_optimization_interface -	bool(no),
 	make_transitive_opt_interface -	bool(no),
 	convert_to_mercury 	-	bool(no),
-	convert_to_goedel 	-	bool(no),
 	typecheck_only		-	bool(no),
 	errorcheck_only		-	bool(no),
 	target_code_only	-	bool(no),
@@ -519,8 +512,6 @@
 	delay_death		-	bool(yes),
 	stack_trace_higher_order -	bool(no),
 	generate_bytecode	-	bool(no),
-	generate_prolog		-	bool(no),
-	prolog_dialect		-	string("default"),
 	line_numbers		-	bool(yes),
 	auto_comments		-	bool(no),
 	show_dependency_graph	-	bool(no),
@@ -824,7 +815,6 @@
 short_option('D', 			dump_hlds_alias).
 short_option('e', 			errorcheck_only).
 short_option('E', 			verbose_errors).
-short_option('G', 			convert_to_goedel).
 short_option('h', 			help).
 short_option('H', 			highlevel_code).
 short_option('i', 			make_interface).
@@ -909,8 +899,6 @@
 long_option("convert-to-mercury", 	convert_to_mercury).
 long_option("convert-to-Mercury", 	convert_to_mercury). 
 long_option("pretty-print", 		convert_to_mercury).
-long_option("convert-to-goedel", 	convert_to_goedel).
-long_option("convert-to-Goedel", 	convert_to_goedel).
 long_option("typecheck-only",		typecheck_only).
 long_option("errorcheck-only",		errorcheck_only).
 long_option("target-code-only",		target_code_only).
@@ -929,10 +917,6 @@
 long_option("delay-death",		delay_death).
 long_option("stack-trace-higher-order",	stack_trace_higher_order).
 long_option("generate-bytecode",	generate_bytecode).
-long_option("generate-prolog",		generate_prolog).
-long_option("generate-Prolog",		generate_prolog).
-long_option("prolog-dialect",		prolog_dialect).
-long_option("Prolog-dialect",		prolog_dialect).
 long_option("line-numbers",		line_numbers).
 long_option("auto-comments",		auto_comments).
 long_option("show-dependency-graph",	show_dependency_graph).
@@ -1713,10 +1697,6 @@
 		"\tOutput transitive optimization information",
 		"\tinto the `<module>.trans_opt' file.",
 		"\tThis option should only be used by mmake.",
-		"-G, --convert-to-goedel",
-		"\tConvert to Goedel. Output to file `<module>.loc'.",
-		"\tNote that some Mercury language constructs cannot",
-		"\t(easily) be translated into Goedel.",
 		"-P, --convert-to-mercury",
 		"\tConvert to Mercury. Output to file `<module>.ugly'",
 		"\tThis option acts as a Mercury ugly-printer.",
@@ -1784,17 +1764,9 @@
 		"--generate-bytecode",
 		"\tOutput a bytecode form of the module for use",
 		"\tby an experimental debugger.",
-% --generate-prolog is not documented because it is not yet implemented
-%		"--generate-prolog",
-%		"\tConvert the program to Prolog. Output to file `<module>.pl'",
-%		"\tor `<module>.nl' (depending on the dialect).",
-% --prolog-dialect is not documented because it is not yet used
-%		"--prolog-dialect {sicstus,nu}",
-%		"\tTarget the named dialect if generating Prolog code.",
 		"-n-, --no-line-numbers",
 		"\tDo not put source line numbers in the generated code.",
 		"\tThe generated code may be in C (the usual case),",
-		"\tin Goedel (with the option --convert-to-goedel)",
 		"\tor in Mercury (with the option --convert-to-mercury).",
 		"--auto-comments",
 		"\tOutput comments in the `<module>.c' file.",
Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.194
diff -u -u -r1.194 prog_io.m
--- compiler/prog_io.m	2000/11/01 05:12:11	1.194
+++ compiler/prog_io.m	2001/05/22 07:44:18
@@ -14,7 +14,7 @@
 % The basic reason for this is that it was designed to preserve
 % as much information about the source code as possible, so that
 % this representation could also be used for other tools such
-% as Mercury-to-Goedel converters, pretty-printers, etc.
+% as pretty-printers.
 % Currently the only information that is lost is that comments and
 % whitespace are stripped, any redundant parenthesization
 % are lost, distinctions between different spellings of the same
Index: compiler/notes/compiler_design.html
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/notes/compiler_design.html,v
retrieving revision 1.61
diff -u -u -r1.61 compiler_design.html
--- compiler/notes/compiler_design.html	2001/05/16 04:50:55	1.61
+++ compiler/notes/compiler_design.html	2001/05/22 08:03:18
@@ -24,7 +24,7 @@
 <p>
 
 The main job of the compiler is to translate Mercury into C, although it
-can also translate (subsets of) Mercury to some other languages: Goedel,
+can also translate (subsets of) Mercury to some other languages:
 Mercury bytecode (for a planned bytecode interpreter), MSIL (for the
 Microsoft .NET platform) and RL (the Aditi Relational Language).
 
@@ -1125,13 +1125,6 @@
 		from last call optimization modulo constructor application.
 		It does not apply the optimization and will not until the
 		mode system is capable of expressing definite aliasing.
-
-	<dt> mercury_to_goedel.m:
-		<dd>
-		This converts from item_list to Goedel source code.
-		It works for simple programs, but doesn't handle
-		various Mercury constructs such as lambda expressions,
-		higher-order predicates, and functor overloading.
 
 	</dl>
 
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.250
diff -u -u -r1.250 user_guide.texi
--- doc/user_guide.texi	2001/05/15 07:12:01	1.250
+++ doc/user_guide.texi	2001/05/22 08:01:37
@@ -3121,13 +3121,6 @@
 from the corresponding @samp{.m} file.
 
 @sp 1
- at item -G
- at itemx --convert-to-goedel
-Convert the Mercury code to Goedel.  Output to file @file{@var{module}.loc}.
-The translation is not perfect; some Mercury constructs cannot be easily
-translated into Goedel.
-
- at sp 1
 @item -P
 @itemx --pretty-print
 @itemx --convert-to-mercury
@@ -3219,14 +3212,6 @@
 Output a bytecode form of the module for use
 by an experimental debugger.
 
- at c @item --generate-prolog
- at c Convert the program to Prolog.  Output to file @file{@var{module}.pl}
- at c or @file{@var{module}.nl} (depending the the dialect).
- at c
- at c @item --prolog-dialect @var{dialect}
- at c Target the named dialect if generating Prolog code.
- at c The @var{dialect} should be one of @samp{sicstus}, @samp{nu}.
-
 @item --auto-comments
 Output comments in the @file{@var{module}.c} file.
 This is primarily useful for trying to understand
@@ -3238,8 +3223,7 @@
 @sp 1
 @item -n-, --no-line-numbers
 Do not put source line numbers in the generated code.
-The generated code may be in C (the usual case),
-in Goedel (with @samp{--convert-to-goedel})
+The generated code may be in C (the usual case)
 or in Mercury (with @samp{--convert-to-mercury}).
 
 @sp 1
--------------------------------------------------------------------------
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