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

Quelle  CFG.thy   Sprache: Isabelle

 

theory CFG
  imports Main
begin

section ‹Adjusted content from AFP/LocalLexing›

type_synonym 'a rule = "'a × 'a list"

type_synonym 'a rules = "'a rule list"

datatype 'a cfg = CFG (R : "'a rules") (S : "'a")

definition nonterminals :: "'a cfg → 'a set" where
  "nonterminals G = set (map fst (R G)) ∪ {S G}"

definition is_word :: "'a cfg → 'a list → bool" where
  "is_word G ψ = (nonterminals G ∩ set ψ = {})"

definition derives1 :: "'a cfg → 'a list → 'a list → bool" where
  "derives1 G u v ≡ ∃ x y A α.
    u = x @ [A] @ y ∧
    v = x @ α @ y ∧
    (A, α) ∈ set (R G)"  

definition derivations1 :: "'a cfg → ('a list × 'a list) set" where
  "derivations1 G ≡ { (u,v) | u v. derives1 G u v }"

definition derivations :: "'a cfg → ('a list × 'a list) set" where 
  "derivations G ≡ (derivations1 G)^*"

definition derives :: "'a cfg → 'a list → 'a list → bool" where
  "derives G u v ≡ ((u, v) ∈ derivations G)"

syntax
  "derives1" :: "'a cfg → 'a list → 'a list → bool" (‹_ ⊨ _ → _› [1000,0,0] 1000)

syntax
  "derives" :: "'a cfg → 'a list → 'a list → bool" (‹_ ⊨ _ →* _› [1000,0,0] 1000)

notation (latex output)
  derives1 (‹_ ⊨ _ → _› [1000,0,0] 1000)

notation (latex output)
  derives (‹_ ⊨ _ 🚫‹\ensuremath{\Rightarrow^{\ast}}› _› [1000,0,0] 1000)

end

Messung V0.5 in Prozent
C=87 H=71 G=79

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-09-29) ¤

*© 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.