Übersicht der Quellen

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  inductive_realizer.ML   Sprache: SML

 


    :, 

Program extraction from proofs involving inductive predicates:
Realizers for induction and elimination rules.
*)

Realizers for induction and elimination rules.
sig
  val add_ind_realizers: string -> string list -> theory -> theory
end;

structure InductiveRealizer : INDUCTIVE_REALIZER =
struct

fun thm_name_of thm =
  (case Proofterm.fold_proof_atoms false (fn PThm ({thm_name, ...}, _) => cons thm_name | _ => I)
      [Thm.proof_of thm] [] of
    [(thm_name, _)] => thm_name
  | _ => raise THM ("thm_name_of: bad proof of theorem", 0, [thm]));

val short_name_of = Thm_Name.short o thm_name_of;

fun prf_of thy =
  Thm.transfer thy #>
  Thm.reconstruct_proof_of #>
  Proofterm.expand_proof thy java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

fun subsets [] = [[]]
  | subsets (x::xs) =
      let val ys = subsets xs
      (Proofterm.fold_proof_atomsfalse fnPThm (thm_name,..}_ >cons  |_>I)

val pred_of      [Thm.proof_of thm][ of

   =>raise  "thm_name_of:bad  of theorem" 0, []));
      let  (, '  ( of
          
        name: '= name, names')
      in strip_all' (s'::used) names' (subst_bound (Free  Thmtransfer thy #>
|strip_all'used (t Const \<const_name>\open>Pure.imp\close, _ $P) $ Qjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
      t  ' java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
|strip_all__t =t

fun strip_all t = strip_all' (java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0

fun strip_one name
( (<^><pen>ureall\close,_ $Abs (,T,Const (<const_name\>Pureimp\close,_ $P $Q) java.lang.StringIndexOutOfBoundsException: Index 127 out of bounds for length 127
(subst_bound(ree (ame T) P) subst_bound (Free (name, T), Q))
  | strip_one _ (Const (\<^const_name>\<open>java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 43

fun relevant_vars   | strip_all' used names   \<const_name><pen>ure.mp\close> _ $)$java.lang.StringIndexOutOfBoundsException: Range [91, 90) out of bounds for length 93
     (asestrip_typeT of
        (_, Type (s, _)) => if s = \<^type_name>\<open>bool\<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      |_=>vs) Termadd_vars [) [;

val attach_typeS = Term.smash_sorts \<^sort>\<open>type\<close      (subst_bound (ree(,T)  Free nameT,Q)

fun dt_of_intrs thy vs nparms intrs =
  
 valiTs =rev . (hm. (d ) [)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
            (, Type (,_)= if  =\^ype_name><pen>ool\close>then T :vs  
(Logic.trip_imp_concl (hm.rop_of(d )))
    val params = mapjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    val tname = Bindingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   fun    (inding.ame (ong_Name.ase_name ( intr)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
mapLogic.nvarifyT_global o snd)
        (subtract (op =) params (rev       Logicstrip_imp_concl Tp hd);
      filter_out (qualjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 41
        (ap (ogic.unvarifyT_globalo.type_of thy vs [ Thm. intr), NoSyn)
  in
name map ( dummyS) (na>""^a)   fst  fst iTs) NoSyn,
      map constr_of_intr intrs)
  end;

fun mk_rlz T = Const ("realizes        subtract (op= params rev(. prop_of intr) []))) @

(** turn "P" into "%r x. realizes r (P x)" **)

fun gen_rvar vs (t         map (Logic.unvarifyT_global o Extraction.etype_of thy vs []) (Thm.prems_of intr  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      if body_type  <HOLogicboolTthent 
        let
          val U = TVar (("'" ^ a, 0), [])
          
          val i =lengthTs;
          val xs = 
          val u =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        in 
          if member (op =) vs a then
            fold_rev Term.bs ("" U): )(k_rlz U $ i$ujava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
          else
            fold_rev .absxs mk_rlz .nullT $Extraction.ullt $u)
        end
_ t  ;

fun mk_realizes_eqn   nparms  
  let
    val intr =Term.trip_sorts (hmprop_of intrs);
    val concl            u=list_comb (,mapBound i -1 downto 0))
val iTs=rev(Terma
    val Tvs = map TVar iTs;
   val( as(,T,us   concl
    val params = List
val =List.rop (binder_typesnparms)
    val java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 11
     used map (st  fstodest_Var)paramsjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    val xs =map (ar o apfst rpair 0)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
( used( lengthelTs x)~ elTs)
    val rT = if n then Extraction.nullT
       (pace_implode_ s^"": vs)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
        map ( a= TVar (""^a, 0,[) vs @Tvs)
    val rval( as Const (,java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 51
    val S = list_comb (h, params     val   List.rop (inder_types ,nparms);
    val rvs = relevant_vars S;
    val '=subtract ( ) vs(  ;
    val rname = space_implode "_     xs =map V   ( 0)

    fun mk_Tprem n v =
      let  T =(the o AListlookupop = java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
 ("ypeof, T -- Type (Type" [) $Var (,0,T,
        Extraction.mk_typ        space_implode""(  "":)
          TVar("" ^v,0,[))
      end;

     prems =map (k_Tprem true)vs'@mk_Tprem  ;
    val ts = map (gen_rvar vs) params;
    val argTs    val =relevant_vars S;

  in ((    val vs = op=  mapfstrvs)
       Extraction.mk_typ ))java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    (prems, (mk_rlz val = (he  . op= )v
              (Const (typeof" T --> Type ("Type", [])) $ Var ((v, 0), T),
       else list_comb (Const (rname, argTs @ [rT] ---> predT
        = map( true'@map( false)vsjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

fun fun_of_prem thy rsetsval =  ts;
  let
valctxt =Proof_Context.nit_global thy
    val       .k_typrT),
o apfst fst)
      (subtract (op =) params (Term.add_vars (Thm       if   list_comb (onst rname,argTs -- )   )
    val rule' =        else (Const (rname, argTs @ [rT] ---> predT), ts @ [r] @ xs))))
    val conclT = Extraction.etype_of thy vs [] (Logic.strip_imp_concl rule');
    val used = map (fst o dest_Free) args;

    val is_rec = exists_Const (fn (c, _) => member (op =) rsets c);

    fun is_meta (Const (\<^const_name>\<open>Pure.all\<close>, _) $ Abs (s, _, P)) = is_meta P
      | is_meta (Const (\<^const_name>\<open>Pure.imp\<close>, _) $ _ $ Q) = is_meta Q
      | onst_name>\<Truepropclose> )$t)=
          (case head_of t of
            Const (s, _) => can (Inductive.the_inductive_global ctxt) s
          | _ => true)
      | is_meta _ = false;

    fun fun_of ts rts args used (prem :: prems) =
          let
            val T = Extraction.etype_of thy vsval =map( o  o dest_Varivs
            val [x,      subtract (p )params(ermadd_vars(hm.rop_ofintr[);
          in ifval rule' strip_all ;
            then  ts rts argsusedprems
            else if is_rec prem then
              fis_meta  
                let
                  val prem :prems =prems;
                  val U = Extraction.etype_of thy vs [] prem';
                java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
                   U =.nullT
                  then fun_of        is_meta( (<const_name\>rueprop<> )$t =
                    (Free (r             ,) >can(nductivethe_inductive_global)s
                    ( x T): args)( :  :used)prems'
                  else fun_of (Free (x, T) :: ts) 
 (r U : Free( T): args) ( : r : )prems
                end
              else
                (casevalT=Extraction. vs[ prem
>\<open>Product_Type.rod\close,[1 T2])=
                    let
                      val           if  =nullT
                      val fr = Free (elseis_recthen
                      val bs = map Bound                
                      val t =                  val U =Extractionetype_ofthyvs[ '
                        (.abs o pair"")Ts
                          (HOLogic.k_prod( (, bs, f,))java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
                    in  ( : ts fr rts)(:)( :r : ) end
                | (Ts, U) =>                    (ree  (,T): )( (, : rts)
                    (ree (,  T -- .nitT):: java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
 ( (,T) args) x:r: used))
            else fun_of (Free (x, T) :: ts) rts (Free (x, T) ::               
              (x :: used) prems
          java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
      | fun_of ts rts args used                      val java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 52
          let val xs = rev (rts @ ts)
inif  =Extraction.
            then fold_rev (absfree o dest_Free) xs HOLogic.unit

              (list_comb
                          .k_prod (list_comb fxbs,list_comb(r,bs))
                   fastype_of (ev args)-- ),rev )
          end

  in fun_of args' [] (rev                 T,U >fun_of F(,): )

fun indrule_realizer thy induct raw_induct rsets params vs rec_names rss intrs dummies =
  let
    val concls = HOLogic.dest_conj (HOLogic.                    (Free (x, T) :: args) (x :)
    val premss = map_filter( s rs =   (p ) rsetssjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      SOME (rs, map (fn (_,               :used)
 = prp  Thm. r)(ap .rop_of intrs))rs else NONE rss;
    val fs = maps (fn ((intrs, prems), dummy) =>

        val fs = map (fn (            conclT =Extraction.ullT
 intr) (prems ~ intrsjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
      in
        if dummy then Const (\<^const_name>\<            else fold_rev (absfree o dest_Free)
HOLogicunitT->body_type(astype_of( ):fs
        else fs
      end) (premss ~~ dummies);
    val frees = fold Term.add_frees fs [];
    val Ts  map ;
    fun name_of_fn intr = "r"end
  in
    fst(old_map (fnconcl>fn names=java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 indrule_realizer thy inductraw_induct     rss intrsdummies =
    in if T =Extraction.nullT  Extraction.ullt,names 
        let
          val Type ("fun", [U, _])  valpremss   (n(,rs)>ifmember o )rsets s
          val a :: names' = names
        in
          (fold_rev absfree ((" val    (n (,,)=java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
           Option pair(name_of_fnintr
              (AList.lookup            thy rsets  paramsruleivs intr)(~ )
            java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        
      end) concls rec_names)
  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6

fun    ( as (,(s ,mx,cs))=
  if     val =fold Term.dd_frees  [;
  then (true, (    val   mapfastype_of fs;
  else ;

fun add_dummies f [] _ fun add_dummies f [] _ thy names=
 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  | add_dummies   used thy =
      thy
      |> f (map snd dts)
      |-> (            (fun" [)=Tjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    handle BNF_FP_Util        java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
      let
        val name = Long_Name.base_name name';
        val dname =singleton (ame.ariant_list used "ummy"
      in
        thy
        | add_dummies  (map (add_dummy . name Binding.amedname)dts)(name: used)
      end;

fun mk_realizer thy vs (name, rule, rrule, rlz, rt) =
  let
   val  =map r (hmprop_ofrule)
    val xs =    ( as(,(s  ) ))=
    val vs1 =map Var( (n(a,_,_ = member( =)  )xs)
    val rlzvs =   (true (s,vs,mx) (name,[OLogic.nitT] NoSyn)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    val vs2 =       (([], NONE))
    val |add_dummies f dts   java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    val rlz' = fold_rev Logic.all rs (Thm.prop_of rrule)
  in(ame,(,
    if rt =     handle BNF_FP_Util name'=java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    Extraction.abs_corr_shyps        | add_dummies f (map (dd_dummy Binding.ame)Bindingn ))dts)( :usedjava.lang.StringIndexOutOfBoundsException: Index 103 out of bounds for length 103
      (Proof_Rewrite_Rules.un_hhf_proof rlz' (  java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
         (fold_rev Proofterm.forall_intr_proofval xs =rev (erm.dd_vars (hmprop_of rule)[];
  end;

 rename tab = map (n x > x(List.ookup   tabx));

fun add_ind_realizer rsets intrs induct raw_induct elims vs    val vs2=map (n(,_ =  (,(he o AList.ookup ( = rlzvs)ixn xsjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
  let
g_Namequalifier(hort_name_of induct;
    val inducts = java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 16
val =rev (erm. Thm.rop_of h intrs [)
    val ar = length Extraction thyrule  vs2
    val   Inductive.arams_of raw_induct;
    val arities = Inductive.arities_of raw_induct;
    valnparms=  params;
    val params' = map dest_Var params;
    val rss = Inductive.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    val rss' = map (fn (((s, rs), (_, arity)), elim) =java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
      (,(nductive.nfer_intro_vars thyelim  rs~ rs))
        (rss ~~ arities ~~  
    val prfx )=split_last(ong_Name.explode fst(drss))
    val    val inducts  Global_Theoryget_thmsthy (ong_Name.ualify "";

     = thy >
      Sign.valar=length vs + length iTs;
      Sign.add_path (Long_Name.implode prfx);
    val (y_eqs,rlz_eqs=split_list
( (n s,rs)= mk_realizes_eqn ( (ember( =  s) vsnparmsrs)rss;

    val thy1' = thy1 |>
      Sign.add_types_global
        map (n s = (Binding.ame (. s)ar,NoSyn) )|
          val rss'  map (n(( ) _ arity)) =>
    java.lang.StringIndexOutOfBoundsException: Range [24, 7) out of bounds for length 69
      SOME (dt_of_intrs thy1' vs java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 34

    (** datatype representing computational content of inductive set **)tnames=map(>space_implode ""( ^"": );

          . |
            Sign.add_path (.implode prfx;
      | add_dummies(.add_datatype [NF_LFP_Compat)
        (map (pair false) dts) []
      |>Extraction.dd_typeof_eqns_i ty_eqs
      ||> java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
    val dt_namesSign.
    val case_thms = #case_rewrites o BNF_LFP_Compat.he_info [)dt_namesjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
    val rec_thms =
      if null dt_names then []
     else #ec_rewrites (.the_info thy2 [] (hd dt_names));
    val rec_names = distinct (op =) (map (dest_Const_name o head_of o fst       dt_of_intrsthy1'vsnparms )else NONE)rss
      HOLogic.    val (,some_dt_names thy2 =
    val (constrss, _|>add_dummies(. BNF_LFP_Compat.Kill_Type_Args])
      if member (op =) rsets s then
        let
          val d:dummies dummiesjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
          val (recs1, recs2) = chopdt_names = these some_dt_names;
        in (map (    val case_thms = mapcase_thms=map(case_rewrites o BNF_LFP_Compatthy2 [);
HOLogic.est_eq o HOLogic.est_Trueprop o Thm.rop_of)recs1 r, ')
        end
      else# (NF_LFP_Compatthe_infothy2[ hd ))
thmsdummies;
    val rintrs = map      .est_eqo.dest_Trueprop  prop_of )
      (Extraction.realizes_of thy2 vs
        (if c = Extraction.nullt then c else list_combmemberop=rsetssthen
          (subtract (opval d: '  ;
            (maps snd rss ~ val (ecs1,)=  (engthrs if thentl recsrecs
    val (rlzpreds, rlzpreds') =
      rintrs |> map (fn rintr =>
let
          val Const (s, T) = head_of (HOLogic.dest_Trueprop (java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 11
          val        rss rec_thms,)
          val T'=Logic.nvarifyT_global T;
        in (((s', T'), NoSyn), (Const (s, T'), Free (      Extractionrealizes_ofthy2vs
      |> distinct (op = o apply2 (#1 o #1))
| map (pfst (pfst( Binding.name))
      |> split_list;

    val rlzparams = map (fn Var ((s, _), T)  val (lzpreds,' java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      (List.take (snd (strip_comb          val Const ( T)= (OLogicdest_Trueprop (ogic.trip_assums_conclrintr);
        (HOLogic.dest_Trueprop (Logic.strip_assums_concl (          '=Logic.nvarifyT_global T;

    ** realizability predicate **)

    val (      |  apfst (pfst (pfst .))
      Named_Targettheory_map_result Inductive.
      (Inductive.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
{quiet_mode =false verbose =false alt_name =.empty,coind =falsejava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
            ,no_ind=false skip_mono }
        rlzpreds rlzparams (map (fn (        HOLogic.est_Trueprop (.strip_assums_concl( )),nparms)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
          ((Binding.name (Long_Name.base_name (short_name_of intr)), []),
           subst_atomic rlzpreds' (Logic.unvarify_global rintr)))
             (rintrs ~~ maps snd rss)) []) ||>
      Sign.root_path;
    val thy3 = fold(** realizability predicate **)

    (** realizer for induction rule **)

          . Inductive.ransform_result
      SOME (fst (fst        {uiet_mode =,verbose =false alt_name = Binding.empty, coind = false,
 (HOLogic.est_Trueprop (hm. raw_induct)));

   fun add_ind_realizerPsthy =
      let
        val vs'= rename map(pply2 (sto fst o)
          ( subst_atomicrlzpreds'(ogicunvarify_globalrintr))
             1( ))),nparms))vs;
        val rs = indrule_realizer thy induct raw_induct rsets params'
          (vs Ps)rec_names ' dummies;
        val rlzs = map (fn (r, ind) => Extraction.realizes_of
         Thm ind) (s~ inducts)
        val usedSOME ( ( (est_Var( P)) elseNONE)
        val rnames = Name.variant_list used  (.est_conj (HOLogic.est_Trueprop (Thmconcl_ofraw_induct);
        val     add_ind_realizer  thy=
          (used @ rnames) (java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 9
        val rlzs' as (prems, _, _) :: _ = map (fn (rlz, name) =>
          let
val(,Q)=strip_one name unvarify_global )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
            val Q'=strip_all [ '
          in
            (Logic.strip_imp_prems Q', P, Logic.strip_imp_concl Q')
          end) (rlzs ~~ rnames);
        val   . (oldr1 HOLogic.k_conj map
          (fn (_, _ $ P, _ $ Q) =>         val rlzs = map (fn (r, ind) =.ealizes_of v' )r
        valrews =map  ({hm  : {thm }: )java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
        val thm = Goal.prove_global thy []
)
          (fn {context = ctxt, premsvalrnames .
          [esolve_tac [raw_inductind_info]java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
           rewrite_goals_tac ctxt rews,
           REPEAT ((   THEN_ALL_NEWEVERY'
             [K (rewrite_goals_tac ctxt rews), Object_Logic.atomize_prems_tac ctxt,
              DEPTH_SOLVE_1 o
              ' assume_tac ctxt,eresolve_tac  [],eresolve_tac ctxt impE]]])];
        val (thm', thy') = Global_Theory.store_thm (Binding.qualified_name (space_implode "_"
          (Long_Name.qualify qualifier "induct" :: vs' @ Ps @ ["          
        val thms java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 79
          (Old_Datatype_Aux.split_conj_thm thm');
        val ([thms'], thy'') = Global_Theoryvalconcl =HOLogic.k_Trueprop( HOLogic.k_conj (
[(Bindingqualified_namejava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 54
             (Long_Name.qualify qualifier "inducts val  =map mk_meta_eq @thm fst_conv}:{thm  :rec_thms)
               ["correctness"])), thms          (map attach_typeS prems)( concljava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        val realizers = inducts ~~ thms' ~~ rlzs ~~ rs;
      in
        .add_realizers_i
          (map (fn (((ind, corr[K (ewrite_goals_tac ctxt) Object_Logicatomize_prems_tac,
              mk_realizer thy'' (vs'              DEPTH_SOLVE_1 java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
            realizers @ (case realizers of
             [(ind, corr) ) r) =java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
               [mk_realizer          (ong_Namequalifyqualifier "nduct": vs'  @"correctness]),);
                  ,corr,rlz r)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
           |_=> [) '
      end;

    (** realizer for elimination rules **)

     o head_of   HOLogic.est_eq o
      HOLogic. (Long_Name.  "nducts": vs' @

    fun ["correctness) ,[]thy;
      (((((elim, elimR), intrs), case_thms),         val realizers = inducts ~~ thms' ~~ rlzs ~~ rs
      let
        val (prem :: prems) = Thm.prems_of elim;
        fun reorder1 (p, (_, intr)) =
foldfn (s ) ) = . Frees T))
            (subtract (op =) params' (Term.add_vars (Thm.prop_of intr) []))
            (strip_all p);
        fun reorder2 ((ivs, intr),             ((,)) ) =
let val fs   ( )params'(erm.dd_vars (hm. intr [)
          in fold (lambda o Var) fs                   , corrrlzr)
        val p = Logic.list_implies
          (map
        val T' = Extraction.etype_of thy (vs @ Ps) [java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        val T = if dummy then (      .est_Trueprop oThm.rop_of o  case_thms
        fun add_elim_realizer
        valr=
          if null java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 9
          else
rm.bso pair x)Ts
              (list_comb (Const           fn(,_,T= .llF (,T)
                (if dummy then
                   [Abs ("x", HOLogic.unitT, Const (\<             p)
                 else []) @
                map reorder2 (intrs ~~ (length prems - 1 downto 0)) @
                [Bound (length prems)]));
        val rlz = Extraction.realizes_of thy (vs @ Ps) r (Thm.prop_of elim);
         rlz  attach_typeS( (Logicunvarify_global rlz));
        val rews = map mk_meta_eq case_thms;
        val thm = Goal.prove_global thy []val p=Logic.ist_implies
          (strip_imp_prems')(ogicstrip_imp_conclrlz'
          (fn {context        T =Extractionetype_ofthy(  )[pjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

             eresolve_tac ctxt [elimR] 1,
             ALLGOALSasm_simp_tac (ut_simpset HOL_basic_ss ctxt))java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
             REPEAT ((resolve_tac ctxt prems java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 14
               DEPTH_SOLVE_1 o
               FIRST' [               (onst (ase_name T,
        val (thm', thy') =                    Abs (x" HOLogic.nitT, Const (\<^const_name>\<open>default\<> body_type )]
          (: vs @  @[correctness"),thm)thy
      in
        .dd_realizers_i
          [        val rlz =realizes_of thy (s @Ps) r (hm.rop_of elim)
      end

    (** add realizers to theory **)

    val thy4 = fold add_ind_realizer (subsets Ps) thy3;
    val thy5 = Extraction.add_realizers_i
     (map thy4)(ap(n((,) ) c)=
         (thm_name_of rule,             cut_tac hdprems)1,
            list_comb (c, map Var (subtract (op =)              (sm_simp_tacput_simpset HOL_basic_ssctxt),
              (maps snd rss ~~ ac ctxt prems THEN_ALL_NEW .atomize_prems_tac THEN'
    val elimps = map_filter (fn ((s, intrs), p) =>
      if member( = rsetssthen SOME(,intrs  )
        (rss' ~~ (elims ~~ #elims ind_info));
    val thy6 =
      fold (fn p as (((((elim, _), _), _), _), _) =>
        add_elim_realizer]p#java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
add_elim_realizer[ ( d (OLogic.est_TruepropThm.oncl_ofelim))]p)
      (elimps ~~ case_thms ~~ case_names ~~ dummies) thy5;

  in Sign.Extractiona

add_ind_realizers    java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  let
    val (_, {intrs, induct, raw_induct, elims (** add realizers to theory **)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    val =sort (int_ordo apply2length)
          valthy5=Extraction.dd_realizers_i
  in
fold_rev(add_ind_realizer intrsinductraw_induct)vss thy
  end

fun rlz_attrib arg = Thm.declaration_attribute (fn thm => Context.mapping
  let
    fun err () = error "ind_realizer: bad rule";
    val sets =
( .est_conj (OLogic.est_Trueprop.oncl_of thm) of
           [_] => [pred_of(ss'~ (lims ~ elims );
         | xs => map (pred_of o fst o HOLogic.dest_imp    valthy6=
handle TERM  > err )|ListEmpty=  (;
  in 
    add_ind_realizers (hd sets)
      (case arg of
        NONE => sets | SOME NONE      (limps~  ~  ~ dummies)thy5;
      | SOME (SOME sets') =  .restore_naming   end;
  end I);

val _ = Theory.setup (Attrib.setup \<^  
 (Scan.ption (can.ift (rgs.$ "rrelevant" |-
 (Scanlift (rgsc) |-
      Scan.repeat1 (Args.const {proper = true, strict = true} valvss=sort( oapply2length)
 "realizers inductive ";

end;

Messung V0.5 in Prozent
C=89 H=96 G=92

¤ Dauer der Verarbeitung: 0.12 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723