NOTE: this change does not affect the io module -- I've left that for a
separate change.
library/*.m:
As per the recent change to the coding standard, avoid module
qualification in library interfaces where possible.
Reformat declarations and descriptive comments to better utilise
any space freed up by the above.
Branches: main
Change the argument order of some predicates in the stack and pqueue modules in
order to make them more conducive to the use of state variable notation.
library/pqueue.m:
library/stack.m:
Change the argument ordering as above.
Rename some variables in stack.m.
library/svpqueue.m:
library/svstack.m:
Make the predicates exported by these modules as obsolete.
NEWS:
Announce the above changes.
compiler/code_info.m:
compiler/delay_info.m:
compiler/ml_gen_info.m:
compiler/mode_constraint_robdd.m:
compiler/mode_ordering.m:
Conform to the above changes.
Branches: main
Add the modules svstack and svpqueue to the standard library.
library/svpqueue.m:
library/svstack.m:
Add state variable friendly interfaces to stacks and pqueues.
library/pqueue.m:
Add a det version of remove/4.
Group function definitions with the clauses for the corresponding
predicates.
library/library.m:
Include the new modules.
NEWS:
Announce the above changes.
Estimated hours taken: 20
Branches: main
Support implicit parallelism in the compiler.
The compiler now uses the deep profiler feedback information to build a
parallel version of a program.
Changes have also been made to the feedback format for candidate parallel
conjunctions and the analysis that recommends opportunities for parallelism to
the compiler.
compiler/implicit_parallelism.m:
Mark Tannier's implementation as deprecated (it also crashes the
compiler).
Introduce new implicit parallelism transformation.
apply_implicit_parallelism_transformation now returns maybe_error rather
than maybe so that errors can be described.
compiler/goal_util.m:
Add a predicate to transform a goal referenced by a goal path within a
larger goal structure and rebuild that structure.
compiler/mercury_compile.m:
Conform to changes in implicit_parallelism.m
deep_profiler/mdprof_feedback.m:
Return a cord of warnings from many predicates, these warnings are used to
describe cases where parallelism might be profitable but it is not (yet)
possible to transform the code into parallel code.
Fix a bug whereby the wrong deep profiling statistic was used to calculate
the cost of a call.
Do not attempt to parallelise calls with other goals between them.
mdbcomp/feedback.m:
Remove the intermediate goals information from the candidate parallel
conjunctions feedback data.
mdbcomp/program_representation.m:
Provide a in-order alternative to the goal_path type so that operations on
the start of the goal path occur in constant time and goal_path itself
remains usable as a key in arrays because it doesn't use the cord type
internally.
library/cord.m:
Added a di/uo mode to cord.foldl_pred.
library/list.m:
Added list.find_index_of_match/4 to return the index of the first item in
a list that satisfies the predicate given in the first argument.
library/pqueue.m:
Added pqueue.length/1
NEWS:
Announce standard library changes.
Estimated hours taken: 0.2
Branches: main, release
library/io.m:
Add the equivalences text_input_stream == input_stream and
text_output_stream == output_stream. The text_ versions are less
ambiguous then the existing ones.
s/IO/I\/O/ (previously we used a mixture of both).
Reformat some documentation.
library/pqueue.m:
Fix a spot where the conversion to 4-space indentation had gone awry.
library/dir.m:
Reposition a section heading.
library/string.m:
browser/declarative_tree.m:
compiler/java_util.m:
compiler/mercury_compile.m:
compiler/typecheck.m:
Fix some typos.
Estimated hours taken: 18
Branches: main
Move the univ, maybe, pair and unit types from std_util into their own
modules. std_util still contains the general purpose higher-order programming
constructs.
library/std_util.m:
Move univ, maybe, pair and unit (plus any other related types
and procedures) into their own modules.
library/maybe.m:
New module. This contains the maybe and maybe_error types and
the associated procedures.
library/pair.m:
New module. This contains the pair type and associated procedures.
library/unit.m:
New module. This contains the types unit/0 and unit/1.
library/univ.m:
New module. This contains the univ type and associated procedures.
library/library.m:
Add the new modules.
library/private_builtin.m:
Update the declaration of the type_ctor_info struct for univ.
runtime/mercury.h:
Update the declaration for the type_ctor_info struct for univ.
runtime/mercury_mcpp.h:
runtime/mercury_hlc_types.h:
Update the definition of MR_Univ.
runtime/mercury_init.h:
Fix a comment: ML_type_name is now exported from type_desc.m.
compiler/mlds_to_il.m:
Update the the name of the module that defines univs (which are
handled specially by the il code generator.)
library/*.m:
compiler/*.m:
browser/*.m:
mdbcomp/*.m:
profiler/*.m:
deep_profiler/*.m:
Conform to the above changes. Import the new modules where they
are needed; don't import std_util where it isn't needed.
Fix formatting in lots of modules. Delete duplicate module
imports.
tests/*:
Update the test suite to confrom to the above changes.
Estimated hours taken: 1
Branches: main
library/*.m:
Replace __ with . as the module qualifier everywhere.
tests/hard_coded/test_injection.exp:
Replace __ with . as the module qualifier in expected exceptions.
Estimated hours taken: 4
Branches: main
library/*.m:
Convert to four-space indentation most of the library modules that
weren't already indented that way. Use predmode syntax where possible.
In some modules, shorten long lines by deleting module name prefixes.
Fix departures from our coding standards.
In some modules, simplify code, mostly using field names and/or state
variables.
There are no changes in algorithms, except for neg_list in integer.m.
Estimated hours taken: 1
Branches: main, release
Add some synonyms for various functions in the string module
and make some more general cleanups to parts of the standard library.
library/array.m:
s/applys/applies/
library/list.m:
Position descriptive comments according to our coding
standard.
Fix a cut and paste error. list.foldl6 has six accumulators
not five.
library/parser.m:
library/pqueue.m:
library/set_bbbtree.m:
library/set_ctree234.m:
Fix minor formatting problems and spelling mistakes.
library/string.m:
Add functions string.from_int/1, string.from_char/1
and string.from_float/1 as synonyms for string.int_to_string/1
etc.
library/version_types.m:
s/incurrs/incurs/
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/pqueue.m:
Add pqueue.from_assoc_list/1 as a synonym for
pqueue.assoc_list_to_pqueue/1.
NEWS:
Mention the above addition.
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/*.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: 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).
varset:
Add some new predicates for the excess assignment pass.
std_util, assoc_list:
Move predicates for associative lists to a new module.
*.m:
Import assoc_list.
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'.
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.