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).
Estimated hours taken: 0.25
library/benchmarking.m:
library/float.m:
library/int.m:
library/io.m:
library/mercury_builtin.m:
library/std_util.m:
Use "mercury_foo.h" instead of "foo.h".
Use `pragma c_code(...)' instead of the obsolete syntax
`pragma(c_code, ...)' (I only changed some of the
occurrences of this).
Estimated hours taken: 4
library/float.m:
- Add a function `func float(int) = float' for converting
from int to float.
- Add function versions of all the predicates.
- Reorder the declarations so that the functions and predicates
defined are grouped according to their purpose.
- Add `pragma obsolete' declarations for all the
`builtin_float_*' predicates (XXX commented out for now,
until my recently committed change to simplify.m to avoid
spurious warnings has been installed on all our machines)
and move the declarations of those predicates so that they
don't appear in the Mercury Library Reference Manual.
- Update the old `pragma(c_code, ...)' declarations to use
the next syntax for `pragma c_code'.
library/mercury_builtin.m:
Use `<' and `>' rather than the obsolete predicates
`builtin_float_lt' and `builtin_float_gt'.
Estimated hours taken: 4
Add new predicate `float__hash' to the standard library for computing a
non-negative integer hash value for a float.
Add a C function to the runtime to do the actual hashing. This
function is in the runtime so that it can be called from both
the library and from C code generated for `pragma fact_table'
indexing.
library/float.m
Add a new predicate `float__hash' that calls the runtime
function `hash_float()'.
runtime/mercury_float.h
Add a declaration for `hash_float()'.
runtime/mercury_float.c
Add new file mercury_float.c for runtime code related to
floats.
Add a new function `hash_float()' for hashing floats.
Estimated hours taken: 0.1
int, float:
Remove the definitions of the unary plus and minus operators and
predicates, since they have been built in for some time now.
Once this change has been installed on all our machines,
we will need to reenable the code in make_hlds that prevents
the redefinition of builtins.
Estimated hours taken: 2
Module qualification of types, insts and modes.
library/std_util.m
Qualified type names in the labels in the C code for __Unify__ etc.
Left the old labels in temporarily to allow the compiler to bootstrap.
library/mercury_builtin.m
library/term.m
Moved type var and predicates term__var_to_int, term__init_var_supply
and term__new_var to mercury_builtin.m to prevent module qualification
conflicts due to type var being defined as a local type to term.m when
it is needed in mercury_builtin.m for term_to_type.
library/library.m
Added assoc_list to the list of modules imported.
library/float.m
Remove the declaration for type float, since it is a builtin.
library/Mmake
Fergus' fix to a VPATH problem.
Estimated hours taken: 6
float, int:
Add reverse modes for the arithmetic predicates and functions,
and make unary plus and minus builtins.
io.m, mercury_builtin, std_util, string:
Make the C code work with --args compact.
In std_util, reduce the number of comment formats used from 4 to 2.
Estimated hours taken: 0.5
int, float:
Add comments showing the future backward modes of arithmetic
operators; their order is important.
io:
Add the ability to print strings on binary files, and fix a bug
in the declaration of io__write_byte/4.
string:
Removed spaces from ends of lines, etc.
Estimated hours taken: 0.5
library/float.m:
Uncomment the floating point comparison operators ('<', '>=', etc.)
since now that we support overloading properly, they don't
conflict with the ones in int.m.
Estimated hours taken: 1
int.m, float.m:
Implement the builtin arithmetic operations using functions,
rather than ad-hoc hacks in the parser. You can know use
use arithmetic operators such as `+', `-', etc. on floats.
(You can't yet use relational operators such as <, >=, etc.
-- that's coming soon.)
Estimated hours taken: 24
Move the C implementation of various builtins from the `runtime' directory
to inside pragma(c_code) declarations in the `library' directory sources.
library/{io,string,require,std_util,mercury_builtin}.m:
Add lots of pragma(c_code) and pragma(c_header_code) declarations.
Also a few other miscellaneous changes.
library/list.m:
Fix a bug in the as yet unused list__merge_sort.
library/io.m:
Combine io__do_open_{input,output,append} into a single
predicate io__do_open.
library/std_util.m:
Fix the implementation of report_statistics so that it gives
useful information when using conservative garbage collection.
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'.
code_util.nl, float.nl, llds.nl, mercury_builtin.nl, opt_debug.nl,
parser.nl, polymorphism.nl, sp_lib.nl, string.nl, string.nu.nl,
type_util.nl, typecheck.nl, unify_gen.nl:
Implement floating point.
Makefile.common:
Remove `-include test.dep' line. Use Mmake.
int.nl:
Update a few of the comments.
io.nu.nl:
For Sicstus Prolog, if main/2 is not defined then enter the
debugger.
term.nl:
In term__create_var, use bit reversals rather than random numbers
to ensure that the binary trees remain balanced.
call_gen.nl:
For polymorphic unifications, generate a call to fatal_error().
code_gen.nl, hlds.nl, make_hlds.nl, modes.nl, unify_proc.nl:
Move the unify_request data structure from code_info to the HLDS,
and move the unify_request handling from code_gen.nl to modes.nl.
This is because we now generate HLDS code rather than LLDS code
for complicated unifications.
code_util.nl, hlds_out.nl:
Do some special name mangling for =/2.
float.nl, typecheck.nl, undef_types.nl, term.nl, hlds.nl:
Until we implement `float' properly, define it as an abstract type
in float.nl.
hlds.nl, make_hlds.nl:
Rename `local_pred, imported_pred, exported_pred' to just
`local, imported, exported' since they also apply to types, etc.,
not just to preds.
mercury_compile.pp, mercury_to_goedel.nl, prog_util.nl:
Replace to goedel__ prefixes in prog_util.nl with prog_util__.
std_util.nl:
Change the code for semidet_succeed to avoid determinism warning.