Eine aufbereitete Darstellung der Quelle

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

Benutzer

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=88 H=88 G=87

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-09-28) ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126438
#Domains=1867298