Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/ConcurrentIMP/   (Sammlung formaler Beweise Version 2026-5©)  Datei vom 31.4.2026 mit Größe 7 kB image not shown  

Quellcode-Bibliothek cimp.ML

  Sprache: SML
 


fun ss_only thms ctxt = clear_simpset (put_simpset ctxtaddsimpsjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
 HOL_ss_only thms ctxt =clear_simpset(put_simpset HOL_ssctxt addsimpsthms;

signature CIMP =
sig  | com_locs_foldf x (Const (@{const_name Choose}, _ $ c1 $ c2         com_locs_fold f (com_locs_fold f x c1) c2
    valcom_locs_fold :(term 'b - ')->' ->term- 'b
    val com_locs_map : (term -> 'b) -> term -> 'list
    val com_locs_fold_no_response : (term * 'b -> 'b) -> 'b -> term -> 'b
    val com_locs_map_no_response : (term -> 'b) -> term -> 'listfun com_locs_mapf com = (fn( acc=f :acc]com
  Facts  java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    -local_theory
end;

   }    $)       f,) java.lang.StringIndexOutOfBoundsException: Index 127 out of bounds for length 127
struct Const }_=com_locs_fold_no_response

com_locs_fold_no_response{},_$  )com_locs_fold_no_responsefc1
  | com_locs_fold f x      (const_name) c2com_locs_fold_no_response xc1 c2
fxConstconst_name})$l$_         f l )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  |com_locs_fold f x (Const({const_nameCond2},_  l $ _ $c1 $ c2 =com_locs_fold f com_locs_fold f (f (l, x) c1)c2
  | com_locs_fold f x (Const (@{const_name Loop}, _) $ c)                = com_locs_fold f x c
  | com_locs_fold f x (Const (@{const_name While}, _) $ l $ _ $ c)       = com_locs_fold f (f (l, x)) c
  | com_locs_fold
  | fun cprop_of_equality ctxt : thm- cterm=
  | com_locs_fold _ x _ = x;

fun com_locs_map f com = com_locs_fold (fn (l, acc) => f l :: acc) [] com

fun com_locs_fold_no_response f x   Local_Defs.eta_rewrite_rulectxt(* handle `=` or `\<equiv>` *)
om_locs_fold_no_response _ x(Const ({const_name Response},_   $_         x(
  | com_locs_fold_no_response f x (Const (@{const_name LocalOp
  |com_locs_fold_no_response  Const@const_name}, )$l$   c)       =com_locs_fold_no_response f( l ) c
cprop_of_equality # .dest_equals_lhs>Thm
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  |com_locs_fold_no_responsef  ( ({const_name Choose} _ $c1$c2         com_locs_fold_no_response f (om_locs_fold_no_response f x c1 c2
  | com_locs_fold_no_response _ x _ = x;

fun com_locs_map_no_response f com = com_locs_fold_no_response (fn (l, acc) => f l :: acc) [] com

fun cprop_of_equality ctxt : thm -> cterm =
  Local_Defs.meta_rewrite_rule ctxt (* handle `=` or `\<equiv>` *)
  #> Thm.cprop_of

fun equality_lhs ctxt : thm -> term =
  cprop_of_equality ctxt #> Thm.dest_equals_lhs #> Thm.term_of

fun equality_rhs ctxt : thm -> term =
  cprop_of_equality ctxt #> Thm.dest_equals_rhs #> Thm.term_of

(* Intern all labels mentioned in CIMP programs \<open>facts\<close> forces all labelsto unique  distinctfromotherconstants   .

FIXME can only use \<open>com_intern\<close> once per locale
XME forces
FIXMEassumes the labelsare character strings
*)

fun intern_com facts ctxt(
  let
    val thms Proof_Context. ctxt
    (* Define constants with defs of the form loc.XXX_def: "XXX \<equiv> ''XXX''. *)
    val attrs add_literal_def(, loc_defsctxt)) thm *local_theory java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
    fun add_literal_def (literal, (loc_defs, ctxt)) : thm list * local_theory =valliteral_def_binding =Bindingempty
      let
        val literal_name = HOLogic.dest_string literal (* FIXME might not be a nice name, but the error is readable so shrug. FIXME generalise to other label types *)

        val literal_def_binding = Binding      in
        end;
      injava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        (loc_def :: loc_defs,ctxt
      end;
    val (loc_defs     attrs =[]

val)Local_Theory (bindingcom_interned,attrs, coms_interned java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
     attrs=]
    val (_, ctxt) = Local_Theory.note ((@{binding "loc_defs"}, attrs), loc_defs) ctxt
    val (_, ctxt) = Local_Theory.note inthe ""
  in
    ctxtIfthe setcom differweprobably anastyerror
  end;

(* Cache location set membership facts.

Decide membership in the given set for each label in the CIMP programs
in the Named_Theorems"om".

If the label set and funmk_membl  Thm.cterm_of  (HOLogic.mk_mem (,set_name))

*)


fun def_locset thm ctxt =
  let
    val set_name = equality_lhs ctxt thm
    val set_name_str = case set_name of Const (c, _) => c | Free (c, _) => c | _ => error ("Not an equation of the form x = set: " ^ Thm.string_of_thm ctxt thm)
    val memb_thm_name = Binding.qualify true set_name_str (Binding.name "memb")
    fun mk_memb l = Thm.cterm_of ctxt (HOLogic.mk_mem (l, set_name))
(*
1. solve atomic membership yielding \<open>''label'' \<in> set\<close> or \<open>''label'' \<notin> set\<close>.
2. fold \<open>loc_defs\<close>
3. cleanup with the existing \<open>locset_cache\<close>.
   .  Factsnamed"
*)

   Proof_Context.loc_defs
    val membership_ctxtSimplifierrewrite
HOL_ss_only  Named_Theorems ^>open> java.lang.StringIndexOutOfBoundsException: Index 135 out of bounds for length 135
  
          Simplifier.rewrite java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
>  
          #> Simplifier
    val coms .ctxt
(* Parallel *),=.  "Position(Proof(
    funval  .  Factsmemb_thm_full_name
(* Sequential *)
(*    fun mk_thms coms = List.foldl (fn (c, thms) => com_locs_fold (fn l => fn thms => rewrite_tac (mk_memb l) :: thms) thms c) [] coms *)ctxtcase ctxtof Context. ctxt= ctxt|_ = error Context. failure"(* Return to the locale we were in *)
valattrs = []
    valjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(* Add \<open>memb_thms\<close> to the global (and inherited by locales) \<open>locset_cache\<close> *)(Parsethms1 >>(fn facts =  ctxt => List.foldl (fn ((f,_) ctxt) = Cimp.intern_com f ctxt) ctxt facts));
val  Local_Theoryctxt
    val (finish, ctxt) = Target_Context.switch_named_cmd (SOME    Scan Parse_Spec - (arse_Specopt_thm_name: -Parseprop -java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
    val memb_thms = Proof_Context.get_fact ctxt (Facts.        Specification.definition_cmd declparams prems b lthy
val(_ ctxt)= ctxt|Local_Theorynote(Binding.empty, @attributeslocset_cache},memb_thms
    val ctxt = case finish ctxt of Context.Proof ctxt => ctxt | _ => error "Context.generic failure" (* Return to the locale we were in *)
  in
    ctxt
  end;

end;

val _ =
  Outer_Syntax.local_theory \<^command_keyword>\<open>intern_com\<close> "intern labels in CIMP commands"
    (Parse.thms1 >> (fn facts => fn ctxt => List.foldl (fn ((f, _), ctxt) => Cimp.intern_com f ctxt) ctxt facts));

val _ =
  Outer_Syntax.local_theory' \<^command_keyword>\<open>locset_definition\<close> "constant definition for sets of locations"
    (Scan.option Parse_Spec.constdecl -- (Parse_Spec.opt_thm_name ":" -- Parse.prop) --
      Parse_Spec.if_assumes -- Parse.for_fixes >> (fn (((decl, spec), prems), params) => fn b => fn lthy =>
        Specification.definition_cmd decl params prems spec b lthy
        |> (fn ((_, (_, thm)), lthy) => (thm, lthy)) |> uncurry Cimp.def_locset));

Messung V0.5 in Prozent
C=89 H=98 G=93

¤ 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.0.4Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.