Copyright : (c) Till Mossakowski and Uni Bremen 2004
The embedding comorphism from CspCASL to ModalCASL.
It keeps the CASL part and interprets the CspCASL LTS semantics as
-- | The identity of the comorphism
data CspCASL2Modal = CspCASL2Modal deriving (Show)
instance Language CspCASL2Modal -- default definition is okay
instance Comorphism CspCASL2Modal
Basic_CSP_CASL_C_SPEC () SYMB_ITEMS SYMB_MAP_ITEMS
M_BASIC_SPEC ModalFORMULA SYMB_ITEMS SYMB_MAP_ITEMS
Symbol RawSymbol () where
sourceLogic CspCASL2Modal = CspCASL
sourceSublogic CspCASL2Modal = ()
targetLogic CspCASL2Modal = Modal
targetSublogic CspCASL2Modal = ()
map_theory CspCASL2Modal = return . simpleTheoryMapping mapSig mapSen
map_morphism CspCASL2Modal = return . mapMor
map_sentence CspCASL2Modal _ = return . mapSen
mapSig :: CSPSign -> MSign
(emptySign emptyModalSign) {sortSet = sortSet sign
, assocOps = assocOps sign
, predMap = predMap sign }
mapMor :: CSPMorphism -> ModalMor
mapMor m = Morphism {msource = mapSig $ msource m
, mtarget = mapSig $ mtarget m
-- needs to be changed once modal symbols are added
mapSen :: () -> ModalFORMULA
Quantification q vs frm ps ->
Quantification q vs (mapSen frm) ps
Conjunction (map mapSen fs) ps
Disjunction (map mapSen fs) ps
Implication f1 f2 b ps ->
Implication (mapSen f1) (mapSen f2) b ps
Equivalence (mapSen f1) (mapSen f2) ps
Negation frm ps -> Negation (mapSen frm) ps
True_atom ps -> True_atom ps
False_atom ps -> False_atom ps
Existl_equation t1 t2 ps ->
Existl_equation (mapTERM t1) (mapTERM t2) ps
Strong_equation t1 t2 ps ->
Strong_equation (mapTERM t1) (mapTERM t2) ps
Predication pn (map mapTERM as) qs
Definedness t ps -> Definedness (mapTERM t) ps
Membership t ty ps -> Membership (mapTERM t) ty ps
Sort_gen_ax constrs isFree -> Sort_gen_ax constrs isFree
mapTERM :: TERM () -> TERM M_FORMULA
Qual_var v ty ps -> Qual_var v ty ps
Application opsym as qs -> Application opsym (map mapTERM as) qs
Sorted_term trm ty ps -> Sorted_term (mapTERM trm) ty ps
Cast trm ty ps -> Cast (mapTERM trm) ty ps
Conditional t1 f t2 ps ->
Conditional (mapTERM t1) (mapSen f) (mapTERM t2) ps