Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.
COPYING.LIB:
Add a special linking exception to the LGPL.
*:
Update references to COPYING.LIB.
Clean up some minor errors that have accumulated in copyright
messages.
In preparation for supporting uint literals and literals for the fixed size
integer types, generalise the representation of integers in the term module, so
that for every integer literal we record its base, value (as an arbitrary
precision integer), signedness and size (the latter two based on the literal's
suffix or lack thereof).
Have the lexer attach information about the integer base to machine sized ints;
we already did this for the 'big_integer' alternative but not the normal one.
In conjunction with the first change, this fixes a problem where the compiler
was accepting non-decimal integers in like arity specifications. (The
resulting error messages could be improved, but that's a separate change.)
Support uints in more places; mark other places which require further work with
XXX UINT.
library/term.m:
Generalise the representation of integer terms so that we can store
the base, signedness and size of a integer along with its value.
In the new design the value is always stored as an arbitrary precision
integer so we no longer require the big_integer/2 alternative; delete it.
Add some utility predicates that make it easier to work with integer terms.
library/term_conversion.m:
library/term_io.m:
Conform to the above changes,
Add missing handling for uints in some spots; add XXX UINT comments
in others -- these will be addressed later.
library/lexer.m:
Record the base of word sized integer literals.
library/parser.m:
compiler/analysis_file.m:
compiler/fact_table.m:
compiler/get_dependencies.m:
compiler/hlds_out_goal.m:
compiler/hlds_out_util.m:
compiler/intermod.m:
compiler/make.module_dep_file.m:
compiler/parse_class.m:
compiler/parse_inst_mode_name.m:
compiler/parse_item.m:
compiler/parse_pragma.m:
compiler/parse_sym_name.m:
compiler/parse_tree_out_term.m:
compiler/parse_tree_to_term.m:
compiler/parse_type_defn.m:
compiler/parse_util.m:
compiler/prog_ctgc.m:
compiler/prog_util.m:
compiler/recompilation.check.m:
compiler/recompilation.version.m:
compiler/superhomogeneous.m:
mdbcomp/trace_counts.m:
samples/calculator2.m:
extras/moose/moose.m:
Conform to the above changes.
tests/hard_coded/impl_def_lex.exp:
tests/hard_coded/impl_def_lex_string.exp:
tests/hard_coded/lexer_bigint.exp*:
tests/hard_coded/lexer_zero.exp*:
tests/hard_coded/parse_number_from_string.exp*:
tests/hard_coded/term_to_unit_test.exp:
Update these expected outputs.
Remove old .cvsignore files, moving their contents to .gitignore files.
There are now no .cvsignore files in the repository.
I've also sorted some .gitignore files and avoided repeating a pattern in a
subdirectory's .gitignore file when it is already mentioned in the parent
.gitignore file.
benchmarks/progs/quicksort/qs_always_par.m:
benchmarks/progs/quicksort/qs_utils.m:
extras/moose/check.m:
extras/posix/samples/mdprof_cgid.m:
extras/xml/parsing.m:
samples/muz/zparser.m:
samples/muz/ztype_op.m:
As above -- the compiler now rejects determinism declarations on
non-predmode predicate declarations.
Replace a call to bitmap.new with bitmap.init.
This fixes `write_goto_table/4` in extras/moose/moose.m for the moose
parser generator. The more accurate mode checker requires a more
specific instantiatedness than `ground` for the generated `goto%s/2`
predicates.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.
*/Makefile:
*/Mmakefile:
As above.
tests/hard_coded/.gitignore:
Don't ignore the purity subdir. This ignore must have been left over
from when purity.m was a test in hard_coded, not hard_coded/purity,
and it ignored an executable, not a directory.
extras/*/*.m:
Replace the use of '__' as a module qualifier in the rest of
the extras.
s/io\.state/io/ in the extras.
Use '=' instead of is/2 in a spot.
This is a consecutive patch to my previous patch, it extends the .gitignore
files to work more thoroughly on Windows.
browser/.gitignore:
ignore .net .dll assemblies
compiler/.gitignore:
ignore *.obj
extras/.gitignore:
Ignore the tags directory
Ignore: *.bat, *.lib,
Ignore *.dll rather than lib*.dll because the .net assemblies are not
prefixed.
extras/dynamic_linking/.gitignore:
Ignore *.out (test output files)
extras/error/.gitignore:
Ignoring unix binary for the error utility
extras/lex/tests/.gitignore:
Ignore the test_regex binary
extras/moose/tests/.gitignore:
Ignore array_based.m because it is generated from array_based.moo
extras/.gitignore:
Mercury ignores the --use-{grade}-subdir dir
Mercury/** for git 1.8+ this recursively ignores all build files
ignoring *.mh and *.init files
*.err output files
lib*.{dll|so|a|dylib} ignores target compiler library output
*.jar ignores the Java grade output
*.exe for Windows executables
extras/dynamic_linking/.gitignore:
ignoring the copy of dl.m, name_mangle.m
ignoring hello lib and dl_test* executables
extras/moose/samples/.gitignore:
ignoring cgram.m small.m alpha.m expr.m which are
generated from the .moo grammar files
extras/graphics/mercury_cairo/samples/.gitignore:
ignoring *.png output and all executables
extras/**/.gitignore:
In each sample/test/example folder the linux executable/test
output is ignored
Branches: main
Change the argument ordering of predicates in the set module.
library/set.m:
Change predicate argument orders to match the versions
in the svset module.
Group function definitions with the corresponding predicates
rather than at the end of the file.
Delete Ralph's comments regarding the argument order in the
module interface: readers of the library reference guide are
unlikely to be interested in his opinion of the argument ordering
ten or so years ago.
Add extra modes for set.map/3 and set.map_fold/5.
library/svset.m:
library/eqvclass.m:
library/tree234.m:
library/varset.m:
browser/*.m:
compiler/*.m:
deep_profiler/*.m:
mdbcomp/trace_counts.m:
extras/moose/grammar.m:
extras/moose/lalr.m:
extras/moose/moose.m:
tests/hard_coded/bitset_tester.m:
Conform to the above change.
NEWS:
Announce the above changes.
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.
Branches: main, 11.01
Don't use "cute" operator overloadings in moose - this allows us to compile it
with the non-C backends, some of which don't currently do the name mangling
which would otherwise be required.
Make the moose samples work again.
extras/moose/misc.m:
Delete this module -- overloading operators in this way was
never a particuarly good idea, especially as several of the
overloaded operators (now) mean other things in Mercury.
extras/moose/check.m:
extras/moose/grammar.m:
extras/moose/lalr.m:
extras/moose/mercury_syntax.m:
extras/moose/moose.m:
extras/moose/tables.m:
Conform to the above changes.
Import each module on its own line.
extras/moose/options.m:
As above.
Use the "multi" form of the option_ops type.
extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
Make these examples work again -- as written the typeclass
instance they contain does not satisfy the current restrictions
on the form of instance arguments.
Syntax and formatting cleanups.
Estimated hours taken: 1
Corrected a bug in moose whereby it failed to return a non-zero exit code when
a critical error occured.
Converted moose to modern syntax with regard to DCGs and State Variables and
module delimters such as '__' vs '.'. Converted some indentation to four
spaces.
extras/moose/check.m:
extras/moose/grammar.m:
extras/moose/lalr.m:
extras/moose/mercury_syntax.m:
extras/moose/misc.m:
extras/moose/moose.m:
extras/moose/options.m:
extras/moose/tables.m:
As above.
extras/moose/BUGS
Noted a new bug.
extras/moose/TODO
Corrected a spelling mistake.
Estimated hours taken: 0.1
Branches: main
Conform to recent stdlib changes.
extras/moose/mercury_syntax.m:
extras/moose/moose.m:
Conform to the recent change change in the representation
of variables in the term module.
Estimated hours taken: 0.5
Branches: main, release
Fix some minor compilation problems in the extras distribution.
extras/curses/user.m:
extras/graphics/easyx/samples/bounce.m:
extras/graphics/easyx/samples/scribble.m:
Conform to recent changes in the standard library.
extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
Replace use of ':' as a module qualifier.
Estimated hours taken: 0.5
Branches: main
Fix compilation problems in the extras distribution caused by recent
changes.
extras/stream/stream.m:
Provide a definition for the type stream/1.
extras/*/*.m:
Conform to the recent changes to the standard library.
Estimated hours taken: 1
Branches: main
extras/moose/moose.m:
Fix a bug introduced by petr's last change: put back the
`:- import_module list.' declaration, since it is needed for
the references to `[]', `[|]', `list', and `list_skel'.
But put it back in the implementation section rather than in
the interface section, because it is not needed by the interface.
extras/moose/tests/Mmakefile:
extras/moose/tests/array_based.moo:
Add a regression test.
Estimated hours taken: 1.
Branches: main.
Allow moose to parse conditional goals written using the if - then - else
notation. This makes the code generated by moose less ugly when the `.moo'
file contains these type of goals.
extras/moose/mercury_syntax.m:
Handle if-then-elses so that the generated code is less ugly.
Fix some indentation.
Fix some type declarations.
Delete some dead code.
extras/moose/check.m:
extras/moose/grammar.m:
Add some module qualifiers.
extras/moose/samples/alpha.moo:
Use the alternative if-then-else notation.
Estimated hours taken 5:
Branches: main.
This change doesn't alter any functionality. It just cleans up some
notation and (hopefully) makes things a little easier to modify in the
future.
The changes are:
- Remove instances of `:' as a module qualifier.
- Add more module qualifiers.
- Use state variables for threading the IO state.
- Use state variables for accumulators.
- Remove some unused predicates.
extras/moose/check.m:
extras/moose/lalr.m:
extras/moose/mercury_syntax.m:
extras/moose/moose.m:
extras/moose/options.m:
extras/moose/tables.m:
Changes to notation as listed above.
extras/moose/grammar.m:
Replace calls to predicate grammar.foldl/4 with calls to
function array.foldl/3 from standard library. Delete grammar.foldl/4.
Other changes as above.
extras/moose/misc.m:
Remove predicate between/3 since it isn't used anywhere.
Other changes as above.
Estimated hours taken: 0.5
Branches: main
Fix moose so that it compiles successfully with intermodule-optimization
enabled.
extras/moose/check.m:
extras/moose/grammar.m:
extras/moose/lalr.m:
extras/moose/moose.m:
Module qualify some predicate names to resolve type ambiguities.
Add underscores to a couple of variables that are not used.
Estimated hours taken: 3
Branches: main, release
Fix a problem where different packages in the `extras' distribution
were being installed in different directories when you specified
INSTALL_PREFIX in the Mmake.params file. Some honoured the INSTALL_PREFIX
setting, some appended "/extras", and some ignored it completely.
Also, add `clean' and `realclean' targets for the extras directory hierarchy,
and fix a few other minor bugs.
extras/lazy_evaluation/Mmakefile:
Include Mmake.params, which previously wasn't included at all
in this file.
extras/logged_output/Mmakefile:
extras/odbc/Mmakefile:
extras/quickcheck/Mmakefile:
Append "/extras" to INSTALL_PREFIX, which previously wasn't done
at all in these directories.
extras/cgi/Mmakefile:
extras/complex_numbers/Mmakefile:
extras/concurrency/Mmakefile:
extras/curs/Mmakefile:
extras/curses/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/moose/Mmakefile:
extras/posix/Mmakefile:
Move the line `INSTALL_PREFIX := $(INSTALL_PREFIX/extras)'
to before the include of Mmake.params, so as not to override
the user's setting (only override the default setting).
extras/Mmakefile:
extras/concurrency/Mmakefile:
Add `clean' and `realclean' targets.
extras/posix/Mmakefile:
Add MGNUCFLAGS = --no-ansi, since this is needed on some systems.
extras/quickcheck/Mmakefile:
Add "depend", "all", and "install" targets.
Ensure that the "check" target runs the test program.
extras/quickcheck/qcheck.m:
Set the exit status to non-zero if a test fails.
extras/references/Mmakefile:
Adjust the setting of LIBGRADES to account for the fact that
$(GRADE) is no longer implicitly included in $(LIBGRADES).
Estimated hours taken: 0.1
Branches: main
extras/moose/moose.m:
Action methods are functions so write them out using function syntax
rather than pred syntax.
Estimated hours taken: 2
Branches: main
Add appropriate infrastructure to support doing `mmake depend && mmake
&& mmake install' in the `extras' directory, and having it automatically
install and build as much as possible.
extras/Mmakefile:
New file.
extras/cgi/Mmakefile:
Delete bogus reference to `ALL_LIBGRADES' and `mercury-config'.
extras/complex_numbers/Mmakefile:
extras/concurrency/Mmakefile:
extras/concurrency/concurrency.m:
extras/curses/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/lazy_evaluation/Mmakefile:
extras/lex/Mmakefile:
extras/moose/Mmakefile:
extras/xml/Mmakefile:
Add rules for `mmake install'.
extras/references/scoped_update.m:
Add macro guard around typedef in `c_header_code'.
extras/curs/Mmakefile:
extras/curses/Mmakefile:
Define MERCURY_BOOTSTRAP_H, to avoid name clash on `bool'
that is caused by our bootstrap code in runtime/Merucry.h.
extras/curs/curs.m:
Add `promise_pure' declarations for all pure procedures.
XXX Should this be needed? These predicates all take
io__state arguments.
Estimated hours taken: 20
Branches: main
I have changed moose to support user-specifiable parser state modes,
rather than just in/out. In particular, this means the parser state
can now include the IO state (this will be useful in conjunction with
lex).
I have also made some changes to the interface.
This change is not backwards compatible.
extras/moose/NEWS:
Made a note of the fact that this change to moose is not
backwards compatible.
extras/moose/README:
Updated the documentation to reflect the new changes.
extras/moose/TODO:
Removed this change from the TODO list.
extras/moose/grammar.m:
Removed the unused EndToken argument from construct_grammar/5.
extras/moose/moose.m:
Fairly extensive changes to support user-specifiable parser
state modes.
Changed the order of some arguments in .moo parse declarations.
Changed the signature of action methods from preds to funcs.
extras/moose/samples/alpha.moo:
extras/moose/samples/expr.moo:
extras/moose/samples/cgram.moo:
extras/moose/samples/small.moo:
Changed parse declarations to match new scheme.
Changed the scan predicates in alpha.moo and expr.moo to be
deterministic.
extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
Changed to use the new interface.
Estimated hours taken: 0.25
Branches: main
extras/moose/mercury.m:
extras/moose/mercury_syntax.m:
extras/moose/moose.m:
Rename the file `mercury.m' as `mercury_syntax.m', since using the
module name `mercury' doesn't work with the `--high-level-code'
back-end (the generated header file conflicts with runtime/mercury.h).
The module name `mercury' is effectively reserved.
Estimated hours taken: 3
Branches: main
Change the list constructor from `./2' to `[|]/2'. `./2' will
eventually become the module qualification operator.
library/parser.m:
library/io.m:
library/sparse_bitset.m:
library/std_util.m:
library/term_io.m:
compiler/mercury_to_mercury.m:
compiler/prog_io_dcg.m:
compiler/prog_io_goal.m:
compiler/prog_io_pragma.m:
compiler/prog_io_typeclass.m:
compiler/prog_io_util.m:
browser/interactive_query.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/morphine/source/generate_call_site_cov.m:
extras/xml/xml.encoding.m:
samples/muz/higher_order.m:
tests/debugger/declarative/app.m:
tests/dppd/transpose_impl.m:
tests/hard_coded/ground_dd.m:
tests/hard_coded/split_c_files.m:
Change all references to `./2' to use `[|]/2' instead.
compiler/typecheck.m:
Handle `./2' as a special case in `report_error_undef_cons'.
Warn about module list not being imported if `[|]/2' is undefined.
compiler/llds_out.m:
util/mdemangle.c:
profiler/demangle.m:
Add name conversions for `[|]' (f_cons) and `[]' (f_nil).
NEWS:
doc/reference_manual.texi:
w3/tutorial/lists-n-things.m4:
Document the changes.
tests/debugger/{,declarative}/*.exp*:
Update test case results. For some tests the output changed
because they output lists in the non-pretty format. For others,
the output changed because the alphabetical ordering of the
constructors of type `list/1' changed, so the numbering of
the switch branches in the goal paths changed.
Estimated hours taken: 4
Optionally test the extras directory during bootchecks.
tools/bootcheck
Add an option, -e, for testing the extras directory. Rename the
-T/--test-only option as -n/--no-bootcheck, since it does not prevent
the testing of the extras.
Bootcheck only test the subdirectories in extras which have an
Mmakefile and which can be tested in all grades and in all setups.
extras/*/Mmakefile:
Updates to include extras/Mmake.params if it exists (to get the
parameters, including grades, of the bootcheck) and to add a check
target, which in most cases does not do anything yet (which means
that the only testing we do is checking that the program compiles
all right). Making "mmake check" do something meaningful will be
up to the authors of the various subdirectories involved.
In many cases, add .PHONY annotations on the relevant targets,
and copyright notices.
extras/aditi/NOBOOTTEST:
Prevent the automatic testing of the aditi subdirectory from
bootcheck, since this can be done only on a machine with Aditi
installed.
extras/aditi/NOBOOTTEST:
Prevent the automatic testing of the aditi subdirectory from
bootcheck, since this can be done only on a machine with Aditi
installed.
extras/aditi/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only on a machine with Aditi installed.
extras/dynamic_linking/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only on a machine with the dl library already
installed.
extras/logged_out/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only in grades with the right kind of stream
support.
extras/odbc/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only on a machine with ODBC installed.
extras/references/NOBOOTTEST:
extras/trailed_update/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only in trailing grades.
extras/*/.nocopyright:
Mention the NOBOOTTEST files in the relevant .nocopyright files.
Estimated hours taken: 1
Fix a bug with moose that was causing my C parser to fail to parse.
The change to add tuples changed the way {}/N was parsed, and moose uses
{}/N for grammar actions.
extras/moose/grammar.m:
Parse {}/N correctly.
Estimated hours taken: 1
extras/moose/grammar.m:
extras/moose/lalr.m:
Changed a couple of places where list_to_set is called so that
we construct the list in sorted order and can call
sorted_list_to_set instead which give about a 10% performance
improvement.
Change a place where we call set_to_sorted_list and then iterate
over the list calling set__insert. Instead we now reverse the
list first so that the insertions happen at the start of the list
not the end. Results in about 5% performance improvement.
Estimated hours taken: 5 (+ unknown hours by Tom, + unknown hours by fjh)
Moose, the Mercury parser generator.
extras/moose/Mmakefile:
extras/moose/check.m:
extras/moose/grammar.m:
extras/moose/lalr.m:
extras/moose/mercury.m:
extras/moose/misc.m:
extras/moose/moose.m:
extras/moose/options.m:
extras/moose/tables.m:
extras/moose/BUGS:
A list of known bugs.
extras/moose/TODO:
Things that still need to be done.
extras/moose/README:
Documentation for moose (thanks to fjh).
extras/moose/samples/Mmakefile:
extras/moose/samples/README:
extras/moose/samples/alpha.input:
extras/moose/samples/alpha.moo:
extras/moose/samples/cgram.moo:
extras/moose/samples/expr.input:
extras/moose/samples/expr.moo:
extras/moose/samples/small.moo:
extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
Some samples.