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.
boehm_gc/.gitignore:
Ignore .obj files
extras/xml/xml.dtd.m:
extras/xml/xml.parse.m:
Change the name of functor ('1') in the multiplicity/0 type
to one. The former name does not (yet) work with the C# grade.
samples/.gitignore:
Ignore library output and sample executables.
samples/c_interface/standalone_c/.gitignore:
Ignore mercury_lib_int output files.
samples/c_interface/standalone_c/Makefile:
chmod 0644.
samples/c_interface/.gitignore:
Ignore object files and executables.
samples/java_interface/.gitignore:
Ignore Java class files and executables.
samples/lazy_list/.gitignore:
samples/muz/.gitignore:
samples/rot13/.gitignore:
Ignore executables.
samples/rot13/rot13_concise.m:
Update call to index_det to use string.det_index.
Added comments to clarify type inference.
samples/solutions/.gitignore:
Ignore executables.
samples/solutions/all_solutions.m:
samples/solutions/n_solutions.m:
samples/solutions/one_solution.m:
samples/solutions/some_solutions.m:
chmod 0644.
samples/solver_types/.gitignore:
Ignore executables.
samples/solver_types/sudoku.m:
Output the solution in a 3x3 grid.
samples/solver_types/Makefile:
Provide a realclean target.
samples/solver_types/Mercury.options:
Provide mmc-specific options here rather than in the
Makefile.
Use a trseg grade instad of a tr one.
Branches: main
samples/solver_types/eqneq.m:
samples/solver_types/sudoku.m:
samples/solver_types/test_eqneq.m:
Add feature set pragmas that specify that trailing is required.
Make it impossible for the labelling predicate to be reordered
so that it is called before the constraints are posted.
Minor formatting fixes.
Estimated hours taken: 10
Branches: main
Remove support for automatic initialisation of solver types from the language.
This is being done because:
* the current implementation of automatic initialisation means we cannot
support polymorphic solver types, e.g. you cannot have the type foo(bar)
where:
:- solver type foo(T).
:- solver type bar.
* the current initialisation strategy is fairly ad-hoc anyway; in particular
it has a tendency to unnecessarily change the determinism of procedures.
* mode error messages are often quite poor because of the interaction between
automatic initialisation and impure code.
* automatic initialisation is not used in practice. All of the
G12 solver libraries that use solver types recommend explicitly
initialising solver variables.
This change removes support for automatic solver initialisation from the
language. The code for supporting it remains in the implementation, but
it is now dependent upon the developer-only `--solver-type-auto-init'
option.
As a transitional measure the compiler will still accept
`initialisation is ...' attributes in solver type definitions even when
`--no-solver-type-auto-init' is enabled. After this change has bootstrapped,
and the relevant updates have been made to the G12 solver libraries, this
will be changed so that `initialisation is ...' attributes are considered
a syntax error unless `--solver-type-auto-init' is enabled.
doc/reference_manual.texi:
Document that solver type definitions no longer allow initialisation
predicates to be supplied. (The section documenting initialisation
predicates has been commented out rather than deleted since the
implementation of automatic initialisation still exists.)
Remove the section documenting the restrictions on polymorphic
solver types. These restrictions no longer apply in the absence
of automatic initialisation.
compiler/options.m:
Add a new developer-only option, `--solver-type-auto-init', that
controls whether automatic initialisation of solver variables is
allowed (for those solver types that have initialisation predicates
specified.)
compiler/prog_data.m:
Add a type that represents whether a solver type allows automatic
initialisation or not.
Extend the solver_type_details structure to allow initialisation
predicates to be optional.
compiler/prog_io.m:
Allow initialisation predicates to be optional in solver type
definitions.
compiler/modes.m:
compiler/modecheck_call.m:
compiler/modecheck_unify.m:
Only insert calls to solver type initialisation predicates if
the solver type has an initialisation predicate and the
developer-only option `--solver-type-auto-init' is enabled.
compiler/unify_proc.m:
Handle the situation where a solver type does not have an
initialise predicate.
compiler/add_special_pred.m:
Only add initialisation special predicates for those solver
types whose definition provides an initialisation predicate.
compiler/mode_info.m:
Add a utility predicate that tests whether the support for
automatic solver type initialisation is enabled.
compiler/type_util.m:
Add a predicate that tests whether a type is a solver type
that supports automatic initialisation.
Add an XXX comment about such types and abstract equivalence
types.
compiler/mercury_to_mercury.m:
Conform to the above changes.
compiler/special_pred.m:
Fix some typos.
samples/solver_types/eqneq.m:
Delete the `initialisation is ...' from the definition of the solver
type eqneq/1.
tests/hard_coded/Mercury.options:
Enable `--solver-type-auto-init' for the solver_construction_init_test
test.
tests/hard_coded/solver_build_call.m:
tests/invalid/any_pass_as_ground.m:
Don't use automatic solver variable initialisation in these
test cases.
tests/invalid/partial_implied_mode.err_exp:
Conform to the above changes in the mode analyser.
tests/valid/Mercury.options:
Compile some tests cases with `--solver-type-auto-init' enabled.