Branches: main
Change the argument order of many of the predicates in the map, bimap, and
multi_map modules so they are more conducive to the use of state variable
notation, i.e. make the order the same as in the sv* modules.
Prepare for the deprecation of the sv{bimap,map,multi_map} modules by
removing their use throughout the system.
library/bimap.m:
library/map.m:
library/multi_map.m:
As above.
NEWS:
Announce the change.
Separate out the "highlights" from the "detailed listing" for
the post-11.01 NEWS.
Reorganise the announcement of the Unicode support.
benchmarks/*/*.m:
browser/*.m:
compiler/*.m:
deep_profiler/*.m:
extras/*/*.m:
mdbcomp/*.m:
profiler/*.m:
tests/*/*.m:
ssdb/*.m:
samples/*/*.m
slice/*.m:
Conform to the above change.
Remove any dependencies on the sv{bimap,map,multi_map} modules.
Estimated hours taken: 12
Branches: main
library/digraph.m:
New module for directed graphs. This is essentially the relation
module but with more consistent terminology, and with argument
ordering that suits state variables. Other differences with the
relation module:
- The digraph_key type has a phantom type parameter, which helps to
ensure that keys from one digraph are not used with another digraph.
- Exports a version of digraph.reduced which also returns the mapping
between the original digraph keys and the new ones.
- The implementation of compose/3 doesn't try to use the "domain" and
"range" of the graphs (which is meaningless in the relation module
anyway).
- New, more efficient algorithm for is_dag/1. Correctness proof is
documented.
- components/2 uses a more efficient data representation, and avoids
some intermediate data structures.
- reduced/{2,3} avoids some intermediate data structures.
- tc/2 avoids some intermediate data structures.
library/library.m:
Add the new module.
library/relation.m:
Document that this module is deprecated in favour of digraph.
Flag relation.init/{0,1} as obsolete (it would be better to flag
the entire module, or the relation/1 type as obsolete, but Mercury
does not support this).
NEWS:
Mention that the new module supersedes relation.m and svrelation.m.
compiler/*.m:
profiler/*.m:
Use the digraph module rather than the relation module.
Estimated hours taken: 1
Branches: main
profiler/*.m:
Fix a bunch of deviations from our coding standards.
Rename some predicates to make them better reflect the predicates'
semantics.
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: 0.5
Branches: main
profiler/*.m:
deep_profiler/*.m:
compiler/*.m:
Replace __ with . as the module qualifier everywhere in all the modules
of the profiler and deep profiler and in some modules of the compiler.
Estimated hours taken: 1
Branches: main
profiler/*.m:
deep_profiler/*.m:
Import only one module per line. Misc other updates to bring these
modules closer to being up to date with our current style guidelines.
Estimates hours taken: 5
Branches: main
Clean up most of the profiler and bring it into line
with out current coding standards. There are no changes
to any algorithms.
This reduce the size of the code and also (hopefully)
makes things a little easier to maintain.
XXX The profiler is currently broken on those machines
that compile with intermodule optimization, e.g jupiter.
XXX I haven't cleaned up the demangler much yet either.
profiler/call_graph.m:
profiler/generate_output.m:
profiler/globals.m:
profiler/output.m:
profiler/mercury_profile.m:
profiler/process_file.m:
profiler/output_prof_info.m:
profiler/prof_debug.m:
profiler/prof_info.m:
profiler/propagate.m:
profiler/read.m:
Bring these modules in line with our current
coding standards.
Replace existing code with code that uses
higher-order predicates, state variables and
functions where appropriate.
profiler/demangler.m:
Replace `is' with `='.
Estimated hours taken: 0.5
Branches: main
Deprecate the predicate int.to_float/2 in favour of float.float/1.
(There has been a comment describing this as obsolete for some time).
NEWS:
Mention this change.
library/float.m:
Add an implementation of float.float/1 rather than
just calling int.to_float/2.
library/int.m:
Add a pragma obsolete declaration to int.to_float/2.
The implementation will have to stay until the predicate
is deleted because importing the float module into this
one results in type ambiguities.
library/term.m:
profiler/generate_output.m:
profiler/output.m:
profiler/propagate.m:
tests/hard_coded/agg.m:
tests/hard_coded/qual_strang.m:
tests/hard_coded/qual_strung.m:
Change calls to int.to_float/2 to calls to float.float/1.
Estimated hours taken: 12
Branches: main
Fix performance bugs in library/relation.m which caused
`mmc --generate-dependencies' to choke on large programs
(e.g. the compiler).
`mmc --generate-dependencies top_level' now takes
about 8 seconds on jupiter, compared to over a minute
before.
library/relation.m:
Use sparse_bitset for sets of relation_keys.
Rewrite relation__compose to use the indexing
in the relation structure, rather than just
doing a naive nested loop join.
Clean up and fix a bug in relation__is_dag.
Rewrite algorithms to avoid using to_sorted_list
on sparse_bitsets of relation keys; this is not
a cheap operation as it is with set.sets.
Use sparse_bitset.fold{l,r} instead where
possible.
library/sparse_bitset.m:
Add new functions to_set and from_set,
which convert between sparse_bitsets
and set.sets.
Add predicate versions of foldl and foldr with
the same modes as the list version.
compiler/modules.m:
Use sparse_bitset.foldl rather than sparse_bitset.to_sorted_list
followed by list.map.
profiler/propagate.m:
relation__dfsrev now takes a sparse_bitset(relation_key),
not set_bbbtree(relation_key).
library/map.m:
library/tree234.m:
Type specialize map__det_update for term.var and int.
NEWS:
Document new predicates and functions.
tests/hard_coded/relation_test.{m,exp}:
Test relation__is_dag.
Estimated hours taken: 0.25
Fix some places where `__' as module qualifier broke the profiler.
generate_output.m:
process_file.m:
prof_info.m:
propagate.m:
s/prof__/prof_/g
s/prof_node__/prof_node_/g
s/pred_info__/pred_info_/g
s/cycle_info__/cycle_info_/g
since the part before `__' was not a module qualifier.
read.m:
s/replace/read__replace/ (where appropriate)
to avoid ambiguity with `list__replace'.
Estimated hours taken: 5
Design change to relation.m to fix a MAJOR shortcoming. Relations
now require the domain to be entered explicitly
fixes a known bug where performing a topological sort in certain
situations resulted in not all elements appearing in the sort.
compiler/call_graph.m:
compiler/process_file.m:
compiler/propagate.m:
Minor changes to use the new relation.m.
Estimated hours taken: 0.25
profiler/{generate_output.m,prof_debug.m,propagate.m}:
Comment out `:- import_module writeln'.
Move lots of `:- import_module' declarations from the interface
to the implementation sections.
Estimated hours taken: 20
Rewrite of the profiler so that it handles cycles in the call graph more
gracefully.
profiler/propagate.m:
Now we build a map of all the cycles as we do a dfs search on the call
graph. Then we use this data to fill out the prof_info structure in
a meaningful manner.
profiler/prof_info.m:
Divide the prof_info structure into two. We now have seperate
structures for cycles and single predicates.
profiler/*.m:
Minor changes to make sure that we print out the data in the correct
manner.
Estimated hours taken: 1
profiler/*.m:
By default the profiler now only generates the flat profile. To
generate the call graph profile as well. One needs to turn the -c
option on.