Estimated hours taken: 0.75
Branches: main
library/queue.m:
library/svqueue.m:
Added to_list, put_on_front, put_list_on_front, and get_from_back.
Added svqueue.put_on_front, svqueue.put_list_on_front, and
svqueue.get_from_back.
Cosmetic changes to comments in svqueue.m.
NEWS:
Mention the new additions.
Estimated hours taken: 3.5
Branches: main
Make the positioning of descriptive comments conform
to the coding standard for the following library modules.
Convert preds to predmode syntax where possible.
Make the ordering of related predicates and functions
conform to the coding standard, where the descriptive
comment makes it possible to do that.
Other minor changes are listed below.
library/bimap.m:
Fix capitalisation of a few comments.
library/dir.m:
s/throw an exception/throws an exception/.
library/exception.m:
Fix the comment about the exception_result/1 type.
There is only one type and an inst following the comment.
library/map.m:
Remove the unique modes for map.set/4, map.delete/3 and
map.delete_list/3.
library/rbtree.m:
Remove the unique modes for rbtree.set/4, rbtree.delete/3,
rbtree.remove/4, rbtree.remove_smallest/4 and rbtree.remove_largest/4.
library/tree234.m:
Remove left over unique modes for preds.
library/set.m:
XXX the ordering of procedures in this module is a bit strange.
library/set_bbbtree.m:
library/set_unordlist.m:
Remove various unique modes for set operations like
delete/3. (Some of these were commented out anyway).
library/term_to_xml.m:
Fix a spot where line width exceeded 79 characters.
library/array.m:
library/assoc_list.m:
library/random.m:
library/multi_map.m:
library/pqueue.m:
library/queue.m:
library/bool.m:
library/char.m:
library/construct.m:
library/counter.m:
library/deconstruct.m:
library/eqvclass.m:
library/gc.m:
library/io.m:
library/sparse_bitset.m:
library/stack.m:
library/std_util.m:
library/store.m:
library/string.m:
library/term.m:
library/term_io.m:
library/type_desc.m:
library/varset.m:
As above.
Estimated hours taken: 0.1
Branches: main
library/queue.m:
Add a function queue.from_list/1 that is a synonym
for queue.list_to_queue/1.
NEWS:
Mention the new function.
Shift the description of the term_to_xml module. It
had ended up under the changes for 0.11 for some reason.
s/ad/as/ in a spot.
Estimated hours taken: 8
Branches: main
library/*.m:
Bring these modules up to date with our current style guidelines.
Use predmode declarations where appropriate. Use state variable syntax
where appropriate. Reorder arguments where this makes it possible to
to use state variable syntax. Standardize format of predicate
description comments. Standardize indentation.
Estimated hours taken: 6
library/pqueue.m:
library/assoc_list.m:
library/getopt.m:
library/bag.m:
library/bimap.m:
library/bintree.m:
library/bintree_set.m:
library/bt_array.m:
library/eqvclass.m:
library/graph.m:
library/group.m:
library/queue.m:
library/rbtree.m:
library/stack.m:
library/term.m:
library/varset.m:
library/tree234.m:
library/relation.m:
library/set.m:
library/set_bbbtree.m:
library/set_ordlist.m:
library/set_unordlist.m:
Ralph Becket <rwab1@cam.sri.com>'s changes to add functions for
the remaining output det predicates in a number of modules in the
standard library. Basically, for each
:- pred f(in, ..., in, out) is det.
he has added the declaration
:- func f(in, ..., in) = out.
and definition
f(X1, ..., Xn) = Y :-
f(X1, ..., Xn, Y).
The changes were made using a mostly automatic process.
Estimated hours taken: 0.5
library/queue.m:
Fix a bug in queue__delete where the constraint that the `off'
list is empty if and only if the queue is empty was not being
preserved in all cases.
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.5
library/queue.m:
Fix an inefficiency where in some circumstances, queue__head
could take O(n) time where n is the number of elements in the
queue. The fix is to impose (and maintain!) an extra
constraint on the queue data structure which guarantees that
the bad case never turns up.
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).
Estimated hours taken: 5
Remove support for term_to_type and type_to_term implemented as special
preds. Remove support for one-cell and one-or-two-cell type_infos (now
shared-one-or-two-cell type_infos). Move definitions that were in
mercury_builtin.m back to where they belong.
This code has been removed because it is no longer used, and was no
longer being maintained but was still quite complex.
compiler/globals.m:
compiler/handle_options.m:
compiler/mercury_compile.m:
compiler/options.m:
Remove one_cell and one_or_two_cell from type_info methods.
compiler/polymorphism.m:
Remove term_to_type and type_to_term support.
Remove one_cell and one_or_two_cell from type_info methods.
Fix documentation to reflect the new situation.
compiler/special_pred.m:
compiler/unify_proc.m:
Remove term_to_type and type_to_term support.
library/list.m:
Put the definition of `list' back into list.m
library/mercury_builtin.m:
Take the definitions of `list', `term', `var', `var__supply',
etc, out of this module.
Remove type_to_term, term_to_type, det_term_to_type,
term__init_var_supply, term__create_var, term__var_to_int
and term__context_init.
Remove references to USE_TYPE_TO_TERM and #ifdefs around
SHARED_ONE_OR_TWO_CELL_TYPE_INFO.
library/std_util.m:
Remove references ONE_OR_TWO_CELL_TYPE_INFO, and code that
handles one-cell typeinfo comparisons.
library/term.m:
Add type_to_term, term_to_type, det_term_to_type,
term__init_var_supply, term__create_var, term__var_to_int
and term__context_init back to term.m.
Add new implementation of type_to_term/2.
library/uniq_array.m:
Fix a typo in a comment - term_to_type/3 instead of term_to_type/2.
runtime/call.mod:
Remove special case code for unify, compare, index for
one-cell typeinfos.
Remove code for type_to_term/2.
runtime/type_info.h:
Remove references to ONE_CELL_TYPE_INFO or ONE_OR_TWO_CELL_TYPE_INFO.
Make sure only SHARED_ONE_OR_TWO_CELL_TYPE_INFO.
Remove references to USE_TYPE_TO_TERM.
compiler/base_type_layout.m:
compiler/bytecode_gen.m:
compiler/code_util.m:
compiler/delay_slot.m:
compiler/det_util.m:
compiler/fact_table.m:
compiler/hlds_data.m:
compiler/hlds_goal.m:
compiler/mode_debug.m:
compiler/tree.m:
library/bag.m:
library/queue.m:
Import module `list' or `term' (or both).
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'.
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.
lots of files:
Make a start at implementing code generation for complicated
unifications. In the HLDS, change complicated_unify/4 to
complicated_unify/2 since we didn't need the extra two args
after all.
peephole.nl:
A couple of minor efficiency improvements.
queue.nl:
Add queue__queue_to_list/2.
mercury_builtin.nl:
Use det_pred(...), semidet_pred(...), nondet_pred(...)
rather than call_pred(...) for the higher-order predicate modes.
prog_io.nl, io.nl, varset.nl, etc.
Add determinism annotations.
hlds.nl, make_hlds.nl, LOTS of other files:
Reorganize the way the predicate table works.
Make hlds.nl a bit more modular.
Change call/4 to call/5.
Remove all/2 from the hlds.
Changed pred_id to an integer.
Added pred_call_id which is similar to the old pred_id.
Makefile:
Add a rule for creating *.hlds_dump.
array.nl:
Fix determinism error.
det_analysis.nl:
Fix a bug in printing determinism warnings.
fix_errors.sed:
Modify this so it allows all the `inferred nondet' determinism
errors but none of the `inferred semidet' ones.
llds.nl:
Rename llds__pred_mode_id as llds__proc_id.
mode_errors.nl:
Finally got around to implementing Zoltan's suggestions
about the error messages from the mode analysis.
If an error occurs in a conjunction, only one error message
is printed out - the first error which doesn't relate to
a head unification.
modes.nl:
Handle X = f(X) properly. NB: determinism analysis and code
generation still get it wrong!
undef_modes, undef_insts:
I've broken the error message code, since it's not easy
to print pred_ids. I just changed it so that it didn't
print the pred_ids out. Should fix this properly at some stage...
list.nl:
Comment out the difficult modes for same_list.
(A temporary hack until the mode system is improved.)
make_hlds.nl:
Fix scoping errors.
prog_io.nl:
Fix scoping error introduced by the DCG expansion of if-then-else.
map.nl:
Add map__is_empty/1.
mercury_to_mercury.nl:
Fix error in mode declaration.
modes.nl:
Fix bug where the waiting_goals_table in the delay_info structure
was not being correctly updated when we exited a conjunction
which contained a mode error.
queue.nl:
Use `[A|B]' instead of `A.B'.
Add a when declaration.
typecheck.nl:
Fix mode error.
Makefile:
Add a rule to create *.ugly using mercury_compile's
`--convert-to-Mercury' option.
set.nl:
Add set__singleton_set/2.
queue.nl:
Fix queue.nl so that all the operations have an amortised cost
of O(1), execept testing for equality which is O(N) (with a
moderately bad constant factor).