ProfilesAndSublogics.hs revision ee87c7423bf599b4f29e9b31945e00482a8b31ca
e290f7ecab535681eaf02b2d04c74aa3aa751f34Christian Maeder{- |
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian MaederModule : $Header$
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerCopyright : (c) Felix Gabriel Mance
e6d40133bc9f858308654afb1262b8b483ec5922Till MossakowskiLicense : GPLv2 or higher, see LICENSE.txt
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian Maeder
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu ProdescuMaintainer : f.mance@jacobs-university.de
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian MaederStability : provisional
3f69b6948966979163bdfe8331c38833d5d90ecdChristian MaederPortability : portable
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian Maeder
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian MaederContains : OWL2 Profiles (EL, QL and RL) + OWL2 DL
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian Maeder
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian MaederReferences : <http://www.w3.org/TR/owl2-profiles/>
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian Maeder-}
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian Maeder
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maedermodule OWL2.ProfilesAndSublogics
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder ( ProfSub (..)
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian Maeder , Profiles (..)
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder , topS
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder , bottomS
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder , maxS
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder , nameS
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder , psAxiom
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder , profilesAndSublogic
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder , sSig
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder , sMorph
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder , prODoc
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maeder , prSig
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maeder , prMorph
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maeder ) where
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maeder
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maederimport OWL2.MS
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maederimport OWL2.Profiles
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maederimport OWL2.Sublogic
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maederimport OWL2.Sign
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maederimport OWL2.Morphism
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maederdata ProfSub = ProfSub {
c1e44804ab02be8fa720960cfd1f2355dd8c0bbeChristian Maeder profiles :: Profiles,
5deaf862dcd5d24363857e4e995761769336eb20Christian Maeder sublogic :: OWLSub
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder } deriving (Show, Eq, Ord)
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaederbottomS :: ProfSub
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaederbottomS = ProfSub topProfile sl_bottom
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder
c1e44804ab02be8fa720960cfd1f2355dd8c0bbeChristian MaedertopS :: ProfSub
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian MaedertopS = ProfSub bottomProfile sl_top
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder
e290f7ecab535681eaf02b2d04c74aa3aa751f34Christian MaedermaxS :: ProfSub -> ProfSub -> ProfSub
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian MaedermaxS ps1 ps2 = ProfSub (andProfileList [profiles ps1, profiles ps2])
e290f7ecab535681eaf02b2d04c74aa3aa751f34Christian Maeder (sl_max (sublogic ps1) (sublogic ps2))
c1e44804ab02be8fa720960cfd1f2355dd8c0bbeChristian Maeder
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaedernameS :: ProfSub -> String
c1e44804ab02be8fa720960cfd1f2355dd8c0bbeChristian MaedernameS ps = printProfile (profiles ps) ++ "-" ++ sl_name (sublogic ps)
c1e44804ab02be8fa720960cfd1f2355dd8c0bbeChristian Maeder
c1e44804ab02be8fa720960cfd1f2355dd8c0bbeChristian MaederpsAxiom :: Axiom -> ProfSub
fb7cd7c1f35a3fb4107a2b5cac3935bf5f6e4021Christian MaederpsAxiom ax = ProfSub (axiom ax) (slAxiom ax)
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian MaedersSig :: Sign -> ProfSub
5deaf862dcd5d24363857e4e995761769336eb20Christian MaedersSig s = bottomS {sublogic = sl_sig s}
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaedersMorph :: OWLMorphism -> ProfSub
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaedersMorph m = bottomS {sublogic = sl_mor m}
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaederprSig :: ProfSub -> Sign -> Sign
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaederprSig s = pr_sig (sublogic s)
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaederprMorph :: ProfSub -> OWLMorphism -> OWLMorphism
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian MaederprMorph s a = a
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder { osource = prSig s $ osource a
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian Maeder , otarget = prSig s $ otarget a }
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian MaederprODoc :: ProfSub -> OntologyDocument -> OntologyDocument
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaederprODoc ps = pr_o_doc (sublogic ps)
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder
299d318e09678939e9ffc6156d59660d07c5d31aChristian MaederprofilesAndSublogic :: OntologyDocument -> ProfSub
d1ce4a1e715ea544dce5257ca225a14d509ea3f1Christian MaederprofilesAndSublogic odoc = ProfSub (ontologyProfiles odoc) (sl_o_doc odoc)
299d318e09678939e9ffc6156d59660d07c5d31aChristian Maeder