CommonLogic2CommonLogic.hs revision b3138d7e20d2d6dd26a325b844a8b21b0ecbb602
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederModule : $Header$
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederDescription : Comorphism from CommonLogic to CommonLogic
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederCopyright : (c) Eugen Kuksa, Uni Bremen 2011
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederLicense : GPLv2 or higher, see LICENSE.txt
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederMaintainer : eugenk@informatik.uni-bremen.de
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederStability : experimental (not complete: typleclass-instances missing)
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederPortability : non-portable (via Logic.Logic)
707a4b48578109589b887a7a1ae0bf079d2ce684Christian MaederTranslating comorphism from CommonLogic to CommonLogic in order to eliminate
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maedermodule Comorphisms.CommonLogic2CommonLogic (
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder CommonLogic2CommonLogic (..)
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder , eliminateModules
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maederimport qualified Data.Set as Set
4cc271fa22221d0d20cf303553f86c4e3b1a56e4Christian Maederimport qualified Common.AS_Annotation as AS_Anno
4cc271fa22221d0d20cf303553f86c4e3b1a56e4Christian Maeder-- Common Logic
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maederimport qualified CommonLogic.Logic_CommonLogic as Logic
4cc271fa22221d0d20cf303553f86c4e3b1a56e4Christian Maederimport qualified CommonLogic.Sign as Sign
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maederimport qualified CommonLogic.Symbol as Symbol
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maederimport qualified CommonLogic.Morphism as Mor
bb5022629cd054caa569bf15e366a9977ab011ceChristian Maederimport qualified CommonLogic.Sublogic as Sl
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maederdata CommonLogic2CommonLogic = CommonLogic2CommonLogic deriving Show
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maederinstance Language CommonLogic2CommonLogic where
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder language_name CommonLogic2CommonLogic = "CommonLogic2CommonLogic"
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maederinstance Comorphism
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder CommonLogic2CommonLogic -- comorphism
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Sl.CommonLogicSL -- sublogics codomain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder BASIC_SPEC -- Basic spec domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder TEXT_MRS -- sentence domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder SYMB_ITEMS -- symb_items
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder SYMB_MAP_ITEMS -- symbol map items domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Sign.Sign -- signature domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Mor.Morphism -- morphism domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Symbol.Symbol -- symbol domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Symbol.Symbol -- rawsymbol domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder ProofTree -- proof tree codomain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Sl.CommonLogicSL -- sublogics codomain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder BASIC_SPEC -- Basic spec domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder TEXT_MRS -- sentence domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder SYMB_ITEMS -- symb_items
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder SYMB_MAP_ITEMS -- symbol map items domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Sign.Sign -- signature domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Mor.Morphism -- morphism domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Symbol.Symbol -- symbol domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder Symbol.Symbol -- rawsymbol domain
707a4b48578109589b887a7a1ae0bf079d2ce684Christian Maeder ProofTree -- proof tree codomain
sourceLogic CommonLogic2CommonLogic = Logic.CommonLogic
sourceSublogic CommonLogic2CommonLogic = Sl.top
targetLogic CommonLogic2CommonLogic = Logic.CommonLogic
mapSentence :: Sign.Sign -> TEXT_MRS -> Result TEXT_MRS
map ((uncurry AS_Anno.makeNamed) . elimModSnd . senAndName) srcTexts)
where senAndName :: AS_Anno.Named TEXT_MRS -> (String, TEXT_MRS)
: (map (ex_conj_indvC newName (n:modules)) $ Set.elems $ indvC_text t)
: (map (ex_conj_indvC newName (n:modules)) $ Set.elems $ indvC_text t)