src/Tools/isac/Specify/specify.sml
changeset 60755 b817019bfda7
parent 60753 30eb1f314f5c
child 60757 9f4d7a352426
equal deleted inserted replaced
60754:bac1b22385e4 60755:b817019bfda7
   206 
   206 
   207 (*
   207 (*
   208   do all specification in one single step:
   208   do all specification in one single step:
   209   bypass input of Problem.model and go immediately for MethodC: I_Model.complete'
   209   bypass input of Problem.model and go immediately for MethodC: I_Model.complete'
   210 *)
   210 *)
   211 fun do_all (pt, (*old* )pos as( *old*) (p, _)) =
   211 fun do_all (pt, (p, _)) =
   212   let
   212   let
   213     val (o_model, o_refs as (_, _, met_id), ctxt) = case Ctree.get_obj I pt p of
   213     val (itms, oris, probl, o_refs, spec, ctxt) = case Ctree.get_obj I pt p of
   214       Ctree.PblObj {origin = (o_model, o_refs, _), ctxt, ...}
   214       Ctree.PblObj {meth = itms, origin = (oris, o_spec, _), probl, spec, ctxt, ...}
   215         => (o_model, o_refs, ctxt)
   215         => (itms, oris, probl, o_spec, spec, ctxt)
   216     | _ => raise ERROR "Specify.do_all: uncovered case get_obj"
   216     | _ => raise ERROR "LI.by_tactic: no PblObj"
   217     val mod_pat = MethodC.from_store ctxt met_id |> #model
   217     val (_, pbl_id', met_id') = References.select_input o_refs spec
   218     val i_model = map (I_Model.complete' mod_pat) o_model
   218     val {model = pbl_patt, ...} = Problem.from_store ctxt pbl_id';
   219       (*no parse, ^^^ takes existing terms; ctxt already created by O_Model.init*)
   219     val {model = met_patt, ...} = MethodC.from_store ctxt met_id';
   220     val (pt, _) = Ctree.cupdate_problem pt p (o_refs, i_model, i_model, ctxt)
   220     val (pbl_imod, met_imod) = I_Model.s_make_complete oris
       
   221       (I_Model.OLD_to_TEST probl, I_Model.OLD_to_TEST itms) (pbl_patt, met_patt)
       
   222     val (pt, _) = Ctree.cupdate_problem pt p
       
   223       (o_refs, I_Model.TEST_to_OLD pbl_imod, I_Model.TEST_to_OLD met_imod, ctxt)
   221   in
   224   in
   222     (pt, (p, Pos.Met))
   225     (pt, (p, Pos.Met))
   223   end
   226   end
   224 
   227 
   225 (**)end(**)
   228 (**)end(**)