src/Tools/isac/MathEngBasic/istate.sml
changeset 59679 7b3c7a3d89e8
parent 59677 b55a25b8ac0c
child 59680 2796db5c718c
equal deleted inserted replaced
59678:204d4acfe790 59679:7b3c7a3d89e8
    23   val get_act_env: pstate -> (term * Env.T)
    23   val get_act_env: pstate -> (term * Env.T)
    24 (*val get_form_env: pstate -> (term option * Env.T)*)
    24 (*val get_form_env: pstate -> (term option * Env.T)*)
    25   val get_subst: pstate -> (Env.T * (term option * term))
    25   val get_subst: pstate -> (Env.T * (term option * term))
    26   val get_assoc: pstate -> bool
    26   val get_assoc: pstate -> bool
    27 
    27 
       
    28   val trans_scan_down2: pstate -> pstate
       
    29   val trans_scan_up2: pstate -> pstate
    28   val trans_ass: pstate -> pstate -> pstate
    30   val trans_ass: pstate -> pstate -> pstate
    29   val trans_env_act: pstate -> pstate -> pstate
    31   val trans_env_act: pstate -> pstate -> pstate
    30 
    32 
    31   val path_down: Celem.loc_ -> pstate -> pstate
    33   val path_down: Celem.loc_ -> pstate -> pstate
    32   val path_down_form: (Celem.loc_ * term) -> pstate -> pstate
    34   val path_down_form: (Celem.loc_ * term) -> pstate -> pstate
    52 
    54 
    53 (**)                   
    55 (**)                   
    54 structure Istate(**): INTERPRETER_STATE(**) =
    56 structure Istate(**): INTERPRETER_STATE(**) =
    55 struct
    57 struct
    56 (**)
    58 (**)
       
    59 
       
    60 open Celem
    57 
    61 
    58 datatype appy_ = (* as argument in nxt_up, nstep_up, from appy               *)
    62 datatype appy_ = (* as argument in nxt_up, nstep_up, from appy               *)
    59 (*Appy              is only (final) returnvalue, not argument during search  *)
    63 (*Appy              is only (final) returnvalue, not argument during search  *)
    60   AppUndef_
    64   AppUndef_
    61 | Napp_          (* ev. detects 'script is not appropriate for this example' *)
    65 | Napp_          (* ev. detects 'script is not appropriate for this example' *)
   113 fun get_env (env, _, _, _, _, _, _) = env
   117 fun get_env (env, _, _, _, _, _, _) = env
   114 fun get_act_env (env, _, _, _, act_arg, _, _) = (act_arg, env)
   118 fun get_act_env (env, _, _, _, act_arg, _, _) = (act_arg, env)
   115 fun get_assoc (_, _, _, _, _, _, ass) = ass
   119 fun get_assoc (_, _, _, _, _, _, ass) = ass
   116 fun get_subst (env, _, _, form_arg, act_arg, _, _) = (env, (form_arg, act_arg))
   120 fun get_subst (env, _, _, form_arg, act_arg, _, _) = (env, (form_arg, act_arg))
   117 
   121 
       
   122 fun trans_scan_down2 (env, _, rls, _, act_arg, _, _)  = 
       
   123   (env, [R], rls, NONE, act_arg, AppUndef_, false)
       
   124 fun trans_scan_up2 (env, path, rls, form_arg, act_arg, _, _)  = 
       
   125   (env, path, rls, form_arg, act_arg, AppUndef_, false)
   118 fun trans_ass (_, _, _,  _,_, _, ass) (env, path, rls, form_arg, act_arg, safe, _) = 
   126 fun trans_ass (_, _, _,  _,_, _, ass) (env, path, rls, form_arg, act_arg, safe, _) = 
   119   (env, path, rls, form_arg, act_arg, safe, ass)
   127   (env, path, rls, form_arg, act_arg, safe, ass)
   120 fun trans_env_act (env, _, _, _, act_arg, _, _) (_, path, rls, form_arg, _, safe, ass) = 
   128 fun trans_env_act (env, _, _, _, act_arg, _, _) (_, path, rls, form_arg, _, safe, ass) = 
   121   (env, path, rls, form_arg, act_arg, safe, ass)
   129   (env, path, rls, form_arg, act_arg, safe, ass)
   122 
   130