mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 13:55:07 +00:00
The non-style changes include
- Replacing outdated information with up to date information.
- Deleting fully obsolete information, such as references to the IL backend.
- Replacing list entries that were just bare words or phrases
with full sentences, where this is useful.
- Improvements to make documents easier to read and understand.
However, the bulk of the diff consists of style changes. The initial main
of these changes are to eliminate, or at least reduce, inconsistencies
- between the styles of the different parts of each document, and
- between the styles of differents documents.
This applies both as they appear in a browser, and in the source .html file.
The main style changes are
- Add a vim mode line to each file.
- Do not specify a color for the page background; let the browser decide.
- Add a heading to the top of each page that echoes the title.
- Avoid SHOUTING in headings.
- Avoid the unneeded use of <hr>.
- Avoid the use of headings (e.g. h5) that are so low in the hierarchy that
browsers render them in a font that is *smaller* than the usual font.
- Replace definition lists with standard unordered lists
when the list items are not definitions.
- Replace ordered lists with standard unordered lists
when the list items have no meaningful order.
- Do not indent the contents of unordered lists, with the exception of
nested lists.
- Unless all entries in a list are extremely short,
do not try to put anything next to <li>.
- Fix violations reported by weblint.
compiler/notes/compiler_design.html:
The changes described above.
Explicitly introduce the notion of the middle end.
compiler/notes/bootstrapping.html:
Rewrite this almost from scratch.
compiler/notes/work_in_progress.html:
Rename the page to make it clear that these issues are NOT being
worked on.
compiler/notes/release_checklist.html:
compiler/notes/todo.html:
Note that these lists are quite out of date.
compiler/notes/allocation.html:
compiler/notes/analysis.html:
compiler/notes/bytecode.html:
compiler/notes/c_coding_standard.html:
compiler/notes/coding_standards.html:
compiler/notes/developer_intro.html:
compiler/notes/failure.html:
compiler/notes/gc_and_c_code.html:
compiler/notes/glossary.html:
compiler/notes/grade_library.html:
compiler/notes/index.html:
compiler/notes/interface_files.html:
compiler/notes/mlds_tail_recursion.html:
compiler/notes/overall_design.html:
compiler/notes/promise_ex.html:
compiler/notes/reviews.html:
compiler/notes/trailing.html:
compiler/notes/type_class_transformation.html:
compiler/notes/upgrade_boehm_gc.html:
compiler/notes/Mmakefile:
Add a target to run weblint on all the HTML files.
356 lines
9.0 KiB
HTML
356 lines
9.0 KiB
HTML
<!--
|
|
vim: ts=4 sw=4 expandtab ft=html
|
|
-->
|
|
|
|
<html>
|
|
<head>
|
|
<title>To Do List</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>TODO LIST</h1>
|
|
|
|
Note that this list is old, and not really maintained anymore.
|
|
<p>
|
|
For more information on any of these issues see our
|
|
<a href="http://www.mercurylang.org/contact.html">contacts page</a>.
|
|
<p>
|
|
|
|
<h2> mode analysis </h2>
|
|
|
|
<p>
|
|
|
|
<ul>
|
|
<li> fix various bugs in mode inference:
|
|
need to fix it to work properly in the presence of functions;
|
|
also need to change normalise_inst so that it handles complicated
|
|
insts such as `list_skel(any)'.
|
|
|
|
<li> extend the mode system to allow known aliasing.
|
|
This is needed to make partially instantiated modes and unique modes work.
|
|
[supported on the "alias" branch, but there were some serious
|
|
performance problems... has not been merged back into the main
|
|
branch]
|
|
|
|
</ul>
|
|
|
|
<h2> determinism analysis </h2>
|
|
|
|
<p>
|
|
|
|
<ul>
|
|
<li> add functionality for promise exclusive declarations:
|
|
<ul>
|
|
<li> add error checking and type checking as for assertions
|
|
<li> include declaration information in the module_info
|
|
<li> take into account mutual exclusivity from promise_exclusive
|
|
and promise_exclusive_exhaustive declarations during switch
|
|
detection
|
|
<li> take into account exhaustiveness from promise_exhaustive and
|
|
promise_exclusive_exhaustive declarations during
|
|
determinism analysis
|
|
</ul>
|
|
</ul>
|
|
|
|
|
|
<h2> unique modes </h2>
|
|
|
|
<ul>
|
|
<li> handle nested unique modes
|
|
|
|
<li> we will probably need to extend unique modes a bit,
|
|
in as-yet-unknown ways; need more experience here
|
|
|
|
</ul>
|
|
|
|
<h2> module system </h2>
|
|
|
|
<ul>
|
|
<li> check that the interface for a module is type-correct
|
|
independently of any declarations or imports in the implementation
|
|
section
|
|
|
|
<li> there are some problems with nested modules (see the language
|
|
reference manual)
|
|
|
|
</ul>
|
|
|
|
<h2> C interface </h2>
|
|
|
|
<ul>
|
|
<li> exporting things for manipulating Mercury types from C
|
|
|
|
<li> need to deal with memory management issues
|
|
|
|
</ul>
|
|
|
|
<h2> code generation </h2>
|
|
|
|
<ul>
|
|
<li> take advantage of unique modes to do compile-time garbage collection
|
|
and structure reuse.
|
|
|
|
</ul>
|
|
|
|
<h2> back-ends </h2>
|
|
|
|
<h3> low-level (LLDS) back-end </h3>
|
|
<ul>
|
|
<li> support accurate garbage collection
|
|
</ul>
|
|
|
|
<h3> high-level C back-end </h3>
|
|
<ul>
|
|
<li> finish off support for accurate garbage collection;
|
|
see the comments in compiler/ml_elim_nested.m
|
|
<li> see also the comments in compiler/ml_code_gen.m
|
|
</ul>
|
|
|
|
<h3> .NET back-end </h3>
|
|
<ul>
|
|
<li> finish off standard library implementation
|
|
<li> see also the TODO list in compiler/mlds_to_il.m
|
|
</ul>
|
|
|
|
<h2> debugger </h2>
|
|
|
|
<ul>
|
|
<li> support back-ends other than LLDS
|
|
<li> allow interactive queries to refer to values generated by
|
|
the program being debugged
|
|
<li> trace semidet unifications
|
|
</ul>
|
|
|
|
<h2> Unicode </h2>
|
|
|
|
<ul>
|
|
<li> allow alternative <em>external</em> encodings, particularly iso-8859-1
|
|
<li> consistent and robust handling of invalid strings
|
|
(overlong sequences, unpaired surrogates, etc.)
|
|
<li> add analogue of wcwidth and make some formatting procedures use it
|
|
<li> io.putback_char depends on multiple pushback in ungetc for
|
|
code points > 127
|
|
</ul>
|
|
|
|
<hr>
|
|
<!--======================-->
|
|
|
|
<h1> WISH LIST </h1>
|
|
|
|
<h2> type-system </h2>
|
|
|
|
<ul>
|
|
|
|
<li> allow construct.construct/3 to work for existential types
|
|
|
|
<li> remove limitation that higher-order terms are monomorphic.
|
|
i.e. allow universal quantifiers at the top level of
|
|
higher-order types, e.g. <samp>:- pred foo(all [T] pred(T)).</samp>.
|
|
|
|
<li> constructor classes
|
|
|
|
<li> allow a module exporting an abstract type to specify that other modules
|
|
should not be allowed to test two values of that type for equality (similar
|
|
to Ada's limited private types). This would be useful for e.g. sets
|
|
represented as unordered lists with possible duplicates.
|
|
[this is a subset of the functionality of type classes]
|
|
|
|
<li> subtypes?
|
|
|
|
<li> optimisation of type representation and manipulation (possibly
|
|
profiler guided)
|
|
|
|
<li> fold/unfolding of types
|
|
</ul>
|
|
|
|
<h2> mode analysis </h2>
|
|
|
|
<ul>
|
|
<li> split construct/deconstruct unifications into their atomic
|
|
"micro-unification" pieces when necessary.
|
|
(When is it necessary?)
|
|
|
|
<li> extend polymorphic modes,
|
|
e.g. to handle uniqueness polymorphism (some research issues?)
|
|
|
|
<li> handle abstract insts in the same way abstract types are handled
|
|
(a research issue - is this possible at all?)
|
|
|
|
<li> implement `willbe(Inst)' insts, for parallelism
|
|
|
|
<li> mode segments & high-level transformation of circularly moded programs.
|
|
</ul>
|
|
|
|
<h2> determinism analysis: </h2>
|
|
|
|
<ul>
|
|
<li> propagate information about bindings from the condition of an if-then-else
|
|
to the else so that
|
|
<pre>
|
|
(if X = [] then .... else X = [A|As], ...)
|
|
</pre>
|
|
is considered det.
|
|
|
|
<li> turn chains of if-then-elses into switches where possible.
|
|
[done by fjh, but not committed; zs not convinced that
|
|
this is a good idea]
|
|
|
|
</ul>
|
|
|
|
<h2> higher-order preds: </h2>
|
|
|
|
<ul>
|
|
<li> implement single-use higher-order predicate modes.
|
|
Single-use higher-order predicates would be allowed to bind curried
|
|
arguments, and to have unique modes for curried arguments.
|
|
|
|
<li> allow taking the address of a predicate with multiple modes
|
|
[we do allow this in case where the mode can be determined from
|
|
the inst of the high-order arguments]
|
|
|
|
|
|
<li> improve support for higher-order programming, eg. by providing
|
|
operators in the standard library which do things like:
|
|
<ul>
|
|
<li>compose functions
|
|
<li>take a predicate with one output argument and treat it like a function.
|
|
ie. <tt>:- func (pred(T)) = T.</tt>
|
|
</ul>
|
|
</ul>
|
|
|
|
<h2> module system: </h2>
|
|
|
|
<ul>
|
|
<li> produce warnings for implementation imports that are not needed
|
|
|
|
<li> produce warnings for imports that are in the wrong place
|
|
(in the interface instead of the implementation, and vice versa)
|
|
[vice versa done by stayl]
|
|
</ul>
|
|
|
|
<h2> source-level transformations </h2>
|
|
|
|
<ul>
|
|
<li> more work on module system, separate compilation, and the multiple
|
|
specialisation problem
|
|
|
|
<li> transform non-tail-recursive predicates into tail-recursive form
|
|
using accumulators. (This is already done, but not enabled by
|
|
default since it can make some programs run much more slowly.
|
|
More work is needed to only enable this optimization in cases
|
|
when it will improve performance rather than pessimize it.)
|
|
|
|
<li> improvements to deforestation / partial deduction
|
|
|
|
</ul>
|
|
|
|
<h2> code generation: </h2>
|
|
|
|
<ul>
|
|
<li> allow floating point fields of structures without boxing
|
|
(need multi-word fields)
|
|
|
|
<li> stack allocation of structures
|
|
|
|
</ul>
|
|
|
|
<h2> LLDS back-end: </h2>
|
|
|
|
<ul>
|
|
<li> inter-procedural register allocation
|
|
|
|
<li> other specializations, e.g. if argument is known to be bound to
|
|
f(X,Y), then just pass X and Y in registers
|
|
|
|
<li> reduce the overhead of higher-order predicate calls (avoid copying
|
|
the real registers into the fake_reg array and back)
|
|
|
|
<li> trim stack frames before making recursive calls, to minimize stack usage
|
|
(this would probably be a pessimization much of the time - zs)
|
|
and to minimize unnecessary garbage retention.
|
|
</ul>
|
|
|
|
<h2> garbage collection </h2>
|
|
<ul>
|
|
<li> implement liveness-accurate GC
|
|
<li> implement incremental GC
|
|
<li> implement generational GC
|
|
<li> implement parallel GC
|
|
<li> implement real-time GC
|
|
</ul>
|
|
|
|
<h2> compilation speed </h2>
|
|
|
|
<ul>
|
|
<li> improve efficiency of the expansion of equivalence types (currently O(N^2))
|
|
(e.g. this is particularly bad when compiling live_vars.m).
|
|
|
|
<li> improve efficiency of the module import handling (currently O(N^2))
|
|
|
|
<li> use "store" rather than "map" for the major compiler data structures
|
|
</ul>
|
|
|
|
|
|
<h2> better diagnostics </h2>
|
|
|
|
<ul>
|
|
<li> optional warning for any implicit quantifiers whose scope is not
|
|
the entire clause (the "John Lloyd" option :-).
|
|
|
|
<li> give a better error message for the use of if-then without else.
|
|
|
|
<li> give a better error message for the use of `<=' instead of `=<'
|
|
(but how?)
|
|
|
|
<li> give a better error message for type errors involving higher-order pred
|
|
constants (requested by Bart Demoen)
|
|
|
|
<li> give better error messages for syntax errors in lambda expressions
|
|
</ul>
|
|
|
|
<h2> general </h2>
|
|
|
|
<ul>
|
|
<li> coroutining and parallel versions of Mercury
|
|
|
|
<li> implement streams (need coroutining at least)
|
|
|
|
<li> implement a very fast turn-around bytecode compiler/interpreter/debugger,
|
|
similar to Gofer
|
|
[not-so-fast bytecode compiler done, but bytecode interpreter
|
|
not implemented]
|
|
|
|
<li> support for easier formal specification translation (eg a Z library,
|
|
or Z to Mercury).
|
|
|
|
<li> implement a source visualisation tool
|
|
|
|
<li> distributed Mercury
|
|
|
|
<li> improved development environment
|
|
|
|
<li> additional software engineering tools
|
|
<ul>
|
|
<li> coverage analysis
|
|
<li> automatic testing
|
|
</ul>
|
|
|
|
<li> literate Mercury
|
|
|
|
<li> implement a GUI library (eg Hugs - Fudgets)
|
|
|
|
<li> profiling guided optimisations
|
|
<ul>
|
|
<li> use profiling information to direct linker for optimal
|
|
code placement (Alpha has a tool for this).
|
|
</ul>
|
|
|
|
<li> use of attribute grammar technology
|
|
(including visit sequence optimization)
|
|
to implement code with circular modes
|
|
</ul>
|
|
|
|
</body>
|
|
</html>
|