Logic_ExtModal.hs revision 8b52f992f2f7a0c4fa6e3692cf868a6baadaa69b
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaModule : $Header$
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaDescription : Instance of class Logic for ExtModal
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaCopyright : DFKI GmbH 2009
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaLicense : GPLv2 or higher, see LICENSE.txt
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaMaintainer : codruta.liliana@gmail.com
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaStability : experimental
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaPortability : non-portable (imports Logic)
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen KuksaInstance of class Logic for ExtModal
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksaimport qualified Data.Map as Map
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksadata ExtModal = ExtModal deriving Show
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksainstance Language ExtModal where
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa description _ = unlines
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa [ "ExtModal is the 'extended modal logic' extension of CASL. "
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa , "Syntax for ordinary modalities, multi-modal logic, dynamic "
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa , "logic, graded modal logic, hybrid logic, CTL* and mu-calculus "
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa , "is provided. Specific modal logics can be optained via "
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa , "restrictions to sublanguages."
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksatype ExtModalSign = Sign EM_FORMULA EModalSign
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksatype ExtModalMorph = Morphism EM_FORMULA EModalSign MorphExtension
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksatype ExtModalFORMULA = FORMULA EM_FORMULA
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksainstance SignExtension EModalSign where
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa isSubSignExtension = isSubEModalSign
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksainstance Syntax ExtModal EM_BASIC_SPEC SYMB_ITEMS SYMB_MAP_ITEMS where
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa parse_basic_spec ExtModal = Just $ basicSpec ext_modal_reserved_words
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa parse_symb_items ExtModal = Just $ symbItems ext_modal_reserved_words
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa parse_symb_map_items ExtModal =
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa Just $ symbMapItems ext_modal_reserved_words
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksa-- Modal formula mapping via signature morphism
a389e88e0acb83d8489bdc5e55bc5522b152bbecEugen Kuksamap_EM_FORMULA :: MapSen EM_FORMULA EModalSign MorphExtension
if Map.member sm mds then Simple_modality (mds Map.! sm) else tm
if Map.member nom nms then Nominal (nms Map.! nom) else nm
matches ExtModal = CASL.Morphism.matches