[m-rev.] for review: "fix" the bug Julien reported yesterday

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jan 28 17:48:55 AEDT 2009


On Wed, 28 Jan 2009, Zoltan Somogyi wrote:

> "Fix" a problem whose workaround by Julien was committed recently.
> The immediate symptom was a code generator abort caused by a model_non goal
> in a model_det context: a det procedure whose body was multi. The reason
> why the body was multi was that a disjunction with no outputs was not
> recognized as having no outputs, because instmap_delta_no_output_vars_2
> does not succeed if the old and new insts of a variable specify non-overlapping
> sets of function symbols.
>
> This diff does not fix the actual problem (though it does document it),
> but it does make it much less likely to occur by making the mishandled
> situation much less likely to occur.
>
> compiler/instmap.m:
> 	Document the problem with instmap_delta_no_output_vars_2.
> 	Simplify the code of instmap_delta_no_output_vars_2.
>
> compiler/mode_util.m:
> 	When recomputing instmap_deltas of deconstruction unifications,
> 	abstractly unify the inst of the LHS variable before and after
> 	the deconstruction. If the cons_id does not appear among the possible
> 	cons_ids in the old inst, this will make the final inst not_reached,
> 	and avoid the problem situation for later.
>
> compiler/Mercury.options:
> 	Remove Julien's workaround, since it is not needed anymore.
>
> doc/user_guide.texi:
> 	Document the --dump-hlds-options a bit better. This helped in tracking
> 	down the problem.
>
> tests/hard_coded/Mmakefile:
> 	Reenable an old test that this change now enables us to pass.

That looks fine.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list