Commit Graph

20 Commits

Author SHA1 Message Date
Ralph Becket
0daae6c8d9 Added support for in/out random__supply arguments to
Estimated hours taken: 0.4

library/random.m:
	Added support for in/out random__supply arguments to
	complement the existing mdi/muo modes.  This is useful
	when a random__supply is a component of a non-(mostly-)
	unique object.
2001-02-28 14:53:41 +00:00
Fergus Henderson
d6a0598116 Improve efficiency of random__permutation:
Estimated hours taken: 0.75

library/random.m:
	Improve efficiency of random__permutation:
		- use an array rather than a map
		- use `rem' rather than `div'
2000-09-25 08:25:00 +00:00
Fergus Henderson
9d8f3d29e9 Change random__permutation so that it takes
Estimated hours taken: 2

library/random.m:
	Change random__permutation so that it takes
	as its first argument a list(T) rather than an int N,
	and returns a permutation of that list rather than
	a permutation of the integers 0 .. N-1.

tests/tabling/expand*.m:
	Change to reflect the new interface to random__permutation.

NEWS:
	Document the random__permutation predicate.
2000-02-16 08:17:59 +00:00
Zoltan Somogyi
973e9c7c76 Add a predicate for computing a random permutation of the first N
Estimated hours taken: 1

library/random.m:
	Add a predicate for computing a random permutation of the first N
	integers.
2000-01-03 05:22:34 +00:00
Thomas Conway
98576713ce Change the coefficients for the linear-congruential generator.
Estimated hours taken: 0.1

library/random.m:
	Change the coefficients for the linear-congruential generator.
	They now assume only 31 bits (unsigned) rather than 32. This
	should prevent the defective behaviour reported on the
	mercury-users mailing list.
1998-10-28 23:18:42 +00:00
Fergus Henderson
7cb525fde3 Undo Zoltan's bogus update of all the copyright dates.
Estimated hours taken: 0.5

library/*.m:
compiler/*.m:
	Undo Zoltan's bogus update of all the copyright dates.
	The dates in the copyright header should reflect the years
	in which the file was modified (and no, changes to the
	copyright header itself don't count as modifications).
1998-01-23 12:33:43 +00:00
Zoltan Somogyi
9ae7acc593 Update all the copyright dates for 1998.
Estimated hours taken: 0.5

library/*.m:
	Update all the copyright dates for 1998.
1998-01-13 10:01:32 +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
Fergus Henderson
91e38df439 Add documentation for the exported procedures.
Estimated hours taken: 0.5

library/random.m:
	Add documentation for the exported procedures.
	Declare the undocumented random__test predicate as
	`pragma obsolete' and remove it from the Mercury
	library reference manual (in preperation for
	deleting it in a future release).
	Some minor changes to the code to make it more
	readable.
1997-06-25 06:25:27 +00:00
Tyson Dowd
cbcb23d17b Enable --warn-interface-imports by default.
Estimated hours taken: 3

Enable --warn-interface-imports by default. This was turned off while
list and term were defined in mercury_builtin.m, since it caused many
warnings.

Fix all the unused interface imports that have been added since then.

compiler/options.m:
	Enable --warn-interface-imports by default.

compiler/module_qual.m:
	Fix formatting inconsistencies with module names in warning
	messages. (".m" was not appended to module names if there was
	only one module).

compiler/*.m:
library/*.m:
tests/invalid/type_loop.m:
tests/warnings/*.m:
	Remove usused interface imports, or move them into
	implementation (mostly bool, list and std_util).
1997-05-21 02:16:53 +00:00
Fergus Henderson
42ec93ecde Remove random__bit_reverse.
Estimated hours taken: 0.5

library/random.m:
	Remove random__bit_reverse.
	Use backtrackable unique modes rather than unique modes.
1996-04-25 03:43:07 +00:00
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
Fergus Henderson
b0351fbeb4 Add copy/2.
library/mercury_builtin.m:
	Add copy/2.

library/io.m:
	Change io__get/set_globals to use unique modes.
	Add a few calls to copy/2 to make things work.

library/*.m:
	Add unique modes to a few predicates.
	Remove unique modes in a couple of cases where they didn't work.
1995-08-02 07:20:49 +00:00
Thomas Conway
407298c19a add a __member predicate for nondeterministically getting the
map.m & tree234.m:
	add a __member predicate for nondeterministically getting the
	members of a map or tree.
random.m:
	replace the random number generator with the original proper one.
1995-06-22 23:57:28 +00:00
Fergus Henderson
93a755d563 Add copyright notices.
library/*:
	Add copyright notices.
1995-03-28 16:19:34 +00:00
Fergus Henderson
1baeaea26c A temporary hack to ensure that the Sicstus version
random.nl, term.nl, sp_lib.nl:
	A temporary hack to ensure that the Sicstus version
	and the Mercury version produce the same output.
1995-02-24 01:57:52 +00:00
Fergus Henderson
fd2470dd0a Add some more stuff for compiling to .o
Makefile*:
	Add some more stuff for compiling to .o

Makefile*, mercury_compile*, code_gen*:
	Add some stuff for handling `.pp' files.
	`.pp' files are Mercury source code containing
	NU-Prolog hacks inside

		#if NU_PROLOG
		...
		#endif

	These hacks are preprocessed out (using sed, not cpp)
	except when compiling with `mnc'.

term_io.nl, term_io.nu.nl, interpreter.nl, prog_out.nl:
	Make sure all the predicates in term_io.nl are
	prefixed with `term_io__', not `io__'.

term_io.nl, require.nl:
	Add some `external' declarations.

call_gen.nl, unify_gen.nl:
	A temporary hack - generate incorrect code for complicated/polymorphic
	unifications, rather than aborting.

random.nl:
	Make the code more efficient.

hlds.nl, term.nl:
	Allocate pred_ids and variable numbers randomly rather than
	sequentially, so that the binary trees remain reasonably balanced.

code_info.nl, unify_gen.nl, hlds_out.nl:
	Generate informative comments for tag tests: say the name of
	the variable being tested, and which constructor we are testing for.

llds.nl:
	Cast field() expressions to (int) when used as rvals, so
	that comparisons work as expected.

make_hlds.nl:
	Improve error reporting.
1994-10-09 18:26:41 +00:00
Fergus Henderson
81175cbf10 Fix naming conventions (delete/remove).
bintree_set.nl:
	Fix naming conventions (delete/remove).
	(XXX should fix set.nl too!)

graph.nl, pqueue.nl, random.nl, bintree_set.nl:
	Add missing determinism annotations.

io.nl, io.nu.nl:
	Add io__call_system.

mercury_compile.nl:
	Call a script `mercury_update_interface' to update the
	interface files without stuffing up the timestamps.
	Output a `<Module>.date' timestamp file.

	Also, eliminate the circular interface dependency warning,
	since it was giving false hits on circular implementation
	dependencies.

GNUMakefile, Makefile.common, Makefile.mercury:
	Fix a bug or two.
	Update the interface files intelligently.
1994-06-21 17:22:46 +00:00
Fergus Henderson
18280e1dff Bug fix: mode ui' should have been di'.
random.nl:
	Bug fix: mode `ui' should have been `di'.
1994-03-30 03:54:18 +00:00
Thomas Conway
4a24d5f59b A random number library. At the moment, it produces only _bad_
random.nl:
	A random number library. At the moment, it produces only _bad_
	random numbers.
1994-03-30 03:11:43 +00:00