[m-rev.] for review: Fix computation of bound variables in goal_info_to_atomic_goal_rep_fields.

Julien Fischer jfischer at opturion.com
Mon Sep 29 14:49:57 AEST 2014


On Fri, 26 Sep 2014, Peter Wang wrote:

> On Mon, 18 Aug 2014 16:06:37 +1000, Peter Wang <novalazy at gmail.com> wrote:
>> compiler/prog_rep.m:
>> 	Use `instmap_changed_vars_old' in a spot to avoid breaking some
>> 	declarative debugging test cases.  I don't know where the real
>> 	problem lies.
>
> ---
>
> Fix computation of bound variables in goal_info_to_atomic_goal_rep_fields.
>
> instmap_changed_vars calls inst_matches_final_typed to compare the insts
> of a variable between two instmaps.  But inst_matches_final_typed
> contained a hack such that ground matches bound(...), so variables
> changing instantiatedness from ground to bound(...) would NOT be
> included in the result set of instmap_changed_vars.  Once the hack was
> removed, the behaviour of instmap_changed_vars changed to match its
> documentation.
>
> goal_info_to_atomic_goal_rep_fields used instmap_changed_vars to compute
> BoundVars.  Variables whose instantiation state changes from ground to
> bound, but are not actually bound by the goal, would now be in BoundVars.
> This bug led to changes in the goal representation (e.g. from
> unify_deconstruct_rep to partial_deconstruct_rep) and caused some
> declarative debugging test cases to fail.
>
> compiler/prog_rep.m:
> 	Change how goal_info_to_atomic_goal_rep_fields to exclude
> 	variables which are ground before the goal from BoundVars.
>
> 	Reorder some code to execution order.
>
> compiler/instmap.m:
> 	Delete instmap_changed_vars_old.

That looks fine -- I assume the existing declarative debugging test
cases provide adequete coverage of the problem?

Cheers,
Julien.



More information about the reviews mailing list