[/] [trunk/] [src/] [maketest/] [actiontrans.sml] - Diff 32 ⟶ 34

Diff between revs 32 and 34
Rev 32 Rev 34
Line 1... Line 1...
(* $Id: actiontrans.sml 32 2008-03-31 03:36:59Z tbourke $ *)
(* $Id: actiontrans.sml 34 2008-03-31 10:48:56Z tbourke $ *)
 
 
structure ActionTrans :> ACTION_TRANS = let
structure ActionTrans :> ACTION_TRANS = let
  structure E    = Expression
  structure E    = Expression
        and ECVT = ExpressionCvt
        and ECVT = ExpressionCvt
        and Env  = Environment
        and Env  = Environment
Line 369... Line 369...
    in foldThrough (groupLikeActions selids) trans end
    in foldThrough (groupLikeActions selids) trans end
 
 
 
 
  fun reduceSelectIds env (at as ActTrans {selectids,actionsubs,guard,names}) =
  fun reduceSelectIds env (at as ActTrans {selectids,actionsubs,guard,names}) =
    let
    let
      val _ = Util.debugVeryDetailed (fn()=> ["reduceSelectIds:before=",
      val _ = Util.debugVeryDetailed (fn()=> ["* reduceSelectIds:before=\n",
                                              toString at])
                                              toString at])
 
 
      val snames = addSelectSubNames actionsubs
      val snames = addSelectSubNames actionsubs
 
 
      val senv = List.foldl (Env.addId Env.SelectScope) env selectids
      val senv = List.foldl (Env.addId Env.SelectScope) env selectids
Line 390... Line 390...
          (* reverse the selectids to handle masking of identical names,
          (* reverse the selectids to handle masking of identical names,
           * folding f has the effect of reversing them back.           *)
           * folding f has the effect of reversing them back.           *)
 
 
      val at' = ActTrans {selectids=selectids', actionsubs=actionsubs,
      val at' = ActTrans {selectids=selectids', actionsubs=actionsubs,
                          guard=guard', names=names'}
                          guard=guard', names=names'}
      val _ = Util.debugVeryDetailed (fn()=> ["reduceSelectIds:after =",
      val _ = Util.debugVeryDetailed (fn()=> ["* reduceSelectIds:after =\n",
                                              toString at'])
                                              toString at'])
    in at' end
    in at' end
 
 
end
end
end
end
end
end