profiler/call_graph.m:
profiler/generate_output.m:
profiler/mercury_profile.m:
profiler/options.m:
profiler/output.m:
profiler/process_file.m:
profiler/read.m:
profiler/snapshots.m:
Replace implicit streams with explicit streams.
profiler/PROF_FLAGS.in:
Specify --warn-implicit-stream-calls for all modules in this directory.
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: 3
Branches: main
Clean up in unused module imports in the Mercury system detected
by --warn-unused-imports.
analysis/*.m:
browser/*.m:
deep_profiler/*.m:
compiler/*.m:
library/*.m:
mdbcomp/*.m:
profiler/*.m:
slice/*.m:
Remove unused module imports.
Fix some minor departures from our coding standards.
analysis/Mercury.options:
browser/Mercury.options:
deep_profiler/Mercury.options:
compiler/Mercury.options:
library/Mercury.options:
mdbcomp/Mercury.options:
profiler/Mercury.options:
slice/Mercury.options:
Set --no-warn-unused-imports for those modules that are used as
packages or otherwise break --warn-unused-imports, e.g. because they
contain predicates with both foreign and Mercury clauses and some of
the imports only depend on the latter.
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
profiler/call_graph.m:
profiler/read.m:
extras/trailed_update/var.m:
Fix some "missing interface import" bugs detected by the
latest version of the compiler.
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: 1.5
Undo dylan's changes in the names of some library entities,
by applying the following sed script
s/term_atom/term__atom/g
s/term_string/term__string/g
s/term_integer/term__integer/g
s/term_float/term__float/g
s/term_context/term__context/g
s/term_functor/term__functor/g
s/term_variable/term__variable/g
s/_term__/_term_/g
s/std_util__bool_/bool__/g
to all the `.m' and `.pp' files in the compiler and library directories.
The reason for undoing these changes was to minimize incompatibilities
with 0.4 (and besides, the changes were not a really good idea in the first
place).
I also moved `bool' from std_util.m to a separate module.
The main reason for that change is to ensure that the `__' prefix is
only used when it genuinely represents a module qualifier.
(That's what dylan's changes were trying to acheive, but `term__'
does genuinely represent a module qualifier.)
profiler/*.m:
Where appropriate, add `bool' to the list of imported modules.
mercury_profile.m:
Work-around problem with the "0 1" line in Prof.Counts.
Use library__version/1 to get the version number.
call_graph.m:
Fix bug where `io__seen' was called when it should not have been.
Improve error message if `io__see' fails.
process_file.m:
Handle errors gracefully: write a message to stderr, don't
call error/1.
Mmake:
Pass EXTRA_MLFLAGS to ml.
This is because ml now strips the executable by default,
so you need to pass --no-strip if you want to debug it.
README:
Very basic description of how to enable profiling and view the
results. Please send comment's on the bits you don't understand
and the I should explain better and expand on.
*.m:
Now also generate's the flat profile. Which tells you how much time
you spend in each predicate as a percentage of total time.
Also print's out an alphabetic list of all the predicate's and there
ID numbers.