ModalCaslToMu.hs revision 98890889ffb2e8f6f722b00e265a211f13b5a861
{-# OPTIONS -fglasgow-exts #-}
{- |
Module : $EmptyHeader$
Description : <optional short description entry>
Copyright : (c) <Authors or Affiliations>
License : GPLv2 or higher, see LICENSE.txt
Maintainer : <email>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>)
<optional description>
-}
module ModalCaslToMu where
import Control.Monad as Monad
import Data.Maybe as Maybe
import ModalCasl as Casl
import Mu as Mu
{------------------------------------------------------------------------------}
{- -}
{- Convert Modal CASL formulas to formulas of the �-Calculus -}
{- -}
{------------------------------------------------------------------------------}
convert :: Casl.StateFormula a -> Maybe (Mu.StateFormula a)
convert (Casl.Diamond phi) = liftM Mu.Diamond (convert phi)
convert (Casl.DiamondPast phi) = liftM Mu.DiamondPast (convert phi)
convert (Casl.BoxPast phi) = liftM Mu.BoxPast (convert phi)
convert' :: Casl.PathFormula a -> Maybe (Mu.PathFormula a)
convert' (Casl.State phi) = liftM Mu.SF (convert phi)
convert' _ = Nothing
{------------------------------------------------------------------------------}