Commit Graph

26 Commits

Author SHA1 Message Date
Zoltan Somogyi
f007b45df8 Implement the infrastructure for term size profiling.
Estimated hours taken: 400
Branches: main

Implement the infrastructure for term size profiling. This means adding two
new grade components, tsw and tsc, and implementing them in the LLDS code
generator. In grades including tsw (term size words), each term is augmented
with an extra word giving the number of heap words it contains; in grades
including tsc (term size cells), each term is augmented with an extra word
giving the number of heap cells it contains. The extra word is at the start,
at offset -1, to leave almost all of the machinery for accessing the heap
unchanged.

For now, the only way to access term sizes is with a new mdb command,
"term_size <varspec>". Later, we will use term sizes in conjunction with
deep profiling to do experimental complexity analysis, but that requires
a lot more research. This diff is a necessary first step.

The implementation of term size profiling consists of three main parts:

- a source-to-source transform that computes the size of each heap cell
  when it is constructed (and increments it in the rare cases when a free
  argument of an existing heap cell is bound),

- a relatively small change to the code generator that reserves the extra
  slot in new heap cells, and

- extensions to the facilities for creating cells from C code to record
  the extra information we now need.

The diff overhauls polymorphism.m to make the source-to-source transform
possible. This overhaul includes separating type_ctor_infos and type_infos
as strictly as possible from each other, converting type_ctor_infos into
type_infos only as necessary. It also includes separating type_ctor_infos,
type_infos, base_typeclass_infos and typeclass_infos (as well as voids,
for clarity) from plain user-defined type constructors in type categorizations.
This change needs this separation because values of those four types do not
have size slots, but they ought to be treated specially in other situations
as well (e.g. by tabling).

The diff adds a new mdb command, term_size. It also replaces the proc_body
mdb command with new ways of using the existing print and browse commands
("print proc_body" and "browse proc_body") in order to make looking at
procedure bodies more controllable. This was useful in debugging the effect
of term size profiling on some test case outputs. It is not strictly tied
to term size profiling, but turns out to be difficult to disentangle.

compiler/size_prof.m:
	A new module implementing the source-to-source transform.

compiler/notes/compiler_design.html:
	Mention the new module.

compiler/transform_hlds.m:
	Include size_prof as a submodule of transform_hlds.

compiler/mercury_compile.m:
	If term size profiling is enabled, invoke its source-to-source
	transform.

compiler/hlds_goal.m:
	Extend construction unifications with an optional slot for recording
	the size of the term if the size is a constant, or the identity of the
	variable holding the size, if the size is not constant. This is
	needed by the source-to-source transform.

compiler/quantification.m:
	Treat the variable reference that may be in this slot as a nonlocal
	variable of construction unifications, since the code generator needs
	this.

compiler/compile_target_code.m:
	Handle the new grade components.

compiler/options.m:
	Implement the options that control term size profiling.

doc/user_guide.texi:
	Document the options and grade components that control term size
	profiling, and the term_size mdb command. The documentation is
	commented out for now.

	Modify the wording of the 'u' HLDS dump flag to include other details
	of unifications (e.g. term size info) rather than just unification
	categories.

	Document the new alternatives of the print and browse commands. Since
	they are for developers only, the documentation is commented out.

compiler/handle_options.m:
	Handle the implications of term size profiling grades.

	Add a -D flag value to print HLDS components relevant to HLDS
	transformations.

compiler/modules.m:
	Import the new builtin library module that implements the operations
	needed by term size profiling automatically in term size profiling
	grades.

	Switch the predicate involved to use state var syntax.

compiler/prog_util.m:
	Add predicates and functions that return the sym_names of the modules
	needed by term size profiling.

compiler/code_info.m:
compiler/unify_gen.m:
compiler/var_locn.m:
 	Reserve an extra slot in heap cells and fill them in in unifications
	marked by size_prof.

compiler/builtin_ops.m:
	Add term_size_prof_builtin.term_size_plus as a builtin, with the same
	implementation as int.+.

compiler/make_hlds.m:
	Disable warnings about clauses for builtins while the change to
	builtin_ops is bootstrapped.

compiler/polymorphism.m:
	Export predicates that generate goals to create type_infos and
	type_ctor_infos to add_to_construct.m. Rewrite their documentation
	to make it more detailed.

	Make orders of arguments amenable to the use of state variable syntax.

	Consolidate knowledge of which type categories have builtin unify and
	compare predicates in one place.

	Add code to leave the types of type_ctor_infos alone: instead of
	changing their types to type_info when used as arguments of other
	type_infos, create a new variable of type type_info instead, and
	use an unsafe_cast. This would make the HLDS closer to being type
	correct, but this new code is currently commented out, for two
	reasons. First, common.m is currently not smart enough to figure out
	that if X and Y are equal, then similar unsafe_casts of X and Y
	are also equal, and this causes the compiler do not detect some
	duplicate calls it used to detect. Second, the code generators
	are also not smart enough to know that if Z is an unsafe_cast of X,
	then X and Z do not need separate stack slots, but can use the same
	slot.

compiler/type_util.m:
	Add utility predicates for returning the types of type_infos and
	type_ctor_infos, for use by new code in polymorphism.m.

	Move some utility predicates here from other modules, since they
	are now used by more than one module.

	Rename the type `builtin_type' as `type_category', to better reflect
	what it does. Extend it to put the type_info, type_ctor_info,
	typeclass_info, base_typeclass_info and void types into categories
	of their own: treating these types as if they were a user-defined
	type (which is how they used to be classified) is not always correct.
	Rename the functor polymorphic_type to variable_type, since types
	such as list(T) are polymorphic, but they fall into the user-defined
	category. Rename user_type as user_ctor_type, since list(int) is not
	wholly user-defined but falls into this category. Rename pred_type
	as higher_order_type, since it also encompasses functions.

	Replace code that used to check for a few of the alternatives
	of this type with code that does a full switch on the type,
	to ensure that they are updated if the type definition ever
	changes again.

compiler/pseudo_type_info.m:
	Delete a predicate whose updated implementation is now in type_util.m.

compiler/mlds_to_c.m:
compiler/mlds_to_gcc.m:
compiler/mlds_to_il.m:
compiler/mlds_to_java.m:
	Still treat type_infos, type_ctor_infos, typeclass_infos and
	base_typeclass_infos as user-defined types, but prepare for when
	they won't be.

compiler/hlds_pred.m:
	Require interface typeinfo liveness when term size profiling is
	enabled.

	Add term_size_profiling_builtin.increase_size as a
	no_type_info_builtin.

compiler/hlds_out.m:
	Print the size annotations on unifications if HLDS dump flags call
	for unification details. (The flag test is in the caller of the
	modified predicate.)

compiler/llds.m:
	Extend incr_hp instructions and data_addr_consts with optional fields
	that allow the code generator to refer to N words past the start of
	a static or dynamic cell. Term size profiling uses this with N=1.

compiler/llds_out.m:
	When allocating memory on the heap, use the macro variants that
	specify an optional offset, and specify the offset when required.

compiler/bytecode_gen.m:
compiler/dense_switch.m:
compiler/dupelim.m:
compiler/exprn_aux.m:
compiler/goal_form.m:
compiler/goal_util.m:
compiler/higher_order.m:
compiler/inst_match.m:
compiler/intermod.m:
compiler/jumpopt.m:
compiler/lambda.m:
compiler/livemap.m:
compiler/ll_pseudo_type_info.m:
compiler/lookup_switch.m:
compiler/magic_util.m:
compiler/middle_rec.m:
compiler/ml_code_util.m:
compiler/ml_switch_gen.m:
compiler/ml_unify_gen.m:
compiler/mlds.m:
compiler/mlds_to_c.m:
compiler/mlds_to_gcc.m:
compiler/mlds_to_il.m:
compiler/mlds_to_java.m:
compiler/modecheck_unify.m:
compiler/opt_debug.m:
compiler/opt_util.m:
compiler/par_conj_gen.m:
compiler/post_typecheck.m:
compiler/reassign.m:
compiler/rl.m:
compiler/rl_key.m:
compiler/special_pred.m:
compiler/stack_layout.m:
compiler/static_term.m:
compiler/string_switch.m:
compiler/switch_gen.m:
compiler/switch_util.m:
compiler/table_gen.m:
compiler/term_util.m:
compiler/type_ctor_info.m:
compiler/unused_args.m:
compiler/use_local_vars.m:
	Minor updates to conform to the changes above.

library/term_size_prof_builtin.m:
	New module containing helper predicates for term size profiling.
	size_prof.m generates call to these predicates.

library/library.m:
	Include the new module in the library.

doc/Mmakefile:
	Do not include the term_size_prof_builtin module in the library
	documentation.

library/array.m:
library/benchmarking.m:
library/construct.m:
library/deconstruct.m:
library/io.m:
library/sparse_bitset.m:
library/store.m:
library/string.m:
	Replace all uses of MR_incr_hp with MR_offset_incr_hp, to ensure
	that we haven't overlooked any places where offsets may need to be
	specified.

	Fix formatting of foreign_procs.

	Use new macros defined by the runtime system when constructing
	terms (which all happen to be lists) in C code. These new macros
	specify the types of the cell arguments, allowing the implementation
	to figure out the size of the new cell based on the sizes of its
	fields.

library/private_builtin.m:
	Define some constant type_info structures for use by these macros.
	They cannot be defined in the runtime, since they refer to types
	defined in the library (list.list and std_util.univ).

util/mkinit.c:
	Make the addresses of these type_info structures available to the
	runtime.

runtime/mercury_init.h:
	Declare these type_info structures, for use in mkinit-generated
	*_init.c files.

runtime/mercury_wrapper.[ch]:
	Declare and define the variables that hold these addresses, for use
	in the new macros for constructing typed lists.

	Since term size profiling can refer to a memory cell by a pointer
	that is offset by one word, register the extra offsets with the Boehm
	collector if is being used.

	Document the incompatibility of MR_HIGHTAGS and the Boehm collector.

runtime/mercury_tags.h:
	Define new macros for constructing typed lists.

	Provide macros for preserving the old interface presented by this file
	to the extent possible. Uses of the old MR_list_cons macro will
	continue to work in grades without term size profiling. In term
	size profiling grades, their use will get a C compiler error.

	Fix a bug caused by a missing backslash.

runtime/mercury_heap.h:
	Change the basic macros for allocating new heap cells to take
	an optional offset argument. If this is nonzero, the macros
	increment the returned address by the given number of words.
	Term size profiling specifies offset=1, reserving the extra
	word at the start (which is ignored by all components of the
	system except term size profiling) for holding the size of the term.

	Provide macros for preserving the old interface presented by this file
	to the extent possible. Since the old MR_create[123] and MR_list_cons
	macros did not specify type information, they had to be changed
	to take additional arguments. This affects only hand-written C code.

	Call new diagnostic macros that can help debug heap allocations.

	Document why the macros in this files must expand to expressions
	instead of statements, evn though the latter would be preferable
	(e.g. by allowing them to declare and use local variables without
	depending on gcc extensions).

runtime/mercury_debug.[ch]:
	Add diagnostic macros to debug heap allocations, and the functions
	behind them if MR_DEBUG_HEAP_ALLOC is defined.

	Update the debugging routines for hand-allocated cells to print the
	values of the term size slot as well as the other slots in the relevant
	grades.

runtime/mercury_string.h:
	Provide some needed variants of the macro for copying strings.

runtime/mercury_deconstruct_macros.h:
runtime/mercury_type_info.c:
	Supply type information when constructing terms.

runtime/mercury_deep_copy_body.h:
	Preserve the term size slot when copying terms.

runtime/mercury_deep_copy_body.h:
runtime/mercury_ho_call.c:
runtime/mercury_ml_expand_body.h:
	Use MR_offset_incr_hp instead of MR_incr_hp to ensure that all places
	that allocate cells also allocate space for the term size slot if
	necessary.

	Reduce code duplication by using a now standard macro for copying
	strings.

runtime/mercury_grade.h:
	Handle the two new grade components.

runtime/mercury_conf_param.h:
	Document the C macros used to control the two new grade components,
	as well as MR_DEBUG_HEAP_ALLOC.

	Detect incompatibilities between high level code and profiling.

runtime/mercury_term_size.[ch]:
	A new module to house a function to find and return term sizes
	stored in heap cells.

runtime/mercury_proc_id.h:
runtime/mercury_univ.h:
	New header files. mercury_proc_id.h contains the (unchanged)
	definition of MR_Proc_Id, while mercury_univ.h contains the
	definitions of the macros for manipulating univs that used to be
	in mercury_type_info.h, updated to use the new macros for allocating
	memory.

	In the absence of these header files, the following circularity
	would ensue:

	mercury_deep_profiling.h includes mercury_stack_layout.h
		- needs definition of MR_Proc_Id
	mercury_stack_layout.h needs mercury_type_info.h
		- needs definition of MR_PseudoTypeInfo
	mercury_type_info.h needs mercury_heap.h
		- needs heap allocation macros for MR_new_univ_on_hp
	mercury_heap.h includes mercury_deep_profiling.h
		- needs MR_current_call_site_dynamic for recording allocations

	Breaking the circular dependency in two places, not just one, is to
	minimize similar problems in the future.

runtime/mercury_stack_layout.h:
	Delete the definition of MR_Proc_Id, which is now in mercury_proc_id.h.

runtime/mercury_type_info.h:
	Delete the macros for manipulating univs, which are now in
	mercury_univ.h.

runtime/Mmakefile:
	Mention the new files.

runtime/mercury_imp.h:
runtime/mercury.h:
runtime/mercury_construct.c:
runtime/mercury_deep_profiling.h:
	Include the new files at appropriate points.

runtime/mercury.c:
	Change the names of the functions that create heap cells for
	hand-written code, since the interface to hand-written code has
	changed to include type information.

runtime/mercury_tabling.h:
	Delete some unused macros.

runtime/mercury_trace_base.c:
runtime/mercury_type_info.c:
	Use the new macros supplying type information when constructing lists.

scripts/canonical_grade_options.sh-subr:
	Fix an undefined sh variable bug that could cause error messages
	to come out without identifying the program they were from.

scripts/init_grade_options.sh-subr:
scripts/parse_grade_options.sh-subr:
scripts/canonical_grade_options.sh-subr:
scripts/mgnuc.in:
	Handle the new grade components and the options controlling them.

trace/mercury_trace_internal.c:
	Implement the mdb command "term_size <varspec>", which is like
	"print <varspec>", but prints the size of a term instead of its value.
	In non-term-size-profiling grades, it prints an error message.

	Replace the "proc_body" command with optional arguments to the "print"
	and "browse" commands.

doc/user_guide.tex:
	Add documentation of the term_size mdb command. Since the command is
	for implementors only, and works only in grades that are not yet ready
	for public consumption, the documentation is commented out.

	Add documentation of the new arguments of the print and browse mdb
	commands. Since they are for implementors only, the documentation
	is commented out.

trace/mercury_trace_vars.[ch]:
	Add the functions needed to implement the term_size command, and
	factor out the code common to the "size" and "print"/"browse" commands.

	Decide whether to print the name of a variable before invoking the
	supplied print or browse predicate on it based on a flag design for
	this purpose, instead of overloading the meaning of the output FILE *
	variable. This arrangement is much clearer.

trace/mercury_trace_browse.c:
trace/mercury_trace_external.c:
trace/mercury_trace_help.c:
	Supply type information when constructing terms.

browser/program_representation.m:
	Since the new library module term_size_prof_builtin never generates
	any events, mark it as such, so that the declarative debugger doesn't
	expect it to generate any.

	Do the same for the deep profiling builtin module.

tests/debugger/term_size_words.{m,inp,exp}:
tests/debugger/term_size_cells.{m,inp,exp}:
	Two new test cases, each testing one of the new grades.

tests/debugger/Mmakefile:
	Enable the two new test cases in their grades.

	Disable the tests sensitive to stack frame sizes in term size profiling
	grades.

tests/debugger/completion.exp:
	Add the new "term_size" mdb command to the list of command completions,
	and delete "proc_body".

tests/debugger/declarative/dependency.{inp,exp}:
	Use "print proc_body" instead of "proc_body".

tests/hard_coded/nondet_c.m:
tests/hard_coded/pragma_inline.m:
	Use MR_offset_incr_hp instead of MR_incr_hp to ensure that all places
	that allocate cells also allocate space for the term size slot if
	necessary.

tests/valid/Mmakefile:
	Disable the IL tests in term size profiling grades, since the term size
	profiling primitives haven't been (and probably won't be) implemented
	for the MLDS backends, and handle_options causes a compiler abort
	for grades that combine term size profiling and any one of IL, Java
	and high level C.
2003-10-20 07:29:59 +00:00
Zoltan Somogyi
934401063f Fix a trivial C compiler warning.
Estimated hours taken: 0.1
Branches: main

library/deconstruct.m:
	Fix a trivial C compiler warning.
2003-04-30 10:59:38 +00:00
Fergus Henderson
9338352410 Delete Mercury clauses that just call sorry/1.
Estimated hours taken: 4
Branches: main

library/*.m:
	Delete Mercury clauses that just call sorry/1.
	I applied this change to all files except the following:
	rtti_implementation.m (because in that case, there is no C
	implementation) and profiling_builtin.m and table_builtin.m
	(because new back-ends needn't support profiling or tabling;
	the warnings with `--warn-stubs' for those would be just noise.)

library/array.m:
	Provide C# code for the (in, array_uo) mode of array__copy/2,
	by copying the code for the (array_ui, array_uo) mode.

library/math.m:
	Provide Mercury implementations of some of the math functions.
2003-02-22 11:17:36 +00:00
Fergus Henderson
4f3a10c1d8 Finish off Peter Ross's partially-completed set of changes to
Estimated hours taken: 9
Branches: main

Finish off Peter Ross's partially-completed set of changes to
use `cc_multi' instead of `cc_nondet' for various predicates in
deconstruct.m and std_util.m.  Also, fix a bug in his changes that
broke `deconstruct.arg_cc' in the asm_fast.gc.par grade.

library/std_util.m:
	Changed named_argument_cc from `cc_nondet' to `cc_multi'.

library/deconstruct.m:
	Delete the cc_nondet mode of `named_arg',
	and replace it with a new cc_multi predicate `named_arg_cc'.

	Also, fix a bug where univ_arg_idcc was declared
	`will_not_call_mercury' but was nevertheless calling Mercury code.

NEWS:
	Document the interface changes mentioned above.

	Also, reorganize the description of all the changes relating
	to incorrect use of `cc_nondet' into a single section.
2003-01-20 16:34:27 +00:00
Fergus Henderson
f1ebe0a801 Fix a bug introduced in petdr's 2002/12/02 change (revision 1.18
Estimated hours taken: 4
Branches: main

library/deconstruct.m:
	Fix a bug introduced in petdr's 2002/12/02 change (revision 1.18
	of deconstruct.m) where a pragma c_code fragment declared
	`will_not_call_mercury' was calling Mercury code.

	Note that the fix was not as simple as changing the declaration,
	since there was other code in the body which relied on MR_hp
	being valid, which is only the case if `will_not_call_mercury'
	is used.  Instead I changed it so that the c_code fragment
	didn't call Mercury code.
2003-01-16 16:21:28 +00:00
Peter Ross
0333f439fc Add argument_cc to the list of predicates whose interface has
Estimated hours taken: 0.25
Branches: main

NEWS:
	Add argument_cc to the list of predicates whose interface has
	changed in std_util.

library/deconstruct.m:
	Add a canonicalize_or_do_not_allow inst and add a mode for it
	to arg/3.
2002-12-04 10:06:59 +00:00
Peter Ross
7cda8fcb57 Fix some incorrect behaviour when attempting to use the
Estimated hours taken: 1
Branches: main

Fix some incorrect behaviour when attempting to use the
include_details_cc mode of various predicates.

library/deconstruct.m:
    Constrain arg and limited_construct so that they are only called for
    the do_not_allow and canonicalize cases, so that users get an error
    message when attempting to use the include_details_cc mode.
    Rewrite det_arg so that it work for the include_details_cc case.

library/std_util.m:
    Rewrite argument_cc to use arg_cc.
2002-12-03 12:30:21 +00:00
Peter Ross
b0d5ed2907 Avoid ambiguous overloading problems with two types in std_util having
Estimated hours taken: 0.25
Branches: main

Avoid ambiguous overloading problems with two types in std_util having
a no data constructor.

library/std_util.m:
	Rename the no data constructor in maybe_arg to no_arg.

library/deconstruct.m:
	Use the new data constructor name.
2002-12-03 10:09:19 +00:00
Peter Ross
d0bad2f9fe Implemented limited_deconstruct_cc in Mercury.
Estimated hours taken: 2
Branches: main

Implemented limited_deconstruct_cc in Mercury.

library/deconstruct.m:
	Implement limited_deconstruct_idcc as a cc_multi predicate
	with the success of the predicate encoded into a maybe type,
	as it is impossible to implement it as cc_nondet.
	Change the C code version of limited_deconstruct_idcc to match
	the Mercurys version behaviour.
	Delete the bogus modes of limited_deconstruct/5 and implement
	them as limited_deconstruct_cc/3 instead.

library/std_util.m:
	Change limited_deconstruct_cc to have the correct determinism
	and type signature.

runtime/mercury_ml_deconstruct_body.h:
	Add a new #define which controls whether we save a success
	indicator into SUCCESS_INDICATOR.

NEWS:
	Document the changes to interfaces of limited_deconstruct and
	limited_deconstruct_cc.

tests/hard_coded/deconstruct_arg.m:
	Update the test case to test this new functionality.
2002-12-02 15:51:32 +00:00
Peter Ross
6fc020597f Fix a too lax determinism warning in det_arg.
Estimated hours taken: 0.1
Branches: main

library/deconstruct.m:
    Fix a too lax determinism warning in det_arg.
2002-12-02 12:52:21 +00:00
Peter Ross
5e20a9ad0b Implement arg_cc in Mercury using rtti_implementation.
Estimated hours taken: 6
Branches: main

Implement arg_cc in Mercury using rtti_implementation.

library/deconstruct.m:
	Implement univ_arg_idcc as a cc_multi predicate with the
	success of the predicate encoded into a maybe type, as it is
	impossible to implement is as cc_nondet.
	Change the C code version of univ_arg_idcc to match the
	Mercury versions behaviour.
	Delete the bogus modes of arg/4 and implement them as arg_cc/3
	instead.

library/std_util.m:
	Introduce a new type maybe_arg which is returned by arg_cc to
	return its result.
	Change arg_cc to have the correct determinism and type
	signature.
	Add utility predicates which allow us to construct values of
	the maybe type from a foreign language.

runtime/mercury_ml_arg_body.h:
	Add a new #define which controls whether or not success is
	saved into SUCCESS_INDICATOR.

NEWS:
	Document the changes to interface of arg and arg_cc.

tests/hard_coded/deconstruct_arg.m:
	Update the test case to test this new functionality.
2002-12-02 12:16:07 +00:00
Peter Ross
0d8fa97581 Add the ability to handle noncanonical types.
Estimated hours taken: 1
Branches: main

library/rtti_implementation.m:
library/deconstruct.m:
	Add the ability to handle noncanonical types.

library/deconstruct.m:
	Note that the cc_nondet modes of limited_deconstruct_idcc of
	univ_arg_idcc are incorrect.  These two predicates need to be
	altered so that they return maybe(result) so that we can make
	them cc_multi.
2002-11-30 08:03:33 +00:00
Zoltan Somogyi
eabee0dbc8 Add const qualifiers to variable declarations.
Estimated hours taken: 0.1
Branches: main

library/deconstruct.m:
runtime/mercury_construct.c:
	Add const qualifiers to variable declarations.
2002-09-02 05:48:05 +00:00
Zoltan Somogyi
404abb0c57 Another step towards RTTI in Mercury.
Estimated hours taken: 32
Branches: main

Another step towards RTTI in Mercury.

This step redefines the representation of type_ctor_infos inside the compiler
to be identical to the representation we will need for efficient interpretation
of RTTI data structures in Mercury, following on from an earlier step which
did the same for (pseudo)typeinfos.

Instead of the type_ctor_info being broken down into its components in
type_ctor_info.m, the breakdown process is now performed in rtti_out.m (for the
LLDS backend) and rtti_to_mlds.m (for the MLDS backend). Eventually, the IL and
Java backends will stop using rtti_to_mlds.m for this purpose, and will instead
write out the type_ctor_data structures as static data to be interpreted
directly.

We now predefine the C types representing type_info and pseudo_type_infos
for types of arity up to 20 for the LLDS C backend as well as for the
MLDS C backend. The LLDS backend can define them for higher arities
on demand; the MLDS backend (for now) still cannot.

runtime/mercury_type_info.h:
	To be able to represent all the kinds of types we now support

	- add a data structure for converting values of reserved_addr types
	  from their printable representation to their internal representation
	  (it was previously missing), and

	- add a type_ctor_rep to represent foreign types.

	Add missing MR_ prefixes on some field names.

	Add typedefs for all the types that the rtti_names can refer to.
	There were already such typedefs in runtime/mercury.h for the MLDS
	grades, we now have them for the LLDS grades too.

	Predefine the C types representing type_info and pseudo_type_infos
	for types of arity up to 20. There were already such typedefs in
	runtime/mercury.h for the MLDS grades, we now have them for the
	LLDS grades too.

runtime/mercury.h:
	Delete the typedefs that are now in mercury_type_info.h.

runtime/mercury.h:
	Delete the definitions of the C types representing type_info and
	pseudo_type_infos, since these are now in mercury_type_info.h.
	#include mercury_type_info.h.

compiler/rtti.m:
	Add new, purely Mercury data structures for representing
	type_ctor_infos and their components, designed both for efficient
	interpretation and as a source for the generation of static data
	structures in C.

	This entailed deleting most of the alternatives of the rtti_data type
	while preserving their rtti_name equivalents; the deleted alternatives
	represent tables are no longer created in type_ctor_info.m but which
	are created dynamically in rtti_out.m and rtti_to_mlds.m (which need
	a way for one table to refer to another).

	Centralize the correspondence between rtti_names and the C and Java
	types of the corresponding structures (the C and Java names differ in
	prefixes only). Among other things, this remove the double maintenance
	problem we have previously with the LLDS and MLDS backends maintaining
	their own maps of the correspondence.

	Add utility predicates on the new data structures for use by both
	rtti_out.m and rtti_to_mlds.m.

compiler/hlds_module.m:
	Always store the ids of unification and comparison procedures in
	type_ctor_gen_infos, to simplify their handling.

compiler/type_ctor_info.m:
	Generate the new data structures for representing type_ctor_infos.

	Conform to the changed data structures for type_ctor_gen_infos.

compiler/rtti_out.m:
compiler/rtti_to_mlds.m:
	Rewrite substantial parts of these modules to convert the new data
	structures for representing type_ctor_infos to sets of discrete
	structures dynamically.

	Most of the dynamically created structures are unique by construction,
	but this is not true for typeinfos and pseudo-typeinfos. Therefore
	add mechanisms to ensure that we don't generate redundant structures
	representing typeinfos and pseudo-typeinfos.

compiler/mlds_to_c.m:
compiler/mlds_to_java.m:
	Use the standard mechanisms for creating C and Java type names.

compiler/mlds_to_gcc.m:
	Conform to the changed data structures in rtti.m and
	mercury_type_info.h.

compiler/opt_debug.m:
	Conform to the changed data structures in rtti.m.

compiler/dead_proc_elim.m:
	Conform to the changed data structures for type_ctor_gen_infos.

compiler/pseudo_type_info.m:
	Add a predicate to construct a representation of a type that may or may
	not be ground.

compiler/mlds_to_gcc.m:
java/runtime/TypeCtorRep.java:
library/private_builtin.m:
library/rtti_implemenation.m:
runtime/mercury_mcpp.{cpp,h}:
	Add the type_ctor_rep for foreign types to the lists of type_ctor_reps.

library/construct.m:
library/deconstruct.m:
	Add missing MR_ prefixes on field names.

runtime/mercury_construct.c:
runtime/mercury_deconstruct.c:
runtime/mercury_deep_copy_body.h:
runtime/mercury_ml_expand_body.h:
runtime/mercury_tabling.c:
runtime/mercury_type_info.c:
runtime/mercury_unify_compare_body.h:
	Handle the type_ctor_rep for foreign types.

	Add missing MR_ prefixes on field names.

library/list.m:
	Add two utility predicates, is_empty and is_not_empty, for use with
	higher order code.

NEWS:
	Mention the new predicates in list.m. Delete a duplicate entry.
2002-08-01 11:52:29 +00:00
Peter Ross
5f118f4a81 The tag bootstrap_20020613_intermod can be used to get a compiler which
Estimated hours taken: 20
Branches: main

The tag bootstrap_20020613_intermod can be used to get a compiler which
compiles this change.

configure.in:
	Test that the option --bug-intermod-2002-06-13 exists.  This signifies
	that the a bug in intermodule optimization for predicates which are
	defined as both mercury and foreign code clauses.

library/array.m:
library/benchmarking.m:
library/builtin.m:
library/char.m:
library/construct.m:
library/deconstruct.m:
library/float.m:
library/gc.m:
library/int.m:
library/io.m:
library/library.m:
library/math.m:
library/private_builtin.m:
library/profiling_builtin.m:
library/rtti_implementation.m:
library/sparse_bitset.m:
library/std_util.m:
library/store.m:
library/table_builtin.m:
library/time.m:
library/type_desc.m:
	Define a mercury version of every pragma foreign_proc.
	Remove any foreign_procs which are not implemented yet.
2002-06-14 10:18:55 +00:00
Simon Taylor
a529a380e2 Back out Pete's unreviewed change from yesterday.
Estimated hours taken: 0.2
Branches: main

library/*.m
	Back out Pete's unreviewed change from yesterday.
	It doesn't compile without a recent bug fix, but no
	CVS tag was added.
2002-06-12 06:46:46 +00:00
Peter Ross
a86cd4342c Define a mercury version of every pragma foreign_proc, and remove any
Estimated hours taken: 16
Branches: main

Define a mercury version of every pragma foreign_proc, and remove any
foreign_procs which just throw an exception that the code is not implemented.

library/array.m:
library/benchmarking.m:
library/builtin.m:
library/char.m:
library/construct.m:
library/deconstruct.m:
library/exception.m:
library/float.m:
library/gc.m:
library/int.m:
library/io.m:
library/library.m:
library/math.m:
library/private_builtin.m:
library/profiling_builtin.m:
library/rtti_implementation.m:
library/sparse_bitset.m:
library/std_util.m:
library/store.m:
library/string.m:
library/table_builtin.m:
library/time.m:
library/type_desc.m:
	Define a mercury version of every pragma foreign_proc, and remove any
	foreign_procs which just throw an exception that the code is not
	implemented.
2002-06-11 11:03:19 +00:00
Peter Ross
7f93607f31 Change the type io__stream to be implemented using pragma foreign_type.
Estimated hours taken: 4
Branches: main

Change the type io__stream to be implemented using pragma foreign_type.
This should make it easier to port the library to the il grade.

library/io.m:
    Implement the type io__stream using pragma foreign_type.
2002-05-12 17:47:47 +00:00
Zoltan Somogyi
43fbf4b956 A step towards RTTI in Mercury.
Estimated hours taken: 40
Branches: main

A step towards RTTI in Mercury.

This step redefines the representation of pseudo-typeinfos inside the compiler
to be identical to the representation we will need for efficient interpretation
of RTTI data structures in Mercury. Later steps will do likewise for
typectorinfos. In the end, we will have two implementations of RTTI:
the current low-level, very efficient one written in C, which will be used
by the C backends (both LLDS and MLDS), and a new, higher-level one
which will use Mercury data structures and Mercury predicates for
interpretation (along the lines of library/rtti_implementation.m)
for the Java and IL backends.

A large part of this change concerns the fact that pseudo-typeinfos can now
contain typeinfos as well as other pseudo-typeinfos, and they do in the
frequent case that the type of an argument is ground. Given that typeinfos
are just special cases of pseudo-typeinfos, the code for handling the two
types is usually similar, with common code factored out when relevant.

In the process of redesigning the data structures concerning (pseudo-)
typeinfos, I also fixed an old naming scheme that has become misleading.
The representation of a (pseudo-) typeinfo depends on whether the principal
type constructor is fixed arity or not. We used to denote this distinction
with the phrases first-order vs higher-order, since at first the only variable
arity type constructors were pred and func. However, this hasn't been true
since we added tuples. I have changed the naming scheme to be fixed-arity vs
variable-arity.

compiler/rtti.m:
	Add new, purely Mercury data structures for representing typeinfos
	and pseudo-typeinfos, designed both for efficient interpretation
	and as a source for the generation of static data structures in C.

compiler/pseudo_type_info.m:
	Delete the type definitions here, since they are superseded by the new
	definitions in rtti.m.

	Add predicates for constructing typeinfos as well as pseudo-typeinfos,
	since now we need those too.

	Conform to the changed data structures for (pseudo-) typeinfos.

compiler/ll_pseudo_type_info.m:
compiler/ml_closure_gen.m:
compiler/rtti_out.m:
compiler/rtti_to_mlds.m:
compiler/opt_debug.m:
compiler/type_ctor_info.m:
	Conform to the changed data structures for (pseudo-) typeinfos.

compiler/mlds.m:
	Since the MLDS now refers to type_infos, add their type
	(mlds__type_info_type) to the list of types the MLDS knows about.

compiler/ml_code_util.m:
compiler/mlds_to_c.m:
compiler/mlds_to_il.m:
compiler/mlds_to_java.m:
	Handle mlds__type_info_type.

compiler/mlds_to_gcc.m:
	Conform to the changed data structures for (pseudo-) typeinfos,
	and handle mlds__type_info_type.

runtime/mercury_bootstrap.h:
	Override the compiler-generated names of the type_ctor_infos of the
	variable arity type constructors. The MLDS backend requires these
	to be module qualified; the LLDS backend requires them to be
	unqualified. This is a problem because the same code now generates
	the compiler's internal representation of pseudo-typeinfos for both
	backends.

	The temporary solution is to have the compiler generate these names
	module qualified, and have these macros convert them to the unqualified
	form. (The long term solution should be to always module qualify
	everything, but doing that is for another change.)

runtime/mercury_type_info.h:
	Change the naming scheme from first order vs higher order to fixed
	arity vs variable arity.

library/construct.m:
library/deconstruct.m:
runtime/mercury.c:
runtime/mercury_construct.c:
runtime/mercury_deconstruct.c:
runtime/mercury_deep_copy_body.h:
runtime/mercury_make_type_info_body.h:
runtime/mercury_ml_expand_body.h:
runtime/mercury_tabling.c:
runtime/mercury_type_desc.c:
runtime/mercury_type_info.c:
runtime/mercury_unify_compare_body.h:
	Conform to the new naming scheme.

runtime/mercury.h:
	Conform to the new naming scheme.

	Declare fixed and variable arity types for typeinfos as well as
	pseudo-typeinfos, since pseudo-typeinfos can now refer to typeinfos.
2002-04-12 01:24:25 +00:00
Zoltan Somogyi
7570fac833 Some of fjh's review comments on my change to enable the deconstruction and
Estimated hours taken: 3
Branches: main

Some of fjh's review comments on my change to enable the deconstruction and
printing of igher order terms arrived after I committed that change. This diff
addresses those comments.

library/deconstruct.m:
	Specify what happens with include_details_cc.


runtime/mercury_deconstruct.c:
	Add a second argument to MR_expand_type_name that specifies whether
	the name of the type specified by the first argument should be wrapped
	in <<>> or not.

runtime/mercury_ml_expand_body.h:
 	Handle type_ctor_infos by returning the type name (without <<>>) as
	a zero-arity functor.

runtime/mercury_type_info.[ch]:
	Delete the code for expanding out type_ctor_info "equivalences", since
	as Fergus pointed out the concepts doesn't make sense.

trace/mercury_trace_internal.c:
	When the user turns the printing of optional values off or on,
	make that change take effect immediately.

tests/debugger/queens.{inp,exp*}:
	Test the immediate nature of the print_optionals command.

NEWS:
	Announce the print_optionals command.
2002-03-12 03:40:42 +00:00
Zoltan Somogyi
6cd535b1f3 Fix a bug: closures do not contain valid layout information in hlc grades,
Estimated hours taken: 2
Branches: main

Fix a bug: closures do not contain valid layout information in hlc grades,
so in those grades closures cannot be deconstructed.

runtime/mercury_ml_expand_body.h:
	Do not deconstruct closures in hlc grades.

library/deconstruct.m:
	Document this behavior.

tests/hard_coded/deconstruct_arg.exp2:
	Add a second expected output file with the output appropriate for hlc
	grades.
2002-02-26 02:36:49 +00:00
Zoltan Somogyi
b51c742885 Allow the debugger to print higher order values and typeinfos, mainly by
Estimated hours taken: 50
Branches: main

Allow the debugger to print higher order values and typeinfos, mainly by
making the committed choice modes of the predicates in deconstruct.m to
deconstruct higher order values and typeinfos. (The non committed choice
versions will continue to return only placeholders.)

Having the debugger print typeinfos is occasionally useful but more often
it is just distracting. This change therefore adds a new debugger command,
"print_optionals", that toggles the printing of optional values. For now,
the only optional values are typeinfos.

NEWS:
	Mention the new capability and the new predicates in the library.

	Mention the predicates added previously that allow the caller to
	specify how non-canonical terms should be handled, since the change
	in their semantics that we anticipated when they were added has now
	happened, and their semantics should now be more stable.

browser/browser_info.m:
	Use the predicates in the deconstruct.m instead of std_util,
	to make the choice of noncanonical term method handling explicit.

browser/browse.m:
	When writing small terms using io__write_univ, explicitly use
	the same noncanonical term handling method as browser_info.m

library/io.m:
	Add predicates to retrieve the current input and output streams.

	Add versions of io__write_univ that specify the stream and maybe
	the method of handling noncanonical terms.

	Add a mode to io__write_list that allows the closure that prints the
	list elements to be cc_multi.

	All of these are for the new functionality in the browser.

runtime/mercury_ml_expand_body.h:
	In committed choice contexts, deconstruct closures as if they were
	ordinary terms, with the function symbol being the name of the
	predicate/function and the arguments being the terms stored in
	the closure.

	In committed choice contexts, deconstruct typeinfos as if they were
	ordinary terms, with the function symbol being the name of the type
	constructor and the arguments being the type constructor's arguments.

runtime/mercury_type_info.[ch]:
	Add a new function, MR_collapse_ctor_equivalences, for use by
	mercury_ml_expand_body.h.

	Delete a redundant function comment.

library/deconstruct.m:
	Document the changes in the behavior of the predicates defined in this
	module as a result of the change to mercury_ml_expand_body.h.

runtime/mercury_ho_call.h:
runtime/mercury_stack_layout.h:
	Add prefixes on structure field names that did not have them.

browser/dl.m:
	Add prefixes where needed by the changes to mercury_ho_call.h.

runtime/mercury_layout_util.[ch]:
	Remove the first argument of MR_materialize_closure_typeinfos, since
	its correct value is always the same part of the second argument.

runtime/mercury_deep_copy_body.h:
	Do not pass the first argument of MR_materialize_closure_typeinfos.

	Add field name prefixes where necessary.

compiler/modules.m:
	The mercury_builtin module is no longer part of the library.

compiler/pd_debug.m:
compiler/rl_analyze.m:
	Minor updates to avoid trying to take the address of io__write_list,
	since it now has more than one mode.

runtime/mercury_init.h:
runtime/mercury_wrapper.[ch]:
trace/mercury_trace_vars.[ch]:
	Add a parameter to MR_trace_browse_all_on_level that specifies
	whether we should print values of type type_info.

trace/mercury_trace_vars.c:
	Do not ignore predicates and functions anymore.

runtime/mercury_stack_trace.c:
trace/mercury_trace.c:
trace/mercury_trace_declarative.c:
trace/mercury_trace_external.c:
	Pass the new parameter of MR_trace_browse_all_on_level.

trace/mercury_trace_internal.c:
	Implement the "print_optionals" command.

doc/user_guide.texi:
	Document the "print_optionals" command.

tests/debugger/mdb_command_test.inp:
	Test the documentation of "print_optionals".

tests/debugger/higher_order.{m,inp,exp,exp2}:
	A new test case to exercise the ability to print higher order values.

	Note that the format of the predicate names in the output should be
	improved, but that is a separate change since doing it the right way
	requires bootstrapping.

tests/debugger/Mmakefile:
	Enable the new test case.

tests/debugger/nondet_stack.exp*:
	Update the expected output to reflect the fact that nondet stack dumps,
	being intended for debugging, include type_infos.

tests/debugger/tabled_read_decl.exp*:
	Update the expected output to reflect the fact that for maximum
	usefulness, the printing of I/O action atoms prints meaningful
	type_infos.

tests/hard_coded/deconstruct_arg.*:
tests/hard_coded/write_reg1.*:
	Expand these tests to check that we handle higher order values
	correctly not just when canonicalizing but also in committed choice
	modes.
2002-02-24 11:53:46 +00:00
Simon Taylor
b7c4a317e9 Add MR_ prefixes to the remaining non-prefixed symbols.
Estimated hours taken: 4
Branches: main

Add MR_ prefixes to the remaining non-prefixed symbols.

This change will require all workspaces to be updated
The compiler will start generating references to MR_TRUE,
MR_bool, etc., which are not defined in the old runtime
header files.

runtime/mercury_std.h:
	Add MR_ prefixes to bool, TRUE, FALSE, max, min,
	streq, strdiff, strtest, strntest, strneq, strndiff,
	strntest, NO_RETURN.

	Delete a commented out definition of `reg'.

runtime/mercury_tags.h:
	Add an MR_ prefix to TAGBITS.

configure.in:
runtime/mercury_goto.h:
runtime/machdeps/i386_regs.h/mercury_goto.h:
	Add an MR_ prefix to PIC.

runtime/mercury_conf_param.h:
	Allow non-prefixed PIC and HIGHTAGS to be defined on
	the command line.

runtime/mercury_bootstrap.h:
	Add backwards compatibility definitions.

RESERVED_MACRO_NAMES:
	Remove the renamed macros.

compiler/export.m:
compiler/ml_code_gen.m:
	Use MR_bool rather than MR_Bool (MR_Bool is
	meant to be for references to the Mercury type
	bool__bool).

runtime/mercury_types.h:
	Add a comment the MR_Bool is for references to
	bool__bool.

*/*.c:
*/*.h:
*/*.m:
	Add MR_ prefixes.
2002-02-18 07:01:33 +00:00
Peter Ross
9cd3e737d3 Various changes to get the library to compile in the ilc grade.
Estimated hours taken: 1
Branches: main

Various changes to get the library to compile in the ilc grade.

library/deconstruct.m:
    Add a missing private_builtin module_specifier to the calls to
    sorry.

library/float.m:
library/int.m:
library/math.m:
library/rtti_implementation.m:
    Add missing promise_pures to the foreign_procs.

library/private_builtin.m:
    Add a predicate imp which is a do nothing predicate which is impure.
    This is used to make calls to sorry/1 impure when needed.

library/type_desc.m:
    Add calls to private_builtin__sorry/1 where needed.
    Get namespace qualifiers correct for calls to
    ML_call_rtti_compare_type_infos.

runtime/mercury_il.il:
    Add get_ftn_ptr_heap_pointer_unify and get_ftn_ptr_heap_pointer_compare.
2002-02-05 16:30:08 +00:00
Zoltan Somogyi
fcccbd166f Reorganize deconstruct.m so that each predicate that deconstructs terms has
Estimated hours taken: 12
Branches: main

Reorganize deconstruct.m so that each predicate that deconstructs terms has
three variants:

- One that aborts when attempting to deconstruct non-canonical terms.

- One that succeeds when attempting to deconstruct a term of a non-canonical
  type, but returns a constant such as "<<noncanonical>>" for such
  deconstructions. It still aborts when deconstructing a noncanonical term
  of an ordinarily canonical type, which can happen with HAL if the term
  is currently a variable.

- One that succeeds when attempting to deconstruct non-canonical terms of both
  kinds, but whose determinism requires its caller to be in a committed choice
  context.

Each of the predicates function, arg, named_arg, deconstruct and
limited_deconstruct now has an extra argument that selects one of the three
variants above. Each of these predicates now has three modes, one for each
value of this argument. The separate predicates with _cc at the ends of their
names are now superseded by one of these modes.

At the same time, I also eliminated the distinction between arg and argument.
Arg used to check if the returned argument was of the expected type, and fail
if it wasn't, while argument used to return a univ. The new arg now returns
a value of an existential type, which the caller can now typecheck or put
into a univ as it pleases.

The descriptions of the changes:

library/deconstruct.m:
	Implement the changes discussed above. Work around a bug by making
	the foreign_procs return a univ from which we later extract the value;
	this inefficiency should be fixed later, when the typechecker has been
	fixed to allow different clauses to return existentially typed values.

library/std_util.m:
	Reimplement the forwarding predicates that call deconstruct.m in terms
	of its new interface.

library/io.m:
	Make use of the new functionality in deconstruct.m to offer versions
	of io__print and io__write that allow the user to choose how to print
	noncanonical terms.

library/private_builtin.m:
	Export the `sorry' predicate for use in deconstruct.m and elsewhere.

runtime/mercury_deconstruct.[ch]:
runtime/mercury_ml_expand_body.h:
runtime/mercury_ml_arg_body.h:
runtime/mercury_ml_deconstruct_body.h:
runtime/mercury_ml_functor_body.h:
	Implement the new functionality.

library/store.m:
extras/trailed_update/tr_store.m:
	Conform to the new interfaces of some functions in the updated files
	in the runtime.

tests/debugger/polymorphic_output.exp*:
	Update for an updated error message.

tests/hard_coded/deconstruct_arg.{m,exp*}:
	Update the test case to test the committed choice versions of the
	deconstruction predicates as well as the usual versions. (The aborting
	versions cannot all be tested in a single test case.)
2002-02-04 05:23:10 +00:00
Zoltan Somogyi
2b559ad054 Move the RTTI-related parts of std_util.m to three new modules in the standard
Estimated hours taken: 8
Branches: main

Move the RTTI-related parts of std_util.m to three new modules in the standard
library, and (in the case of embedded C code) to new modules in the runtime.
The main reason for this is to allow a reorganization of some of the
RTTi-related functionality without breaking backward compatibility. However,
the new arrangement should also be easier to maintain.

Use a separate type_ctor_rep for functions, to distinguish them from predicates
for RTTI code. (At one point, I thought this could avoid the need for the
change to the initialization files mentioned below. It can't, but it is a good
idea in any case.)

library/std_util.m:
	Remove the functionality moved to the new modules, and replace them
	with type equivalences and forwarding code. There are no changes in
	the meanings of the user-visible predicates, with two exceptions.

	- First, the true, equivalence-expanded names of what used to be
	  std_util:type_desc and std_util:type_ctor_desc are now
	  type_desc:type_desc and type_desc: type_ctor_desc.
	- Second, deconstructing a function term now yields
	  "<<function>>" instead of "<<predicate>>".

	The intention is that the RTTI predicates in std_util.m will continue
	to work in a backwards-compatible manner for the near future, i.e. as
	the new modules are updated, the code in std_util will be updated to
	maintain the same functionality, modulo improvements such as avoiding
	unwanted exceptions. When the RTTI functionality in the other modules
	has stabilised, the RTTI predicates in std_util.m should be marked
	obsolete.

	The exported but non-documented functionality of std_util has been
	moved to one of the new modules without forwarding code, with one
	of the moved predicates being turned into the function it should have
	been in the first place.

library/construct.m:
library/deconstruct.m:
library/type_desc.m:
	Three new modules for the code moved from std_util.m.

library/library.m:
compiler/modules.m:
	Record the names of the three new library modules.

runtime/mercury.[ch]:
compiler/mlds_to_il.m:
	Record that type_desc is now in type_desc.m, not std_util.m.

compiler/static_term.m:
	Import the deconstruct module, since we are using its undocumented
	facilities.

runtime/Mmakefile:
	Mention the two new modules.

runtime/mercury_construct.[ch]:
runtime/mercury_type_desc.[ch]:
	Two new modules holding the C functions that used to be in foreign_code
	in std_util, now using MR_ instead of ML_ prefixes, and being more
	consistent about indentation.

runtime/mercury_type_info.h:
	Add a new type_ctor_rep for functions, separate from predicates.
	(It reuses the EQUIV_VAR type_ctor_rep, which hasn't been used
	in ages.)

	Use type_ctor_reps to distinguish between the type_ctor_infos of
	pred/0 and func/0. However, to create higher order typeinfos, we
	still need to know the addresses of the type_ctor_infos for
	pred/0 and func/0, and we still need to know the address of the
	type_ctor_info for tuples to create typeinfos for tuples. Since
	these three type_ctor_infos are defined in the library,
	we cannot access them directly from the runtime. We therefore need
	to access them indirectly in the usual manner, via address_of
	variables initialized by mkinit-generated code.

library/builtin.m:
library/private_builtin.m:
library/rtti_implementation.m:
runtime/mercury.c:
runtime/mercury_mcpp.{h,cpp}:
java/TypeCtorRep.java:
	Updates to accommondate the new function type_ctor_rep.

runtime/mercury_type_info.[ch]:
	Add some functions from foreign_code in std_util that fit in best here.

runtime/mercury_ml_expand_body.h:
runtime/mercury_tabling.h:
runtime/mercury_unify_compare_body.h:
	Delete the code for handling EQUIV_VAR, and add code for handling
	functions.

runtime/mercury_init.h:
runtime/mercury_wrapper.[ch]:
	Add three variables holding the address of the type_ctor_infos
	representing functions, predicates and tuples.

util/mkinit.c:
	Fill in these three variables.

tests/general/accumulator/construct.{m,exp}:
tests/general/accumulator/deconstruct.{m,exp}:
tests/hard_coded/construct.{m,exp}:
	Rename these tests by adding a _test at the ends of their names,
	in order to avoid collisions with the names of the new standard library
	modules. The test cases have not changed, with the exception of the :-
	module declaration of course.

tests/general/accumulator/Mmakefile:
tests/general/accumulator/INTRODUCED:
tests/hard_coded/Mmakefile:
	Record the name changes.

tests/hard_coded/existential_float.exp:
	Updated the expected output to reflect that deconstructions now print
	"<<function>>" instead of "<<predicate>>" when appropriate.

tests/hard_coded/higher_order_type_manip.exp:
	Updated the expected output to reflect the new name of what used to be
	std_util:type_desc.

trace/mercury_trace_browse.c:
trace/mercury_trace_external.c:
trace/mercury_trace_help.c:
	#include type_desc.h instead of std_util.h, since the C functions
	we want to call are now defined there.

trace/mercury_trace_vars.c:
	Update to account for the movement of type_desc from std_util to
	type_desc, and ensure that we don't refer to any type_ctor_infos
	in MLDS grades.
2002-01-30 05:09:13 +00:00