Morphism.hs revision 8dd62da91d8ac7cfa80cfaff34dc87bb4c2c855b
{- |
Module : $Header$
Description : RDF Morphism
Copyright : (c) Francisc-Nicolae Bungiu, 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : f.bungiu@jacobs-university.de
Stability : provisional
Portability : portable
Morphisms for RDF
-}
module RDF.Morphism where
import RDF.Sign
import RDF.Function
import qualified Data.Map as Map
data RDFMorphism = RDFMorphism
{ osource :: Sign
, otarget :: Sign
, mmaps :: MorphMap
, pmap :: StringMap
} deriving (Show, Eq, Ord)
inclRDFMorphism :: Sign -> Sign -> RDFMorphism
inclRDFMorphism s t = RDFMorphism
{ osource = s
, otarget = t
, pmap = Map.empty
, mmaps = Map.empty }
isRDFInclusion :: RDFMorphism -> Bool
isRDFInclusion m = Map.null (pmap m)
&& Map.null (mmaps m) && isSubSign (osource m) (otarget m)
legalMor = undefined
composeMor = undefined
mapSen = undefined
symOf = undefined
symMapOf = undefined