[m-rev.] diff: add a test case for a bug in ho/type specialization

Simon Taylor stayl at cs.mu.OZ.AU
Thu May 5 10:53:36 AEST 2005


I sent this a couple of days ago, doesn't seem to have gone through.

On 02-May-2005, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> Add a test case for a bug that causes an assertion failure in the
> compiler.  It seems to be caused by the interaction of higher-order and
> type specialization; a unification involving the construction of a
> type_ctor_info (for the type being specialized) in a predicate created
> by higher-order specialization seems to have an incorrect entry in the
> instmap - this results in simplify incorrectly optimizing away the
> unification, even though its output is need later.  (The unification is
> the one involving V_20 in the predicate foldl_ho1/5).

I've had a quick look at this.  The problem seems to be that
mode_util.recompute_instmap_delta_unify doesn't recompute
instmap_deltas for construction unifications.

The sequence of events seems to be
1. higher_order.construct_higher_order_terms builds a construction
unification for a type-info which isn't yet used.
2. quantification works out that the type-info isn't used and
removes it from the instmap_delta.
3. further specialization makes the type-info become used.
4. recompute_instmap_delta doesn't put it back in the instmap_delta.
5. crash.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list