[m-rev.] for review: avoid using some "keywords" 5

Julien Fischer jfischer at opturion.com
Wed May 18 11:42:08 AEST 2016



On Wed, 18 May 2016, Zoltan Somogyi wrote:

> Simplify the representation of modes of unifications.
> 
> Unifications (x = y) have long had two descriptions of their modes.
> One is the unify_mode, which used to look like this:
>     (initx -> finalx) - (inity -> finaly)
> and other is the uni_mode, which used to look like this:
>     (initx - inity) -> (finalx - finaly)
> Each unification had one unify_mode, and each unification that includes
> a function symbol had one uni_mode per argument of that function symbol.

...

> index 889f755..b433661 100644
> --- a/compiler/hlds_goal.m
> +++ b/compiler/hlds_goal.m

...

> @@ -1052,13 +1052,10 @@
>      --->    cell_is_unique
>      ;       cell_is_shared.
> 
> -:- type unify_mode == pair(mer_mode, mer_mode).
> -
> -:- type uni_mode
> -    --->    pair(mer_inst) -> pair(mer_inst).
> -            % Each uni_mode maps a pair of insts to a pair of new insts
> -            % Each pair represents the insts of the LHS and the RHS
> -            % respectively.
> +:- type unify_mode
> +    --->    unify_modes_lhs_rhs(from_to_insts, from_to_insts).
> +            % XXX Should the function symbol be unify_insts_lhs_rhs?

No.

> +            % I (zs) think unify_from_to_insts_lhs_rhs is too cumbersome.

It is.

The rest of the diff looks fine.

Julien.


More information about the reviews mailing list