[m-rev.] diff: add higher-order proc_arg_vector ops / function symbol renamings

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jan 15 18:52:41 AEDT 2007


Estimated hour taken: 1.5
Branches: main

Add some higher-order operations that work on proc_arg_vectors.  These
are required by upcoming changes.

Remove ambiguities on the function symbol `dead' by renaming type
constructors (and in one case by deleting an unused type.)

Julien.

compiler/hlds_args.m:
 	Add some higher-order operations for proc_arg_vectors.

compiler/hlds_pred.m:
 	Delete the type `liveness' since it is unused and its function
 	symbols clash with those of other types.

compiler/prog_data.m:
 	Add prefixes to the function symbols of the type is_live in
 	order to make them unambiguous.

compiler/var_locn.m:
 	Do the same for the function symbols for the dead_or_alive type.

compiler/inst_match.m:
compiler/inst_util.m:
compiler/instmap.m:
compiler/mercury_to_mercury.m:
compiler/mode_info.m:
compiler/mode_util.m:
compiler/modecheck_call.m:
compiler/modecheck_unify.m:
compiler/modes.m:
compiler/unique_modes.m:
 	Conform to the above changes.

compiler_unify_gen.m
 	Switch on the arg_mode type in a few spots.

 	Conform to the above changes.

Index: compiler/structure_sharing.domain.m
 	Fix some comments.

Julien.

Index: compiler/hlds_args.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_args.m,v
retrieving revision 1.2
diff -u -r1.2 hlds_args.m
--- compiler/hlds_args.m	11 Jan 2007 03:36:00 -0000	1.2
+++ compiler/hlds_args.m	15 Jan 2007 07:49:47 -0000
@@ -127,6 +127,58 @@

  %-----------------------------------------------------------------------------%
  %
+% Higher-order operations on proc_arg_vectors
+%
+
+%
+% NOTE: these higher-order operations all work in a similar fashion
+%       to their counterparts in library/list.m.
+
+:- func proc_arg_vector_map(func(T) = U, proc_arg_vector(T)) =
+    proc_arg_vector(U).
+
+:- pred proc_arg_vector_map(pred(T, U)::in(pred(in, out) is det),
+    proc_arg_vector(T)::in, proc_arg_vector(U)::out) is det.
+
+:- pred proc_arg_vector_map_corresponding(
+    pred(T, U, V)::in(pred(in, in, out) is det),
+    proc_arg_vector(T)::in, proc_arg_vector(U)::in, proc_arg_vector(V)::out)
+    is det.
+
+:- pred proc_arg_vector_all_true(pred(T)::in(pred(in) is semidet),
+    proc_arg_vector(T)::in) is semidet.
+
+:- pred proc_arg_vector_map_corresponding_foldl2(
+    pred(A, B, C, D, D, E, E)::in(pred(in, in, out, in, out, in, out) is det),
+    proc_arg_vector(A)::in, proc_arg_vector(B)::in, proc_arg_vector(C)::out,
+    D::in, D::out, E::in, E::out) is det.
+
+:- pred proc_arg_vector_foldl3_corresponding(
+    pred(A, B, C, C, D, D, E, E)
+    ::in(pred(in, in, in, out, in, out, in, out) is det),
+    proc_arg_vector(A)::in, proc_arg_vector(B)::in,
+    C::in, C::out, D::in, D::out, E::in, E::out) is det.
+
+:- pred proc_arg_vector_foldl2_corresponding3(
+    pred(A, B, C, D, D, E, E)
+    ::in(pred(in, in, in, in, out, in, out) is det),
+    proc_arg_vector(A)::in, proc_arg_vector(B)::in, proc_arg_vector(C)::in,
+    D::in, D::out, E::in, E::out) is det.
+
+:- pred proc_arg_vector_foldl3_corresponding3(
+    pred(A, B, C, D, D, E, E, F, F)
+    ::in(pred(in, in, in, in, out, in, out, in, out) is det),
+    proc_arg_vector(A)::in, proc_arg_vector(B)::in, proc_arg_vector(C)::in,
+    D::in, D::out, E::in, E::out, F::in, F::out) is det.
+
+:- pred proc_arg_vector_foldl4_corresponding3(
+    pred(A, B, C, D, D, E, E, F, F, G, G)
+    ::in(pred(in, in, in, in, out, in, out, in, out, in, out) is det),
+    proc_arg_vector(A)::in, proc_arg_vector(B)::in, proc_arg_vector(C)::in,
+    D::in, D::out, E::in, E::out, F::in, F::out, G::in, G::out) is det.
+
+%-----------------------------------------------------------------------------%
+%
  % Stuff related to the polymorphism pass
  %

@@ -358,6 +410,254 @@
      ).

  %-----------------------------------------------------------------------------%
+
+proc_arg_vector_map(Func, V0) = V :-
+    V0 = proc_arg_vector(ITI0, ITCI0, UTI0, ETI0, UTCI0, ETCI0, Args0,
+        MaybeRetVal0),
+    ITI  = list.map(Func, ITI0),
+    ITCI = list.map(Func, ITCI0),
+    UTI  = list.map(Func, UTI0),
+    ETI  = list.map(Func, ETI0),
+    UTCI = list.map(Func, UTCI0),
+    ETCI = list.map(Func, ETCI0),
+    Args = list.map(Func, Args0),
+    (
+        MaybeRetVal0 = yes(RetVal0),
+        RetVal = Func(RetVal0),
+        MaybeRetVal = yes(RetVal)
+    ;
+        MaybeRetVal0 = no,
+        MaybeRetVal  = no
+    ),
+    V = proc_arg_vector(ITI, ITCI, UTI, ETI, UTCI, ETCI, Args,
+        MaybeRetVal).
+
+proc_arg_vector_map(Pred, V0, V) :-
+    V0 = proc_arg_vector(ITI0, ITCI0, UTI0, ETI0, UTCI0, ETCI0, Args0,
+        MaybeRetVal0),
+    list.map(Pred, ITI0,  ITI),
+    list.map(Pred, ITCI0, ITCI),
+    list.map(Pred, UTI0,  UTI),
+    list.map(Pred, ETI0,  ETI),
+    list.map(Pred, UTCI0, UTCI),
+    list.map(Pred, ETCI0, ETCI),
+    list.map(Pred, Args0, Args),
+    (
+        MaybeRetVal0 = yes(RetVal0),
+        Pred(RetVal0, RetVal),
+        MaybeRetVal = yes(RetVal)
+    ;
+        MaybeRetVal0 = no,
+        MaybeRetVal  = no
+    ),
+    V = proc_arg_vector(ITI, ITCI, UTI, ETI, UTCI, ETCI, Args,
+        MaybeRetVal).
+
+proc_arg_vector_map_corresponding(P, A, B, C) :-
+    A = proc_arg_vector(ITIA, ITCIA, UTIA, ETIA, UTCIA, ETCIA, ArgsA,
+        MaybeRetValA),
+    B = proc_arg_vector(ITIB, ITCIB, UTIB, ETIB, UTCIB, ETCIB, ArgsB,
+        MaybeRetValB),
+    list.map_corresponding(P, ITIA, ITIB, ITIC),
+    list.map_corresponding(P, ITCIA, ITCIB, ITCIC),
+    list.map_corresponding(P, UTIA, UTIB, UTIC),
+    list.map_corresponding(P, ETIA, ETIB, ETIC),
+    list.map_corresponding(P, UTCIA, UTCIB, UTCIC),
+    list.map_corresponding(P, ETCIA, ETCIB, ETCIC),
+    list.map_corresponding(P, ArgsA, ArgsB, ArgsC),
+    (
+        MaybeRetValA = yes(RetValA),
+        MaybeRetValB = yes(RetValB)
+    ->
+        P(RetValA, RetValB, RetValC),
+        MaybeRetValC = yes(RetValC)
+    ;
+        MaybeRetValA = no,
+        MaybeRetValB = no
+    ->
+        MaybeRetValC = no 
+    ;
+        unexpected(this_file, "proc_arg_vector_map_corresponding/4: " ++ 
+            "mismatched proc_arg_vectors")
+    ),
+    C = proc_arg_vector(ITIC, ITCIC, UTIC, ETIC, UTCIC, ETCIC, ArgsC,
+        MaybeRetValC).
+
+proc_arg_vector_all_true(P, V) :-
+    V = proc_arg_vector(ITI, ITCI, UTI, ETI, UTCI, ETCI, Args, MaybeRetVal),
+    list.all_true(P, ITI),
+    list.all_true(P, ITCI),
+    list.all_true(P, UTI),
+    list.all_true(P, ETI),
+    list.all_true(P, UTCI),
+    list.all_true(P, ETCI),
+    list.all_true(P, Args),
+    (
+        MaybeRetVal = yes(RetVal),
+        P(RetVal)
+    ;
+        MaybeRetVal = no
+    ).
+
+proc_arg_vector_map_corresponding_foldl2(P, A, B, C, !Acc1, !Acc2) :-
+    A = proc_arg_vector(ITIA, ITCIA, UTIA, ETIA, UTCIA, ETCIA, ArgsA,
+        MaybeRetValA),
+    B = proc_arg_vector(ITIB, ITCIB, UTIB, ETIB, UTCIB, ETCIB, ArgsB,
+        MaybeRetValB),
+    list.map_corresponding_foldl2(P, ITIA,  ITIB,  ITIC,  !Acc1, !Acc2),
+    list.map_corresponding_foldl2(P, ITCIA, ITCIB, ITCIC, !Acc1, !Acc2),
+    list.map_corresponding_foldl2(P, UTIA,  UTIB,  UTIC,  !Acc1, !Acc2),
+    list.map_corresponding_foldl2(P, ETIA,  ETIB,  ETIC,  !Acc1, !Acc2),
+    list.map_corresponding_foldl2(P, UTCIA, UTCIB, UTCIC, !Acc1, !Acc2),
+    list.map_corresponding_foldl2(P, ETCIA, ETCIB, ETCIC, !Acc1, !Acc2),
+    list.map_corresponding_foldl2(P, ArgsA, ArgsB, ArgsC, !Acc1, !Acc2),
+    (
+        MaybeRetValA = yes(RetValA),
+        MaybeRetValB = yes(RetValB)
+    ->
+        P(RetValA, RetValB, RetValC, !Acc1, !Acc2),
+        MaybeRetValC = yes(RetValC)
+    ;
+        MaybeRetValA = no,
+        MaybeRetValB = no
+    -> 
+        MaybeRetValC = no
+    ;
+        unexpected(this_file, "proc_arg_vector_map_corresponding_foldl2/8: "
+            ++ "mismatched proc_arg_vectors")
+    ),
+    C = proc_arg_vector(ITIC, ITCIC, UTIC, ETIC, UTCIC, ETCIC, ArgsC,
+        MaybeRetValC).
+
+proc_arg_vector_foldl3_corresponding(P, A, B, !Acc1, !Acc2, !Acc3) :-
+    A = proc_arg_vector(ITIA, ITCIA, UTIA, ETIA, UTCIA, ETCIA, ArgsA,
+        MaybeRetValA),
+    B = proc_arg_vector(ITIB, ITCIB, UTIB, ETIB, UTCIB, ETCIB, ArgsB,
+        MaybeRetValB),
+    list.foldl3_corresponding(P, ITIA,  ITIB,  !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding(P, ITCIA, ITCIB, !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding(P, UTIA,  UTIB,  !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding(P, ETIA,  ETIB,  !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding(P, UTCIA, UTCIB, !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding(P, ETCIA, ETCIB, !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding(P, ArgsA, ArgsB, !Acc1, !Acc2, !Acc3),
+    (
+        MaybeRetValA = yes(RetValA),
+        MaybeRetValB = yes(RetValB)
+    ->
+        P(RetValA, RetValB, !Acc1, !Acc2, !Acc3)
+    ;
+        MaybeRetValA = no,
+        MaybeRetValB = no
+    -> 
+        true
+    ;
+        unexpected(this_file, "proc_arg_vector_fold3_corresponding/9: "
+            ++ "mismatched proc_arg_vectors")
+    ).
+
+proc_arg_vector_foldl2_corresponding3(P, A, B, C, !Acc1, !Acc2) :-
+    A = proc_arg_vector(ITIA, ITCIA, UTIA, ETIA, UTCIA, ETCIA, ArgsA,
+        MaybeRetValA),
+    B = proc_arg_vector(ITIB, ITCIB, UTIB, ETIB, UTCIB, ETCIB, ArgsB,
+        MaybeRetValB),
+    C = proc_arg_vector(ITIC, ITCIC, UTIC, ETIC, UTCIC, ETCIC, ArgsC,
+        MaybeRetValC),
+    list.foldl2_corresponding3(P, ITIA,  ITIB,  ITIC,  !Acc1, !Acc2),
+    list.foldl2_corresponding3(P, ITCIA, ITCIB, ITCIC, !Acc1, !Acc2),
+    list.foldl2_corresponding3(P, UTIA,  UTIB,  UTIC,  !Acc1, !Acc2),
+    list.foldl2_corresponding3(P, ETIA,  ETIB,  ETIC,  !Acc1, !Acc2),
+    list.foldl2_corresponding3(P, UTCIA, UTCIB, UTCIC, !Acc1, !Acc2),
+    list.foldl2_corresponding3(P, ETCIA, ETCIB, ETCIC, !Acc1, !Acc2),
+    list.foldl2_corresponding3(P, ArgsA, ArgsB, ArgsC, !Acc1, !Acc2),
+    (
+        MaybeRetValA = yes(RetValA),
+        MaybeRetValB = yes(RetValB),
+        MaybeRetValC = yes(RetValC)
+    ->
+        P(RetValA, RetValB, RetValC, !Acc1, !Acc2)
+    ;
+        MaybeRetValA = no,
+        MaybeRetValB = no,
+        MaybeRetValC = no
+    -> 
+        true
+    ;
+        unexpected(this_file, "proc_arg_vector_foldl2_corresponding3/8 "
+            ++ "mismatched proc_arg_vectors")
+    ).
+
+proc_arg_vector_foldl3_corresponding3(P, A, B, C, !Acc1, !Acc2, !Acc3) :-
+    A = proc_arg_vector(ITIA, ITCIA, UTIA, ETIA, UTCIA, ETCIA, ArgsA,
+        MaybeRetValA),
+    B = proc_arg_vector(ITIB, ITCIB, UTIB, ETIB, UTCIB, ETCIB, ArgsB,
+        MaybeRetValB),
+    C = proc_arg_vector(ITIC, ITCIC, UTIC, ETIC, UTCIC, ETCIC, ArgsC,
+        MaybeRetValC),
+    list.foldl3_corresponding3(P, ITIA,  ITIB,  ITIC,  !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding3(P, ITCIA, ITCIB, ITCIC, !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding3(P, UTIA,  UTIB,  UTIC,  !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding3(P, ETIA,  ETIB,  ETIC,  !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding3(P, UTCIA, UTCIB, UTCIC, !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding3(P, ETCIA, ETCIB, ETCIC, !Acc1, !Acc2, !Acc3),
+    list.foldl3_corresponding3(P, ArgsA, ArgsB, ArgsC, !Acc1, !Acc2, !Acc3),
+    (
+        MaybeRetValA = yes(RetValA),
+        MaybeRetValB = yes(RetValB),
+        MaybeRetValC = yes(RetValC)
+    ->
+        P(RetValA, RetValB, RetValC, !Acc1, !Acc2, !Acc3)
+    ;
+        MaybeRetValA = no,
+        MaybeRetValB = no,
+        MaybeRetValC = no
+    -> 
+        true
+    ;
+        unexpected(this_file, "proc_arg_vector_foldl3_corresponding3/10 "
+            ++ "mismatched proc_arg_vectors")
+    ).
+
+proc_arg_vector_foldl4_corresponding3(P, A, B, C, !Acc1, !Acc2, !Acc3,
+        !Acc4) :-
+    A = proc_arg_vector(ITIA, ITCIA, UTIA, ETIA, UTCIA, ETCIA, ArgsA,
+        MaybeRetValA),
+    B = proc_arg_vector(ITIB, ITCIB, UTIB, ETIB, UTCIB, ETCIB, ArgsB,
+        MaybeRetValB),
+    C = proc_arg_vector(ITIC, ITCIC, UTIC, ETIC, UTCIC, ETCIC, ArgsC,
+        MaybeRetValC),
+    list.foldl4_corresponding3(P, ITIA,  ITIB,  ITIC,  !Acc1, !Acc2, !Acc3,
+        !Acc4),
+    list.foldl4_corresponding3(P, ITCIA, ITCIB, ITCIC, !Acc1, !Acc2, !Acc3,
+        !Acc4),
+    list.foldl4_corresponding3(P, UTIA,  UTIB,  UTIC,  !Acc1, !Acc2, !Acc3,
+        !Acc4),
+    list.foldl4_corresponding3(P, ETIA,  ETIB,  ETIC,  !Acc1, !Acc2, !Acc3,
+        !Acc4),
+    list.foldl4_corresponding3(P, UTCIA, UTCIB, UTCIC, !Acc1, !Acc2, !Acc3,
+        !Acc4),
+    list.foldl4_corresponding3(P, ETCIA, ETCIB, ETCIC, !Acc1, !Acc2, !Acc3,
+        !Acc4),
+    list.foldl4_corresponding3(P, ArgsA, ArgsB, ArgsC, !Acc1, !Acc2, !Acc3,
+        !Acc4),
+    (
+        MaybeRetValA = yes(RetValA),
+        MaybeRetValB = yes(RetValB),
+        MaybeRetValC = yes(RetValC)
+    ->
+        P(RetValA, RetValB, RetValC, !Acc1, !Acc2, !Acc3, !Acc4)
+    ;
+        MaybeRetValA = no,
+        MaybeRetValB = no,
+        MaybeRetValC = no
+    -> 
+        true
+    ;
+        unexpected(this_file, "proc_arg_vector_foldl4_corresponding3/12 "
+            ++ "mismatched proc_arg_vectors")
+    ).
+
+%-----------------------------------------------------------------------------%
  %
  % Stuff related to the polymorphism transformation
  %
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.423
diff -u -r1.423 hlds_out.m
--- compiler/hlds_out.m	6 Jan 2007 10:56:13 -0000	1.423
+++ compiler/hlds_out.m	15 Jan 2007 07:11:49 -0000
@@ -4097,21 +4097,21 @@
          Context, Term).
  inst_name_to_term(unify_inst(Liveness, InstA, InstB, Real), Context) = Term :-
      construct_qualified_term(unqualified("$unify"),
-        [make_atom((Liveness = live -> "live" ; "dead"), Context)] ++
+        [make_atom((Liveness = is_live -> "live" ; "dead"), Context)] ++
          list.map(map_inst_to_term(Context), [InstA, InstB]) ++
          [make_atom((Real = real_unify -> "real" ; "fake"), Context)],
          Context, Term).
  inst_name_to_term(ground_inst(InstName, IsLive, Uniq, Real), Context) = Term :-
      construct_qualified_term(unqualified("$ground"),
          [inst_name_to_term(InstName, Context),
-        make_atom((IsLive = live -> "live" ; "dead"), Context),
+        make_atom((IsLive = is_live -> "live" ; "dead"), Context),
          make_atom(inst_uniqueness(Uniq, "shared"), Context),
          make_atom((Real = real_unify -> "real" ; "fake"), Context)],
          Context, Term).
  inst_name_to_term(any_inst(InstName, IsLive, Uniq, Real), Context) = Term :-
      construct_qualified_term(unqualified("$any"),
          [inst_name_to_term(InstName, Context),
-        make_atom((IsLive = live -> "live" ; "dead"), Context),
+        make_atom((IsLive = is_live -> "live" ; "dead"), Context),
          make_atom(inst_uniqueness(Uniq, "shared"), Context),
          make_atom((Real = real_unify -> "real" ; "fake"), Context)],
          Context, Term).
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.222
diff -u -r1.222 hlds_pred.m
--- compiler/hlds_pred.m	15 Jan 2007 02:23:45 -0000	1.222
+++ compiler/hlds_pred.m	15 Jan 2007 07:23:31 -0000
@@ -13,7 +13,6 @@
  % and procedures.
  %
  %-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%

  :- module hlds.hlds_pred.
  :- interface.
@@ -157,20 +156,16 @@
      ;       goal_type_promise(promise_type)
      ;       goal_type_none.

-    % Note: `liveness' and `liveness_info' record liveness in the sense
-    % used by code generation.  This is *not* the same thing as the notion
-    % of liveness used by mode analysis!  See compiler/notes/glossary.html.
-
-:- type liveness_info   ==  set(prog_var).  % The live variables
-
-:- type liveness
-    --->    live
-    ;       dead.
+    % NOTE: `liveness_info' records liveness in the sense used by code
+    % generation.  This is *not* the same thing as the notion of liveness
+    % used by mode analysis!  See compiler/notes/glossary.html.
+    %
+:- type liveness_info == set(prog_var).  % The live variables.

  :- type arg_info
      --->    arg_info(
-                arg_loc,    % stored location
-                arg_mode    % mode of top functor
+                arg_loc,    % Stored location.
+                arg_mode    % Mode of top functor.
              ).

      % The `arg_mode' specifies the mode of the top-level functor
Index: compiler/inst_match.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_match.m,v
retrieving revision 1.78
diff -u -r1.78 inst_match.m
--- compiler/inst_match.m	27 Sep 2006 06:16:52 -0000	1.78
+++ compiler/inst_match.m	15 Jan 2007 07:03:55 -0000
@@ -517,9 +517,9 @@

          % Call abstractly_unify_inst to calculate the uniqueness of the
          % inst represented by the constrained_inst_var.
-        % We pass `Live = dead' because we want
+        % We pass `Live = is_dead' because we want
          % abstractly_unify(unique, unique) = unique, not shared.
-        Live = dead,
+        Live = is_dead,
          abstractly_unify_inst(Live, InstA, InstB1, fake_unify,
              Inst, _Det, ModuleInfo0, ModuleInfo),
          !:Info = !.Info ^ module_info := ModuleInfo,
@@ -1811,20 +1811,22 @@

  inst_list_is_ground_or_dead([], [], _).
  inst_list_is_ground_or_dead([Inst | Insts], [Live | Lives], ModuleInfo) :-
-    ( Live = live ->
+    (
+        Live = is_live,
          inst_is_ground(ModuleInfo, Inst)
      ;
-        true
+        Live = is_dead
      ),
      inst_list_is_ground_or_dead(Insts, Lives, ModuleInfo).

  inst_list_is_ground_or_any_or_dead([], [], _).
  inst_list_is_ground_or_any_or_dead([Inst | Insts], [Live | Lives],
          ModuleInfo) :-
-    ( Live = live ->
+    (
+        Live = is_live,
          inst_is_ground_or_any(ModuleInfo, Inst)
      ;
-        true
+        Live = is_dead
      ),
      inst_list_is_ground_or_any_or_dead(Insts, Lives, ModuleInfo).

Index: compiler/inst_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_util.m,v
retrieving revision 1.52
diff -u -r1.52 inst_util.m
--- compiler/inst_util.m	27 Sep 2006 06:16:53 -0000	1.52
+++ compiler/inst_util.m	15 Jan 2007 07:03:03 -0000
@@ -243,7 +243,7 @@
      ).

      % Abstractly unify two expanded insts.
-    % The is_live parameter is `live' iff *both* insts are live.
+    % The is_live parameter is `is_live' iff *both* insts are live.
      % Given the two insts to be unified, this produces
      % a resulting inst and a determinism for the unification.
      %
@@ -253,22 +253,22 @@
      unify_is_real::in, mer_inst::out, determinism::out,
      module_info::in, module_info::out) is semidet.

-abstractly_unify_inst_3(live, not_reached, _, _, not_reached, detism_det,
+abstractly_unify_inst_3(is_live, not_reached, _, _, not_reached, detism_det,
          !ModuleInfo).

-abstractly_unify_inst_3(live, any(Uniq), Inst0, Real, Inst, Det,
+abstractly_unify_inst_3(is_live, any(Uniq), Inst0, Real, Inst, Det,
          !ModuleInfo) :-
-    make_any_inst(Inst0, live, Uniq, Real, Inst, Det, !ModuleInfo).
+    make_any_inst(Inst0, is_live, Uniq, Real, Inst, Det, !ModuleInfo).

-abstractly_unify_inst_3(live, free, any(UniqY), Real, any(Uniq), detism_det,
+abstractly_unify_inst_3(is_live, free, any(UniqY), Real, any(Uniq), detism_det,
          !ModuleInfo) :-
-    unify_uniq(live, Real, detism_det, unique, UniqY, Uniq).
+    unify_uniq(is_live, Real, detism_det, unique, UniqY, Uniq).

-% abstractly_unify_inst_3(live, free, free, _, _, _, _, _) :- fail.
+% abstractly_unify_inst_3(is_live, free, free, _, _, _, _, _) :- fail.

-abstractly_unify_inst_3(live, free, bound(UniqY, List0), Real,
+abstractly_unify_inst_3(is_live, free, bound(UniqY, List0), Real,
          bound(Uniq, List), detism_det, !ModuleInfo) :-
-    unify_uniq(live, Real, detism_det, unique, UniqY, Uniq),
+    unify_uniq(is_live, Real, detism_det, unique, UniqY, Uniq),
          % Since both are live, we must disallow free-free unifications.
      bound_inst_list_is_ground_or_any(List0, !.ModuleInfo),
          % Since both are live, we must make the result shared
@@ -279,66 +279,67 @@
          List = List0
      ).

-abstractly_unify_inst_3(live, free, ground(UniqY, PredInst), Real,
+abstractly_unify_inst_3(is_live, free, ground(UniqY, PredInst), Real,
          ground(Uniq, PredInst), detism_det, !ModuleInfo) :-
-    unify_uniq(live, Real, detism_det, unique, UniqY, Uniq).
+    unify_uniq(is_live, Real, detism_det, unique, UniqY, Uniq).

-% abstractly_unify_inst_3(live, free, abstract_inst(_,_), _, _, _, _) :- fail.
+% abstractly_unify_inst_3(is_live, free, abstract_inst(_,_), _, _, _, _) :-
+%   fail.

-abstractly_unify_inst_3(live, bound(UniqX, List0), any(UniqY), Real,
+abstractly_unify_inst_3(is_live, bound(UniqX, List0), any(UniqY), Real,
          bound(Uniq, List), Det, !ModuleInfo) :-
      allow_unify_bound_any(Real),
-    unify_uniq(live, Real, detism_semi, UniqX, UniqY, Uniq),
-    make_any_bound_inst_list(List0, live, UniqY, Real, List, Det1,
+    unify_uniq(is_live, Real, detism_semi, UniqX, UniqY, Uniq),
+    make_any_bound_inst_list(List0, is_live, UniqY, Real, List, Det1,
          !ModuleInfo),
      det_par_conjunction_detism(Det1, detism_semi, Det).

-abstractly_unify_inst_3(live, bound(UniqY, List0), free, Real,
+abstractly_unify_inst_3(is_live, bound(UniqY, List0), free, Real,
          bound(Uniq, List), detism_det, !ModuleInfo) :-
-    unify_uniq(live, Real, detism_det, unique, UniqY, Uniq),
+    unify_uniq(is_live, Real, detism_det, unique, UniqY, Uniq),
      % Since both are live, we must disallow free-free unifications.
      bound_inst_list_is_ground_or_any(List0, !.ModuleInfo),
      make_shared_bound_inst_list(List0, List, !ModuleInfo).

-abstractly_unify_inst_3(live, bound(UniqX, ListX), bound(UniqY, ListY), Real,
+abstractly_unify_inst_3(is_live, bound(UniqX, ListX), bound(UniqY, ListY), Real,
          bound(Uniq, List), Det, !ModuleInfo) :-
-    abstractly_unify_bound_inst_list(live, ListX, ListY, Real, List, Det,
+    abstractly_unify_bound_inst_list(is_live, ListX, ListY, Real, List, Det,
          !ModuleInfo),
-    unify_uniq(live, Real, Det, UniqX, UniqY, Uniq).
+    unify_uniq(is_live, Real, Det, UniqX, UniqY, Uniq).

-abstractly_unify_inst_3(live, bound(UniqX, BoundInsts0), ground(UniqY, _),
+abstractly_unify_inst_3(is_live, bound(UniqX, BoundInsts0), ground(UniqY, _),
          Real, bound(Uniq, BoundInsts), Det, !ModuleInfo) :-
-    unify_uniq(live, Real, detism_semi, UniqX, UniqY, Uniq),
-    make_ground_bound_inst_list(BoundInsts0, live, UniqY, Real, BoundInsts,
+    unify_uniq(is_live, Real, detism_semi, UniqX, UniqY, Uniq),
+    make_ground_bound_inst_list(BoundInsts0, is_live, UniqY, Real, BoundInsts,
          Det1, !ModuleInfo),
      det_par_conjunction_detism(Det1, detism_semi, Det).

  % abstract insts not supported
-% abstractly_unify_inst_3(live, bound(Uniq, List), abstract_inst(_,_), Real,
+% abstractly_unify_inst_3(is_live, bound(Uniq, List), abstract_inst(_,_), Real,
  %       ground(shared), detism_semi, !ModuleInfo) :-
-%   unify_uniq(live, Real, detism_semi, unique, UniqY, Uniq),
+%   unify_uniq(is_live, Real, detism_semi, unique, UniqY, Uniq),
  %   bound_inst_list_is_ground(List, !.ModuleInfo).

-abstractly_unify_inst_3(live, ground(UniqX, higher_order(PredInst)),
+abstractly_unify_inst_3(is_live, ground(UniqX, higher_order(PredInst)),
          any(UniqY), Real, ground(Uniq, higher_order(PredInst)),
          detism_semi, !ModuleInfo) :-
      Real = fake_unify,
-    unify_uniq(live, Real, detism_det, UniqX, UniqY, Uniq).
+    unify_uniq(is_live, Real, detism_det, UniqX, UniqY, Uniq).

-abstractly_unify_inst_3(live, ground(Uniq0, higher_order(PredInst)), free,
+abstractly_unify_inst_3(is_live, ground(Uniq0, higher_order(PredInst)), free,
          Real, ground(Uniq, higher_order(PredInst)), detism_det, !ModuleInfo) :-
-    unify_uniq(live, Real, detism_det, unique, Uniq0, Uniq).
+    unify_uniq(is_live, Real, detism_det, unique, Uniq0, Uniq).

-abstractly_unify_inst_3(live, ground(UniqX, higher_order(_)),
+abstractly_unify_inst_3(is_live, ground(UniqX, higher_order(_)),
          bound(UniqY, BoundInsts0), Real, bound(Uniq, BoundInsts),
          Det, !ModuleInfo) :-
      % check `Real = fake_unify' ?
-    unify_uniq(live, Real, detism_semi, UniqX, UniqY, Uniq),
-    make_ground_bound_inst_list(BoundInsts0, live, UniqX, Real, BoundInsts,
+    unify_uniq(is_live, Real, detism_semi, UniqX, UniqY, Uniq),
+    make_ground_bound_inst_list(BoundInsts0, is_live, UniqX, Real, BoundInsts,
          Det1, !ModuleInfo),
      det_par_conjunction_detism(Det1, detism_semi, Det).

-abstractly_unify_inst_3(live, ground(UniqA, higher_order(PredInstA)),
+abstractly_unify_inst_3(is_live, ground(UniqA, higher_order(PredInstA)),
          ground(UniqB, _GroundInstInfoB), Real,
          ground(Uniq, GroundInstInfo), detism_semi, !ModuleInfo) :-
      % It is an error to unify higher-order preds,
@@ -350,67 +351,67 @@
      % fake_unifys, for which it shouldn't make any difference, we just choose
      % the information specified by PredInstA.
      GroundInstInfo = higher_order(PredInstA),
-    unify_uniq(live, Real, detism_semi, UniqA, UniqB, Uniq).
+    unify_uniq(is_live, Real, detism_semi, UniqA, UniqB, Uniq).

-abstractly_unify_inst_3(live, ground(Uniq, none), Inst0, Real, Inst, Det,
+abstractly_unify_inst_3(is_live, ground(Uniq, none), Inst0, Real, Inst, Det,
          !ModuleInfo) :-
-    make_ground_inst(Inst0, live, Uniq, Real, Inst, Det, !ModuleInfo).
+    make_ground_inst(Inst0, is_live, Uniq, Real, Inst, Det, !ModuleInfo).

-% abstractly_unify_inst_3(live, abstract_inst(_,_), free, _, _, _, _, _)
+% abstractly_unify_inst_3(is_live, abstract_inst(_,_), free, _, _, _, _, _)
  %       :- fail.

  % abstract insts not supported
-% abstractly_unify_inst_3(live, abstract_inst(_,_), bound(Uniq, List), Real,
+% abstractly_unify_inst_3(is_live, abstract_inst(_,_), bound(Uniq, List), Real,
  %       ground(shared, no), detism_semi, !ModuleInfo) :-
  %   check_not_clobbered(Real, Uniq),
  %   bound_inst_list_is_ground(List, !.ModuleInfo).
  %
-% abstractly_unify_inst_3(live, abstract_inst(_,_), ground(Uniq, no), Real,
+% abstractly_unify_inst_3(is_live, abstract_inst(_,_), ground(Uniq, no), Real,
  %       ground(shared, no), detism_semi, !ModuleInfo) :-
  %   check_not_clobbered(Real, Uniq).
  %
-% abstractly_unify_inst_3(live, abstract_inst(Name, ArgsA),
+% abstractly_unify_inst_3(is_live, abstract_inst(Name, ArgsA),
  %       abstract_inst(Name, ArgsB), Real,
  %       abstract_inst(Name, Args), Det, !ModuleInfo) :-
-%   abstractly_unify_inst_list(ArgsA, ArgsB, live, Real,
+%   abstractly_unify_inst_list(ArgsA, ArgsB, is_live, Real,
  %       Args, Det, !ModuleInfo).

-abstractly_unify_inst_3(dead, not_reached, _, _, not_reached, detism_det,
+abstractly_unify_inst_3(is_dead, not_reached, _, _, not_reached, detism_det,
          !ModuleInfo).

-abstractly_unify_inst_3(dead, any(Uniq), Inst0, Real, Inst, Det,
+abstractly_unify_inst_3(is_dead, any(Uniq), Inst0, Real, Inst, Det,
          !ModuleInfo) :-
-    make_any_inst(Inst0, dead, Uniq, Real, Inst, Det, !ModuleInfo).
+    make_any_inst(Inst0, is_dead, Uniq, Real, Inst, Det, !ModuleInfo).

-abstractly_unify_inst_3(dead, free, Inst, _, Inst, detism_det, !ModuleInfo).
+abstractly_unify_inst_3(is_dead, free, Inst, _, Inst, detism_det, !ModuleInfo).

-abstractly_unify_inst_3(dead, bound(UniqX, List0), any(UniqY), Real,
+abstractly_unify_inst_3(is_dead, bound(UniqX, List0), any(UniqY), Real,
          bound(Uniq, List), Det, !ModuleInfo) :-
      allow_unify_bound_any(Real),
-    unify_uniq(dead, Real, detism_semi, UniqX, UniqY, Uniq),
-    make_any_bound_inst_list(List0, live, UniqY, Real, List, Det1,
+    unify_uniq(is_dead, Real, detism_semi, UniqX, UniqY, Uniq),
+    make_any_bound_inst_list(List0, is_live, UniqY, Real, List, Det1,
          !ModuleInfo),
      det_par_conjunction_detism(Det1, detism_semi, Det).

-abstractly_unify_inst_3(dead, bound(UniqX, List), free, Real,
+abstractly_unify_inst_3(is_dead, bound(UniqX, List), free, Real,
          bound(Uniq, List), detism_det, !ModuleInfo) :-
-    unify_uniq(dead, Real, detism_det, UniqX, unique, Uniq).
+    unify_uniq(is_dead, Real, detism_det, UniqX, unique, Uniq).

-abstractly_unify_inst_3(dead, bound(UniqX, ListX), bound(UniqY, ListY),
+abstractly_unify_inst_3(is_dead, bound(UniqX, ListX), bound(UniqY, ListY),
          Real, bound(Uniq, List), Det, !ModuleInfo) :-
-    abstractly_unify_bound_inst_list(dead, ListX, ListY, Real,
+    abstractly_unify_bound_inst_list(is_dead, ListX, ListY, Real,
          List, Det, !ModuleInfo),
-    unify_uniq(dead, Real, Det, UniqX, UniqY, Uniq).
+    unify_uniq(is_dead, Real, Det, UniqX, UniqY, Uniq).

-abstractly_unify_inst_3(dead, bound(UniqX, BoundInsts0), ground(UniqY, _),
+abstractly_unify_inst_3(is_dead, bound(UniqX, BoundInsts0), ground(UniqY, _),
          Real, bound(Uniq, BoundInsts), Det, !ModuleInfo) :-
-    unify_uniq(dead, Real, detism_semi, UniqX, UniqY, Uniq),
-    make_ground_bound_inst_list(BoundInsts0, dead, UniqY, Real, BoundInsts,
+    unify_uniq(is_dead, Real, detism_semi, UniqX, UniqY, Uniq),
+    make_ground_bound_inst_list(BoundInsts0, is_dead, UniqY, Real, BoundInsts,
          Det1, !ModuleInfo),
      det_par_conjunction_detism(Det1, detism_semi, Det).

  % abstract insts aren't really supported
-% abstractly_unify_inst_3(dead, bound(Uniq, List), abstract_inst(N,As),
+% abstractly_unify_inst_3(is_dead, bound(Uniq, List), abstract_inst(N,As),
  %           Result, Det, !ModuleInfo) :-
  %   ( bound_inst_list_is_ground(List, !.ModuleInfo) ->
  %       Result = bound(Uniq, List),
@@ -422,36 +423,36 @@
  %       fail
  %   ).

-abstractly_unify_inst_3(dead, ground(UniqX, higher_order(PredInst)),
+abstractly_unify_inst_3(is_dead, ground(UniqX, higher_order(PredInst)),
          any(UniqY), Real, ground(Uniq, higher_order(PredInst)),
          detism_semi, !ModuleInfo) :-
      allow_unify_bound_any(Real),
-    unify_uniq(dead, Real, detism_semi, UniqX, UniqY, Uniq).
+    unify_uniq(is_dead, Real, detism_semi, UniqX, UniqY, Uniq).

-abstractly_unify_inst_3(dead, ground(Uniq, higher_order(PredInst)), free,
+abstractly_unify_inst_3(is_dead, ground(Uniq, higher_order(PredInst)), free,
          _Real, ground(Uniq, higher_order(PredInst)), detism_det, !ModuleInfo).

-abstractly_unify_inst_3(dead, ground(UniqA, higher_order(_)),
+abstractly_unify_inst_3(is_dead, ground(UniqA, higher_order(_)),
          bound(UniqB, BoundInsts0), Real, bound(Uniq, BoundInsts),
          Det, !ModuleInfo) :-
-    unify_uniq(dead, Real, detism_semi, UniqA, UniqB, Uniq),
-    make_ground_bound_inst_list(BoundInsts0, dead, UniqA, Real, BoundInsts,
+    unify_uniq(is_dead, Real, detism_semi, UniqA, UniqB, Uniq),
+    make_ground_bound_inst_list(BoundInsts0, is_dead, UniqA, Real, BoundInsts,
          Det1, !ModuleInfo),
      det_par_conjunction_detism(Det1, detism_semi, Det).

-abstractly_unify_inst_3(dead, ground(UniqA, higher_order(PredInstA)),
+abstractly_unify_inst_3(is_dead, ground(UniqA, higher_order(PredInstA)),
          ground(UniqB, _GroundInstInfoB), Real,
          ground(Uniq, GroundInstInfo), detism_det, !ModuleInfo) :-
      Real = fake_unify,
      GroundInstInfo = higher_order(PredInstA),
-    unify_uniq(dead, Real, detism_det, UniqA, UniqB, Uniq).
+    unify_uniq(is_dead, Real, detism_det, UniqA, UniqB, Uniq).

-abstractly_unify_inst_3(dead, ground(Uniq, none), Inst0, Real, Inst, Det,
+abstractly_unify_inst_3(is_dead, ground(Uniq, none), Inst0, Real, Inst, Det,
          !ModuleInfo) :-
-    make_ground_inst(Inst0, dead, Uniq, Real, Inst, Det, !ModuleInfo).
+    make_ground_inst(Inst0, is_dead, Uniq, Real, Inst, Det, !ModuleInfo).

  % abstract insts aren't really supported
-% abstractly_unify_inst_3(dead, abstract_inst(N,As), bound(List), Real,
+% abstractly_unify_inst_3(is_dead, abstract_inst(N,As), bound(List), Real,
  %           ModuleInfo, Result, Det, ModuleInfo) :-
  %   ( bound_inst_list_is_ground(List, ModuleInfo) ->
  %       Result = bound(List),
@@ -463,13 +464,13 @@
  %       fail
  %   ).
  %
-% abstractly_unify_inst_3(dead, abstract_inst(_,_), ground, _Real,
+% abstractly_unify_inst_3(is_dead, abstract_inst(_,_), ground, _Real,
  %       ground, detism_semi, !ModuleInfo).
  %
-% abstractly_unify_inst_3(dead, abstract_inst(Name, ArgsA),
+% abstractly_unify_inst_3(is_dead, abstract_inst(Name, ArgsA),
  %       abstract_inst(Name, ArgsB), Real,
  %       abstract_inst(Name, Args), Det, !ModuleInfo) :-
-%   abstractly_unify_inst_list(ArgsA, ArgsB, dead, Real,
+%   abstractly_unify_inst_list(ArgsA, ArgsB, is_dead, Real,
  %       Args, Det, !ModuleInfo).

  %-----------------------------------------------------------------------------%
@@ -528,66 +529,67 @@
      mer_inst::out, determinism::out, module_info::in, module_info::out)
      is semidet.

-abstractly_unify_inst_functor_2(live, not_reached, _, _, _, _, _,
+abstractly_unify_inst_functor_2(is_live, not_reached, _, _, _, _, _,
          not_reached, detism_erroneous, !ModuleInfo).

-abstractly_unify_inst_functor_2(live, free, ConsId, Args0, ArgLives, _Real,
+abstractly_unify_inst_functor_2(is_live, free, ConsId, Args0, ArgLives, _Real,
          _, bound(unique, [bound_functor(ConsId, Args)]), detism_det,
          !ModuleInfo) :-
      inst_list_is_ground_or_any_or_dead(Args0, ArgLives, !.ModuleInfo),
      maybe_make_shared_inst_list(Args0, ArgLives, Args, !ModuleInfo).

-abstractly_unify_inst_functor_2(live, any(Uniq), ConsId, ArgInsts,
+abstractly_unify_inst_functor_2(is_live, any(Uniq), ConsId, ArgInsts,
          ArgLives, Real, Type, Inst, Det, !ModuleInfo) :-
      % We only allow `any' to unify with a functor if we know that
      % the type is not a solver type.
      \+ type_util.is_solver_type(!.ModuleInfo, Type),
-    make_any_inst_list_lives(ArgInsts, live, ArgLives, Uniq, Real,
+    make_any_inst_list_lives(ArgInsts, is_live, ArgLives, Uniq, Real,
          AnyArgInsts, Det, !ModuleInfo),
      Inst = bound(Uniq, [bound_functor(ConsId, AnyArgInsts)]).

-abstractly_unify_inst_functor_2(live, bound(Uniq, ListX), ConsId, Args,
+abstractly_unify_inst_functor_2(is_live, bound(Uniq, ListX), ConsId, Args,
          ArgLives, Real, _, bound(Uniq, List), Det,
          !ModuleInfo) :-
      abstractly_unify_bound_inst_list_lives(ListX, ConsId, Args, ArgLives,
          Real, List, Det, !ModuleInfo).

-abstractly_unify_inst_functor_2(live, ground(Uniq, _), ConsId, ArgInsts,
+abstractly_unify_inst_functor_2(is_live, ground(Uniq, _), ConsId, ArgInsts,
          ArgLives, Real, _, Inst, Det, !ModuleInfo) :-
-    make_ground_inst_list_lives(ArgInsts, live, ArgLives, Uniq, Real,
+    make_ground_inst_list_lives(ArgInsts, is_live, ArgLives, Uniq, Real,
          GroundArgInsts, Det, !ModuleInfo),
      Inst = bound(Uniq, [bound_functor(ConsId, GroundArgInsts)]).

-% abstractly_unify_inst_functor_2(live, abstract_inst(_,_), _, _, _, _, _,
+% abstractly_unify_inst_functor_2(is_live, abstract_inst(_,_), _, _, _, _, _,
  %       _, _) :-
  %       fail.

-abstractly_unify_inst_functor_2(dead, not_reached, _, _, _, _, _,
+abstractly_unify_inst_functor_2(is_dead, not_reached, _, _, _, _, _,
          not_reached, detism_erroneous, !ModuleInfo).

-abstractly_unify_inst_functor_2(dead, free, ConsId, Args, _ArgLives, _Real, _,
-        bound(unique, [bound_functor(ConsId, Args)]), detism_det, !ModuleInfo).
+abstractly_unify_inst_functor_2(is_dead, free, ConsId, Args, _ArgLives,
+        _Real, _, bound(unique, [bound_functor(ConsId, Args)]), detism_det,
+        !ModuleInfo).

-abstractly_unify_inst_functor_2(dead, any(Uniq), ConsId, ArgInsts,
+abstractly_unify_inst_functor_2(is_dead, any(Uniq), ConsId, ArgInsts,
          _ArgLives, Real, Type, Inst, Det, !ModuleInfo) :-
      \+ type_util.is_solver_type(!.ModuleInfo, Type),
-    make_any_inst_list(ArgInsts, dead, Uniq, Real, AnyArgInsts, Det,
+    make_any_inst_list(ArgInsts, is_dead, Uniq, Real, AnyArgInsts, Det,
          !ModuleInfo),
      Inst = bound(Uniq, [bound_functor(ConsId, AnyArgInsts)]).

-abstractly_unify_inst_functor_2(dead, bound(Uniq, ListX), ConsId, Args,
+abstractly_unify_inst_functor_2(is_dead, bound(Uniq, ListX), ConsId, Args,
          _ArgLives, Real, _, bound(Uniq, List), Det, !ModuleInfo) :-
      ListY = [bound_functor(ConsId, Args)],
-    abstractly_unify_bound_inst_list(dead, ListX, ListY, Real, List, Det,
+    abstractly_unify_bound_inst_list(is_dead, ListX, ListY, Real, List, Det,
          !ModuleInfo).

-abstractly_unify_inst_functor_2(dead, ground(Uniq, _), ConsId, ArgInsts,
+abstractly_unify_inst_functor_2(is_dead, ground(Uniq, _), ConsId, ArgInsts,
          _ArgLives, Real, _, Inst, Det, !ModuleInfo) :-
-    make_ground_inst_list(ArgInsts, dead, Uniq, Real, GroundArgInsts, Det,
+    make_ground_inst_list(ArgInsts, is_dead, Uniq, Real, GroundArgInsts, Det,
          !ModuleInfo),
      Inst = bound(Uniq, [bound_functor(ConsId, GroundArgInsts)]).

-% abstractly_unify_inst_functor_2(dead, abstract_inst(_,_), _, _, _, _,
+% abstractly_unify_inst_functor_2(is_dead, abstract_inst(_,_), _, _, _, _,
  %       _, _, _) :-
  %       fail.

@@ -777,10 +779,10 @@
      allow_unify_with_clobbered(Live, Real, Det).

  unify_uniq(_, _, _, unique, shared, shared).
-unify_uniq(live, _, _, unique, unique, shared).
-unify_uniq(live, _, _, unique, mostly_unique, shared).
-unify_uniq(dead, _, _, unique, unique, unique).
-unify_uniq(dead, _, _, unique, mostly_unique, mostly_unique).
+unify_uniq(is_live, _, _, unique, unique, shared).
+unify_uniq(is_live, _, _, unique, mostly_unique, shared).
+unify_uniq(is_dead, _, _, unique, unique, unique).
+unify_uniq(is_dead, _, _, unique, mostly_unique, mostly_unique).
          % XXX The above line is a conservative approximation;
          % sometimes it should return unique not mostly_unique.
  unify_uniq(Live, Real, Det, unique, clobbered, clobbered) :-
@@ -789,12 +791,12 @@
      allow_unify_with_clobbered(Live, Real, Det).

  unify_uniq(_, _, _, mostly_unique, shared, shared).
-unify_uniq(live, _, _, mostly_unique, unique, shared).
-unify_uniq(live, _, _, mostly_unique, mostly_unique, shared).
-unify_uniq(dead, _, _, mostly_unique, unique, mostly_unique).
+unify_uniq(is_live, _, _, mostly_unique, unique, shared).
+unify_uniq(is_live, _, _, mostly_unique, mostly_unique, shared).
+unify_uniq(is_dead, _, _, mostly_unique, unique, mostly_unique).
          % XXX The above line is a conservative approximation;
          % sometimes it should return unique not mostly_unique.
-unify_uniq(dead, _, _, mostly_unique, mostly_unique, mostly_unique).
+unify_uniq(is_dead, _, _, mostly_unique, mostly_unique, mostly_unique).
  unify_uniq(Live, Real, Det, mostly_unique, clobbered, clobbered) :-
      allow_unify_with_clobbered(Live, Real, Det).
  unify_uniq(Live, Real, Det, mostly_unique, mostly_clobbered,
@@ -815,11 +817,11 @@
  :- pred allow_unify_with_clobbered(is_live::in, unify_is_real::in,
      determinism::in) is semidet.

-allow_unify_with_clobbered(live, _, _) :-
+allow_unify_with_clobbered(is_live, _, _) :-
      unexpected(this_file,
-        "allow_unify_with_clobbered: clobbered value is live?").
-allow_unify_with_clobbered(dead, fake_unify, _).
-allow_unify_with_clobbered(dead, _, detism_det).
+        "allow_unify_with_clobbered: clobbered value is is_live?").
+allow_unify_with_clobbered(is_dead, fake_unify, _).
+allow_unify_with_clobbered(is_dead, _, detism_det).

  %-----------------------------------------------------------------------------%

@@ -845,10 +847,10 @@
  make_ground_inst_list_lives([], _, _, _, _, [], detism_det, !ModuleInfo).
  make_ground_inst_list_lives([Inst0 | Insts0], Live, [ArgLive | ArgLives],
          Uniq, Real, [Inst | Insts], Det, !ModuleInfo) :-
-    ( Live = live, ArgLive = live ->
-        BothLive = live
+    ( Live = is_live, ArgLive = is_live ->
+        BothLive = is_live
      ;
-        BothLive = dead
+        BothLive = is_dead
      ),
      make_ground_inst(Inst0, BothLive, Uniq, Real, Inst, Det1,
          !ModuleInfo),
@@ -1091,10 +1093,10 @@
  make_any_inst_list_lives([], _, _, _, _, [], detism_det, !ModuleInfo).
  make_any_inst_list_lives([Inst0 | Insts0], Live, [ArgLive | ArgLives],
          Uniq, Real, [Inst | Insts], Det, !ModuleInfo) :-
-    ( Live = live, ArgLive = live ->
-        BothLive = live
+    ( Live = is_live, ArgLive = is_live ->
+        BothLive = is_live
      ;
-        BothLive = dead
+        BothLive = is_dead
      ),
      make_any_inst(Inst0, BothLive, Uniq, Real, Inst, Det1, !ModuleInfo),
      make_any_inst_list_lives(Insts0, Live, ArgLives, Uniq, Real,
@@ -1109,9 +1111,11 @@
  maybe_make_shared_inst_list([], [], [], !ModuleInfo).
  maybe_make_shared_inst_list([Inst0 | Insts0], [IsLive | IsLives],
          [Inst | Insts], !ModuleInfo) :-
-    ( IsLive = live ->
+    (
+        IsLive = is_live,
          make_shared_inst(Inst0, Inst, !ModuleInfo)
      ;
+        IsLive = is_dead,
          Inst = Inst0
      ),
      maybe_make_shared_inst_list(Insts0, IsLives, Insts, !ModuleInfo).
Index: compiler/instmap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/instmap.m,v
retrieving revision 1.54
diff -u -r1.54 instmap.m
--- compiler/instmap.m	19 Dec 2006 03:02:15 -0000	1.54
+++ compiler/instmap.m	15 Jan 2007 07:12:53 -0000
@@ -542,10 +542,10 @@

  bind_inst_to_functor(Type, ConsId, !Inst, !ModuleInfo) :-
      Arity = cons_id_adjusted_arity(!.ModuleInfo, Type, ConsId),
-    list.duplicate(Arity, dead, ArgLives),
+    list.duplicate(Arity, is_dead, ArgLives),
      list.duplicate(Arity, free, ArgInsts),
      (
-        abstractly_unify_inst_functor(dead, !.Inst, ConsId, ArgInsts,
+        abstractly_unify_inst_functor(is_dead, !.Inst, ConsId, ArgInsts,
              ArgLives, real_unify, Type, !:Inst, _Det, !ModuleInfo)
      ->
          true
@@ -959,7 +959,7 @@
              % We can ignore the determinism of the unification:
              % if it isn't det, then there will be a mode error
              % or a determinism error in one of the parallel conjuncts.
-            abstractly_unify_inst(live, !.Inst, VarInst,
+            abstractly_unify_inst(is_live, !.Inst, VarInst,
                  fake_unify, !:Inst, _Det, !ModuleInfo)
          ->
              true
@@ -1147,7 +1147,7 @@
                  % isn't det, then there will be a mode error or a determinism
                  % error in one of the parallel conjuncts.

-                abstractly_unify_inst(live, InstA, InstB,
+                abstractly_unify_inst(is_live, InstA, InstB,
                      fake_unify, Inst, _Det, !ModuleInfo)
              ->
                  svmap.det_insert(Var, Inst, !InstMapping)
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.312
diff -u -r1.312 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m	6 Jan 2007 09:23:41 -0000	1.312
+++ compiler/mercury_to_mercury.m	15 Jan 2007 07:19:48 -0000
@@ -1293,10 +1293,10 @@

  mercury_format_is_live_comma(IsLive, !U) :-
      (
-        IsLive = live,
+        IsLive = is_live,
          add_string("live, ", !U)
      ;
-        IsLive = dead,
+        IsLive = is_dead,
          add_string("dead, ", !U)
      ).

Index: compiler/mode_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_info.m,v
retrieving revision 1.92
diff -u -r1.92 mode_info.m
--- compiler/mode_info.m	27 Sep 2006 06:16:55 -0000	1.92
+++ compiler/mode_info.m	15 Jan 2007 07:04:40 -0000
@@ -646,16 +646,16 @@

  mode_info_var_is_live(ModeInfo, Var, Result) :-
      ( bag.contains(ModeInfo ^ live_vars, Var) ->
-        Result = live
+        Result = is_live
      ;
-        Result = dead
+        Result = is_dead
      ).

  mode_info_var_is_nondet_live(ModeInfo, Var, Result) :-
      ( bag.contains(ModeInfo ^ nondet_live_vars, Var) ->
-        Result = live
+        Result = is_live
      ;
-        Result = dead
+        Result = is_dead
      ).

  mode_info_get_liveness(ModeInfo, LiveVars) :-
Index: compiler/mode_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_util.m,v
retrieving revision 1.195
diff -u -r1.195 mode_util.m
--- compiler/mode_util.m	6 Jan 2007 09:23:43 -0000	1.195
+++ compiler/mode_util.m	15 Jan 2007 07:05:23 -0000
@@ -1300,7 +1300,7 @@
          instmap.lookup_var(InstMap, Arg, ArgInst0),
          mode_get_insts(!.ModuleInfo, Mode0, _, FinalInst),
          (
-            abstractly_unify_inst(dead, ArgInst0, FinalInst,
+            abstractly_unify_inst(is_dead, ArgInst0, FinalInst,
                  fake_unify, UnifyInst, _, !ModuleInfo)
          ->
              Mode = (ArgInst0 -> UnifyInst)
@@ -1367,9 +1367,9 @@
  get_arg_lives(ModuleInfo, [Mode | Modes], [IsLive | IsLives]) :-
      mode_get_insts(ModuleInfo, Mode, _InitialInst, FinalInst),
      ( inst_is_clobbered(ModuleInfo, FinalInst) ->
-        IsLive = dead
+        IsLive = is_dead
      ;
-        IsLive = live
+        IsLive = is_live
      ),
      get_arg_lives(ModuleInfo, Modes, IsLives).

Index: compiler/modecheck_call.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_call.m,v
retrieving revision 1.76
diff -u -r1.76 modecheck_call.m
--- compiler/modecheck_call.m	27 Sep 2006 06:16:57 -0000	1.76
+++ compiler/modecheck_call.m	15 Jan 2007 07:06:33 -0000
@@ -487,10 +487,10 @@

      mode_info_var_is_live(ModeInfo, Var, IsLive0),
      (
-        IsLive0 = live,
-        IsLive = live
+        IsLive0 = is_live,
+        IsLive = is_live
      ;
-        IsLive0 = dead,
+        IsLive0 = is_dead,
          % To reduce the potentially exponential explosion in the number of
          % modes, we only set IsLive to `dead' - meaning that the procedure
          % requires its argument to be dead, so that it can do destructive
@@ -500,9 +500,9 @@
              inst_is_ground(ModuleInfo, Inst),
              inst_is_mostly_unique(ModuleInfo, Inst)
          ->
-            IsLive = dead
+            IsLive = is_dead
          ;
-            IsLive = live
+            IsLive = is_live
          )
      ),

@@ -781,10 +781,10 @@
      %
  :- pred compare_liveness(is_live::in, is_live::in, match::out) is det.

-compare_liveness(dead, dead, same).
-compare_liveness(dead, live, better).
-compare_liveness(live, dead, worse).
-compare_liveness(live, live, same).
+compare_liveness(is_dead, is_dead, same).
+compare_liveness(is_dead, is_live, better).
+compare_liveness(is_live, is_dead, worse).
+compare_liveness(is_live, is_live, same).

      % Combine two results, giving priority to the first one.
      %
Index: compiler/modecheck_unify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_unify.m,v
retrieving revision 1.114
diff -u -r1.114 modecheck_unify.m
--- compiler/modecheck_unify.m	6 Jan 2007 09:23:43 -0000	1.114
+++ compiler/modecheck_unify.m	15 Jan 2007 07:08:02 -0000
@@ -151,10 +151,10 @@
      mode_info_var_is_live(!.ModeInfo, X, LiveX),
      mode_info_var_is_live(!.ModeInfo, Y, LiveY),
      (
-        ( LiveX = live, LiveY = live ->
-            BothLive = live
+        ( LiveX = is_live, LiveY = is_live ->
+            BothLive = is_live
          ;
-            BothLive = dead
+            BothLive = is_dead
          ),
          abstractly_unify_inst(BothLive, InstOfX, InstOfY, real_unify,
              UnifyInst, Det1, ModuleInfo0, ModuleInfo1),
@@ -437,7 +437,7 @@
      InstOfY = ground(unique, higher_order(LambdaPredInfo)),
      LambdaPredInfo = pred_inst_info(PredOrFunc, LambdaModes, LambdaDet),
      (
-        abstractly_unify_inst(dead, InstOfX, InstOfY, real_unify,
+        abstractly_unify_inst(is_dead, InstOfX, InstOfY, real_unify,
              UnifyInst, _Det, ModuleInfo0, ModuleInfo1)
      ->
          Inst = UnifyInst,
@@ -502,7 +502,7 @@
          %   X = Z.

          InstOfX = free,
-        LiveX = live,
+        LiveX = is_live,
          make_complicated_sub_unify(X0, X, ExtraGoals0, !ModeInfo)
      ;
          InstOfX = InstOfX0,
@@ -670,7 +670,7 @@
      %
      (
          Unification = construct(_, _, _, _, _, _, _),
-        LiveX = dead
+        LiveX = is_dead
      ->
          Goal = conj(plain_conj, [])
      ;
@@ -915,9 +915,9 @@
          % For free-free unifications, we pretend for a moment that they are
          % an assignment to the dead variable - they will then be optimized
          % away.
-        ( LiveX = dead ->
+        ( LiveX = is_dead ->
              Unification = assign(X, Y)
-        ; LiveY = dead ->
+        ; LiveY = is_dead ->
              Unification = assign(Y, X)
          ;
              unexpected(this_file, "categorize_unify_var_var: free-free unify!")
@@ -959,7 +959,7 @@
      % `fail'.
      (
          Unification = assign(AssignTarget, AssignSource),
-        mode_info_var_is_live(!.ModeInfo, AssignTarget, dead)
+        mode_info_var_is_live(!.ModeInfo, AssignTarget, is_dead)
      ->
          Unify = conj(plain_conj, []),
          record_optimize_away(GoalInfo, AssignTarget, AssignSource, !ModeInfo)
Index: compiler/modes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modes.m,v
retrieving revision 1.353
diff -u -r1.353 modes.m
--- compiler/modes.m	6 Jan 2007 09:23:44 -0000	1.353
+++ compiler/modes.m	15 Jan 2007 07:09:02 -0000
@@ -1135,9 +1135,11 @@
      unexpected(this_file, "maybe_clobber_insts: length mismatch").
  maybe_clobber_insts([], [], []).
  maybe_clobber_insts([Inst0 | Insts0], [IsLive | IsLives], [Inst | Insts]) :-
-    ( IsLive = dead ->
+    (
+        IsLive = is_dead,
          Inst = ground(clobbered, none)
      ;
+        IsLive = is_live,
          Inst = Inst0
      ),
      maybe_clobber_insts(Insts0, IsLives, Insts).
@@ -2806,8 +2808,8 @@
  modecheck_var_is_live_no_exact_match(VarId, ExpectedIsLive, !ModeInfo) :-
      mode_info_var_is_live(!.ModeInfo, VarId, VarIsLive),
      (
-        ExpectedIsLive = dead,
-        VarIsLive = live
+        ExpectedIsLive = is_dead,
+        VarIsLive = is_live
      ->
          set.singleton_set(WaitingVars, VarId),
          mode_info_error(WaitingVars, mode_error_var_is_live(VarId), !ModeInfo)
@@ -2994,7 +2996,7 @@
          instmap.lookup_var(InstMap0, Var0, Inst0),
          mode_info_get_module_info(!.ModeInfo, ModuleInfo0),
          (
-            abstractly_unify_inst(dead, Inst0, FinalInst,
+            abstractly_unify_inst(is_dead, Inst0, FinalInst,
                  fake_unify, UnifyInst, _Det, ModuleInfo0, ModuleInfo1)
          ->
              ModuleInfo = ModuleInfo1,
@@ -3445,10 +3447,10 @@
      unexpected(this_file, "get_live_vars: length mismatch").
  get_live_vars([Var | Vars], [IsLive | IsLives], LiveVars) :-
      (
-        IsLive = live,
+        IsLive = is_live,
          LiveVars = [Var | LiveVars0]
      ;
-        IsLive = dead,
+        IsLive = is_dead,
          LiveVars = LiveVars0
      ),
      get_live_vars(Vars, IsLives, LiveVars0).
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.186
diff -u -r1.186 prog_data.m
--- compiler/prog_data.m	15 Jan 2007 02:23:49 -0000	1.186
+++ compiler/prog_data.m	15 Jan 2007 07:19:28 -0000
@@ -1052,6 +1052,7 @@
      % Describe how a lambda expression is to be evaluated.
      %
      % `normal' is the top-down Mercury execution algorithm.
+    %
  :- type lambda_eval_method
      --->    lambda_normal.

@@ -1443,8 +1444,8 @@
      % used by code generation.  See compiler/notes/glossary.html.
      %
  :- type is_live
-    --->    live
-    ;       dead.
+    --->    is_live
+    ;       is_dead.

      % Unifications of insts fall into two categories, "real" and "fake".
      % The "real" inst unifications correspond to real unifications,
Index: compiler/structure_sharing.domain.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_sharing.domain.m,v
retrieving revision 1.18
diff -u -r1.18 structure_sharing.domain.m
--- compiler/structure_sharing.domain.m	1 Dec 2006 15:04:22 -0000	1.18
+++ compiler/structure_sharing.domain.m	15 Jan 2007 07:14:51 -0000
@@ -891,16 +891,16 @@
      Test = (pred(Pair::in) is semidet :-
          Pair = Mode - Type,

-        % mode is not unique nor clobbered.
+        % Mode is not unique nor clobbered.
          mode_get_insts(ModuleInfo, Mode, _LeftInst, RightInst),
          \+ inst_is_unique(ModuleInfo, RightInst),
          \+ inst_is_clobbered(ModuleInfo, RightInst),

-        % mode is output.
+        % Mode is output.
          mode_to_arg_mode(ModuleInfo, Mode, Type, ArgMode),
          ArgMode = top_out,

-        % type is not primitive
+        % Type is not primitive.
          \+ type_is_atomic(ModuleInfo, Type)
      ),
      list.filter(Test, ModeTypePairs, TrueModeTypePairs),
Index: compiler/unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_gen.m,v
retrieving revision 1.177
diff -u -r1.177 unify_gen.m
--- compiler/unify_gen.m	6 Jan 2007 10:56:18 -0000	1.177
+++ compiler/unify_gen.m	15 Jan 2007 06:36:18 -0000
@@ -732,9 +732,13 @@
  generate_pred_args(ModuleInfo, VarTypes, [Var | Vars], [ArgInfo | ArgInfos],
          [Rval | Rvals], !MayUseAtomic) :-
      ArgInfo = arg_info(_, ArgMode),
-    ( ArgMode = top_in ->
+    (
+        ArgMode = top_in,
          Rval = yes(var(Var))
      ;
+        ( ArgMode = top_out
+        ; ArgMode = top_unused
+        ),
          Rval = no
      ),
      map.lookup(VarTypes, Var, Type),
@@ -787,9 +791,13 @@
      ;
          UniMode = ((_LI - RI) -> (_LF - RF)),
          mode_to_arg_mode(ModuleInfo, (RI -> RF), Type, ArgMode),
-        ( ArgMode = top_in ->
+        (
+            ArgMode = top_in,
              Rval = yes(var(Var))
          ;
+            ( ArgMode = top_out
+            ; ArgMode = top_unused
+            ),
              Rval = no
          ),
          generate_cons_args_2(Vars, Types, UniModes, FirstOffset, CurArgNum + 1,
Index: compiler/unique_modes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unique_modes.m,v
retrieving revision 1.119
diff -u -r1.119 unique_modes.m
--- compiler/unique_modes.m	6 Jan 2007 09:23:57 -0000	1.119
+++ compiler/unique_modes.m	15 Jan 2007 07:10:45 -0000
@@ -173,7 +173,7 @@

  select_live_vars([], _, []).
  select_live_vars([Var|Vars], ModeInfo, LiveVars) :-
-    ( mode_info_var_is_live(ModeInfo, Var, live) ->
+    ( mode_info_var_is_live(ModeInfo, Var, is_live) ->
          select_live_vars(Vars, ModeInfo, LiveVars1),
          LiveVars = [Var | LiveVars1]
      ;
@@ -185,7 +185,7 @@

  select_nondet_live_vars([], _, []).
  select_nondet_live_vars([Var|Vars], ModeInfo, NondetLiveVars) :-
-    ( mode_info_var_is_nondet_live(ModeInfo, Var, live) ->
+    ( mode_info_var_is_nondet_live(ModeInfo, Var, is_live) ->
          select_nondet_live_vars(Vars, ModeInfo, NondetLiveVars1),
          NondetLiveVars = [Var | NondetLiveVars1]
      ;
Index: compiler/var_locn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/var_locn.m,v
retrieving revision 1.48
diff -u -r1.48 var_locn.m
--- compiler/var_locn.m	6 Jan 2007 09:23:58 -0000	1.48
+++ compiler/var_locn.m	15 Jan 2007 06:33:01 -0000
@@ -371,14 +371,15 @@
  :- import_module int.
  :- import_module pair.
  :- import_module string.
+:- import_module svmap.
  :- import_module term.
  :- import_module varset.

  %----------------------------------------------------------------------------%

  :- type dead_or_alive
-    --->    dead
-    ;       alive.
+    --->    doa_dead
+    ;       doa_alive.

      % The state of a variable can be one of three kinds: const, cached
      % and general.
@@ -546,8 +547,8 @@
          ;
              set.singleton_set(NewLocs, Lval),
              set.init(Using),
-            State = var_state(NewLocs, no, no, Using, alive),
-            map.det_insert(!.VarStateMap, Var, State, !:VarStateMap)
+            State = var_state(NewLocs, no, no, Using, doa_alive),
+            svmap.det_insert(Var, State, !VarStateMap)
          ),
          make_var_depend_on_lval_roots(Var, Lval, !LocVarMap)
      ),
@@ -565,7 +566,7 @@
      pair(prog_var, set(lval))::out) is semidet.

  convert_live_to_lval_set(Var - State, Var - Lvals) :-
-    State = var_state(Lvals, _, _, _, alive).
+    State = var_state(Lvals, _, _, _, doa_alive).

  %----------------------------------------------------------------------------%

@@ -649,7 +650,7 @@
      ;
          OkToDeleteAny = yes
      ;
-        DeadOrAlive = dead,
+        DeadOrAlive = doa_dead,
          set.to_sorted_list(Using, UsingVars),
          recursive_using_vars_dead_and_ok_to_delete(UsingVars,
              !.VarStateMap, OkToDeleteVars)
@@ -667,7 +668,7 @@
      ;
          map.lookup(VarStateMap, Var, State),
          State = var_state(_, _, _, Using, DeadOrAlive),
-        DeadOrAlive = dead,
+        DeadOrAlive = doa_dead,
          set.to_sorted_list(Using, UsingVars),
          recursive_using_vars_dead_and_ok_to_delete(UsingVars,
              VarStateMap, OkToDeleteVars)
@@ -686,7 +687,7 @@
      (
          MaybeExprRval = yes(_),
          State = var_state(Lvals, MaybeConstRval, yes(var(OldVar)), set.init,
-            alive),
+            doa_alive),
          set.insert(Using0, Var, Using),
          OldState = var_state(Lvals, MaybeConstRval, MaybeExprRval, Using,
              DeadOrAlive),
@@ -694,7 +695,7 @@
      ;
          MaybeExprRval = no,
          set.init(Empty),
-        State = var_state(Lvals, MaybeConstRval, no, Empty, alive),
+        State = var_state(Lvals, MaybeConstRval, no, Empty, doa_alive),
          VarStateMap1 = VarStateMap0
      ),
      map.det_insert(VarStateMap1, Var, State, VarStateMap),
@@ -728,7 +729,7 @@
              Lvals = set.map(add_field_offset(yes(Ptag),
                  const(llconst_int(Offset))), BaseVarLvals),
              set.init(Using),
-            State = var_state(Lvals, MaybeConstRval, no, Using, alive),
+            State = var_state(Lvals, MaybeConstRval, no, Using, doa_alive),
              map.det_insert(VarStateMap0, Var, State, VarStateMap),
              var_locn_set_var_state_map(VarStateMap, !VLI),

@@ -739,7 +740,7 @@
              set.init(Lvals),
              Expr = lval(Lval0),
              set.init(Using),
-            State = var_state(Lvals, no, yes(Expr), Using, alive),
+            State = var_state(Lvals, no, yes(Expr), Using, doa_alive),
              map.det_insert(VarStateMap0, Var, State, VarStateMap1),
              add_use_ref(BaseVar, Var, VarStateMap1, VarStateMap),
              var_locn_set_var_state_map(VarStateMap, !VLI)
@@ -750,7 +751,7 @@

          var_locn_get_var_state_map(!.VLI, VarStateMap0),
          set.singleton_set(LvalSet, Lval),
-        State = var_state(LvalSet, no, no, set.init, alive),
+        State = var_state(LvalSet, no, no, set.init, doa_alive),
          map.det_insert(VarStateMap0, Var, State, VarStateMap),
          var_locn_set_var_state_map(VarStateMap, !VLI),

@@ -772,7 +773,7 @@
      var_locn_get_var_state_map(!.VLI, VarStateMap0),
      var_locn_get_exprn_opts(!.VLI, ExprnOpts),
      ( expr_is_constant(VarStateMap0, ExprnOpts, ConstRval0, ConstRval) ->
-        State = var_state(set.init, yes(ConstRval), no, set.init, alive),
+        State = var_state(set.init, yes(ConstRval), no, set.init, doa_alive),
          map.det_insert(VarStateMap0, Var, State, VarStateMap),
          var_locn_set_var_state_map(VarStateMap, !VLI)
      ;
@@ -786,7 +787,7 @@
      check_var_is_unknown(!.VLI, Var),

      var_locn_get_var_state_map(!.VLI, VarStateMap0),
-    State = var_state(set.init, no, yes(Rval), set.init, alive),
+    State = var_state(set.init, no, yes(Rval), set.init, doa_alive),
      map.det_insert(VarStateMap0, Var, State, VarStateMap1),

      exprn_aux.vars_in_rval(Rval, ContainedVars0),
@@ -999,7 +1000,7 @@
      var_locn_set_var_state_map(VarStateMap, !VLI),
      (
          set.empty(Using),
-        DeadOrAlive = dead
+        DeadOrAlive = doa_dead
      ->
          var_locn_var_becomes_dead(ContainedVar, no, !VLI)
      ;
@@ -1023,7 +1024,7 @@

      var_locn_get_var_state_map(!.VLI, VarStateMap0),
      set.singleton_set(LvalSet, Lval),
-    State = var_state(LvalSet, no, no, set.init, alive),
+    State = var_state(LvalSet, no, no, set.init, doa_alive),
      map.det_insert(VarStateMap0, Var, State, VarStateMap),
      var_locn_set_var_state_map(VarStateMap, !VLI).

@@ -1522,11 +1523,11 @@
          State0 = var_state(Lvals, MaybeConstRval, MaybeExprRval, Using,
              DeadOrAlive0),
          (
-            DeadOrAlive0 = dead,
+            DeadOrAlive0 = doa_dead,
              expect(unify(FirstTime, no), this_file,
                  "var_becomes_dead: already dead")
          ;
-            DeadOrAlive0 = alive
+            DeadOrAlive0 = doa_alive
          ),
          ( set.empty(Using) ->
              map.det_remove(VarStateMap0, Var, _, VarStateMap),
@@ -1541,7 +1542,7 @@
              remove_use_refs(MaybeExprRval, Var, !VLI)
          ;
              State = var_state(Lvals, MaybeConstRval, MaybeExprRval, Using,
-                dead),
+                doa_dead),
              map.det_update(VarStateMap0, Var, State, VarStateMap),
              var_locn_set_var_state_map(VarStateMap, !VLI)
          )

--------------------------------------------------------------------------
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