ModalCaslToMu.hs revision b87efd3db0d2dc41615ea28669faf80fc1b48d56
{- |
Module : $EmptyHeader$
Description : <optional short description entry>
Copyright : (c) <Authors or Affiliations>
License : GPLv2 or higher
Maintainer : <email>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>)
<optional description>
-}
{-# OPTIONS -fglasgow-exts #-}
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
{------------------------------------------------------------------------------}