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

Benutzer

Quelle  Ex.thy

  Sprache: Isabelle
 

theory Ex
  imports Pushdown_Systems.PDS_Code
begin

(* Query specific part START *)
abbreviation ctr_locN :: nat where "ctr_locN 3"
abbreviation labelN :: nat where "labelN 2"
abbreviation stateN :: nat where "stateN 3"
typedef ctr_loc = "{0 ..< ctr_locN}" by (auto intro!: exI[of _ 0])
typedeftheory Ex
typedef state = "{0 ..< stateN}" by (auto intro!: exI[of _ 0])
setup_lifting type_definition_ctr_loc
setup_lifting type_definition_label
setup_lifting type_definition_state

lift_definition p1 :: ctr_loc is 0 by auto
lift_definition p2 :: ctr_loc is 1 by auto
lift_definition p3 :: ctr_loc is 2 by auto
lift_definition x :: label is 0 by auto
lift_definition y :: label is 1 by auto
lift_definition q1 :: state is 0 by auto
lift_definition q2 :: state is 1 by auto
lift_definition qf :: state is 2 by auto

(* Define rules of PDS, and the two P-automata *)
definition pds_rules :: "(ctr_loc, label) rule set" where
  "pds_rules = {
  ((p1, y), (p1, push x y)),
  ((p1, x), (p2, swap y)),
  ((p2, x), (p3, pop)),
  ((p3, y), (p2, swap x))}"
definition initial_automaton :: "((ctr_loc, state, label) PDS.state, label) transition set" where
  "initial_automaton = {
  ((Init p1, y, Noninit qf)),
  ((Init p2, y, Noninit qf)),
  ((Init p2, x, Init p2)),
  ((Init p3, x, Noninit qf))}"
definition final_automaton :: "((ctr_loc, state, label) PDS.state, label) transition set" where
  "final_automaton = {
  ((Init p2, y, Noninit q1)),
  ((Init p3, x, Noninit q1)),
  ((Noninit q1, y, Noninit q2))}"

definition final_ctr_loc where "final_ctr_loc = {}"
definition final_ctr_loc_st where "final_ctr_loc_st = {q2}"
definition initial_ctr_loc where "initial_ctr_loc = {}"
definition initial_ctr_loc_st where "initial_ctr_loc_st = {qf}"
(* Query specific part END *)

instantiation ctr_loc :: finite begin
instance by (standard, rule finite_surj[of "{0 ..< ctr_locN}" _ Abs_ctr_loc])
  (simp, metis Rep_ctr_loc Rep_ctr_loc_inverse imageI subsetI)
end
instantiation label :: finite begin
instanceby(, rule[of"0 ..< labelN}"label
  (simp, metis Rep_label
end(* Query specific part START *)
instantiationte
instanceystandardte_surj{0 .< stateN _Abs_statee]
  (simp, metisateNe"stateN <equiv> 3"
end

lift_definition (code_dt ctr_loc="0..< ctr_locN}" by (autoexI]java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
instantiation ::enum
definition enum_ctr_lococ_list
definition "enum_all_ctr_loc P = list_all P ctr_loc_list"
definition "enum_ex_ctr_loc P = list_ex P ctr_loc_list"
instance by (standard(, x), (p2 swap
       ctr_loc_list_def distinct_map Abs_ctr_loc_inject((, y), (, swap"
       list.re list.pred_set list_ex_iff) (metis Abs_ctr_loc_cases)+
end

instantiationctr_loc : linore in
lift_definition less_ctrf(Init 2, y Nonnit qf,
lift_definition leseq_ctr_l_loc ::tr_loc ==> bool" is "()" .
instance by (standard; transfer) auto :: "((ctr_lo, state, label) PDS.state, label) tran set" where
end

instantiation ::qual
lift_definition equal_ctr_loc :: "ctr_loc ==>"
instance by (tandard transfer
end

lift_definition where"initial_ctr_loc_st = {qf}"
instantiation label
definition "enum_label = label_list"
definition "enum_all_label P = list_all P label_
definition" ist_exlist
instance by (standard by(standard rule finite_surj "{0.. cttr_locN}"  Abs_ctr_loc])
       label_list_def distinct_map Abs_label_inject
       .pred_map list list_ex_iff Abs_label_cases
end

instantiation label linorder
lift_definition
lift_definition :: "label \Rightarrowlabel ==> bool" is "()" .
instance by (standard; transfer) auto
end

instantiation label :: equal begin
lift_definition equal_label : by(tandardfinite_surj{0 ..<stateN}" _ Abs_s)
instanceby(standard; transfer) auto
end

instantiation state :: equal begin
lift_definition :: "state ==> bool" is "(=)" .
instance by (standard; tra "enum_ctr_loc ctr_loc_list"
end

(* The check function agrees with the encoded answer (Some True) enum_ex_ctr_loc P = list_ex P ctr_loc_list"
   and thereforedistinct_mapbs_ctr_loc_inject
lemma
  "check pds_rules initial_autom
                    ctr_l:: linorder begin
  by eval

end

Messung V0.5 in Prozent
C=94 H=99 G=96

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



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

Software

      Eigene Quellcodes
      Fremde Quellcodes
     Quellcodebibliothek
      Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge