Estimated hours taken: 500
Add a new pass to the compiler, that attempts to introduce accumulators
into a procedure so as to make that procedure tail recursive.
WORK_IN_PROGRESS:
Document that the transformation now exists.
compiler/goal_util.m:
Create goal_util__can_reorder_goals, which is a version of
pd_util__can_reorder_goals that will work on the alias branch.
compiler/instmap.m:
Add instmap__changed_vars. This predicate is meant to provide the
same functionality as instmap_delta_changed_vars, but work on the
alias branch.
Also add comment to instmap_delta_changed_vars about using
instmap_changed_vars
compiler/accumulator.m:
The transformation.
compiler/mercury_compile.m:
Call the transformation.
compiler/options.m:
Add the option to turn the transformation on.
doc/user_guide.texi:
Document the option.
profiler/demangle.m:
util/mdemangle.c:
Demangle the accumulator version of the procedure labels.
compiler/notes/compiler_design.html:
Add the new pass to the documentation.
Estimated hours taken: 4
Make declarative debugging enabled by default, and add test cases.
The declarative debugger, while not complete, is fairly stable so
users will be able to experiment with it after this change without
having to re-configure the whole system. However, the main motivation
for this change is so that developers who make changes to the system
will have access to these test cases.
configure.in:
Turn the decl-debug feature on by default.
tests/debugger/declarative:
New directory containing tests for the declarative debugger.
tests/debugger/declarative/*.m:
tests/debugger/declarative/*.inp:
tests/debugger/declarative/*.exp:
Declarative debugger test cases.
tests/debugger/declarative/Mmakefile:
Mmakefile to do the declarative debugger tests.
tests/debugger/Mmakefile:
For each target, make the corresponding target in the
'declarative' subdirectory.
WORK_IN_PROGRESS:
Document the new (incomplete) feature.
Estimated hours taken: 1
WORK_IN_PROGRESS:
- mention the support for Aditi
- mention the support for aliasing and accumulator introduction,
- add a new section "work not in progress" at the end of this file
- move the documentation on `--generate-bytecode' and
`--generate-prolog' into this new section, and rewrite
them a bit
- mention `--high-level-c' in the "work not in progress" section
Estimated hours taken: 90
An initial implementation of the accurate garbage collector.
WORK_IN_PROGRESS:
Add an entry for the accurate garbage collector.
library/builtin.m:
library/mercury_builtin.m:
library/std_util.m:
runtime/mercury_tabling.h:
Deep copy terms using the address of the value instead of
just the value.
library/io.m:
Initialize the garbage collector's rootset with the globals.
runtime/Mmakefile:
Add new files to the Mmakefile.
runtime/mercury_accurate_gc.h:
runtime/mercury_accurate_gc.c:
The new garbage collector.
runtime/mercury_agc_debug.c:
runtime/mercury_agc_debug.h:
Debugging utilities for the new garbage collector.
runtime/mercury_deep_copy.c:
runtime/mercury_deep_copy.h:
runtime/mercury_deep_copy_body.h:
Put the deep copy code in mercury_deep_copy_body.h, and #include
it with appropriate #defines in order to get a variant for
deep_copy(), and one for agc_deep_copy().
agc_deep_copy() forwards pointers as it copies.
Also, deep_copy (all variants) have been modified to take
a pointer to the data to be copied, because some variants
need to be able to modify it.
runtime/mercury_engine.c:
runtime/mercury_engine.h:
Add a second heap_zone which is the to-space of
the copying collector.
Add a debug_heap_zone, which is used as a scratch
heap for debugging.
runtime/mercury_label.c:
Instead of
realloc(entry_table, ....)
do
entry_table = realloc(entry_table, ....)
to avoid horrible bugs.
Also, make sure the tables get initialized before looking up
an entry label.
runtime/mercury_imp.h:
Include mercury_debug.h before most of the modules.
(mercury_engine.h adds a new MemoryZone only if we are
debugging accurate GC).
runtime/mercury_memory.c:
Setup the debug_memory_zone sizes.
Remove an unnecessary prototype.
runtime/mercury_memory_handlers.c:
Add code to get the program counter and the stack pointer
from the signal context.
Call MR_schedule_agc() from default_handler() if doing accurate gc.
runtime/mercury_memory_zones.c:
Setup the hardzone regardless of whether redzones are used.
Add some more debugging information.
runtime/mercury_regorder.h:
runtime/machdeps/alpha_regs.h:
runtime/machdeps/i386_regs.h:
Add definitions to make the real machine registers name/number
for MR_sp available.
runtime/mercury_trace_internal.c:
runtime/mercury_trace_util.c:
runtime/mercury_trace_util.h:
Add MR_trace_write_variable(), which writes terms given their
value and type_info.
runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
Change the size of the heap redzone when doing accurate GC.
Use a small heap when debugging agc.
runtime/mercury_debug.h:
runtime/mercury_conf_param.h:
Add new debugging macros and document them.
runtime/mercury_type_info.c:
Add const to the pointer arguments of MR_make_type_info.
Estimated hours taken: 1
NEWS:
- Mention that the distribution is now split into core + extras.
- Mention improved handling of grades.
- Move the mention of DLL support to the WORK_IN_PROGRESS file.
- Mention better constant-propagation optimization.
- Fix an XXX: specify the location of lp_solve.
- Change the description of the change to io__call_system
to say that it was a bug fix, not an interface change.
- For a few items, add pointers to their documentation.
- Reorganize everything -- split it into four major sections:
changes to the language, standard library, extra libraries,
and the compiler.
WORK_IN_PROGRESS:
- Delete the mention of termination analysis, since this
is now in the NEWS file.
- Mention DLL support.
Estimated hours taken: 500
Add termination analysis to the compiler. The termination analysis
annotates each procinfo structure with termination information stating
whether each procedure is guaranteed to terminate.
Add transitive intermodule optimization to the compiler. Transitive
intermodule optimization uses .trans_opt files to store optimization
information. The difference between .trans_opt files and .opt files is
that .trans_opt files may depend on other .trans_opt files, whereas .opt
files may only depend on a .m file.
compiler/termination.m:
New file. The main module which controls the termination
analysis.
compiler/term_pass1.m:
New file. This file implements the first pass of the
termination analysis which attempts to derive relationships
between the relative sizes of variables. This information is
used by term_pass2.m
compiler/term_pass2.m:
New file. The second pass of the termination analysis attempts
to prove that each predicate or function in the program is
guaranteed to terminate.
compiler/term_util.m:
New file. Contains utilities which are used in various stages
of the termination analysis.
compiler/term_errors.m:
New file. Contains predicates for printing out error messages
produced by termination analysis.
compiler/trans_opt.m:
New file. This module contains predicates for both reading in
and writing .trans_opt files.
compiler/globals.m:
compiler/handle_options.m:
compiler/options.m:
Various modifications to handle the new options. Some of the
new options imply other options, and the `--termination-norm'
option is a string option which needs processing.
compiler/hlds_goal.m:
Added a comment that the list(uni_mode) subfield of construct,
and the unify_mode subfield of unify are not necessarily valid
when the unification applies to higher order terms.
compiler/hlds_out.m:
Added code to output termination information, as well as code to
print out the new markers.
compiler/hlds_pred.m:
Added the termination subfield to the proc_info structure and
added code to support it. Also added support for the new
markers.
compiler/make_hlds.m:
compiler/mercury_to_mercury.m:
compiler/module_qual.m:
compiler/modules.m:
compiler/prog_io_pragma.m:
Added support for the new pragmas, `termination_info',
`teminates', `check_termination' and `does_not_terminate'.
compiler/prog_data.m:
Added the new pragmas to the pragma_type. Also reformatted the
type declarations to conform with the coding specifications.
compiler/prog_io.m:
Reformatted some code and comments.
compiler/mercury_compiler.m:
Added code to call the termination analyser and to call the
predicate which creates .trans_opt files.
doc/reference_manual.texi:
Documented the termination analysis and the new pragmas.
doc/user_guide.texi:
Documented the new options.
Estimated hours taken: 0.1
WORK_IN_PROGRESS:
Delete mention of the support for user-defined equality axioms;
that is mentioned in NEWS file, so it shouldn't be mentioned here.
Estimated hours taken: 0.1
WORK_IN_PROGRESS:
Add mention of termination analysis:
+* Termination analysis. The paper describing our algorithm and results
+ is available from our Web page; a shorter version will be published
+ in the Static Analysis Symposium.
Estimated hours taken: 0.5
Update the documentation in preparation for the next release.
NEWS:
Move the "Work in Progress" section to a separate file.
Make the typography more consistent. Various minor cleanups.
WORK_IN_PROGRESS:
New file, containing a cleaned up version of the
"Work in Progress" section from the NEWS file.
BUGS, LIMITATIONS:
Minor wording changes.