[m-rev.] for review: fix termination tests (?)

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jul 3 14:13:46 AEST 2007


On Tue, 3 Jul 2007, Peter Wang wrote:

> Julien, does this look right?
>
> Estimated hours taken: 0.25
> Branches: main
>
> compiler/term_constr_initial.m:
> 	Handle the new builtins builtin_compound_eq and builtin_compound_lt.
>
> Index: compiler/term_constr_initial.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_initial.m,v
> retrieving revision 1.20
> diff -u -p -r1.20 term_constr_initial.m
> --- compiler/term_constr_initial.m	31 May 2007 08:12:53 -0000	1.20
> +++ compiler/term_constr_initial.m	3 Jul 2007 03:44:44 -0000
> @@ -549,7 +549,10 @@ process_no_type_info_builtin(PredName, H
>             SizeVar2 = prog_var_to_size_var(SizeVarMap, HVar2),
>             ConstraintsPrime = [make_vars_eq_constraint(SizeVar1, SizeVar2)]
>         ;
> -            PredName = "store_at_ref"
> +            ( PredName = "store_at_ref"
> +            ; PredName = "builtin_compound_eq"
> +            ; PredName = "builtin_compound_lt"
> +            )
>         ->
>             ConstraintsPrime = []
>         ;

You could potentially add stronger constraints, e.g. |A| = |B|,
for builtin_compound_eq(A, B), but it will work as is.

(Actually, I would add these two to the XXX comment at the head of the
module that mentions that the analyser does the wrong thing for
copy/2 and typed_unify/2.)

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