src/Pure/tactic.ML
changeset 0 a5a9c433f639
child 69 e7588b53d6b0
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/Pure/tactic.ML	Thu Sep 16 12:20:38 1993 +0200
     1.3 @@ -0,0 +1,421 @@
     1.4 +(*  Title: 	tactic
     1.5 +    ID:         $Id$
     1.6 +    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
     1.7 +    Copyright   1991  University of Cambridge
     1.8 +
     1.9 +Tactics 
    1.10 +*)
    1.11 +
    1.12 +signature TACTIC =
    1.13 +sig
    1.14 +  structure Tactical: TACTICAL and Net: NET
    1.15 +  local open Tactical Tactical.Thm Net
    1.16 +  in
    1.17 +  val ares_tac: thm list -> int -> tactic
    1.18 +  val asm_rewrite_goal_tac:
    1.19 +        (meta_simpset -> tactic) -> meta_simpset -> int -> tactic
    1.20 +  val assume_tac: int -> tactic
    1.21 +  val atac: int ->tactic
    1.22 +  val bimatch_from_nets_tac: (int*(bool*thm)) net * (int*(bool*thm)) net -> int -> tactic
    1.23 +  val bimatch_tac: (bool*thm)list -> int -> tactic
    1.24 +  val biresolve_from_nets_tac: (int*(bool*thm)) net * (int*(bool*thm)) net -> int -> tactic
    1.25 +  val biresolve_tac: (bool*thm)list -> int -> tactic
    1.26 +  val build_net: thm list -> (int*thm) net
    1.27 +  val build_netpair: (bool*thm)list -> (int*(bool*thm)) net * (int*(bool*thm)) net
    1.28 +  val compose_inst_tac: (string*string)list -> (bool*thm*int) -> int -> tactic
    1.29 +  val compose_tac: (bool * thm * int) -> int -> tactic 
    1.30 +  val cut_facts_tac: thm list -> int -> tactic
    1.31 +  val dmatch_tac: thm list -> int -> tactic
    1.32 +  val dresolve_tac: thm list -> int -> tactic
    1.33 +  val dres_inst_tac: (string*string)list -> thm -> int -> tactic   
    1.34 +  val dtac: thm -> int ->tactic
    1.35 +  val etac: thm -> int ->tactic
    1.36 +  val eq_assume_tac: int -> tactic   
    1.37 +  val ematch_tac: thm list -> int -> tactic
    1.38 +  val eresolve_tac: thm list -> int -> tactic
    1.39 +  val eres_inst_tac: (string*string)list -> thm -> int -> tactic   
    1.40 +  val filter_thms: (term*term->bool) -> int*term*thm list -> thm list
    1.41 +  val filt_resolve_tac: thm list -> int -> int -> tactic
    1.42 +  val flexflex_tac: tactic
    1.43 +  val fold_goals_tac: thm list -> tactic
    1.44 +  val fold_tac: thm list -> tactic
    1.45 +  val forward_tac: thm list -> int -> tactic   
    1.46 +  val forw_inst_tac: (string*string)list -> thm -> int -> tactic
    1.47 +  val is_fact: thm -> bool
    1.48 +  val lessb: (bool * thm) * (bool * thm) -> bool
    1.49 +  val lift_inst_rule: thm * int * (string*string)list * thm -> thm
    1.50 +  val make_elim: thm -> thm
    1.51 +  val match_from_net_tac: (int*thm) net -> int -> tactic
    1.52 +  val match_tac: thm list -> int -> tactic
    1.53 +  val metacut_tac: thm -> int -> tactic   
    1.54 +  val net_bimatch_tac: (bool*thm) list -> int -> tactic
    1.55 +  val net_biresolve_tac: (bool*thm) list -> int -> tactic
    1.56 +  val net_match_tac: thm list -> int -> tactic
    1.57 +  val net_resolve_tac: thm list -> int -> tactic
    1.58 +  val PRIMITIVE: (thm -> thm) -> tactic  
    1.59 +  val PRIMSEQ: (thm -> thm Sequence.seq) -> tactic  
    1.60 +  val prune_params_tac: tactic
    1.61 +  val rename_tac: string -> int -> tactic
    1.62 +  val rename_last_tac: string -> string list -> int -> tactic
    1.63 +  val resolve_from_net_tac: (int*thm) net -> int -> tactic
    1.64 +  val resolve_tac: thm list -> int -> tactic
    1.65 +  val res_inst_tac: (string*string)list -> thm -> int -> tactic   
    1.66 +  val rewrite_goals_tac: thm list -> tactic
    1.67 +  val rewrite_tac: thm list -> tactic
    1.68 +  val rewtac: thm -> tactic
    1.69 +  val rtac: thm -> int -> tactic
    1.70 +  val rule_by_tactic: tactic -> thm -> thm
    1.71 +  val subgoals_of_brl: bool * thm -> int
    1.72 +  val subgoal_tac: string -> int -> tactic
    1.73 +  val trace_goalno_tac: (int -> tactic) -> int -> tactic
    1.74 +  end
    1.75 +end;
    1.76 +
    1.77 +
    1.78 +functor TacticFun (structure Logic: LOGIC and Drule: DRULE and 
    1.79 +		   Tactical: TACTICAL and Net: NET
    1.80 +	  sharing Drule.Thm = Tactical.Thm) : TACTIC = 
    1.81 +struct
    1.82 +structure Tactical = Tactical;
    1.83 +structure Thm = Tactical.Thm;
    1.84 +structure Net = Net;
    1.85 +structure Sequence = Thm.Sequence;
    1.86 +structure Sign = Thm.Sign;
    1.87 +local open Tactical Tactical.Thm Drule
    1.88 +in
    1.89 +
    1.90 +(*Discover what goal is chosen:  SOMEGOAL(trace_goalno_tac tac) *)
    1.91 +fun trace_goalno_tac tf i = Tactic (fn state => 
    1.92 +    case Sequence.pull(tapply(tf i, state)) of
    1.93 +	None    => Sequence.null
    1.94 +      | seqcell => (prs("Subgoal " ^ string_of_int i ^ " selected\n"); 
    1.95 +    			 Sequence.seqof(fn()=> seqcell)));
    1.96 +
    1.97 +fun string_of (a,0) = a
    1.98 +  | string_of (a,i) = a ^ "_" ^ string_of_int i;
    1.99 +
   1.100 +(*convert all Vars in a theorem to Frees -- export??*)
   1.101 +fun freeze th =
   1.102 +  let val fth = freezeT th
   1.103 +      val {prop,sign,...} = rep_thm fth
   1.104 +      fun mk_inst (Var(v,T)) = 
   1.105 +	  (Sign.cterm_of sign (Var(v,T)),
   1.106 +	   Sign.cterm_of sign (Free(string_of v, T)))
   1.107 +      val insts = map mk_inst (term_vars prop)
   1.108 +  in  instantiate ([],insts) fth  end;
   1.109 +
   1.110 +(*Makes a rule by applying a tactic to an existing rule*)
   1.111 +fun rule_by_tactic (Tactic tf) rl =
   1.112 +    case Sequence.pull(tf (freeze (standard rl))) of
   1.113 +	None        => raise THM("rule_by_tactic", 0, [rl])
   1.114 +      | Some(rl',_) => standard rl';
   1.115 + 
   1.116 +(*** Basic tactics ***)
   1.117 +
   1.118 +(*Makes a tactic whose effect on a state is given by thmfun: thm->thm seq.*)
   1.119 +fun PRIMSEQ thmfun = Tactic (fn state => thmfun state
   1.120 +			                 handle THM _ => Sequence.null);
   1.121 +
   1.122 +(*Makes a tactic whose effect on a state is given by thmfun: thm->thm.*)
   1.123 +fun PRIMITIVE thmfun = PRIMSEQ (Sequence.single o thmfun);
   1.124 +
   1.125 +(*** The following fail if the goal number is out of range:
   1.126 +     thus (REPEAT (resolve_tac rules i)) stops once subgoal i disappears. *)
   1.127 +
   1.128 +(*Solve subgoal i by assumption*)
   1.129 +fun assume_tac i = PRIMSEQ (assumption i);
   1.130 +
   1.131 +(*Solve subgoal i by assumption, using no unification*)
   1.132 +fun eq_assume_tac i = PRIMITIVE (eq_assumption i);
   1.133 +
   1.134 +(** Resolution/matching tactics **)
   1.135 +
   1.136 +(*The composition rule/state: no lifting or var renaming.
   1.137 +  The arg = (bires_flg, orule, m) ;  see bicompose for explanation.*)
   1.138 +fun compose_tac arg i = PRIMSEQ (bicompose false arg i);
   1.139 +
   1.140 +(*Converts a "destruct" rule like P&Q==>P to an "elimination" rule
   1.141 +  like [| P&Q; P==>R |] ==> R *)
   1.142 +fun make_elim rl = zero_var_indexes (rl RS revcut_rl);
   1.143 +
   1.144 +(*Attack subgoal i by resolution, using flags to indicate elimination rules*)
   1.145 +fun biresolve_tac brules i = PRIMSEQ (biresolution false brules i);
   1.146 +
   1.147 +(*Resolution: the simple case, works for introduction rules*)
   1.148 +fun resolve_tac rules = biresolve_tac (map (pair false) rules);
   1.149 +
   1.150 +(*Resolution with elimination rules only*)
   1.151 +fun eresolve_tac rules = biresolve_tac (map (pair true) rules);
   1.152 +
   1.153 +(*Forward reasoning using destruction rules.*)
   1.154 +fun forward_tac rls = resolve_tac (map make_elim rls) THEN' assume_tac;
   1.155 +
   1.156 +(*Like forward_tac, but deletes the assumption after use.*)
   1.157 +fun dresolve_tac rls = eresolve_tac (map make_elim rls);
   1.158 +
   1.159 +(*Shorthand versions: for resolution with a single theorem*)
   1.160 +fun rtac rl = resolve_tac [rl];
   1.161 +fun etac rl = eresolve_tac [rl];
   1.162 +fun dtac rl = dresolve_tac [rl];
   1.163 +val atac = assume_tac;
   1.164 +
   1.165 +(*Use an assumption or some rules ... A popular combination!*)
   1.166 +fun ares_tac rules = assume_tac  ORELSE'  resolve_tac rules;
   1.167 +
   1.168 +(*Matching tactics -- as above, but forbid updating of state*)
   1.169 +fun bimatch_tac brules i = PRIMSEQ (biresolution true brules i);
   1.170 +fun match_tac rules  = bimatch_tac (map (pair false) rules);
   1.171 +fun ematch_tac rules = bimatch_tac (map (pair true) rules);
   1.172 +fun dmatch_tac rls   = ematch_tac (map make_elim rls);
   1.173 +
   1.174 +(*Smash all flex-flex disagreement pairs in the proof state.*)
   1.175 +val flexflex_tac = PRIMSEQ flexflex_rule;
   1.176 +
   1.177 +(*Lift and instantiate a rule wrt the given state and subgoal number *)
   1.178 +fun lift_inst_rule (state, i, sinsts, rule) =
   1.179 +let val {maxidx,sign,...} = rep_thm state
   1.180 +    val (_, _, Bi, _) = dest_state(state,i)
   1.181 +    val params = Logic.strip_params Bi	        (*params of subgoal i*)
   1.182 +    val params = rev(rename_wrt_term Bi params) (*as they are printed*)
   1.183 +    val paramTs = map #2 params
   1.184 +    and inc = maxidx+1
   1.185 +    fun liftvar (Var ((a,j), T)) = Var((a, j+inc), paramTs---> incr_tvar inc T)
   1.186 +      | liftvar t = raise TERM("Variable expected", [t]);
   1.187 +    fun liftterm t = list_abs_free (params, 
   1.188 +				    Logic.incr_indexes(paramTs,inc) t)
   1.189 +    (*Lifts instantiation pair over params*)
   1.190 +    fun liftpair (cv,ct) = (Sign.cfun liftvar cv, Sign.cfun liftterm ct)
   1.191 +    fun lifttvar((a,i),ctyp) =
   1.192 +	let val {T,sign} = Sign.rep_ctyp ctyp
   1.193 +	in  ((a,i+inc), Sign.ctyp_of sign (incr_tvar inc T)) end
   1.194 +    val rts = types_sorts rule and (types,sorts) = types_sorts state
   1.195 +    fun types'(a,~1) = (case assoc(params,a) of None => types(a,~1) | sm => sm)
   1.196 +      | types'(ixn) = types ixn;
   1.197 +    val (Tinsts,insts) = Sign.read_insts sign rts (types',sorts) sinsts
   1.198 +in instantiate (map lifttvar Tinsts, map liftpair insts)
   1.199 +		(lift_rule (state,i) rule)
   1.200 +end;
   1.201 +
   1.202 +
   1.203 +(*** Resolve after lifting and instantation; may refer to parameters of the
   1.204 +     subgoal.  Fails if "i" is out of range.  ***)
   1.205 +
   1.206 +(*compose version: arguments are as for bicompose.*)
   1.207 +fun compose_inst_tac sinsts (bires_flg, rule, nsubgoal) i =
   1.208 +  STATE ( fn state => 
   1.209 +	   compose_tac (bires_flg, lift_inst_rule (state, i, sinsts, rule),
   1.210 +			nsubgoal) i
   1.211 +	   handle TERM (msg,_) => (writeln msg;  no_tac)
   1.212 +		| THM _ => no_tac );
   1.213 +
   1.214 +(*Resolve version*)
   1.215 +fun res_inst_tac sinsts rule i =
   1.216 +    compose_inst_tac sinsts (false, rule, nprems_of rule) i;
   1.217 +
   1.218 +(*eresolve (elimination) version*)
   1.219 +fun eres_inst_tac sinsts rule i =
   1.220 +    compose_inst_tac sinsts (true, rule, nprems_of rule) i;
   1.221 +
   1.222 +(*For forw_inst_tac and dres_inst_tac: preserve Var indexes of rl.
   1.223 +  Fails if rl's major premise contains !! or ==> ; it should not anyway!*)
   1.224 +fun make_elim_preserve rl = 
   1.225 +  let val revcut_rl' = lift_rule (rl,1) revcut_rl
   1.226 +      val arg = (false, rl, nprems_of rl)
   1.227 +      val [th] = Sequence.list_of_s (bicompose false arg 1 revcut_rl')
   1.228 +  in  th  end
   1.229 +  handle Bind => raise THM("make_elim_preserve", 1, [rl]);
   1.230 +
   1.231 +(*forward version*)
   1.232 +fun forw_inst_tac sinsts rule =
   1.233 +    res_inst_tac sinsts (make_elim_preserve rule) THEN' assume_tac;
   1.234 +
   1.235 +(*dresolve version*)
   1.236 +fun dres_inst_tac sinsts rule = eres_inst_tac sinsts (make_elim_preserve rule);
   1.237 +
   1.238 +(*** Applications of cut_rl -- forward reasoning ***)
   1.239 +
   1.240 +(*Used by metacut_tac*)
   1.241 +fun bires_cut_tac arg i =
   1.242 +    resolve_tac [cut_rl] i  THEN  biresolve_tac arg (i+1) ;
   1.243 +
   1.244 +(*The conclusion of the rule gets assumed in subgoal i,
   1.245 +  while subgoal i+1,... are the premises of the rule.*)
   1.246 +fun metacut_tac rule = bires_cut_tac [(false,rule)];
   1.247 +
   1.248 +(*Recognizes theorems that are not rules, but simple propositions*)
   1.249 +fun is_fact rl =
   1.250 +    case prems_of rl of
   1.251 +	[] => true  |  _::_ => false;
   1.252 +
   1.253 +(*"Cut" all facts from theorem list into the goal as assumptions. *)
   1.254 +fun cut_facts_tac ths i =
   1.255 +    EVERY (map (fn th => metacut_tac th i) (filter is_fact ths));
   1.256 +
   1.257 +(*Introduce the given proposition as a lemma and subgoal*)
   1.258 +fun subgoal_tac sprop = res_inst_tac [("psi", sprop)] cut_rl;
   1.259 +
   1.260 +
   1.261 +(**** Indexing and filtering of theorems ****)
   1.262 +
   1.263 +(*Returns the list of potentially resolvable theorems for the goal "prem",
   1.264 +	using the predicate  could(subgoal,concl).
   1.265 +  Resulting list is no longer than "limit"*)
   1.266 +fun filter_thms could (limit, prem, ths) =
   1.267 +  let val pb = Logic.strip_assums_concl prem;   (*delete assumptions*)
   1.268 +      fun filtr (limit, []) = []
   1.269 +	| filtr (limit, th::ths) =
   1.270 +	    if limit=0 then  []
   1.271 +	    else if could(pb, concl_of th)  then th :: filtr(limit-1, ths)
   1.272 +	    else filtr(limit,ths)
   1.273 +  in  filtr(limit,ths)  end;
   1.274 +
   1.275 +
   1.276 +(*** biresolution and resolution using nets ***)
   1.277 +
   1.278 +(** To preserve the order of the rules, tag them with increasing integers **)
   1.279 +
   1.280 +(*insert tags*)
   1.281 +fun taglist k [] = []
   1.282 +  | taglist k (x::xs) = (k,x) :: taglist (k+1) xs;
   1.283 +
   1.284 +(*remove tags and suppress duplicates -- list is assumed sorted!*)
   1.285 +fun untaglist [] = []
   1.286 +  | untaglist [(k:int,x)] = [x]
   1.287 +  | untaglist ((k,x) :: (rest as (k',x')::_)) =
   1.288 +      if k=k' then untaglist rest
   1.289 +      else    x :: untaglist rest;
   1.290 +
   1.291 +(*return list elements in original order*)
   1.292 +val orderlist = untaglist o sort (fn(x,y)=> #1 x < #1 y); 
   1.293 +
   1.294 +(*insert one tagged brl into the pair of nets*)
   1.295 +fun insert_kbrl (kbrl as (k,(eres,th)), (inet,enet)) =
   1.296 +    if eres then 
   1.297 +	case prems_of th of
   1.298 +	    prem::_ => (inet, Net.insert_term ((prem,kbrl), enet, K false))
   1.299 +	  | [] => error"insert_kbrl: elimination rule with no premises"
   1.300 +    else (Net.insert_term ((concl_of th, kbrl), inet, K false), enet);
   1.301 +
   1.302 +(*build a pair of nets for biresolution*)
   1.303 +fun build_netpair brls = 
   1.304 +    foldr insert_kbrl (taglist 1 brls, (Net.empty,Net.empty));
   1.305 +
   1.306 +(*biresolution using a pair of nets rather than rules*)
   1.307 +fun biresolution_from_nets_tac match (inet,enet) =
   1.308 +  SUBGOAL
   1.309 +    (fn (prem,i) =>
   1.310 +      let val hyps = Logic.strip_assums_hyp prem
   1.311 +          and concl = Logic.strip_assums_concl prem 
   1.312 +          val kbrls = Net.unify_term inet concl @
   1.313 +                      flat (map (Net.unify_term enet) hyps)
   1.314 +      in PRIMSEQ (biresolution match (orderlist kbrls) i) end);
   1.315 +
   1.316 +(*versions taking pre-built nets*)
   1.317 +val biresolve_from_nets_tac = biresolution_from_nets_tac false;
   1.318 +val bimatch_from_nets_tac = biresolution_from_nets_tac true;
   1.319 +
   1.320 +(*fast versions using nets internally*)
   1.321 +val net_biresolve_tac = biresolve_from_nets_tac o build_netpair;
   1.322 +val net_bimatch_tac = bimatch_from_nets_tac o build_netpair;
   1.323 +
   1.324 +(*** Simpler version for resolve_tac -- only one net, and no hyps ***)
   1.325 +
   1.326 +(*insert one tagged rl into the net*)
   1.327 +fun insert_krl (krl as (k,th), net) =
   1.328 +    Net.insert_term ((concl_of th, krl), net, K false);
   1.329 +
   1.330 +(*build a net of rules for resolution*)
   1.331 +fun build_net rls = 
   1.332 +    foldr insert_krl (taglist 1 rls, Net.empty);
   1.333 +
   1.334 +(*resolution using a net rather than rules; pred supports filt_resolve_tac*)
   1.335 +fun filt_resolution_from_net_tac match pred net =
   1.336 +  SUBGOAL
   1.337 +    (fn (prem,i) =>
   1.338 +      let val krls = Net.unify_term net (Logic.strip_assums_concl prem)
   1.339 +      in 
   1.340 +	 if pred krls  
   1.341 +         then PRIMSEQ
   1.342 +		(biresolution match (map (pair false) (orderlist krls)) i)
   1.343 +         else no_tac
   1.344 +      end);
   1.345 +
   1.346 +(*Resolve the subgoal using the rules (making a net) unless too flexible,
   1.347 +   which means more than maxr rules are unifiable.      *)
   1.348 +fun filt_resolve_tac rules maxr = 
   1.349 +    let fun pred krls = length krls <= maxr
   1.350 +    in  filt_resolution_from_net_tac false pred (build_net rules)  end;
   1.351 +
   1.352 +(*versions taking pre-built nets*)
   1.353 +val resolve_from_net_tac = filt_resolution_from_net_tac false (K true);
   1.354 +val match_from_net_tac = filt_resolution_from_net_tac true (K true);
   1.355 +
   1.356 +(*fast versions using nets internally*)
   1.357 +val net_resolve_tac = resolve_from_net_tac o build_net;
   1.358 +val net_match_tac = match_from_net_tac o build_net;
   1.359 +
   1.360 +
   1.361 +(*** For Natural Deduction using (bires_flg, rule) pairs ***)
   1.362 +
   1.363 +(*The number of new subgoals produced by the brule*)
   1.364 +fun subgoals_of_brl (true,rule) = length (prems_of rule) - 1
   1.365 +  | subgoals_of_brl (false,rule) = length (prems_of rule);
   1.366 +
   1.367 +(*Less-than test: for sorting to minimize number of new subgoals*)
   1.368 +fun lessb (brl1,brl2) = subgoals_of_brl brl1 < subgoals_of_brl brl2;
   1.369 +
   1.370 +
   1.371 +(*** Meta-Rewriting Tactics ***)
   1.372 +
   1.373 +fun result1 tacf mss thm =
   1.374 +  case Sequence.pull(tapply(tacf mss,thm)) of
   1.375 +    None => None
   1.376 +  | Some(thm,_) => Some(thm);
   1.377 +
   1.378 +(*Rewrite subgoal i only *)
   1.379 +fun asm_rewrite_goal_tac prover_tac mss i =
   1.380 +      PRIMITIVE(rewrite_goal_rule (result1 prover_tac) mss i);
   1.381 +
   1.382 +(*Rewrite or fold throughout proof state. *)
   1.383 +fun rewrite_tac thms = PRIMITIVE(rewrite_rule thms);
   1.384 +fun fold_tac rths = rewrite_tac (map symmetric rths);
   1.385 +
   1.386 +(*Rewrite subgoals only, not main goal. *)
   1.387 +fun rewrite_goals_tac thms = PRIMITIVE (rewrite_goals_rule thms);
   1.388 +fun fold_goals_tac rths = rewrite_goals_tac (map symmetric rths);
   1.389 +
   1.390 +fun rewtac rth = rewrite_goals_tac [rth];
   1.391 +
   1.392 +
   1.393 +(** Renaming of parameters in a subgoal
   1.394 +    Names may contain letters, digits or primes and must be
   1.395 +    separated by blanks **)
   1.396 +
   1.397 +(*Calling this will generate the warning "Same as previous level" since
   1.398 +  it affects nothing but the names of bound variables!*)
   1.399 +fun rename_tac str i = 
   1.400 +  let val cs = explode str 
   1.401 +  in  
   1.402 +  if !Logic.auto_rename 
   1.403 +  then (writeln"Note: setting Logic.auto_rename := false"; 
   1.404 +	Logic.auto_rename := false)
   1.405 +  else ();
   1.406 +  case #2 (take_prefix (is_letdig orf is_blank) cs) of
   1.407 +      [] => PRIMITIVE (rename_params_rule (scanwords is_letdig cs, i))
   1.408 +    | c::_ => error ("Illegal character: " ^ c)
   1.409 +  end;
   1.410 +
   1.411 +(*Rename recent parameters using names generated from (a) and the suffixes,
   1.412 +  provided the string (a), which represents a term, is an identifier. *)
   1.413 +fun rename_last_tac a sufs i = 
   1.414 +  let val names = map (curry op^ a) sufs
   1.415 +  in  if Syntax.is_identifier a
   1.416 +      then PRIMITIVE (rename_params_rule (names,i))
   1.417 +      else all_tac
   1.418 +  end;
   1.419 +
   1.420 +(*Prunes all redundant parameters from the proof state by rewriting*)
   1.421 +val prune_params_tac = rewrite_tac [triv_forall_equality];
   1.422 +
   1.423 +end;
   1.424 +end;