Commit Graph

4 Commits

Author SHA1 Message Date
Zoltan Somogyi
3dc4babb24 Update the style of more test cases.
And update expected output files for changes in line numbers.
2021-07-27 13:29:46 +10:00
Zoltan Somogyi
e64c41d735 Generate better error messages for bad switch arm determinisms.
compiler/det_report.m:
    When a switch is wrapped in a require_switch_arms_<detism> scope
    but a switch arm violates the requirement, we generate an error message.
    Modify that message to identify both the switched-on variable and
    the functor(s) of the arm with the determinism error.

compiler/det_util.m:
    To make it possible to print the name of the switched-on variable,
    record the varset of the procedure being analyzed.

compiler/det_analysis.m:
compiler/pd_util.m:
compiler/simplify_proc.m:
    Supply the varset.

tests/invalid/require_det_in_lambda.err_exp:
tests/invalid/require_scopes.err_exp:
    Expect the improved error messages.
2015-11-18 00:40:05 +11:00
Zoltan Somogyi
f564e463b4 Print the causes of unmet determinism requirements.
compiler/det_report.m:
    When a scope that requires a goal to have a certain determinism doesn't,
    don't just print a message saying there is a mismatch between the actual
    and required determinisms; also print the cause of that mismatch.

    Fix a case error in an error message.

tests/invalid/det_atomic_goal_msgs.err_exp:
tests/invalid/magicbox.err_exp:
tests/invalid/require_det_in_lambda.err_exp:
tests/invalid/require_scopes.err_exp:
    Expect the compiler's newly expanded and fixed output.
2015-03-12 03:28:49 +11:00
Zoltan Somogyi
6efbf5a458 Fix Mantis bug 227.
Estimated hours taken: 1
Branches: main

Fix Mantis bug 227.

compiler/det_report.m:
	When looking for violations of require_detism scopes, look inside
	lambda goals.

tests/invalid/require_det_in_lambda.{m,err_exp}:
	New test case for this bug.

tests/invalid/Mmakefile:
	Enable the new test case.
2011-11-14 05:48:24 +00:00