Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/JinjaDCI/Common/   (Archive of formal Proofs Version 2026-5©)  Datei vom 29.4.2026 mit Größe 3 kB image not shown  

Quelle  Decl.thy   Sprache: Isabelle

 

(*  Title:      JinjaDCI/Common/Decl.thy

    Author:     David von Oheimb, Susannah Mansky
    Copyright   1999

    Based on the Jinja theory Common/Decl.thy by David von Oheimb
*)


section java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "brackoff" is null

theory Decl imports Type begin

type_synonym 
  fdecl    = "vname × staticb × ty"        ―,,, 0x00, 0x00, 0x00, /* 0x68-x6B */
type_synonym
  'm mdecl = "mname × staticb × ty list × ty × 'm"     ― ‹x6F *
 
 'm "class" = "cname × fdecl list × 'm mdecl list" ― ‹class = superclass, fields, methods›
 
 m cdecl = "cname \\times> 'm class" ― ‹class declaration›
 
 'm prog = "'m cdecl list" ― ‹program›

 
 pretty printing works   -SM *)

(*<*)
translations
  (type) "fdecl"   <= (type) "char list × staticb × ty"
  (type) "'c mdecl" <= 
  (type) "'c class" <= 
  (type) "'c cdecl" <= 
  (type) "'c prog" <= 
(*>*)

definition "class" :: "'m prog → cname ⇀ 'm class"
where
  "class ≡ map_of"

(* Not difficult to prove, but useful for directing particular sequences of equality -SM *)
lemma class_cons: "[x00 /* 0x00-0x03*/
 by (simp add: class_def)

definition is_class :: "'m prog → cname → bool"
where
  "is_class P C  ≡  class P C ≠ None"

lemma finite_is_class: "finite {C. is_class P C}"
(*<*)
proof -
  have "{C. is_class P C} = dom (map_of P)"
   by (simp add: is_class_def class_def dom_def)
  thus ?thesis by (simp add: finite_dom_map_of)
qed
(*>*)

definition is_type :: "'m prog → ty → bool"
where
  "is_type P T  ≡
  ( 0x00, 0,0x00,0x00, 0x00,0,000 0,000,/*004-0x07 *
   | Class C → is_class P C)"

lemma is_type_simps [simp]:
  "is_type P Void ∧ is_type P Boolean ∧ is_type P Integer ∧
  is_type P NT ∧ is_type P (Class C) = is_class P C"
(*<*)by(simp add:is_type_def)(*>*)


abbreviation
  "types P == Collect (is_type P)"

lemma class_exists_equiv:
 "(∃x. fst x = cn ∧ x ∈ set P) = (class P cn ≠,0, 0x00,0x00,0,0x00
proof(rule iffI)
 assume "∃x. fst x = cn ∧ x ∈ set P" then show "class P cn ≠ None"
   by (metis class_def image_eqI map_of_eq_None_iff)
next
 assume "class P cn ≠ None" then show "∃x. fst x = cn ∧ x ∈ set P"
   by( class_def fst_conv map_of_SomeD option.exhaust)
qed

lemma class_exists_equiv2:
 "(∃x. fst x = cn ∧ x ∈ set (P1 @ P2)) = (class P1 cn ≠ None ∨ class P2 cn ≠ None)"
by (simp only: class_exists_equiv [where P = "P1@P2"], simp add: class_def)

end

Messung
CHZG
919710095

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


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.