ModalCaslToMu.hs revision f1edf379717f0ddb7607585a027cf6f03a6fce68
1010N/A{- |
1879N/AModule : $Header$
2327N/ACopyright : (c) Klaus Hartke, Uni Bremen 2008
1010N/ALicense : GPLv2 or higher, see LICENSE.txt
1010N/A
1010N/AMaintainer : Christian.Maeder@dfki.de
1010N/AStability : experimental
1010N/APortability : portable
1010N/A
1010N/A-}
1010N/A
1010N/Amodule ModalCaslToMu where
1010N/A
1010N/Aimport Control.Monad as Monad
1010N/Aimport Data.Maybe as Maybe
1010N/A
1010N/Aimport ModalCasl as Casl
1010N/Aimport Mu as Mu
1010N/A
1472N/A
1472N/A
1472N/A{------------------------------------------------------------------------------}
1010N/A{- -}
1010N/A{- Convert Modal CASL formulas to formulas of the �-Calculus -}
1010N/A{- -}
1879N/A{------------------------------------------------------------------------------}
1879N/A
1879N/Aconvert :: Casl.StateFormula a -> Maybe (Mu.StateFormula a)
1010N/A
1010N/Aconvert (Casl.Var x) = Just (Mu.Var x)
1010N/A
1010N/Aconvert (Casl.Snot phi) = liftM Mu.Snot (convert phi)
1010N/Aconvert (Casl.Sand phi psi) = liftM2 Mu.Sand (convert phi) (convert psi)
1010N/Aconvert (Casl.Sor phi psi) = liftM2 Mu.Sor (convert phi) (convert psi)
1010N/A
1010N/Aconvert (Casl.E phi) = liftM Mu.E (convert' phi)
1010N/Aconvert (Casl.A phi) = liftM Mu.A (convert' phi)
1010N/A
1010N/Aconvert (Casl.Diamond phi) = liftM Mu.Diamond (convert phi)
1010N/Aconvert (Casl.Box phi) = liftM Mu.Box (convert phi)
1010N/A
1010N/Aconvert (Casl.DiamondPast phi) = liftM Mu.DiamondPast (convert phi)
1010N/Aconvert (Casl.BoxPast phi) = liftM Mu.BoxPast (convert phi)
1010N/A
1010N/Aconvert (Casl.Mu x phi) = liftM (Mu.Mu x) (convert phi)
1010N/Aconvert (Casl.Nu x phi) = liftM (Mu.Nu x) (convert phi)
1010N/A
1010N/A
1010N/Aconvert' :: Casl.PathFormula a -> Maybe (Mu.PathFormula a)
1010N/A
1010N/Aconvert' (Casl.State phi) = liftM Mu.SF (convert phi)
1010N/A
1010N/Aconvert' (Casl.Pnot phi) = liftM Mu.Pnot (convert' phi)
1010N/Aconvert' (Casl.Pand phi psi) = liftM2 Mu.Pand (convert' phi) (convert' psi)
1010N/Aconvert' (Casl.Por phi psi) = liftM2 Mu.Por (convert' phi) (convert' psi)
1010N/A
1010N/Aconvert' (Casl.X phi) = liftM Mu.X (convert' phi)
1010N/A
1010N/Aconvert' _ = Nothing
1010N/A
1010N/A
1010N/A{------------------------------------------------------------------------------}
1010N/A