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.
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.
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/.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
extras/trailed_update/samples/vqueens.m:
Use higher-order any insts to avoid the mode error in this module.
extras/trailed_update/var.m:
Add extras modes to the freeze predicates that take closures with inst
any. (XXX This module could do with a re-write since Mercury now
implements many of the features that had to be hacked around when
it was written.)
extras/trailed_update/tr_store.m:
Conform to runtime changes.
extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/graphics/samples/maze/maze.m:
extras/trailed_update/samples/interpreter.m:
Conform to standard library changes.
Branches: main
Pack consecutive enumeration arguments in discriminated union types into a
single word to reduce cell sizes. Argument packing is only enabled on C
back-ends with low-level data, and reordering arguments to improve
opportunities for packing is not yet attempted. The RTTI implementations for
other back-ends will need to be updated, but that is best left until after any
argument reordering change.
Modules which import abstract enumeration types are notified so by writing
declarations of the form:
:- type foo where type_is_abstract_enum(NumBits).
into the interface file for the module which defines the type.
compiler/prog_data.m:
Add an `arg_width' argument to constructor arguments.
Replace `is_solver_type' by `abstract_type_details', with an extra
option for abstract exported enumeration types.
compiler/handle_options.m:
compiler/options.m:
Add an internal option `--allow-argument-packing'.
compiler/make_hlds_passes.m:
Determine whether and how to pack enumeration arguments, updating the
`arg_width' fields of constructor arguments before constructors are
added to the HLDS.
compiler/mercury_to_mercury.m:
compiler/modules.m:
Write `where type_is_abstract_enum(NumBits)' to interface files
for abstract exported enumeration types.
compiler/prog_io_type_defn.m:
Parse `where type_is_abstract_enum(NumBits)' attributes on type
definitions.
compiler/arg_pack.m:
compiler/backend_libs.m:
Add a new module. This mainly contains a predicate which packs rvals
according to arg_widths, which is used by both LLDS and MLDS back-ends.
compiler/ml_unify_gen.m:
compiler/unify_gen.m:
Take argument packing into account when generating code for
constructions and deconstructions. Only a relatively small part of the
compiler actually needs to understand argument packing. The rest works
at the HLDS level with constructor arguments and variables, or at the
LLDS and MLDS levels with structure fields.
compiler/code_info.m:
compiler/var_locn.m:
Add assign_field_lval_expr_to_var and
var_locn_assign_field_lval_expr_to_var.
Allow more kinds of rvals in assign_cell_arg. I do not know why it was
previously restricted, except that the other kinds of rvals were not
encountered as cell arguments before.
compiler/mlds.m:
We can now rely on the compiler to pack arguments in the
mlds_decl_flags type instead of doing it manually. A slight downside
is that though the type is packed down to a single word cell, it will
still incur a memory allocation per cell. However, I did not notice
any difference in compiler speed.
compiler/rtti.m:
compiler/rtti_out.m:
Add and output a new field for MR_DuFunctorDesc instances, which, if
any arguments are packed, points to an array of MR_DuArgLocn. Each
array element describes the offset in the cell at which the argument's
value is held, and which bits of the word it occupies. In the more
common case where no arguments are packed, the new field is simply
null.
compiler/rtti_to_mlds.m:
Generate the new field to MR_DuFunctorDesc.
compiler/structure_reuse.direct.choose_reuse.m:
For now, prevent structure reuse reusing a dead cell which has a
different constructor to the new cell. The code to determine whether a
dead cell will hold the arguments of a new cell with a different
constructor will need to be updated to account for argument packing.
compiler/type_ctor_info.m:
Bump RTTI version number.
Conform to changes.
compiler/add_type.m:
compiler/check_typeclass.m:
compiler/equiv_type.m:
compiler/equiv_type_hlds.m:
compiler/erl_rtti.m:
compiler/hlds_data.m:
compiler/hlds_out_module.m:
compiler/intermod.m:
compiler/make_tags.m:
compiler/mlds_to_gcc.m:
compiler/opt_debug.m:
compiler/prog_type.m:
compiler/recompilation.check.m:
compiler/recompilation.version.m:
compiler/special_pred.m:
compiler/type_constraints.m:
compiler/type_util.m:
compiler/unify_proc.m:
compiler/xml_documentation.m:
Conform to changes.
Reduce code duplication in classify_type_defn.
compiler/hlds_goal.m:
Clarify a comment.
library/construct.m:
Make `construct' pack arguments when necessary.
Remove an old RTTI version number check as recommended in
mercury_grade.h.
library/store.m:
Deal with packed arguments in this module.
runtime/mercury_grade.h:
Bump binary compatibility version number.
runtime/mercury_type_info.c:
runtime/mercury_type_info.h:
Bump RTTI version number.
Add MR_DuArgLocn structure definition.
Add a macro to unpack an argument as described by MR_DuArgLocn.
Add a function to determine a cell's size, since the number of
arguments is no longer correct.
runtime/mercury_deconstruct.c:
runtime/mercury_deconstruct.h:
runtime/mercury_deconstruct_macros.h:
runtime/mercury_ml_arg_body.h:
runtime/mercury_ml_expand_body.h:
Deal with packed arguments when deconstructing.
Remove an old RTTI version number check as recommended in
mercury_grade.h.
runtime/mercury_deep_copy_body.h:
Deal with packed arguments when copying.
runtime/mercury_table_type_body.h:
Deal with packed arguments in tabling.
runtime/mercury_dotnet.cs.in:
Add DuArgLocn field to DuFunctorDesc. Argument packing is not enabled
for the C# back-end yet so this is unused.
trace/mercury_trace_vars.c:
Deal with packed arguments in MR_select_specified_subterm,
use for the `hold' command.
java/runtime/DuArgLocn.java:
java/runtime/DuFunctorDesc.java:
Add DuArgLocn field to DuFunctorDesc. Argument packing is not enabled
for the Java back-end yet so this is unused.
extras/trailed_update/tr_store.m:
Deal with packed arguments in this module (untested).
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/tr_array.m:
Conform to argument reordering in the array, map and other modules in
previous changes.
tests/hard_coded/Mercury.options:
tests/hard_coded/Mmakefile:
tests/hard_coded/lco_pack_args.exp:
tests/hard_coded/lco_pack_args.m:
tests/hard_coded/pack_args.exp:
tests/hard_coded/pack_args.m:
tests/hard_coded/pack_args_copy.exp:
tests/hard_coded/pack_args_copy.m:
tests/hard_coded/pack_args_intermod1.exp:
tests/hard_coded/pack_args_intermod1.m:
tests/hard_coded/pack_args_intermod2.m:
tests/hard_coded/pack_args_reuse.exp:
tests/hard_coded/pack_args_reuse.m:
tests/hard_coded/store_ref.exp:
tests/hard_coded/store_ref.m:
tests/invalid/Mmakefile:
tests/invalid/where_abstract_enum.err_exp:
tests/invalid/where_abstract_enum.m:
tests/tabling/Mmakefile:
tests/tabling/pack_args_memo.exp:
tests/tabling/pack_args_memo.m:
Add new test cases.
tests/hard_coded/deconstruct_arg.exp:
tests/hard_coded/deconstruct_arg.exp2:
tests/hard_coded/deconstruct_arg.m:
Add constructors with packed arguments to these cases.
tests/invalid/where_direct_arg.err_exp:
Update expected output.
Branches: main
Fix bitrot in extras/trailed_update.
extras/trailed_updated/var.m:
Don't specify an initialisation predicated for the solver type var/1.
extras/trailed_updated/samples/interpreter.m:
Conform with the change that added an extra argument to the variable/2
constructor of the standard library type term/1.
extras/trailed_update/tests/var_test.m:
Use up-to-date syntax for modes.
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/var_test.m:
Use trail segments since that's what you get in an installation by
default.
extras/trailed_update/*.m:
Update syntax and formatting to conform more closely to our
current coding standards.
Add require_feature_set pragmas for trailing.
Estimated hours taken: 1
Branches: main
Remove support for the reserve tag (.rt) grades.
These were only ever needed to support the implementation of Herbrand
variables in (older versions of) HAL.
NOTE: this change removes the .rt grade, the undocumented
reserve_tag pragma is unchanged.
runtime/mercury_grade.h:
Do not handle the .rt component. Rather than renumbering the
grade parts here I have documented that grade part 8 (formerly .rt)
is unused.
runtime/mercury_tags.h:
runtime/mercury_type_info.h:
runtime/mercury_conf_param.h:
Conform to the above change.
compiler/compile_target_code.m:
compiler/handle_options.m:
compiler/options.m:
compiler/make_tags.m:
compiler/prog_type.m:
Remove the `--reserve-tag' option and modify any code
that relied upon it. Such code is largely unchanged
since it is still required for the implementation of the
reserve_tag pragma.
doc/user_guide.texi:
Delete documentation for `--reserve-tag'.
scripts/canonical_grade.sh-subr:
scripts/init_grade_otpions.sh-subr:
scripts/mgnuc.in:
scripts/parse_grade_options.sh-subr:
Remove support for the `.rt' grade component.
NEWS:
Announce that .rt grades are no longer supported.
extras/trailed_update/var.m:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
Update some documentation.
tests/debugger/Mmakefile:
tests/tabling/Mmakefile:
Delete special handling for .rt grades.
Estimated hours taken: 0.1
Branches: main, release
Fix compilation of extras/trailed_update.
extras/trailed_update/var.m:
Add missing promise_pure scopes.
extras/trailed_update/samples/interpreter.m:
Conform to recent changes in the standard library.
Estimated hours taken: 2.5
Branches: main, release
extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/var.m:
extras/trailed_update/unsafe.m:
extras/trailed_update/samples/vqueens.m:
Use more recent syntax and make these modules
conform more closely to our coding standard.
Use the new foreign language interface.
Replace deprecated mode and inst syntax.
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/interpreter.exp:
s/mutvar/generic_mutvar/
Estimated hours taken: 1
Branches: main
Fix a problem that broke extras/trailed_update/samples/interpreter.
extras/trailed_update/samples/interpreter.m:
Use an assoc_list rather than a map when mapping from store__mutvars.
This is needed because store__mutvars (and other reference types)
can only be tested for equality, not compared. That changed
after my previous patch to add a new TYPE_CTOR_REP for references.
We need to disallow compare/3 on reference types because in *.agc
grades, their addresses might change after a garbage collection,
and the changes might not preserve the ordering.
extras/trailed_update/samples/interpreter.exp:
Update to reflect the above change to interpreter.m.
Estimated hours taken: 0.75
Branches: main
extras/trailed_update/samples/interpreter.m:
Use `unsafe_promise_unique' rather than impure code.
This is a cleaner solution. (We don't want to be
recommending the use of `impure' in sample code
when better alternatives are available!)
Estimated hours taken: 0.5
Branches: main, release
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
Fix problems linking in debug grades on Solaris
(-ldl is not available with static linking).
Estimated hours taken: 0.25
Branches: main
extras/trailed_update/samples/Mmakefile:
Fix a bug where Mmake.params (which can set $(GRADE))
was being included after a place that tests $(GRADE).
Branches: main
Estimated hours taken: 4
Fix some problems with the trailed_update tests.
extras/trailed_update/var.m:
Document that this module doesn't work in `.rt' grades (and why).
extras/trailed_update/samples/Mmakefile:
Disable the vqueens test in `.rt' grades.
Also, enable the interpreter test, since the reason for disabling
it is no longer valid now that the value numbering pass has been
deleted. But disable it for `.rt' grades, since it turns out
to fail for those.
Also, use $(DIFF_OPTS) rather than hard-coding "-c".
extras/trailed_update/samples/interpreter.exp:
Update to reflect the current output,
which has different variable numbers than the original output.
(The output also changed slightly when interpreter.m was changed
to use store__new rather than store__init.)
Estimated hours taken: 0.5
Branches: main
Remove the RM_C mmake variable, which controlled whether the intermediate
`.c' files were removed (now they never are).
The implementation was buggy (it didn't work with parallel makes), and
made it difficult to avoid always recompiling the `.c' file with smart
recompilation.
Mmake.common.in:
configure.in:
README.AIX:
bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
compiler/modules.m:
tools/bootcheck:
tools/binary_step:
*/Mmakefile:
Remove references to RM_C, DEFAULT_RM_C and LIBRARY_RM_C.
compiler/modules.m:
The `.o' and `.pic_o' file now depends only on the `.c' file,
not on everthing the `.c' file depends on. The extra dependencies
were only needed because the intermediate `.c' file could
be removed by RM_C. This change is needed to avoid recompiling
unchanged `.c' files with smart recompilation.
Estimated hours taken: 0.1
extras/trailed_update/samples/Mmakefile:
- Pass C compiler options via CFLAGS rather than MGNUCFLAGS.
- Don't include $(EXTRA_<foo>) in $(FOO) since Mmake
already does that automatically.
Estimated hours taken: 0.25
Fix a problem introduced by my recent changes to tools/test_mercury
that was causing the tests of the extras stuff to fail.
extras/clpr/samples/Mmakefile:
extras/clpr/clpr/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
Include Mmake.params, so that it works properly when invoked
by tools/test_mercury.
Estimated hours taken: 2
Change library/store.m to make use of existential types.
library/store.m:
Add a new existentially predicate store__new/1, which is like the old
store__init/1 but existentially typed. This ensures safety,
by preventing you from using a key from one store as an index
into a different store.
The unsafe store__init predicate is now declared `pragma obsolete'.
The store__some_store_type type is now also documented as obsolete
(unfortunately there is currently no equivalent to a `pragma obsolete'
declaration for types).
browser/declarative_execution.m:
extras/trailed_update/samples/interpreter.m:
Use store__new rather than the obsolete store__init.
tests/general/intermod_type2.m:
Avoid using the obsolete type store__some_store_type.
extras/curses/user.m:
Add a new predicate init_curse_store, and use that
instead of the obsolete store__init.
Also rename set_curse and get_curse as set_curse_store
and get_curse_store respectively.
NEWS:
Mention this change.
Estimated hours taken: 0.75
Mmakefile:
*/Mmakefile:
*/*/Mmakefile:
*/*/*/Mmakefile:
Use `clean_local' instead of `clean' and `realclean_local' instead
of `realclean' where appropriate. This is necessary now that
`realclean' does not depend on `clean'.
Estimated hours taken: 15
Split the automatically generated `.dep' file into two files. The new `.dv'
file contains all the variable definitions which used to be in the `.dep'
file, which now contains just the rules. With mmake including the `.dv'
files before the user's Mmakefile and the `.dep' files after, this allows
user-defined Mmakefiles to refer to the automatically-generated variables
and automatically-generated rules to refer to variables defined in the
user's Mmakefile. This was possible before to a limited extent, but in
particular dependency lists for automatically-generated rules could not
refer to user-defined variables.
Also introduced `C2INITARGS' as part of an illustration of how this change
is useful (though probably this should be a separate change). `C2INITARGS'
should be used to specify extra files to be passed to `c2init', rather than
the currently-used `C2INITFLAGS' (which should only be used for option
flags). The `_init.c' target should depend on these extra arguments, but it
was not possible to do this automatically prior to this change (at least,
not if one wanted to support per-program specification of `C2INITARGS').
compiler/modules.m:
Generate the new `.dv' files and revised `.dep' files.
Update the `change_clean' and `real_clean' targets to delete the
`.dv' files.
Update the `_init.c' rule to refer to `$(ALL_C2INITARGS)' as well as
`$(ALL_C2INITFLAGS)', and add a dependency on `$(ALL_C2INITARGS)'.
scripts/Mmake.rules:
Add appropriate rules and dependencies for `.dv' files.
scripts/Mmake.vars.in:
Add definitions for implementing `C2INITARGS'.
scripts/mmake.in:
Add code for using `.dv' files (while maintaining backward
compatibility for when they don't exist).
doc/user_guide.texi:
Document the new `.dv' files.
Document the new `C2INITARGS' variables and the dependencies they
imply.
../clpr/Mmakefile:
../clpr/samples/Mmakefile:
extras/complex_numbers/samples/Mmakefile:
extras/complex_numbers/tests/Mmakefile:
extras/graphics/mercury_opengl/Mmakefile:
extras/references/samples/Mmakefile:
extras/references/tests/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
Update to use `C2INITARGS' instead of `C2INITFLAGS', where
appropriate, and remove any now-obsolete `%_init.c' dependencies
(which wouldn't have worked anyway since GNU Make ignores pattern
dependencies with no commands).
Estimated hours taken: 12
Bug fixes.
tests/term/arit_exp.m still fails with --intermodule-optimization
due to a slightly different (but correct) trans_opt file being produced.
compiler/simplify.m
Don't produce singleton disjunctions, since the code generator
barfs on them. Use a `some' instead.
Test case: tests/general/partition.m compiled with --deforestation.
compiler/unused_args.m
Deconstructions where the arguments included `any' insts were
not being handled correctly, due to inst_matches_binding
failing for any->any.
Test case: extras/trailed_update/samples/vqueens.m at -O3.
Don't warn about predicates from `.opt' files having unused
arguments, because in most cases the warning will be generated
when compiling the imported module.
compiler/higher_order.m
Fix a bug that caused compiler/modules.m to be miscompiled at
-O3 --intermodule-optimization, due to curried arguments for
multiple known higher-order arguments being passed to a
specialised version in the wrong order.
Test case: tests/hard_coded/ho_order2.m
compiler/mercury_compile.m
Call intermod__update_pred_import_status when compiling to
C at the same stage of the compilation as the `.opt' file
was written to ensure that the same information is being used.
Test case: tests/hard_coded/rational_test.m compiled with
--intermodule-optimization failed because of a link error.
Make sure polymorphism has been run before doing unused argument
checking with --errorcheck-only. Otherwise the argument indices
read in from `.opt' files are incorrect.
compiler/intermod.m
Use code_util__compiler_generated to test if a called predicate
is compiler generated, rather than looking for a call_unify_context
(function calls have a call_unify_context).
Add a progress message for updating the import status of predicates
exported to `.opt' files.
Fix a bug where the unused_args pragmas read in from the current
module's `.opt' file were given an import_status of `imported' rather
than `opt_imported' resulting in an error message from make_hlds.m.
compiler/dead_proc_elim.m
Ensure that predicates used by instance declarations and
`:- pragma export's are not eliminated by the dead_pred_elim
pass before typechecking.
Test case: most of the typeclass tests compiled with
--intermodule-optimization.
compiler/hlds_goal.m
Remove obsolete comments about the modes of a higher-order
unification being incorrect after polymorphism, since that
was fixed months ago.
compiler/options.m
Reenable deforestation.
Enable --intermodule-optimization and --intermod-unused-args
at -O5 so they get tested occasionally.
compiler/handle_options.m
Disable deforestation if --typeinfo-liveness is set, since
there are bugs in the folding code if extra typeinfos are
added to a new predicate's arguments by hlds_pred__define_new_pred.
Disable higher_order.m if --typeinfo-liveness is set, since
higher_order.m currently does not pass all necessary typeinfos
to specialised versions or update the typeinfo_varmap of
specialised versions.
Test case: tests/valid/agc_ho_pred.m
tests/hard_coded/ho_order2.m
tests/hard_coded/ho_order2.exp
Test case for higher_order.m.
tools/test_mercury
Added --intermod-unused-args to the options for murlibobo.
extras/trailed_update/{samples,tests}/Mmakefile
Add "-I.." to MGNUCFLAGS so gcc can find unsafe.h which
is #included in c_header_code read from unsafe.opt.
Estimated hours taken: 4.5
Fix some bugs in code generation for nondet disjunctions and
if-then-elses. The compiler was incorrectly releasing the temp stack
slots used to save the heap pointer and trail pointer at the start
of the else or the last clauses, thus allowing them to be reused not
only in the else case or the last clause, but also by goals following the
disjunction or if-then-else, even though the values in these slots might
be needed again on backtracking into the condition or the earlier
disjunctions.
Thanks to Warwick Harvey for reporting this bug.
compiler/code_info.m:
Add new predicate `code_info__maybe_reset_and_pop_ticket',
which is like `code_info__maybe_reset_and_discard_ticket',
except that it does not release the temp stack slot.
compiler/disj_gen.m:
compiler/ite_gen.m:
When generating code for nondet goals that save
and restore the hp and trail, if the saved
values might be needed again on backtracking
into the current goal from one that follows
(i.e. in nondet disjunctions and in if-then-elses
with nondet conditions), make sure we use
`code_info__maybe_reset_and_pop_ticket' and
`code_info__reset_hp' instead of
`code_info__maybe_reset_and_discard_ticket' and
`code_info__reset_and_discard_hp'.
compiler/code_info.m:
Include the temp_avail_slots in the set of things
that slap_code_info does not update. Temp slots
that were acquired (and not released) in one branch
of a branched goal need to be still reserved at the
end of the branched goal.
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tests/var_test.exp:
Add a new subdirectory `tests' in extras/trailed_update,
and move the test case `tests.{m,exp}' from the samples
subdirectory into the tests subdirectory, at the same
time renaming it as `var_test.{m,exp}'.
extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/func_trail_test.m:
extras/trailed_update/tests/func_trail_test.exp:
extras/trailed_update/tests/func_trail_test_2.m:
extras/trailed_update/tests/func_trail_test_2.exp:
Add a couple of regression tests for the bug mentioned above.
These tests need to go here rather than somewhere in the
main `tests' directory (e.g. `tests/hard_coded'), because
they only work in trailing grades, and the normal tests are
compiled in lots of grades, many of which don't have
corresponding trailing grades installed.
(I suppose we could put them in the main `tests' directory,
and only enable them for trailing grades, but it just seemed
easier to put them here.)
Estimated hours taken: 0.1
tests/trailed_update/samples/Mmakefile:
Temporarily disable the test of `interpreter',
since this test fails in some grades.
Estimated hours taken: 1.0
Fix bugs uncovered/introduced by recent changes to ml.
extras/clpr/samples/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use MLFLAGS += --shared, rather than redefining ML, and
rather than using --mercury-libs shared.
Similar changes for doing static linking.
Estimated hours taken: 0.1
extras/trailed_update/samples/Mmakefile:
In the rule for creating *.res, swap the order in
which the .out and .exp files are passed to diff,
so that the diff properly reflects how the actual
output differs from the expected output rather than
vice versa.
Estimated hours taken: 1
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/interpreter.exp:
Work around a (spurious) unique mode error, which was
caused by the recent changes to make unique mode checking
of higher-order terms and lambda expressions more strict.
The work-around is to avoid the use of the higher-order
pred unsorted_aggregate/4, and instead use impure code (ugh).
In the long term, a better solution would be to add support
for `call-once' higher-order modes.
Estimated hours taken: 0.25
extras/clpr/Mmakefile:
extras/clpr/samples/Mmakefile:
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use `GRADEFLAGS += --use-trail' instead of `GRADEFLAGS = --use-trail',
so that the definition of GRADEFLAGS doesn't override the default
definition `GRADEFLAGS = --use-grade $(GRADE)'. This means that
the specified GRADEFLAGS will modify the GRADE, rather than
replacing it.
Estimated hours taken: 0.1
extras/trailed_update/samples/.cvsignore:
Ignore the `.c' files and executables corresponding to the
`.m' files in this directory.
Estimated hours taken: 0.1
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use `GRADEFLAGS = --use-trail' rather than `GRADE=asm_fast.gc.tr'.
Estimated hours taken: 2
extras/trailed_update/var.m:
Add new predicate var__is_ground/2.
Also fix a bug: it was not handling unifications between
already-aliased variables correctly.
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
Add some more test cases.
Estimated hours taken: 3
extras/trailed_update/var.m:
Fix a bug in the code for detecting floundering.
Improve the error message for floundering slightly
(print out how many floundered goals there are).
extras/trailed_update/Mmakefile:
Add an `mmake check' target.
extras/trailed_update/samples/tests.exp:
Update the expected test output to reflect the new
floundering error message.
Estimated hours taken: 6
Various bug fixes and enhancements to var.m and other stuff in
extras/trailed_update.
extras/trailed_update/var.m:
Add code to detect floundering.
Change the code for debug_freeze/3 to avoid a floundering warning.
Add new predicates debug_freeze/4 (to go with debug_freeze/3)
and dump_var/3.
Fix a bug in freeze/3 (higher-order terms are monomorphic, so
there is no need to explicitly pass type-infos when calling them).
Fix a bug in wakeup_delayed_goals/2 (we need to set the binding
to ground _before_ waking up the goals).
extras/trailed_update/Mmakefile:
Add `ML = ml --mercury-libs shared', so that it will work on Linux.
extras/trailed_update/samples/Mmakefile:
Make it work with shared libraries on Linux.
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
Some test cases for var.m.
extras/trailed_update/tr_store.m:
Add a prototype for ML_compare_typeinfo().
extras/trailed_update/unsafe.m:
Change the C code for unsafe_perform_io to match the new
interface for exported Mercury procedures that do I/O --
there is no longer any need to pass dummy io__state arguments
in the C code.
Estimated hours taken: 4
extras/trailed_update/samples/interpreter.m:
New file. An example of the use of tr_store.m.
samples/interpreter.m:
Add pointer to extras/trailed_update/samples/interpreter.m.
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/interpreter.inp:
extras/trailed_update/samples/interpreter.exp:
extras/trailed_update/samples/vqueens.exp:
New files. Some testing infrastructure.