Commit Graph

77 Commits

Author SHA1 Message Date
Fergus Henderson
5e41fcdd66 Fix a small error in the invocation of autoconf in my previous change:
Estimated hours taken: 0.05

bindist/Mmakefile:
	Fix a small error in the invocation of autoconf in my previous change:
	a space is needed between the `-l' option and the directory name.
1999-03-31 08:07:24 +00:00
Fergus Henderson
1757f89df3 Add GNU readline support to the debugger.
Estimated hours taken: 16

Add GNU readline support to the debugger.

Because GNU readline is licensed under the GPL, not the LGPL,
I was careful to ensure that (1) the readline library is
only linked into your application if it is compiled with
debugging enabled and (2) even in the latter case, the readline
support is disable-able (if you use the source distribution).

Mmakefile:
bindist/Mmakefile:
	Add dependency of configure on new file aclocal.m4.

aclocal.m4:
	Define a macro MERCURY_CHECK_READLINE to check for the readline
	headers, the readline library, and for libraries needed by readline,
	in particular -l{termcap,curses,ncurses}.
	If they're not found, define MR_NO_USE_READLINE.
	Otherwise, define various variables for using & installing readline.

bindist/bindist.configure.in:
configure.in:
	Add call to MERCURY_CHECK_READLINE to check for readline.

scripts/ml.in:
	If tracing is enabled, then (by default) link in readline,
	and hence also termcap/curses/ncurses.
	Add a new option `--no-readline' to disable this.

trace/mercury_trace_internal.c:
	Delete the FILE * parameter from the MR_getline() function,
	because there are actually two files involved (MR_mdb_in and
	MR_mdb_out), and they are always the same for all calls to this
	function.
	Also change this function so that it calls MR_trace_readline() rather
	than printing the prompt and then calling MR_trace_getline_raw().
	Delete the MR_trace_getline_raw() function -- this has been renamed
	as MR_trace_readline_raw() and moved to mercury_trace_readline.c.

trace/mercury_trace_readline.h:
trace/mercury_trace_readline.c:
	New module containing a new function MR_trace_readline() that prints
	a prompt and reads a line in by calling the readline library.
	I put all this new code inside `#ifndef MR_NO_USE_READLINE' so that
	the use of readline can be disabled.  If that symbol is defined,
	it reverts to the old implementation using MR_trace_readline_raw()
	(formerly called MR_trace_getline_raw()).

runtime/mercury_conf.h.in:
	Define the new configuration parameter `MR_NO_USE_READLINE'.

trace/Mmakefile:
	Add the new files mercury_trace_readline.[ch].
	Ensure that this new module is compiled with warnings disabled,
	to avoid spurious warnings resulting from the readline header files.
	Also simplify the code by deleting unnecessary uses of $(EXTRA_*) --
	that's handled by scripts/Mmake.vars now.

NEWS:
	Mention the readline support.

.INSTALL.in:
	Mention that it is helpful to have GNU Readline installed.

bindist/bindist.INSTALL:
	Mention that you may need to have GNU Readline installed.
1999-03-30 05:45:53 +00:00
Fergus Henderson
4acc88239f Remove support for NU-Prolog and SICStus Prolog.
Estimated hours taken: 0.25

Remove support for NU-Prolog and SICStus Prolog.

bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Delete the rules for building NU-Prolog and SICStus Prolog stuff.
1999-03-16 06:11:36 +00:00
Fergus Henderson
14728289fa Remove support for NU-Prolog and SICStus Prolog.
Estimated hours taken: 5

Remove support for NU-Prolog and SICStus Prolog.

The reasons for this are:
(a) We now have a proper working debugger, so we don't need to use
    NU-Prolog or SICStus Prolog for debugging.
(b) The Prolog support was only ever a hack, not a proper solution;
    Mercury language features like functions or mode reordering
    were never supported.
(c) It was a maintenance problem.

compiler/make_hlds.m:
	Warn that NU-Prolog `when' declarations are deprecated.

compiler/prog_io.m:
	Update a comment to say that NU-Prolog `when' declarations
	are now deprecated.

library/*.m:
	Delete `when' declarations.

configure.in:
bindist/bindist.configure.in:
	Delete the autoconf tests for NU-Prolog and SICStus Prolog.
	Delete the stuff for generating the NU-Prolog and SICStus Prolog
	scripts.

tools/bootcheck:
	Delete the options for testing using SICStus Prolog.

library/Mmakefile:
	Delete the rules for building NU-Prolog and SICStus Prolog stuff.

library/library.nu.nl.in:
	library/swi_*.m:
	library/*.nu.nl:
library/array.nu.nl:
library/assoc_list.nu.nl:
library/char.nu.nl:
library/float.nu.nl:
library/int.nu.nl:
library/io.nu.nl:
library/library.nu.nl.in:
library/map.nu.nl:
library/mercury_builtin.nu.nl:
library/nc_builtin.nl:
library/require.nu.nl:
library/sp_builtin.nl:
library/sp_lib.nl:
library/std_util.nu.nl:
library/store.nu.nl:
library/string.nu.nl:
library/swi_builtin.m:
library/swi_lib.m:
library/term_io.nu.nl:
	Delete these files.

scripts/mnc.in:
scripts/mnp.in:
scripts/mnl.in:
scripts/msc.in:
scripts/msl.in:
scripts/msp.in:
	Delete these files.

doc/user_guide.texi:
	Delete the documentation about the Prolog support.

NEWS:
w3/news/newsdb.inc:
        Mention that we've removed the Prolog support.
1999-03-15 08:48:36 +00:00
Fergus Henderson
c2b1d0b667 Update to reflect recent changes in Cygwin
Estimated hours taken: 0.5

README.MS-Windows:
bindist/bindist.README.MS-Windows:
	Update to reflect recent changes in Cygwin
	(name change "gnu-win32" => "Cygwin",
	new URL for the Cygwin WWW site, etc.).
	A few other minor improvements.
1999-03-13 01:03:11 +00:00
Erwan Jahier
033ba2bb2e Enable by default the use of the external debugger on architectures that
Estimated hours taken: 9

Enable by default the use of the external debugger on architectures that
support sockets.

configure.in:
bindist/bindist.configure.in:
	Define MR_USE_EXTERNAL_DEBUGGER for systems that support sockets.

	Pass down a variable SOCKET_LIBRARY that contains the name of the
	socket library (may varies from one system to another).

scripts/ml.in:
	Add the name of the socket library to the libraries passed in
	argument of ml.

runtime/mercury_conf.h.in:
	Add "#undef  MR_USE_EXTERNAL_DEBUGGER".

runtime/mercury_conf_param.h:
	Remove a useless comment.

trace/mercury_trace_external.c:
	Update a comment.
1999-03-11 19:18:09 +00:00
Warwick Harvey
b77c6e9831 Added a missing close quotes (").
Estimated hours taken: 0.1

bindist/bindist.Makefile.in:
	Added a missing close quotes (").
1999-03-09 01:50:33 +00:00
Simon Taylor
f158ec7471 Add a missing `\' from Fergus' last change.
Estimated hours taken: 0.1

bindist/Mmakefile:
	Add a missing `\' from Fergus' last change.

Index: Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/bindist/Mmakefile,v
retrieving revision 1.16
diff -u -r1.16 Mmakefile
--- Mmakefile	1998/12/21 11:33:54	1.16
+++ Mmakefile	1998/12/23 23:50:26
@@ -27,7 +27,7 @@
 		  ../VERSION

 SCRIPT_FILES	= ../scripts/*.in ../scripts/*.sh-subr \
-		  ../scripts/Mmake.rules
+		  ../scripts/Mmake.rules \
 		  ../scripts/gud.el
1998-12-23 23:53:23 +00:00
Tyson Dowd
c851b75aeb Move the patch for making the GNU assembler into the configuration script.
Estimated hours taken: 1

Move the patch for making the GNU assembler into the configuration script.

README.Linux-Alpha:
configure.in:
bindist/bindist.configure.in:
scripts/mgnuc.in:
	Autodetect whether "as" does full pre-processing or not.
	Set AS accordingly in mgnuc.
1998-12-22 07:54:12 +00:00
Fergus Henderson
c5a69daae3 Add support for debugging Mercury code using mdb to "Gud",
Estimated hours taken: 16

Add support for debugging Mercury code using mdb to "Gud",
the Emacs "Grand Unified Debugger".  This lets you run mdb
under emacs, using the tags file provided by `mtags --emacs'
for source code linking.

scripts/gud.el:
	Add support for Mercury.

Mmake.common.in:
scripts/Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Modify the installation scripts to install gud.el in
	.../lib/mercury/elisp.

.INSTALL.in:
bindist/bindist.INSTALL:
	Document what you need to add to your ~/.emacs file to
	use the Emacs mdb interface.
1998-12-21 11:34:00 +00:00
Fergus Henderson
7f2d503ba9 Update the README files for the binary distributions to reflect recent changes.
Estimated hours taken: 0.5

Update the README files for the binary distributions to reflect recent changes.
(A little late, oh well.)

bindist/README.MS-Windows:
	Mention info_to_gdb.
	Delete mention of an old cygwin bug since fixed.

bindist/bindist.README:
	Update the stuff about copyright messages.
	Add trailing slashes to the URLs.

bindist/bindist.README.MS-Windows:
	Use the new name "Cygwin" instead of "Cygwin32" or "gnu-win32".
	Update the Cygwin URL and installation instructions.
	Update the instructions for running configure --
	it now autodetects this configuration, so there's no
	need to specify it explicitly.
1998-12-16 19:23:41 +00:00
Fergus Henderson
a98f04cefb Fix a couple more things that I forgot to add to the binary
Estimated hours taken: 0.5

Fix a couple more things that I forgot to add to the binary
distribution.

bindist/bindist.Makefile.in:
	Install the `mprof_merge_runs' script.

bindist/bindist.configure.in:
	Substitute the value of the DEFAULT_RM_C variable.
1998-12-08 12:38:35 +00:00
Fergus Henderson
c236043092 Fix some more bugs in the binary distribution.
Estimated hours taken: 0.75

Fix some more bugs in the binary distribution.

bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Fix bugs in the handling of the mdbrc and mdb_doc files.
1998-12-07 02:37:37 +00:00
Simon Taylor
18430aaef1 Aditi compilation.
Estimated hours taken: 1200

Aditi compilation.

compiler/options.m:
	The documentation for these is commented out because the Aditi
	system is not currently useful to the general public.
	--aditi: enable Aditi compilation.
	--dump-rl: write the intermediate RL to `<module>.rl_dump'.
	--dump-rl-bytecode: write a text version of the bytecodes
		to `<module>.rla'
	--aditi-only: don't produce a `.c' file.
	--filenames-from-stdin: accept a list of filenames to compile
		from stdin. This is used by the query shell.
	--optimize-rl, --optimize-rl-cse, --optimize-rl-invariants,
	--optimize-rl-index, --detect-rl-streams:
		Options to control RL optimization passes.
	--aditi-user:
		Default owner of any Aditi procedures,
		defaults to $USER or "guest".
	--generate-schemas:
		write schemas for base relations to `<module>'.base_schema
		and schemas for derived relations to `<module>'.derived_schema.
		This is used by the query shell.

compiler/handle_options.m:
	Handle the default for --aditi-user.

compiler/hlds_pred.m:
compiler/prog_data.m:
compiler/prog_io_pragma.m:
compiler/make_hlds.m:
	Add some Aditi pragma declarations - `aditi', `supp_magic', `context',
	`naive', `psn' (predicate semi-naive), `aditi_memo', `aditi_no_memo',
	`base_relation', `owner' and `index'.
	Separate out code to parse a predicate name and arity.

compiler/hlds_pred.m:
	Add predicates to identify Aditi procedures.
	Added markers `generate_inline' and `aditi_interface', which
	are used internally for Aditi code generation.
	Add an `owner' field to pred_infos, which is used for database
	security checks.
	Add a field to pred_infos to hold the list of indexes for a base
	relation.

compiler/make_hlds.m:
	Some pragmas must be exported if the corresponding predicates
	are exported, check this.
	Make sure stratification of Aditi procedures is checked.
	Predicates with a mode declaration but no type declaration
	are no longer assumed to be local.
	Set the `do_aditi_compilation' field of the module_info if there
	are any local Aditi procedures or base relations.
	Check that `--aditi' is set if Aditi compilation is required.

compiler/post_typecheck.m:
	Check that every Aditi predicate has an `aditi__state' argument,
	which is used to ensure sequencing of updates and that Aditi
	procedures are only called within transactions.

compiler/dnf.m:
	Changed the definition of disjunctive normal form slightly
	so that a call followed by some atomic goals not including
	any database calls is considered atomic. magic.m can handle
	this kind of goal, and it results in more efficient RL code.

compiler/hlds_module.m:
compiler/dependency_graph.m:
	Added dependency_graph__get_scc_entry_points which finds
	the procedures in an SCC which could be called from outside.
	Added a new field to the dependency_info, the
	aditi_dependency_ordering. This contains all Aditi SCCs of
	the original program, with multiple SCCs merged where
	possible to improve the effectiveness of differential evaluation
	and the low level RL optimizations.

compiler/hlds_module.m:
	Add a field to record whether there are any local Aditi procedures
	in the current module.
	Added versions of module_info_pred_proc_info and
	module_info_set_pred_proc_info which take a pred_proc_id,
	not a separate pred_id and proc_id.

compiler/polymorphism.m:
compiler/lambda.m:
	Make sure that predicates created for closures in Aditi procedures
	have the correct markers.

compiler/goal_util.m:
	Added goal_util__switch_to_disjunction,
	goal_util__case_to_disjunct (factored out from simplify.m)
	and goal_util__if_then_else_to_disjunction. These are
	require because supplementary magic sets can't handle
	if-then-elses or switches.

compiler/type_util.m:
	Added type_is_aditi_state/1.

compiler/mode_util.m:
	Added partition_args/5 which partitions a list of arguments
	into inputs and others.

compiler/inlining.m:
	Don't inline memoed procedures.
	Don't inline Aditi procedures into non-Aditi procedures.

compiler/intermod.m:
	Handle Aditi markers.
	Clean up handling of markers which should not appear in `.opt' files.

compiler/simplify.m:
	Export a slightly different interface for use by magic.m.
	Remove explicit quantifications where possible.
	Merge multiple nested quantifications.
	Don't report infinite recursion warnings for Aditi procedures.

compiler/prog_out.m:
	Generalised the code to output a module list to write any list.

compiler/code_gen.m:
compiler/arg_info.m:
	Don't process Aditi procedures.

compiler/mercury_compile.m:
	Call magic.m and rl_gen.m.
	Don't perform the low-level annotation passes on Aditi procedures.
	Remove calls to constraint.m - sometime soon a rewritten version
	will be called directly from deforestation.

compiler/passes_aux.m:
	Add predicates to process only non-Aditi procedures.

compiler/llds.m:
compiler/llds_out.m:
	Added new `code_addr' enum members, do_{det,semidet,nondet}_aditi_call,
	which are defined in extras/aditi/aditi.m.

compiler/call_gen.m:
	Handle generation of do_*_aditi_call.

compiler/llds_out.m:
	Write the RL code for the module as a constant char array
	in the `.c' file.

compiler/term_errors.m:
compiler/error_util.m:
	Move code to describe predicates into error_util.m
	Allow the caller to explicitly add line breaks.
	Added error_util:list_to_pieces to format a list of
	strings.
	Reordered some arguments for currying.

compiler/hlds_out.m:
	Don't try to print clauses if there are none.

runtime/mercury_init.h:
util/mkinit.c:
scripts/c2init.in:
	Added a function `mercury__load_aditi_rl_code()' to the generated
	`<module>_init.c' file which throws all the RL code for the program
	at the database. This should be called at connection time by
	`aditi__connect'.
	Added an option `--aditi' which controls the output
	`mercury__load_aditi_rl_code()'.

compiler/notes/compiler_design.html:
	Document the new files.

Mmakefile:
bindist/Mmakefile:
	Don't distribute extras/aditi yet.

New files:

compiler/magic.m:
compiler/magic_util.m:
	Supplementary magic sets transformation. Report errors
	for constructs that Aditi can't handle.

compiler/context.m:
	Supplementary context transformation.

compiler/rl_gen.m:
compiler/rl_relops.m:
	Aditi code generation.

compiler/rl_info.m:
	Code generator state.

compiler/rl.m:
	Intermediate RL representation.

compiler/rl_util:
	Predicates to collect information about RL instructions.

compiler/rl_dump.m:
	Print out the representation in rl.m.

compiler/rl_opt.m:
	Control low-level RL optimizations.

compiler/rl_block.m:
	Break a procedure into basic blocks.

compiler/rl_analyse.m:
	Generic dataflow analysis for RL procedures.

compiler/rl_liveness.m:
	Make sure all relations are initialised before used, clear
	references to relations that are no longer required.

compiler/rl_loop.m:
	Loop invariant removal.

compiler/rl_block_opt.m:
	CSE and instruction merging on basic blocks.

compiler/rl_key.m:
	Detect upper/lower bounds for which a goal could succeed.

compiler/rl_sort.m:
	Use indexing for joins and projections.
	Optimize away unnecessary sorting and indexing.

compiler/rl_stream.m:
	Detect relations which don't need to be materialised.

compiler/rl_code.m:
	RL bytecode definitions. Automatically generated from the Aditi
	header files.

compiler/rl_out.m:
compiler/rl_file.m:
	Output the RL bytecodes in binary to <module>.rlo (for use by Aditi)
	and in text to <module>.rla (for use by the RL interpreter).
	Also output the schema information if --generate-schemas is set.

compiler/rl_exprn.m:
	Generate bytecodes for join conditions.

extras/aditi/Mmakefile:
extras/aditi/aditi.m:
	Definitions of some Aditi library predicates and the
	interfacing and transaction processing code.
1998-12-06 23:49:14 +00:00
Fergus Henderson
ec6315ba2f Fix yet another bug in the binary distribution.
Estimated hours taken: 0.25

Fix yet another bug in the binary distribution.

bindist/bindist.Makefile.in:
	Fix a bug in my previous change to this file -- it
	was doing the wrong thing when installing on machines
	missing either SICStus or NU-Prolog.
1998-12-02 18:11:13 +00:00
Fergus Henderson
b2e395c374 Fix yet another bug in the binary distribution.
Estimated hours taken: 0.25

Fix yet another bug in the binary distribution.

bindist/bindist.configure.in:
	Make sure we create scripts/mdb and scripts/mdbrc from their
	`.in' files.
1998-11-29 06:14:33 +00:00
Fergus Henderson
255c035812 Fix another bug in the binary distribution.
Estimated hours taken: 0.25

Fix another bug in the binary distribution.

bindist/bindist.configure.in:
	Add a definition for the MERCURY_MSG macro
	(copied from ../configure.in).
1998-11-29 06:05:02 +00:00
Fergus Henderson
62a00afbe7 Fix another couple of bugs in the binary distribution.
Estimated hours taken: 0.5

Fix another couple of bugs in the binary distribution.

bindist/bindist.Makefile.in:
	- Make sure to install the `mdb' and `mmake' lib subdirectories.
	- Ensure that installation doesn't fail in the case where
	  the binary distribution was built without SICStus or NU-Prolog
	  but is installed on a machine which does have either of those
	  installed.
1998-11-29 03:45:58 +00:00
Fergus Henderson
4d1d02e086 Fix another bug in the binary distribution.
Estimated hours taken: 0.5

Fix another bug in the binary distribution.

bindist/bindist.build_vars.in:
	Pass on the setting of DEFAULT_RM_C.
1998-11-26 18:31:23 +00:00
Fergus Henderson
4592dc733b Fix some bugs in the binary distribution.
Estimated hours taken: 0.5

Fix some bugs in the binary distribution.

bindist/bindist.configure.in:
	Copy some code that was added to ../configure.in:
	- Check for `mktemp'
	- Substitute DEFAULT_MERCURY_DEBUGGER_INIT_DIR.

bindist/Mmakefile:
	Include `mprof_merge_runs' in the list of utility programs.
	Don't include `mdb' in the list of script files, since that list
	already includes `mdb.in', which is the file we want.

bindist/bindist.Makefile.in:
	Add `mdbrc' to the list of script files to install.
1998-11-24 00:26:13 +00:00
Fergus Henderson
8c135d8553 Fix a bug reported by James Cussens <jc@cs.york.ac.uk>.
Estimated hours taken: 0.25

Fix a bug reported by James Cussens <jc@cs.york.ac.uk>.

bindist/bindist.configure.in:
	Substitute @FINAL_GRADE_OPTIONS@, as ../configure.in does.
1998-11-20 18:27:31 +00:00
Fergus Henderson
4b0db18cf1 Change it to work properly if the `tests' directory
Estimated hours taken: 0.25

bindist/Mmakefile:
	Change it to work properly if the `tests' directory
	is at the same level as the `mercury' directory
	rather than being a subdirectory.
	Also change an incorrect variable name in a comment to fix
	an Mmake warning about using an undefined variable.
1998-11-08 22:41:55 +00:00
Thomas Conway
2b4f16bb9b Remove mint since it isn't very useful anymore, is buggy, and
Estimated hours taken: 0.2

Remove mint since it isn't very useful anymore, is buggy, and
has been surplanted by the library reference manual.

scripts/mint.in:
	removed.

mercury/configure.in:
bindist/bindist.Mmakefile.in:
bindist/bindist.configure.in:
scripts/Mmakefile:
	remove references to `mint' and `mint.in'.
1998-10-06 05:36:15 +00:00
Zoltan Somogyi
e07b0917b3 This change makes the tracer a lot more useful.
Estimated hours taken: 90

This change makes the tracer a lot more useful. The major points are:

- you can now print the values of live variables at all trace ports,
  not just at entry and exit ports;

- you can now print the values of polymorphic variables;

- you can now set spy points;

- you can now say "give me back control when execution starts going
  forward again";

- the implementation no longer saves and restores a thousand pseudo-registers
  unnecessarily;

- the implementation no longer insists that stack layouts must be present
  either for all labels or for none;

- you can now execute programs compiled with tracing without user intervention
  if that is what you want.

The last change makes bootstrapping with --generate-trace possible in theory,
although this has not yet been done successfully.

The three major things remaining to be done to make the tracer an adequate
replacement for Prolog debugging are

- a real term browser;

- a redo capability

- being able to trace different modules at different levels
  (full/interface/none).

Two less important things to do are making the representation of typeinfos
themselves type correct :-( and not including partially clobbered variables
in trace events (we already filter out fully clobbered variables, which are
the vast majority of all at-least-partially clobbered variables).

compiler/trace.m:
	We now record information about what (non-fully-clobbered) variables
	are live where in a label that we associate with each event,
	a label we allocate for this purpose. Since the stack layouts can
	only describe registers and stack slots, generating a trace event
	may now require materializing some variables and moving some others
	from fields to registers or stack slots.

	We now recognize three kinds of events: external, normal internal
	and nondet pragma C code internal. We have different predicates
	for generating each kind of event, since the three kinds of callers
	are different and have different information available.

compiler/arg_info.m:
compiler/code_info.m:
	Move some code that always belonged in arg_info.m to arg_info.m
	from code_info.m.

compiler/code_exprn.m:
	Add a predicate to find out which registers are in use, so the tracer
	can avoid saving and restoring registers that are not use.

compiler/code_gen.m:
	Reorganize the handling of epilogs. Whereas epilogs used to generate
	the failure handling code, this is now done in generate_category_code,
	because failure handling is now complicated by having to save the
	input args for the fail event, and the setup for this naturally
	belongs in generate_category_code.

	Rename generate_{prolog,epilog} as generate_{entry,exit}, since
	this makes clear that the latter now only handles success
	continuations, not failure continuations.

	Spell prologue and epilogue correctly elsewhere.

	Also move the responsibility for the call event to
	generate_category_code.

	Move Tyson's recent additions for tracing to trace.m in a generalized
	form, since they are now needed for all events, not just call and exit.

	Remove obsolete code for eager code generation.

compiler/code_info.m:
	Add a predicate to call the new predicate in code_exprn.

	Export a predicate for trace.m.

	Considerably simplify the treatment of continuation_infos,
	with code_info structures now storing only the stuff that can change
	during code generation (due to trace events).

compiler/code_util.m:
compiler/opt_util.m:
compiler/vn_filter.m:
compiler/trace.m:
	Move some code to code_util.m from opt_util.m and generalize it a bit,
	since the new predicate in code_exprn.m now needs the functionality.
	Make trace.m and vn_filter.m refer to the moved predicates by their
	new name.

compiler/continuation_info.m:
	Major reorganization and simplification of the data structures.
	The data that changes during code generation is now stored in the
	code generator state; data that is only available after code generation
	is combined with the info from the code generator state and put into
	the HLDS; data that is available only after optimization is put
	directly into the HLDS.

	Do not add continuation_info records for labels that are not used
	either by tracing or by agc. For labels that are used by either,
	always include stack layout information if any variables are live.

	(The removal of an unnecessary layer of maybe's wasn't ready
	for this time around; Tom will remove this layer soon.)

compiler/continuation_info.m:
compiler/stack_layout.m:
	Do not associate the stack layout information at procedure entry and
	exit with the per-procedure data structure. Since we now associate this
	info with the labels of those events instead, they do not need special
	handling. However, do include a pointer to the layout structure of
	the label associated with the call event in the per-procedure data,
	so that we can later implement redo in the debugger.

compiler/stack_layout.m:
	Handle the possibility that the set of type variables that are needed
	at a point is not numbered 1-N without any missing type var numbers.
	This can happen if all variables whose types include a low-numbered
	type variable die before some of those whose types include a higher-
	numbered type variable.

compiler/*_switch*.m:
compiler/ite_gen.m:
compiler/disj_gen.m:
	When creating trace events, associate not just a goal path but
	also a pre-death set with events that represent entry to a computation
	branch. Trace.m now needs the pre-death set so that it can avoid
	trying to flush variables that are not supposed to be live in the
	computation branch being traced.

	Since putting variable values in positions that can be described
	by stack layouts (which includes only registers and stack slots,
	not fields etc) may require generating code, make sure that this
	code is generated when code_info has the appropriate contents
	(i.e. just before the generating the code the entrance to which
	the event refers to).

compiler/pragma_c_gen.m:
	Add two new event types to signify entry to the C code fragments
	executed on first call and on later reentries.

compiler/handle_options.m:
	Handle some more implications of tracing, and document them better.
	One of these changes (follow_vars) ought to allow munta to pass
	the debugger test cases.

compiler/llds_out.m:
	When generating init_{entry,label,local} operations, append a suffix
	_sl to the macro name if the label whose info is being registered
	has a stack layout record. This will cause the stack layout to be
	registered also. For other labels, the macro without the _sl will
	register NULL instead.

compiler/live_vars.m:
compiler/liveness.m:
compiler/store_alloc.m:
	If tracing is on, try to preserve the input arguments throughout
	the execution of the procedure. This is not possible if any part
	of an input argument is clobbered, but in the absence of a utility
	predicate that can test for this, we ignore the issue for now.

compiler/mercury_compile.m:
	Do not invoke continuation_info__process_instructions to add
	stack layout information about call return sites unless we are doing
	agc. (Tracing does not require this info, and it is big.)

	Pass info on which labels have stack layout records to llds_out.m.

	Fix some misleading progress messages.

compiler/{lambda,polymorphism,goal_util}.m:
	Enforce the invariant that if the signature of a procedure created
	for a lambda goal includes a type variable, it also includes the
	typeinfo for that type variable.

	(This change is from Simon.)

library/{benchmarking,std_util}.m:
	Add the _sl suffix to init_* macros in hand-written code where
	necessary.

library/require.m:
	When error is called from a program that does tracing, make it
	print the number of the last event.

runtime/mercury_{conf_param.h,trace.c}:
util/mkinit.c:
	Rename MR_USE_DEBUGGER as MR_USE_EXTERNAL_DEBUGGER, since we
	have an internal one as well.

runtime/mercury_goto.h:
	For each of the init_{entry,label,local} macros, and the macros
	they invoke, add a new variant (denoted by a _sl suffix on the
	macro name) that will cause the stack layout record associated
	with the label to be registered also. For labels initialized
	with the variants without the _sl, initialization will register
	NULL instead.

runtime/mercury_{memory,misc}.c:
	In several locations, just before exiting with a fatal error in
	a program that does tracing, print the number of the last event.

runtime/mercury_regorder.h:
	Add two new macros, MR_NUM_SPECIAL_REG and MR_MAX_SPECIAL_REG_MR
	that mercury_trace.c uses to decide how much fake_reg to save and
	restore.

runtime/mercury_stack_layout.h:
	Change the definition of MR_Var_Shape_Info to reflect the real type
	of one of its fields more closely.

	Make the type names conform to the Mercury style guide
	With_Studly_Cap_Names.

	Fix the name and the definition of MR_DETISM_DET_CODE_MODEL.

runtime/mercury_stack_layout.c:
	Use the new forms of the type names.

runtime/mercury_trace.[ch]:
runtime/mercury_wrapper.c:
	Add support for turning tracing on and off and for choosing the
	external or internal debugger.

	Modify the prototype of MR_trace() to reflect the new arg giving
	the number of the highest numbered rN register in use at the call.

	Support the new trace ports for nondet pragma C code.

runtime/mercury_trace.c:
	Implement a new command set more in line with what we intend to
	grow towards in the future:

	[N] s/S/CR to skip N events
	f/F to finish the execution of the current call
	c/C to continue to the end

	The upper case versions print events as they go, the lower case
	ones don't.

	Add several new commands:

	N g/G to go to event #N
	r to skip all following exit and fail ports until we come to
		another port type
	b module pred
		to add a breakpoint (which actually functions like a spy point)
	? to list all breakpoints
	+ to enable a numbered breakpoint
	- to disable a numbered breakpoint

	Save/restore only the necessary registers, not all of them.

	Do not indent trace events by the depth, since the depth can get
	very large (4800 in one case I looked at).

	Provide functions for other parts of the runtime and the library
	to call to print the number of the last trace event.

	There is a reference here back to the library, but this will
	go away when the tabling change is committed.

runtime/mercury_trace.[ch]:
	Add a new function, MR_trace_report. This function, which is for
	invocation in the event of a fatal error, reports what the number
	of the last event was (if tracing is enabled). This should allow
	the programmer to go more directly to the source of the problem.

runtime/mercury_wrapper.[ch]:
	Remove the long obsolete code for initializing r[123] with integers.

scripts/mdb:
	A new script for turning on the tracing code in an executable.

scripts/Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Include mdb in the list of scripts to be installed.

doc/Mmakefile:
	Include mdb in the list of scripts with autogenerated man pages.

tests/misc_tests/Mmakefile:
tests/misc_tests/debugger_regs.*:
tests/misc_tests/debugger_test.*:
	Move the tests of the debugger to the new tests/debugger directory.
	In the process, give debugger_test back its original name,
	"interpreter", and give it an input script that tests the new
	debugger commands while avoiding the printing of excessively large
	terms (although they still overflow 80 columns).

tests/debugger/Mmakefile:
tests/debugger/runtests:
tests/debugger/debugger_regs.*:
tests/debugger/interpreter.*:
	The moved test cases and copied Mmakefile/runtests.

tests/debugger/queens.*:
	A new test case to test the printing of variables in polymorphic
	procedures.
1998-04-08 11:10:37 +00:00
Fergus Henderson
c200d4dd67 Fix a bug in the handling of the *.sh-subr files:
Estimated hours taken: 0.5

bindist/bindist.configure.in:
	Fix a bug in the handling of the *.sh-subr files:
	`$top' should be "`pwd`", not "`pwd`/..", since
	when this file is executed it is the top-level
	configure script, not in the bindist subdirectory.
1998-03-02 10:02:37 +00:00
Fergus Henderson
c784525d64 Add the extras/trailed_update directory to the list of directories
Estimated hours taken: 0.1

bindist/Mmakefile:
	Add the extras/trailed_update directory to the list of directories
	which are cleaned up before creating the binary distribution.
1998-02-11 16:58:11 +00:00
Fergus Henderson
1cde397a7d Fix a bug: it was not including the scripts/*.sh-subr files
Estimated hours taken: 0.25

bindist/Mmakefile:
	Fix a bug: it was not including the scripts/*.sh-subr files
	in the binary distribution.
1998-01-23 10:33:33 +00:00
Fergus Henderson
da637eeb27 Delete all references to `lp_solve'. It is not needed anymore,
Estimated hours taken: 0.25

.README.in:
Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
tools/bootcheck:
	Delete all references to `lp_solve'. It is not needed anymore,
	now that we have written our own solver.
1997-10-21 14:57:05 +00:00
Fergus Henderson
f6ef3ad51f Changes needed to include `lp_solve' in the Mercury distribution.
Estimated hours taken: 2

Changes needed to include `lp_solve' in the Mercury distribution.
Note that these changes include it in the main distribution; that is temporary.
For copyright reasons, it ought to be moved to the `extras' distribution,

lp_solve/lpkit.h:
	Delete definition of `NULL' that conflicted with system header files.

lp_solve/COPYING:
	New file, explaining the copying policy.

lp_solve/Mmakefile:
	New file, contains rules for building and installing lp_solve.

Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Add rules for installing lp_solve and for including it in the
	source and binary distributions.

.README.in:
	Mention lp_solve.
1997-10-09 14:04:31 +00:00
Fergus Henderson
eb7bcf0fd9 Change mgnuc and ml to support the same
compilation model options as mmc.
Allow the user to mix `--grade foo' options with
other options that affect the grade such as `--profiling'.
Compute the final grade to link with from the options.

Also add a few new options and grade modifiers.

compiler/options.m:
compiler/mercury_compile.m:
	Add `--profile-time' and `--profile-calls' options.
	Change `--profiling' to now just imply both of those.
	Add `--pic-reg' option (just implies `-DPIC_REG' in cflags).

compiler/handle_options.m:
	Add support for grade modifiers `.proftime' and `.profcalls'.
	Make `.debug' a grade modifier, rather than having a base
	grade `debug'.

scripts/init_grade_options.sh-subr:
scripts/parse_grade_options.sh-subr:
	New files containing sh subroutines for parsing grade-related
	options.

configure.in:
bindist/bindist.configure.in:
	Use AC_SUBST_FILE to allow #inclusion of the above-mentioned
	`.sh-subr' files.

scripts/ml.in:
scripts/mgnuc.in:
	Use the above-mentioned sh subroutines.

scripts/ml.in:
compiler/mercury_compile.m:
compiler/handle_options.m:
	Compute the final grade to link with from the various
	grade-related options.

scripts/mgnuc.in:
	Support the `--inline-alloc' option.

doc/user_guide.texi:
README.Linux:
	Document the above changes.
1997-10-08 13:16:33 +00:00
Fergus Henderson
e3c93e9150 Include the man pages in the binary distribution.
Estimated hours taken: 1

bindist/bindist.Makefile.in:
bindist/Makefile.in:
	Include the man pages in the binary distribution.

bindist/bindist.Makefile.in:
	Fix a bug where it didn't install the NUPROLOG or SICSTUS stuff
	even when configure detected that NUPROLOG / SICSTUS was present.
	Fix a bug in the rule for installing NUPROLOG.

bindist/bindist.build_vars.in:
	Put the definition of SHARED_LIBS in single quotes rather than
	double quotes, so that if it contains a back-quoted command
	(e.g. SHARED_LIBS='`gcc -print-libgcc-file-name` -lm -lc')
	it is evaluated dynamically rather than at build time.
	This avoids potential problems if users upgrade to a new gcc
	version after installing Mercury.
1997-08-14 13:53:03 +00:00
Fergus Henderson
28559969bb Fix a few bugs: some variables (SHARED_LIBS, EXE_RPATH_OPT, etc.)
Estimated hours taken: 0.5

bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
	Fix a few bugs: some variables (SHARED_LIBS, EXE_RPATH_OPT, etc.)
	use in the scripts/*.in files were not being passed in from the
	source configure.in to the binary distribution configure.in.
1997-08-14 11:59:25 +00:00
Fergus Henderson
6096d9e3d8 s/mc/mmc/
Estimated hours taken: 0.25

tools/bindist.Makefile.in:
	s/mc/mmc/
1997-08-14 09:55:47 +00:00
Fergus Henderson
043a7a7a2f Add a version of the README.Linux modified for the binary release
Estimated hours taken: 0.25

tools/bindist.README.Linux:
	Add a version of the README.Linux modified for the binary release
	(I just removed the stuff about how to get the source distribution
	to compile with libc 6).
1997-08-14 09:31:44 +00:00
Fergus Henderson
0aa46f1171 Include the extras' and tests' directories and the
Estimated hours taken: 0.25

bindist/Mmakefile:
	Include the `extras' and `tests' directories and the
	`README.Linux' and `WORK_IN_PROGRESS' files in the binary
	distribution.
1997-08-11 07:24:15 +00:00
Fergus Henderson
89d32e061f Mention `extras' directory.
Estimated hours taken: 0.25

bindist/bindist.README:
	Mention `extras' directory.
	Mention the copyright on `extras/graphics/Togl-1.2'.
1997-07-28 15:52:02 +00:00
Fergus Henderson
64a1c52666 Localize the definition of the version number into a single file.
Automate the building of releases, including daily "rotd"
(release-of-the-day) releases.

VERSION:
	New file, defines the version number.
	Also document the general scheme for assigning version numbers.

Mmake.common.in:
	Add `include VERSION'.

Mmakefile:
bindist/Mmakefile:
configure.in:
	Use the version number in VERSION rather than hard-coding it
	in multiple places.

Mmakefile:
README:
.README.in:
INSTALL:
.INSTALL.in:
	Change things so that README and INSTALL are automatically
	generated from .README.in and .INSTALL.in respectively, using
	the version number defined in VERSION.

BUGS:
	Remove an unnecessary reference to the version number.

RELEASE_NOTES:
	Change this file so that the version number is only mentioned
	in one place.  Bump the version number here to 0.7 in preparation
	for the next release.

library/Mmakefile:
library/library.m:
library/library.m.in:
	Change things so that library.m is automatically generated from
	library.m.in using the version number in VERSION.
	Also change it so that library__version says which architecture
	it was configured for.

tools/test_mercury:
	Override the version specified in the VERSION file in the CVS
	repository with either `rotd-YYYY-MM-DD' or (when making a release)
	with a specified $RELEASE_VERSION.
	When running on murliboobo, if the version built passes all its
	tests, copy it to the /pub/mercury/beta-releases directory on
	ftp://turiel.cs.mu.oz.au.

compiler/notes/release_checklist.m:
	Change the release checklist to say that you only need to
	update the version number in VERSION rather than in 6 different
	places.  Also change the procedure for building the final
	tar file to reflect the above changes to the `test_mercury' script.
1997-07-28 08:52:15 +00:00
Fergus Henderson
04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00
Tyson Dowd
9484d33ff9 Rename mc' as mmc'.
Estimated hours taken: 2

Rename `mc' as `mmc'.

Note: we do not change the names of variables such as MCFLAGS, just the
`mc' executable.

configure.in:
	Look for mmc not mc. If you can't find mmc to bootstrap, try for
	mc.

bindist/Mmakefile:
bindist/bindist.configure.in:
doc/Mmakefile:
doc/user_guide.texi:
scripts/Mmake.vars.in:
scripts/Mmakefile:
scripts/msl.in:
tools/expand_params:
tools/optstages:
tools/speedtest:
tools/test_mercury:
	Change references to mc into mmc.
1997-07-15 08:05:15 +00:00
Fergus Henderson
715634e5ef Fix a problem with shared libraries on Linux.
They weren't working because Linux requires the `-rpath' option
be specified when linking the shared libraries, as well as when
linking executables.  Previously we only passed `-rpath' option
when linking executables.

configure.in:
Mmake.common.in:
bindist/bindist.build_vars.in:
	Add new configuration variables for handling `-rpath' or `-R' options:
	EXE_RPATH_OPT, EXE_RPATH_SEP, SHLIB_RPATH_OPT, and SHLIB_RPATH_SEP.

scripts/ml.in:
	Rewrite the system-specific code for handling rpaths
	to instead use the new rpath configuration variables.

library/Mmakefile:
runtime/Mmakefile:
	When linking shared libraries that depend on other shared libraries,
	pass appropriate rpath options using the rpath configuration variables.
1997-06-16 13:35:34 +00:00
Fergus Henderson
ddb73722b9 Rename all the Mmake' files as Mmakefile'. This is necessary to
avoid confusion between `Mmake' and `mmake' on case-insensitive file
systems.
1997-02-13 21:38:45 +00:00
Fergus Henderson
62f61c6e35 Add mention of the Mercury mailing lists.
Estimated hours taken: 0.25

bindist/bindist.README:
	Add mention of the Mercury mailing lists.
1997-01-17 07:43:53 +00:00
Fergus Henderson
a212266763 Update for gnu-win32 version b17.1: system() is now fixed
Estimated hours taken: 0.1

bindist/bindist.README.MS-Windows:
	Update for gnu-win32 version b17.1: system() is now fixed
	(so no work-around needed); "-Wl,--force-exe-suffix" is now
	the default; but the handling of `.exe' has changed again,
	so we need to modify the work-around for that.
1996-12-20 14:12:29 +00:00
Fergus Henderson
2296cc2d9d Reduce the number of places where the version number is hard-coded.
Estimated hours taken: 0.5

Reduce the number of places where the version number is hard-coded.

bindist/Mmake:
	Add `VERSION=0.6'.
	When creating a binary distribution, use `sed' to replace
	the strings `<VERSION>' and `<FULLARCH>' in the bindist.* files
	with the corresponding values.

bindist/bindist.INSTALL:
bindist/bindist.README:
bindist/bindist.README.MS-Windows:
bindist/bindist.configure.in:
	Replace hard-coded version numbers with <VERSION>.
1996-12-19 10:20:02 +00:00
Fergus Henderson
12694ac1cf A few minor changes.
Estimated hours taken: 0.25

bindist/bindist.README.MS-Windows:
	A few minor changes.
1996-12-14 20:44:06 +00:00
Fergus Henderson
04162721bd Add HAVE_BOXED_FLOATS, and also fix a bug
Estimated hours taken: 0.5

bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
	Add HAVE_BOXED_FLOATS, and also fix a bug
	(NUM_REAL_TEMPS was renamed NUM_REAL_R_TEMPS).
1996-12-13 02:37:46 +00:00
Fergus Henderson
1a23e8923a Various changes to support a binary distribution for Windows.
Estimated hours taken: 2

Various changes to support a binary distribution for Windows.

bindist/Mmake:
	Fix a bug (`lib' should have been `lib.tar').

bindist/Makefile.in:
	Fix a bug (it had `lib.tar' in a couple of places where it should
	have had `info.tar').
	Change the `echo "blah"' statements to `@echo "-- blah"'.

bindist/README.MS-Windows:
	Add directions for creating a binary distribution for Windows.

bindist/README.MS-Windows:
	Add directions for installing from the binary distribution
	for Windows.
1996-12-11 18:29:29 +00:00
Fergus Henderson
bce9e59b0a Fix a bug: $dir' should have been $$dir', since it is a shell
Estimated hours taken: 0.25

bindist/Mmake:
	Fix a bug: `$dir' should have been `$$dir', since it is a shell
	variable, not a Make variable.
1996-12-11 16:49:42 +00:00
Fergus Henderson
8ddc27d1f2 Try to make the instructions a little bit more user-proof.
Estimated hours taken: 0.25

bindist/bindist.INSTALL:
	Try to make the instructions a little bit more user-proof.
1996-12-10 15:10:14 +00:00
Fergus Henderson
9c34e91598 Fix a couple of bugs in the binary distribution makefiles,
Estimated hours taken: 0.5

Fix a couple of bugs in the binary distribution makefiles,
and change them so they should work better on gnu-win32.

bindist/Mmake:
bindist/bindist.Makefile.in:
	Avoid using redirection with `tar', since this breaks on
	gnu-win32, because stdin and stdout default to text mode, not
	binary mode.  Also avoid using `zcat' -- use `gzip
	--decompress' instead, because `zcat' might only understand
	compressed files, not gzipped files.  Also make sure
	that multiple commands are separated by `&&' rather than `;',
	so that we don't ignore failures.
1996-12-09 08:17:49 +00:00