Estimated hours taken: 12
Branches: main
Add a new goal form, as discussed on our mailing lists:
promise_equivalent_solution_sets [Vars] (
arbitrary [Vars1] Goal1,
arbitrary [Vars2] Goal2,
...
)
NEWS:
Mention the new goal form.
doc/reference_manual.texi:
Document the new goal form.
library/ops.m:
Add "promise_equivalent_solution_sets" and "arbitrary" as new
operators.
compiler/prog_item.m:
Add a parse_tree representation of new constructs.
Change the representation of goal forms in the parse tree to avoid
using punctuation marks as function symbols, to avoid function symbols
that need quoting, and to avoid ambiguity with hlds_goal_expr.
Delete the obsolete if_then (no else) goal form.
compiler/hlds_goal.m:
Provide a HLDS representation of the new constructs.
compiler/det_analysis.m:
Implement the rules for processing the new constructs.
compiler/det_report.m:
Implement the messages for the errors that can occur with the
new constructs.
Add quotes around `promise_equivalent_solutions' in an existing error
message, for consistency.
compiler/prog_io_goal.m:
Parse the new goal constructs.
compiler/add_clause.m:
compiler/hlds_out.m:
compiler/make_hlds_passes.m:
compiler/make_hlds_warn.m:
compiler/mercury_to_mercury.m:
compiler/module_qual.m:
compiler/pd_util.m:
compiler/prog_io.m:
compiler/prog_io_dcg.m:
compiler/prog_io_goal.m:
compiler/prog_util.m:
compiler/saved_vars.m:
compiler/simplify.m:
Conform to the changes to prog_item.m and hlds_goal.m.
tests/hard_coded/one_member.{m,exp}:
New test case to test the proper functioning of the new construct.
tests/invalid/one_member.{m,err_exp}:
New test case to test the kinds of errors that can occur when using
the new construct.
tests/hard_coded/Mmakefile:
tests/invalid/Mmakefile:
Enable the new test cases.
tests/invalid/promise_equivalent_solutions_test.err_exp:
Expect quotes around an old construct name, after the change to
det_report.m.