Commit Graph

10 Commits

Author SHA1 Message Date
Fergus Henderson
fa5226ee67 Improve the documentation.
library/*.m:
	Improve the documentation.
	Add a "Stability: low/medium/high" comment to all modules,
	which describes the stability of the interface to that module.

ops.m:
	Add `:' as an infix operator.

require.m:
	Implement require/1, since higher-order predicates now work.

term.m:
	Use the type `comparison_result' from mercury_builtin.m,
	rather than defining an identical type `comparison'.
1995-10-05 11:31:52 +00:00
Andrew Bromage
4841071c9e Added stack__push_list and set__join. Cleaned up a couple of typos
in the documentation.
1995-06-12 04:11:17 +00:00
Zoltan Somogyi
549ca23f61 added a list__chunk primitive.
list:
	added a list__chunk primitive.

std_util:
	added bool__or_list, bool__and_list, and bool__not.

others:
	suppressed determinism warnings by changing declarations from nondet to
	multidet and with judicious use of semidet_fail and semidet_succeed.
1995-04-25 08:37:37 +00:00
Fergus Henderson
93a755d563 Add copyright notices.
library/*:
	Add copyright notices.
1995-03-28 16:19:34 +00:00
Fergus Henderson
d8c9479872 Override the MERCURY_LIB_OBJS variable when invoking ml.
Makefile.mercury:
	Override the MERCURY_LIB_OBJS variable when invoking ml.
	This avoids some bootstrapping problems.
	Also, add mercury_compile.nu.

Makefile.common:
	Bump NU-Prolog's -u option up to 2000 (8M), to avoid some memory
	problems.

array.nl, bintree.nl, char.nl, dir.nl, globals.nl, list.nl, map.nl, modes.nl,
prog_util.nl, stack.nl, std_util.nl, string.nl, term.nl:
	Avoid the use of implied modes.

code_info.nl, bimap.nl, make_hlds.nl, mercury_compile.nl,
mercury_to_mercury.nl, unify_proc.nl:
	Fix determinism errors which had previously not been discovered
	because of either implied modes or running out of memory.
	(Note that I had to change the interface to bimap__lookup, since
	it's not possible to make it bidirectional.)

code_util.nl, llds.nl, opt_debug.nl, value_number.nl:
	Rename `operator' as `binary_op'.

hlds.nl, code_info.nl, unify_gen.nl, llds.nl, opt_debug.nl, switch_gen.nl:
	*** Handle simple cases of higher-order pred terms. ***
	(We don't yet handle taking the address of an overloaded
	predicate or a predicate with multiple modes.
	We don't handle closures.  call/1 and call/N are not yet implemented.
	This has not yet been tested.)

make_hlds.nl:
	Modify the mode priority ordering so that semidet modes get
	selected before det ones.

llds.nl:
	Don't include the priority part of the mode number in the mangled
	label name.  *** Note: this will break some things! ***

mercury_compile.nl:
	Move the NU-Prolog hacks into mercury_compile.nu.nl.

switch_gen.nl:
	Fix a simple logic bug in handling the grab/slap of the code_info.

prog_io.nl, builtins.nl, int.nl:
	Fix bugs and omissions with handling of the new arithmetic operators.

prog_io.nl:
	As a quick hack, strip off calls to io__gc_call
	(this avoids spurious error messages which are due to
	the fact that we don't get mode analysis right in those cases).
1994-10-02 17:00:57 +00:00
Fergus Henderson
3e984e7793 Various bug fixes for non-deterministic code.
code_gen.nl, code_info.nl, disj_gen.nl, ite_gen.nl, switch_gen.nl:
	Various bug fixes for non-deterministic code.
	(nqueens now works! ;-)

live_vars.nl:
	Bug fix: initial liveness should be {input vars} not {output vars}.
	(Apologies from Thomas ;-).

llds.nl:
	Couple of minor bug fixes.  Added code to output redo().

io.nl, portray.nl, prog_io.nl, std_util.nu.nl, term_io.nu.nl:
	Change X.Xs into [X|Xs].

swi_builtin.nl, doit.pl:
	Add some support for SWI-Prolog.

set.nl, stack.nl:
	Suppress bogus SWI-Prolog singleton variables warnings in
	type declarations.

term_io.nu.nl:
	Remove some of the dependences on NU-Prologisms.
1994-08-14 12:14:51 +00:00
Fergus Henderson
e0a02e7adb Remove the unused `declared_determinsm' field in the goal_info.
hlds.nl, hlds_out.nl, det_analysis.nl:
	Remove the unused `declared_determinsm' field in the goal_info.
	Rename the `inferred_determinism' field as just `determism'.
	Add a new field `local_determinism'.  In det_analysis.nl,
	Plug the contents of the new `local_determinsm' field in the goal_info
	into the computation of the determinism for each goal.

det_analysis.nl, fix_errs.sed:
	For the cases which we currently don't handle correctly,
	generate incorrect code in preference to generating spurious
	error messages (we still have to handle these cases sometime,
	but this means that we can deal with them one at a time).

arg_info.nl, builtins.nl, code_gen.nl, delay_info.nl, det_analysis.nl,
getopt.nl, globals.nl, make_hlds.nl, modes.nl, mode_util.nl, stack.nl,
string.nl, string.nu.nl, term.nl, undef_modes.nl, varset.nl:
	Fix determinism errors uncovered by the changes in the determinism
	analysis.
1994-06-27 03:34:09 +00:00
Fergus Henderson
987bef62be Add determinism declarations. Fix a few determinism problems.
*.nl:
	Add determinism declarations.  Fix a few determinism problems.
1994-06-17 00:38:40 +00:00
Fergus Henderson
8bf2aacf0b Rename a whole bunch of predicates.
*.nl:
	Rename a whole bunch of predicates.
	Apart from some manual changes to list.nl, the changes
	were all generated by applying the following sed script:

/[^a-zA-Z_]goedel_expand(/s/goedel_expand(/prog_util__expand(/g
/[^a-zA-Z_]goedel_replace(/s/goedel_replace(/prog_util__replace(/g
/[^a-zA-Z_]to_upper(/s/to_upper(/char__to_upper(/g
/[^a-zA-Z_]to_lower(/s/to_lower(/char__to_lower(/g
/[^a-zA-Z_]is_upper(/s/is_upper(/char__is_upper(/g
/[^a-zA-Z_]is_lower(/s/is_lower(/char__is_lower(/g
/[^a-zA-Z_]is_alpha(/s/is_alpha(/char__is_alpha(/g
/[^a-zA-Z_]is_alnum(/s/is_alnum(/char__is_alnum(/g
/[^a-zA-Z_]is_alpha_or_underscore(/s/is_alpha_or_underscore(/char__is_alpha_or_underscore(/g
/[^a-zA-Z_]is_alnum_or_underscore(/s/is_alnum_or_underscore(/char__is_alnum_or_underscore(/g
/[^a-zA-Z_]is_digit(/s/is_digit(/char__is_digit(/g
/[^a-zA-Z_]lower_upper(/s/lower_upper(/char__lower_upper(/g
/[^a-zA-Z_]io__op(/s/io__op(/term_io__op(/g
/[^a-zA-Z_]io__current_ops(/s/io__current_ops(/term_io__current_ops(/g
/[^a-zA-Z_]io__read_term(/s/io__read_term(/term_io__read_term(/g
/[^a-zA-Z_]io__write_term(/s/io__write_term(/term_io__write_term(/g
/[^a-zA-Z_]io__write_constant(/s/io__write_constant(/term_io__write_constant(/g
/[^a-zA-Z_]io__write_variable(/s/io__write_variable(/term_io__write_variable(/g
/[^a-zA-Z_]mercury_quote_string(/s/mercury_quote_string(/term_io__quote_string(/g
/[^a-zA-Z_]mercury_quote_atom(/s/mercury_quote_atom(/term_io__quote_atom(/g
/[^a-zA-Z_]mercury_quote_char(/s/mercury_quote_char(/term_io__quote_char(/g
/[^a-zA-Z_]mercury_quote_single_char(/s/mercury_quote_single_char(/term_io__quote_single_char(/g
/[^a-zA-Z_]delay_info_/s/delay_info_/delay_info__/g
/[^a-zA-Z_]process_options(/s/process_options(/getopt__process_options(/g
/[^a-zA-Z_]lookup_option(/s/lookup_option(/globals__lookup_option(/g
/[^a-zA-Z_]append(/s/append(/list__append(/g
/[^a-zA-Z_]member(/s/member(/list__member(/g
/[^a-zA-Z_]merge(/s/merge(/list__merge(/g
/[^a-zA-Z_]member_chk(/s/member_chk(/list__member_chk(/g
/[^a-zA-Z_]length(/s/length(/list__length(/g
/[^a-zA-Z_]condense(/s/condense(/list__condense(/g
/[^a-zA-Z_]same_length(/s/same_length(/list__same_length(/g
/[^a-zA-Z_]split_list(/s/split_list(/list__split_list(/g
/[^a-zA-Z_]reverse(/s/reverse(/list__reverse(/g
/[^a-zA-Z_]delete(/s/delete(/list__delete(/g
/[^a-zA-Z_]delete_first(/s/delete_first(/list__delete_first(/g
/[^a-zA-Z_]sort(/s/sort(/list__sort(/g
/[^a-zA-Z_]nth_member_search(/s/nth_member_search(/list__nth_member_search(/g
/[^a-zA-Z_]nth_member_lookup(/s/nth_member_lookup(/list__nth_member_lookup(/g
/^goedel_expand(/s/goedel_expand(/prog_util__expand(/g
/^goedel_replace(/s/goedel_replace(/prog_util__replace(/g
/^to_upper(/s/to_upper(/char__to_upper(/g
/^to_lower(/s/to_lower(/char__to_lower(/g
/^is_upper(/s/is_upper(/char__is_upper(/g
/^is_lower(/s/is_lower(/char__is_lower(/g
/^is_alpha(/s/is_alpha(/char__is_alpha(/g
/^is_alnum(/s/is_alnum(/char__is_alnum(/g
/^is_alpha_or_underscore(/s/is_alpha_or_underscore(/char__is_alpha_or_underscore(/g
/^is_alnum_or_underscore(/s/is_alnum_or_underscore(/char__is_alnum_or_underscore(/g
/^is_digit(/s/is_digit(/char__is_digit(/g
/^lower_upper(/s/lower_upper(/char__lower_upper(/g
/^io__op(/s/io__op(/term_io__op(/g
/^io__current_ops(/s/io__current_ops(/term_io__current_ops(/g
/^io__read_term(/s/io__read_term(/term_io__read_term(/g
/^io__write_term(/s/io__write_term(/term_io__write_term(/g
/^io__write_constant(/s/io__write_constant(/term_io__write_constant(/g
/^io__write_variable(/s/io__write_variable(/term_io__write_variable(/g
/^mercury_quote_string(/s/mercury_quote_string(/term_io__quote_string(/g
/^mercury_quote_atom(/s/mercury_quote_atom(/term_io__quote_atom(/g
/^mercury_quote_char(/s/mercury_quote_char(/term_io__quote_char(/g
/^mercury_quote_single_char(/s/mercury_quote_single_char(/term_io__quote_single_char(/g
/^delay_info_/s/delay_info_/delay_info__/g
/^process_options(/s/process_options(/getopt__process_options(/g
/^lookup_option(/s/lookup_option(/globals__lookup_option(/g
/^append(/s/append(/list__append(/g
/^member(/s/member(/list__member(/g
/^merge(/s/merge(/list__merge(/g
/^member_chk(/s/member_chk(/list__member_chk(/g
/^length(/s/length(/list__length(/g
/^condense(/s/condense(/list__condense(/g
/^same_length(/s/same_length(/list__same_length(/g
/^split_list(/s/split_list(/list__split_list(/g
/^reverse(/s/reverse(/list__reverse(/g
/^delete(/s/delete(/list__delete(/g
/^delete_first(/s/delete_first(/list__delete_first(/g
/^sort(/s/sort(/list__sort(/g
/^nth_member_search(/s/nth_member_search(/list__nth_member_search(/g
/^nth_member_lookup(/s/nth_member_lookup(/list__nth_member_lookup(/g
/[^a-zA-Z_]delete_all(/s/delete_all(/list__delete_all(/g
/^delete_all(/s/delete_all(/list__delete_all(/g
1994-06-02 16:03:34 +00:00
Fergus Henderson
251413586a Added a couple of ADTs for the library.
stack.nl, queue.nl:
	Added a couple of ADTs for the library.
1994-04-25 17:56:04 +00:00