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

Quelle  PromelaLTLConv.thy

  Sprache: Isabelle
 

theory PromelaLTLConv
imports 
  Promela
  LTL.LTL
begin
subsection Proposition types and conversion

text LTL formulae and propositions are also generated by an SML parser.
  we have the same setup as for Promela itself: Mirror the data structures and
 sometimes) map them to new ones.


text This theory is intended purely to be used by frontend code to convert
  propc to expr. The other theories work on @{typ expr} directly.

  we could of course convert directly, that would introduce yet a semantic level.


datatype binOp = Eq | Le | LEq | Gr | GEq

datatype ident = Ident "String.literal" "integer option"

datatype propc = CProp ident
               | BProp binOp ident ident
               | BExpProp binOp ident integer

fun identConv :: "ident ==> varRef" where
  "identConv (Ident name None) = VarRef True name None"
"identConv (Ident name (Some i)) = VarRef True name (Some (ExprConst i))"

definition ident2expr :: "ident ==> expr" where
  "ident2expr = ExprVarRef identConv"

primrec binOpConv :: "binOp ==> PromelaDatastructures.binOp" where
  "binOpConv Eq = BinOpEq"
"binOpConv Le = BinOpLe"
"binOpConv LEq = BinOpLEq"
"binOpConv Gr = BinOpGr"
"binOpConv GEq = BinOpGEq"

primrec propc2expr :: "propc ==> expr" where
  "propc2expr (CProp ident) =
     ExprBinOp BinOpEq (ident2expr ident) (ExprConst 1)"
"propc2expr (BProp bop il ir) =
     ExprBinOp (binOpConv bop) (ident2expr il) (ident2expr ir)"
"propc2expr (BExpProp bop il ir) =
     ExprBinOp (binOpConv bop) (ident2expr il) (ExprConst ir)"

definition ltl_conv :: "propc ltlc ==> expr ltlc" where
  "ltl_conv = map_ltlc propc2expr"

definition printPropc 
  :: "(integer ==> char list) ==> propc ==> char list"
where
  "printPropc f p = printExpr f (propc2expr p)" 

text The semantics of a @{typ propc} is given just for reference.
definition evalPropc :: "gState ==> propc ==> bool" where
  "evalPropc g p exprArith g emptyProc (propc2expr p) 0"

end

Messung V0.5 in Prozent
C=84 H=100 G=92

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






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.