Comorphisms.hs revision 3b48e17c1da54ee669e70b626d9fbc32ce495b2c
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerModule : $Header$
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel CalegariDescription : generic CspCASL instance for comorphisms
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel CalegariCopyright : (c) Liam O'Reilly, Swansea University 2009
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian MaederLicense : GPLv2 or higher, see LICENSE.txt
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian MaederMaintainer : csliam@swansea.ac.uk
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian MaederStability : experimental
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian MaederPortability : non-portable(import Logic.Logic)
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel Calegariimport CspCASL.AS_CspCASL (CspBasicSpec (..))
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegariimport qualified Data.Set as Set
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari-- | The identity of the comorphism
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegaridata CspCASL2CspCASL a b = CspCASL2CspCASL a b deriving Show
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian MaedercspCASLTrace :: CspCASL2CspCASL () Trace
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel CalegaricspCASLTrace = CspCASL2CspCASL () Trace
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel CalegaricspCASLFailure :: CspCASL2CspCASL () Failure
1a38107941725211e7c3f051f7a8f5e12199f03acmaedercspCASLFailure = CspCASL2CspCASL () Failure
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegariinstance (Show a, Show b) => Language (CspCASL2CspCASL a b) where
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari language_name (CspCASL2CspCASL a b) =
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari language_name (GenCspCASL a)
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari ++ "2" ++ language_name (GenCspCASL b)
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel Calegariinstance (CspCASLSemantics a, CspCASLSemantics b)
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel Calegari => Comorphism (CspCASL2CspCASL a b)
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder (GenCspCASL a) ()
ab8506c5100f101785452b5047259ec4f17ef436Daniel Calegari CspBasicSpec CspCASLSen SymbItems SymbMapItems
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari CspCASLSign CspCASLMorphism CspSymbol CspRawSymbol ()
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari (GenCspCASL b) ()
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari CspBasicSpec CspCASLSen SymbItems SymbMapItems
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari CspCASLSign CspCASLMorphism CspSymbol CspRawSymbol () where
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder sourceLogic (CspCASL2CspCASL a _) = GenCspCASL a
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder sourceSublogic _ = ()
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder targetLogic (CspCASL2CspCASL _ b) = GenCspCASL b
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel Calegari mapSublogic _ _ = Just ()
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder map_theory _ = return
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel Calegari map_morphism _ = return
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari map_sentence _ = const return
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari map_symbol _ _ = Set.singleton
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari is_model_transportable _ = True
acc049a844d19fb294ce7f68742390dee87447dcDaniel Calegari has_model_expansion _ = True
7c808aadfb7293563388dbe16d84cf3384bb5d3cDaniel Calegari is_weakly_amalgamable _ = True
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder isInclusionComorphism _ = True