Copyright | (c) Dominik Luecke Felix Gabriel Mance |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | f.mance@jacobs-university.de |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Complexity analysis of OWL2
Synopsis
- data NumberRestrictions
- = None
- | Unqualified
- | Qualified
- owlDatatypes :: Set Datatype
- data OWLSub = OWLSub {
- numberRestrictions :: NumberRestrictions
- nominals :: Bool
- inverseRoles :: Bool
- roleTransitivity :: Bool
- roleHierarchy :: Bool
- complexRoleInclusions :: Bool
- addFeatures :: Bool
- datatype :: Set Datatype
- rules :: Bool
- unrestrictedDL :: Bool
- allSublogics :: [[OWLSub]]
- slTop :: OWLSub
- slBottom :: OWLSub
- slDL :: OWLSub
- slMax :: OWLSub -> OWLSub -> OWLSub
- slMaxs :: Foldable t => t OWLSub -> OWLSub
- slName :: OWLSub -> String
- requireQualNumberRestrictions :: OWLSub -> OWLSub
- requireNumberRestrictions :: OWLSub -> OWLSub
- requireRoleTransitivity :: OWLSub -> OWLSub
- requireRoleHierarchy :: OWLSub -> OWLSub
- requireComplexRoleInclusions :: OWLSub -> OWLSub
- requireAddFeatures :: OWLSub -> OWLSub
- requireNominals :: OWLSub -> OWLSub
- requireInverseRoles :: OWLSub -> OWLSub
- requireRules :: OWLSub -> OWLSub
- requireUnrestrictedDL :: OWLSub -> OWLSub
- slDatatype :: Datatype -> OWLSub
- slObjProp :: ObjectPropertyExpression -> OWLSub
- slEntity :: Entity -> OWLSub
- slAnnotation :: Annotation -> OWLSub
- slAnnos :: [Annotation] -> OWLSub
- slAnnosAnd :: [Annotation] -> OWLSub -> OWLSub
- slLiteral :: Literal -> OWLSub
- slDataRange :: DataRange -> OWLSub
- slIndividuals :: [Individual] -> OWLSub
- slClassExpression :: COPs -> ClassExpression -> OWLSub
- slDataCard :: Cardinality DataPropertyExpression DataRange -> OWLSub
- slObjCard :: COPs -> Cardinality ObjectPropertyExpression ClassExpression -> OWLSub
- slSimpleObjectProp :: COPs -> ObjectPropertyExpression -> OWLSub
- slIArg :: IndividualArg -> OWLSub
- slDArg :: DataArg -> OWLSub
- slAtom :: COPs -> Atom -> OWLSub
- slAxiom :: COPs -> Axiom -> OWLSub
- slGeneralRestrictions :: [Axiom] -> OWLSub
- slGTypingConstraints :: [Entity] -> OWLSub
- slGDatatypes :: [(Datatype, DataRange)] -> OWLSub
- type Graph a = Map a (Set a)
- addEdge :: Ord a => a -> a -> Graph a -> Graph a
- connected :: Ord a => a -> Graph a -> Set a
- isCyclicU :: Ord a => Graph a -> Bool
- isCyclicD :: Ord a => Graph a -> Bool
- isCyclic' :: Ord a => Bool -> Graph a -> a -> Maybe a -> Set a -> (Bool, Set a)
- forest :: Ord a => Graph a -> Forest a
- reachable :: Ord a => a -> Graph a -> Set a
- reachable' :: Ord a => Graph a -> Set a -> a -> Set a
- inverse :: Ord a => Graph a -> Graph a
- components :: Ord a => Graph a -> [Graph a]
- buildTree :: Ord a => Graph a -> a -> (Tree a, Graph a)
- slGAnonymousIndividuals :: [(Individual, Individual)] -> OWLSub
- slGPropertyHierachy :: [Axiom] -> OWLSub
- isCyclic :: [SCC a] -> Bool
- containsCircle :: Int -> [SCC a] -> Bool
- type COPs = Set ObjectPropertyExpression
- compositeObjectProperties :: [Axiom] -> Set ObjectPropertyExpression
- objectPropertyHierachy :: [Axiom] -> Graph ObjectPropertyExpression
- objectPropertyOrder :: [(PropertyExpressionChain, ObjectPropertyExpression)] -> Graph ObjectProperty
- complexObjectProperties :: [Axiom] -> Set ObjectPropertyExpression
- slODoc :: OntologyDocument -> OWLSub
- slSig :: Sign -> OWLSub
- slMor :: OWLMorphism -> OWLSub
- prMor :: OWLSub -> OWLMorphism -> OWLMorphism
- prSig :: OWLSub -> Sign -> Sign
- prODoc :: OWLSub -> OntologyDocument -> OntologyDocument
Documentation
data NumberRestrictions Source #
Instances
Eq NumberRestrictions Source # | |
Defined in OWL2.Sublogic (==) :: NumberRestrictions -> NumberRestrictions -> Bool (/=) :: NumberRestrictions -> NumberRestrictions -> Bool | |
Data NumberRestrictions Source # | |
Defined in OWL2.Sublogic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NumberRestrictions -> c NumberRestrictions gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NumberRestrictions toConstr :: NumberRestrictions -> Constr dataTypeOf :: NumberRestrictions -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NumberRestrictions) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NumberRestrictions) gmapT :: (forall b. Data b => b -> b) -> NumberRestrictions -> NumberRestrictions gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NumberRestrictions -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NumberRestrictions -> r gmapQ :: (forall d. Data d => d -> u) -> NumberRestrictions -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> NumberRestrictions -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> NumberRestrictions -> m NumberRestrictions gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NumberRestrictions -> m NumberRestrictions gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NumberRestrictions -> m NumberRestrictions | |
Ord NumberRestrictions Source # | |
Defined in OWL2.Sublogic compare :: NumberRestrictions -> NumberRestrictions -> Ordering (<) :: NumberRestrictions -> NumberRestrictions -> Bool (<=) :: NumberRestrictions -> NumberRestrictions -> Bool (>) :: NumberRestrictions -> NumberRestrictions -> Bool (>=) :: NumberRestrictions -> NumberRestrictions -> Bool max :: NumberRestrictions -> NumberRestrictions -> NumberRestrictions min :: NumberRestrictions -> NumberRestrictions -> NumberRestrictions | |
Show NumberRestrictions Source # | |
Defined in OWL2.Sublogic showsPrec :: Int -> NumberRestrictions -> ShowS show :: NumberRestrictions -> String showList :: [NumberRestrictions] -> ShowS | |
Generic NumberRestrictions | |
Defined in OWL2.ATC_OWL2 type Rep NumberRestrictions :: Type -> Type from :: NumberRestrictions -> Rep NumberRestrictions x to :: Rep NumberRestrictions x -> NumberRestrictions | |
FromJSON NumberRestrictions | |
Defined in OWL2.ATC_OWL2 parseJSON :: Value -> Parser NumberRestrictions parseJSONList :: Value -> Parser [NumberRestrictions] | |
ToJSON NumberRestrictions | |
Defined in OWL2.ATC_OWL2 toJSON :: NumberRestrictions -> Value toEncoding :: NumberRestrictions -> Encoding toJSONList :: [NumberRestrictions] -> Value toEncodingList :: [NumberRestrictions] -> Encoding | |
ShATermConvertible NumberRestrictions | |
Defined in OWL2.ATC_OWL2 toShATermAux :: ATermTable -> NumberRestrictions -> IO (ATermTable, Int) toShATermList' :: ATermTable -> [NumberRestrictions] -> IO (ATermTable, Int) fromShATermAux :: Int -> ATermTable -> (ATermTable, NumberRestrictions) fromShATermList' :: Int -> ATermTable -> (ATermTable, [NumberRestrictions]) | |
type Rep NumberRestrictions | |
Defined in OWL2.ATC_OWL2 type Rep NumberRestrictions = D1 ('MetaData "NumberRestrictions" "OWL2.Sublogic" "main" 'False) (C1 ('MetaCons "None" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Unqualified" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Qualified" 'PrefixI 'False) (U1 :: Type -> Type))) |
owlDatatypes :: Set Datatype Source #
OWLSub | |
|
Instances
Eq OWLSub Source # | |
Data OWLSub Source # | |
Defined in OWL2.Sublogic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OWLSub -> c OWLSub gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OWLSub dataTypeOf :: OWLSub -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OWLSub) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OWLSub) gmapT :: (forall b. Data b => b -> b) -> OWLSub -> OWLSub gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OWLSub -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OWLSub -> r gmapQ :: (forall d. Data d => d -> u) -> OWLSub -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> OWLSub -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> OWLSub -> m OWLSub gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OWLSub -> m OWLSub gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OWLSub -> m OWLSub | |
Ord OWLSub Source # | |
Show OWLSub Source # | |
Generic OWLSub | |
FromJSON OWLSub | |
Defined in OWL2.ATC_OWL2 parseJSON :: Value -> Parser OWLSub parseJSONList :: Value -> Parser [OWLSub] | |
ToJSON OWLSub | |
Defined in OWL2.ATC_OWL2 toEncoding :: OWLSub -> Encoding toJSONList :: [OWLSub] -> Value toEncodingList :: [OWLSub] -> Encoding | |
ShATermConvertible OWLSub | |
Defined in OWL2.ATC_OWL2 toShATermAux :: ATermTable -> OWLSub -> IO (ATermTable, Int) toShATermList' :: ATermTable -> [OWLSub] -> IO (ATermTable, Int) fromShATermAux :: Int -> ATermTable -> (ATermTable, OWLSub) fromShATermList' :: Int -> ATermTable -> (ATermTable, [OWLSub]) | |
type Rep OWLSub | |
Defined in OWL2.ATC_OWL2 type Rep OWLSub = D1 ('MetaData "OWLSub" "OWL2.Sublogic" "main" 'False) (C1 ('MetaCons "OWLSub" 'PrefixI 'True) (((S1 ('MetaSel ('Just "numberRestrictions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NumberRestrictions) :*: S1 ('MetaSel ('Just "nominals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "inverseRoles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "roleTransitivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "roleHierarchy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "complexRoleInclusions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "addFeatures") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "datatype") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Datatype)) :*: (S1 ('MetaSel ('Just "rules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "unrestrictedDL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))) |
allSublogics :: [[OWLSub]] Source #
requireRoleHierarchy :: OWLSub -> OWLSub Source #
requireAddFeatures :: OWLSub -> OWLSub Source #
requireNominals :: OWLSub -> OWLSub Source #
requireInverseRoles :: OWLSub -> OWLSub Source #
requireRules :: OWLSub -> OWLSub Source #
requireUnrestrictedDL :: OWLSub -> OWLSub Source #
slDatatype :: Datatype -> OWLSub Source #
slAnnotation :: Annotation -> OWLSub Source #
slAnnos :: [Annotation] -> OWLSub Source #
slAnnosAnd :: [Annotation] -> OWLSub -> OWLSub Source #
slDataRange :: DataRange -> OWLSub Source #
slIndividuals :: [Individual] -> OWLSub Source #
Checks anonymous individuals Anonymous individuals are not allowed in some place in OWL2 DL
slClassExpression :: COPs -> ClassExpression -> OWLSub Source #
slIArg :: IndividualArg -> OWLSub Source #
slGeneralRestrictions :: [Axiom] -> OWLSub Source #
Checks only for general restrictions
slGTypingConstraints :: [Entity] -> OWLSub Source #
slGDatatypes :: [(Datatype, DataRange)] -> OWLSub Source #
Analyses the datatypes for a circle in their definition
connected :: Ord a => a -> Graph a -> Set a Source #
connected x g
yields all nodes connected to x with an edge in g
isCyclic' :: Ord a => Bool -> Graph a -> a -> Maybe a -> Set a -> (Bool, Set a) Source #
isCyclic' directed g v p r
checks if a cycle can be found in g
starting at vertex v
with parent p
and not visited vertices r
forest :: Ord a => Graph a -> Forest a Source #
forest g
Given that g
is acyclic, transforms g
to a forest
reachable :: Ord a => a -> Graph a -> Set a Source #
reachable r g
returns all reachable nodes from r
in g
reachable' :: Ord a => Graph a -> Set a -> a -> Set a Source #
reachable' g visited r
returns all reachable unvisited nodes from r
in g
components :: Ord a => Graph a -> [Graph a] Source #
components g
gets the components of g
buildTree :: Ord a => Graph a -> a -> (Tree a, Graph a) Source #
buildTree g r
given that g
is acyclic, transforms g
into a tree with r
as root node and returns the remaining graph
slGAnonymousIndividuals :: [(Individual, Individual)] -> OWLSub Source #
slGPropertyHierachy :: [Axiom] -> OWLSub Source #
containsCircle :: Int -> [SCC a] -> Bool Source #
containsCircle len comps
Checks whether comps
contain a circle of min length len
type COPs = Set ObjectPropertyExpression Source #
compositeObjectProperties :: [Axiom] -> Set ObjectPropertyExpression Source #
objectPropertyHierachy :: [Axiom] -> Graph ObjectPropertyExpression Source #
Extracts the object property hierachy as an adjacency list.
Each object property expression has an edge according to https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Property_Hierarchy_and_Simple_Object_Property_Expressions
objectPropertyOrder :: [(PropertyExpressionChain, ObjectPropertyExpression)] -> Graph ObjectProperty Source #
complexObjectProperties :: [Axiom] -> Set ObjectPropertyExpression Source #
All object properties in a set of axioms that are not simple
slODoc :: OntologyDocument -> OWLSub Source #
slMor :: OWLMorphism -> OWLSub Source #
prMor :: OWLSub -> OWLMorphism -> OWLMorphism Source #
prODoc :: OWLSub -> OntologyDocument -> OntologyDocument Source #