{-# OPTIONS -w -O0 #-}
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
{- |
Module      :  OWL2/ATC_OWL2.der.hs
Description :  generated ShATermConvertible, Json instances
Copyright   :  (c) DFKI GmbH 2012
License     :  GPLv2 or higher, see LICENSE.txt

Maintainer  :  Christian.Maeder@dfki.de
Stability   :  provisional
Portability :  non-portable(derive Typeable instances)

Automatic derivation of instances via DrIFT-rule ShATermConvertible, Json
  for the type(s):
'OWL2.AS.EquivOrDisjoint'
'OWL2.AS.DomainOrRange'
'OWL2.AS.SameOrDifferent'
'OWL2.AS.Relation'
'OWL2.AS.Character'
'OWL2.AS.PositiveOrNegative'
'OWL2.AS.QuantifierType'
'OWL2.AS.DatatypeCat'
'OWL2.AS.CardinalityType'
'OWL2.AS.Cardinality'
'OWL2.AS.JunctionType'
'OWL2.AS.Entity'
'OWL2.AS.EntityType'
'OWL2.AS.TypedOrUntyped'
'OWL2.AS.Literal'
'OWL2.AS.NNInt'
'OWL2.AS.IntLit'
'OWL2.AS.DecLit'
'OWL2.AS.FloatLit'
'OWL2.AS.ObjectPropertyExpression'
'OWL2.AS.DataRange'
'OWL2.AS.ClassExpression'
'OWL2.AS.Annotation'
'OWL2.AS.AnnotationValue'
'OWL2.AS.AnnotationAxiom'
'OWL2.AS.AnnotationSubject'
'OWL2.AS.Axiom'
'OWL2.AS.ClassAxiom'
'OWL2.AS.ObjectPropertyAxiom'
'OWL2.AS.SubObjectPropertyExpression'
'OWL2.AS.DataPropertyAxiom'
'OWL2.AS.Assertion'
'OWL2.AS.Rule'
'OWL2.AS.IndividualArg'
'OWL2.AS.DataArg'
'OWL2.AS.UnknownArg'
'OWL2.AS.Atom'
'OWL2.AS.DGAtom'
'OWL2.AS.DGNodeAssertion'
'OWL2.AS.DGEdgeAssertion'
'OWL2.AS.OntologySyntaxType'
'OWL2.AS.OntologyMetadata'
'OWL2.AS.OntologyDocument'
'OWL2.AS.PrefixDeclaration'
'OWL2.AS.Ontology'
'OWL2.Symbols.ExtEntityType'
'OWL2.Symbols.SymbItems'
'OWL2.Symbols.SymbMapItems'
'OWL2.Symbols.RawSymb'
'OWL2.Sign.Sign'
'OWL2.Sign.SignAxiom'
'OWL2.Sign.RoleKind'
'OWL2.Sign.RoleType'
'OWL2.Sign.DesKind'
'OWL2.Sign.DomainOrRangeOrFunc'
'OWL2.Morphism.OWLMorphism'
'OWL2.ProfilesAndSublogics.ProfSub'
'OWL2.Sublogic.NumberRestrictions'
'OWL2.Sublogic.OWLSub'
'OWL2.Profiles.Profiles'
-}

{-
Generated by 'genRules' (automatic rule generation for DrIFT). Don't touch!!
  dependency files:
OWL2/AS.hs
OWL2/Symbols.hs
OWL2/Sign.hs
OWL2/Morphism.hs
OWL2/ProfilesAndSublogics.hs
OWL2/Sublogic.hs
OWL2/Profiles.hs
-}

module OWL2.ATC_OWL2 () where

import ATC.IRI
import ATC.Result
import ATerm.Lib
import Common.Doc
import Common.DocUtils
import Common.IRI
import Common.IRI (expandIRI')
import Common.IRI (setPrefix, mkIRI)
import Common.Id
import Common.Id (Id)
import Common.Id (nullRange)
import Common.Json.Instances
import Common.Keywords (stringS)
import Common.Lib.MapSet (setToMap)
import Common.Lib.State
import Common.Lib.State (execState)
import Common.Result
import Common.Utils (composeMap)
import Control.Monad
import Data.Aeson(ToJSON, FromJSON)
import Data.Char (intToDigit)
import Data.Data
import Data.Graph (stronglyConnComp, SCC(..))
import Data.List
import Data.List (stripPrefix)
import Data.Maybe
import Data.Maybe (mapMaybe)
import Data.Set (empty)
import Data.Tree
import GHC.Generics(Generic)
import OWL2.AS
import OWL2.ColonKeywords
import OWL2.Function
import OWL2.Keywords
import OWL2.ManchesterPrint ()
import OWL2.Morphism
import OWL2.Profiles
import OWL2.ProfilesAndSublogics
import OWL2.Sign
import OWL2.Sublogic
import OWL2.Symbols
import qualified Common.GlobalAnnotations as GA (PrefixMap)
import qualified Control.Monad.Fail as Fail
import qualified Data.Map as Map
import qualified Data.Set as Set

{-! for OWL2.AS.EquivOrDisjoint derive : ShATermConvertible !-}
{-! for OWL2.AS.DomainOrRange derive : ShATermConvertible !-}
{-! for OWL2.AS.SameOrDifferent derive : ShATermConvertible !-}
{-! for OWL2.AS.Relation derive : ShATermConvertible !-}
{-! for OWL2.AS.Character derive : ShATermConvertible !-}
{-! for OWL2.AS.PositiveOrNegative derive : ShATermConvertible !-}
{-! for OWL2.AS.QuantifierType derive : ShATermConvertible !-}
{-! for OWL2.AS.DatatypeCat derive : ShATermConvertible !-}
{-! for OWL2.AS.CardinalityType derive : ShATermConvertible !-}
{-! for OWL2.AS.Cardinality derive : ShATermConvertible !-}
{-! for OWL2.AS.JunctionType derive : ShATermConvertible !-}
{-! for OWL2.AS.Entity derive : ShATermConvertible !-}
{-! for OWL2.AS.EntityType derive : ShATermConvertible !-}
{-! for OWL2.AS.TypedOrUntyped derive : ShATermConvertible !-}
{-! for OWL2.AS.Literal derive : ShATermConvertible !-}
{-! for OWL2.AS.NNInt derive : ShATermConvertible !-}
{-! for OWL2.AS.IntLit derive : ShATermConvertible !-}
{-! for OWL2.AS.DecLit derive : ShATermConvertible !-}
{-! for OWL2.AS.FloatLit derive : ShATermConvertible !-}
{-! for OWL2.AS.ObjectPropertyExpression derive : ShATermConvertible !-}
{-! for OWL2.AS.DataRange derive : ShATermConvertible !-}
{-! for OWL2.AS.ClassExpression derive : ShATermConvertible !-}
{-! for OWL2.AS.Annotation derive : ShATermConvertible !-}
{-! for OWL2.AS.AnnotationValue derive : ShATermConvertible !-}
{-! for OWL2.AS.AnnotationAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.AnnotationSubject derive : ShATermConvertible !-}
{-! for OWL2.AS.Axiom derive : ShATermConvertible !-}
{-! for OWL2.AS.ClassAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.ObjectPropertyAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.SubObjectPropertyExpression derive : ShATermConvertible !-}
{-! for OWL2.AS.DataPropertyAxiom derive : ShATermConvertible !-}
{-! for OWL2.AS.Assertion derive : ShATermConvertible !-}
{-! for OWL2.AS.Rule derive : ShATermConvertible !-}
{-! for OWL2.AS.IndividualArg derive : ShATermConvertible !-}
{-! for OWL2.AS.DataArg derive : ShATermConvertible !-}
{-! for OWL2.AS.UnknownArg derive : ShATermConvertible !-}
{-! for OWL2.AS.Atom derive : ShATermConvertible !-}
{-! for OWL2.AS.DGAtom derive : ShATermConvertible !-}
{-! for OWL2.AS.DGNodeAssertion derive : ShATermConvertible !-}
{-! for OWL2.AS.DGEdgeAssertion derive : ShATermConvertible !-}
{-! for OWL2.AS.OntologySyntaxType derive : ShATermConvertible !-}
{-! for OWL2.AS.OntologyMetadata derive : ShATermConvertible !-}
{-! for OWL2.AS.OntologyDocument derive : ShATermConvertible !-}
{-! for OWL2.AS.PrefixDeclaration derive : ShATermConvertible !-}
{-! for OWL2.AS.Ontology derive : ShATermConvertible !-}
{-! for OWL2.Symbols.ExtEntityType derive : ShATermConvertible !-}
{-! for OWL2.Symbols.SymbItems derive : ShATermConvertible !-}
{-! for OWL2.Symbols.SymbMapItems derive : ShATermConvertible !-}
{-! for OWL2.Symbols.RawSymb derive : ShATermConvertible !-}
{-! for OWL2.Sign.Sign derive : ShATermConvertible !-}
{-! for OWL2.Sign.SignAxiom derive : ShATermConvertible !-}
{-! for OWL2.Sign.RoleKind derive : ShATermConvertible !-}
{-! for OWL2.Sign.RoleType derive : ShATermConvertible !-}
{-! for OWL2.Sign.DesKind derive : ShATermConvertible !-}
{-! for OWL2.Sign.DomainOrRangeOrFunc derive : ShATermConvertible !-}
{-! for OWL2.Morphism.OWLMorphism derive : ShATermConvertible !-}
{-! for OWL2.ProfilesAndSublogics.ProfSub derive : ShATermConvertible !-}
{-! for OWL2.Sublogic.NumberRestrictions derive : ShATermConvertible !-}
{-! for OWL2.Sublogic.OWLSub derive : ShATermConvertible !-}
{-! for OWL2.Profiles.Profiles derive : ShATermConvertible !-}

{-! for OWL2.AS.EquivOrDisjoint derive : Json !-}
{-! for OWL2.AS.DomainOrRange derive : Json !-}
{-! for OWL2.AS.SameOrDifferent derive : Json !-}
{-! for OWL2.AS.Relation derive : Json !-}
{-! for OWL2.AS.Character derive : Json !-}
{-! for OWL2.AS.PositiveOrNegative derive : Json !-}
{-! for OWL2.AS.QuantifierType derive : Json !-}
{-! for OWL2.AS.DatatypeCat derive : Json !-}
{-! for OWL2.AS.CardinalityType derive : Json !-}
{-! for OWL2.AS.Cardinality derive : Json !-}
{-! for OWL2.AS.JunctionType derive : Json !-}
{-! for OWL2.AS.Entity derive : Json !-}
{-! for OWL2.AS.EntityType derive : Json !-}
{-! for OWL2.AS.TypedOrUntyped derive : Json !-}
{-! for OWL2.AS.Literal derive : Json !-}
{-! for OWL2.AS.NNInt derive : Json !-}
{-! for OWL2.AS.IntLit derive : Json !-}
{-! for OWL2.AS.DecLit derive : Json !-}
{-! for OWL2.AS.FloatLit derive : Json !-}
{-! for OWL2.AS.ObjectPropertyExpression derive : Json !-}
{-! for OWL2.AS.DataRange derive : Json !-}
{-! for OWL2.AS.ClassExpression derive : Json !-}
{-! for OWL2.AS.Annotation derive : Json !-}
{-! for OWL2.AS.AnnotationValue derive : Json !-}
{-! for OWL2.AS.AnnotationAxiom derive : Json !-}
{-! for OWL2.AS.AnnotationSubject derive : Json !-}
{-! for OWL2.AS.Axiom derive : Json !-}
{-! for OWL2.AS.ClassAxiom derive : Json !-}
{-! for OWL2.AS.ObjectPropertyAxiom derive : Json !-}
{-! for OWL2.AS.SubObjectPropertyExpression derive : Json !-}
{-! for OWL2.AS.DataPropertyAxiom derive : Json !-}
{-! for OWL2.AS.Assertion derive : Json !-}
{-! for OWL2.AS.Rule derive : Json !-}
{-! for OWL2.AS.IndividualArg derive : Json !-}
{-! for OWL2.AS.DataArg derive : Json !-}
{-! for OWL2.AS.UnknownArg derive : Json !-}
{-! for OWL2.AS.Atom derive : Json !-}
{-! for OWL2.AS.DGAtom derive : Json !-}
{-! for OWL2.AS.DGNodeAssertion derive : Json !-}
{-! for OWL2.AS.DGEdgeAssertion derive : Json !-}
{-! for OWL2.AS.OntologySyntaxType derive : Json !-}
{-! for OWL2.AS.OntologyMetadata derive : Json !-}
{-! for OWL2.AS.OntologyDocument derive : Json !-}
{-! for OWL2.AS.PrefixDeclaration derive : Json !-}
{-! for OWL2.AS.Ontology derive : Json !-}
{-! for OWL2.Symbols.ExtEntityType derive : Json !-}
{-! for OWL2.Symbols.SymbItems derive : Json !-}
{-! for OWL2.Symbols.SymbMapItems derive : Json !-}
{-! for OWL2.Symbols.RawSymb derive : Json !-}
{-! for OWL2.Sign.Sign derive : Json !-}
{-! for OWL2.Sign.SignAxiom derive : Json !-}
{-! for OWL2.Sign.RoleKind derive : Json !-}
{-! for OWL2.Sign.RoleType derive : Json !-}
{-! for OWL2.Sign.DesKind derive : Json !-}
{-! for OWL2.Sign.DomainOrRangeOrFunc derive : Json !-}
{-! for OWL2.Morphism.OWLMorphism derive : Json !-}
{-! for OWL2.ProfilesAndSublogics.ProfSub derive : Json !-}
{-! for OWL2.Sublogic.NumberRestrictions derive : Json !-}
{-! for OWL2.Sublogic.OWLSub derive : Json !-}
{-! for OWL2.Profiles.Profiles derive : Json !-}

-- Generated by DrIFT, look but don't touch!

deriving instance GHC.Generics.Generic OWL2.AS.Ontology
instance Data.Aeson.ToJSON OWL2.AS.Ontology where
instance Data.Aeson.FromJSON OWL2.AS.Ontology where

deriving instance GHC.Generics.Generic OWL2.AS.PrefixDeclaration
instance Data.Aeson.ToJSON OWL2.AS.PrefixDeclaration where
instance Data.Aeson.FromJSON OWL2.AS.PrefixDeclaration where

deriving instance GHC.Generics.Generic OWL2.AS.OntologyDocument
instance Data.Aeson.ToJSON OWL2.AS.OntologyDocument where
instance Data.Aeson.FromJSON OWL2.AS.OntologyDocument where

deriving instance GHC.Generics.Generic OWL2.AS.OntologyMetadata
instance Data.Aeson.ToJSON OWL2.AS.OntologyMetadata where
instance Data.Aeson.FromJSON OWL2.AS.OntologyMetadata where

deriving instance GHC.Generics.Generic OWL2.AS.OntologySyntaxType
instance Data.Aeson.ToJSON OWL2.AS.OntologySyntaxType where
instance Data.Aeson.FromJSON OWL2.AS.OntologySyntaxType where

deriving instance GHC.Generics.Generic OWL2.AS.DGEdgeAssertion
instance Data.Aeson.ToJSON OWL2.AS.DGEdgeAssertion where
instance Data.Aeson.FromJSON OWL2.AS.DGEdgeAssertion where

deriving instance GHC.Generics.Generic OWL2.AS.DGNodeAssertion
instance Data.Aeson.ToJSON OWL2.AS.DGNodeAssertion where
instance Data.Aeson.FromJSON OWL2.AS.DGNodeAssertion where

deriving instance GHC.Generics.Generic OWL2.AS.DGAtom
instance Data.Aeson.ToJSON OWL2.AS.DGAtom where
instance Data.Aeson.FromJSON OWL2.AS.DGAtom where

deriving instance GHC.Generics.Generic OWL2.AS.Atom
instance Data.Aeson.ToJSON OWL2.AS.Atom where
instance Data.Aeson.FromJSON OWL2.AS.Atom where

deriving instance GHC.Generics.Generic OWL2.AS.UnknownArg
instance Data.Aeson.ToJSON OWL2.AS.UnknownArg where
instance Data.Aeson.FromJSON OWL2.AS.UnknownArg where

deriving instance GHC.Generics.Generic OWL2.AS.DataArg
instance Data.Aeson.ToJSON OWL2.AS.DataArg where
instance Data.Aeson.FromJSON OWL2.AS.DataArg where

deriving instance GHC.Generics.Generic OWL2.AS.IndividualArg
instance Data.Aeson.ToJSON OWL2.AS.IndividualArg where
instance Data.Aeson.FromJSON OWL2.AS.IndividualArg where

deriving instance GHC.Generics.Generic OWL2.AS.Rule
instance Data.Aeson.ToJSON OWL2.AS.Rule where
instance Data.Aeson.FromJSON OWL2.AS.Rule where

deriving instance GHC.Generics.Generic OWL2.AS.Assertion
instance Data.Aeson.ToJSON OWL2.AS.Assertion where
instance Data.Aeson.FromJSON OWL2.AS.Assertion where

deriving instance GHC.Generics.Generic OWL2.AS.DataPropertyAxiom
instance Data.Aeson.ToJSON OWL2.AS.DataPropertyAxiom where
instance Data.Aeson.FromJSON OWL2.AS.DataPropertyAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.SubObjectPropertyExpression
instance Data.Aeson.ToJSON OWL2.AS.SubObjectPropertyExpression where
instance Data.Aeson.FromJSON OWL2.AS.SubObjectPropertyExpression where

deriving instance GHC.Generics.Generic OWL2.AS.ObjectPropertyAxiom
instance Data.Aeson.ToJSON OWL2.AS.ObjectPropertyAxiom where
instance Data.Aeson.FromJSON OWL2.AS.ObjectPropertyAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.ClassAxiom
instance Data.Aeson.ToJSON OWL2.AS.ClassAxiom where
instance Data.Aeson.FromJSON OWL2.AS.ClassAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.Axiom
instance Data.Aeson.ToJSON OWL2.AS.Axiom where
instance Data.Aeson.FromJSON OWL2.AS.Axiom where

deriving instance GHC.Generics.Generic OWL2.AS.AnnotationSubject
instance Data.Aeson.ToJSON OWL2.AS.AnnotationSubject where
instance Data.Aeson.FromJSON OWL2.AS.AnnotationSubject where

deriving instance GHC.Generics.Generic OWL2.AS.AnnotationAxiom
instance Data.Aeson.ToJSON OWL2.AS.AnnotationAxiom where
instance Data.Aeson.FromJSON OWL2.AS.AnnotationAxiom where

deriving instance GHC.Generics.Generic OWL2.AS.AnnotationValue
instance Data.Aeson.ToJSON OWL2.AS.AnnotationValue where
instance Data.Aeson.FromJSON OWL2.AS.AnnotationValue where

deriving instance GHC.Generics.Generic OWL2.AS.Annotation
instance Data.Aeson.ToJSON OWL2.AS.Annotation where
instance Data.Aeson.FromJSON OWL2.AS.Annotation where

deriving instance GHC.Generics.Generic OWL2.AS.ClassExpression
instance Data.Aeson.ToJSON OWL2.AS.ClassExpression where
instance Data.Aeson.FromJSON OWL2.AS.ClassExpression where

deriving instance GHC.Generics.Generic OWL2.AS.DataRange
instance Data.Aeson.ToJSON OWL2.AS.DataRange where
instance Data.Aeson.FromJSON OWL2.AS.DataRange where

deriving instance GHC.Generics.Generic OWL2.AS.ObjectPropertyExpression
instance Data.Aeson.ToJSON OWL2.AS.ObjectPropertyExpression where
instance Data.Aeson.FromJSON OWL2.AS.ObjectPropertyExpression where

deriving instance GHC.Generics.Generic OWL2.AS.FloatLit
instance Data.Aeson.ToJSON OWL2.AS.FloatLit where
instance Data.Aeson.FromJSON OWL2.AS.FloatLit where

deriving instance GHC.Generics.Generic OWL2.AS.DecLit
instance Data.Aeson.ToJSON OWL2.AS.DecLit where
instance Data.Aeson.FromJSON OWL2.AS.DecLit where

deriving instance GHC.Generics.Generic OWL2.AS.IntLit
instance Data.Aeson.ToJSON OWL2.AS.IntLit where
instance Data.Aeson.FromJSON OWL2.AS.IntLit where

deriving instance GHC.Generics.Generic OWL2.AS.NNInt
instance Data.Aeson.ToJSON OWL2.AS.NNInt where
instance Data.Aeson.FromJSON OWL2.AS.NNInt where

deriving instance GHC.Generics.Generic OWL2.AS.Literal
instance Data.Aeson.ToJSON OWL2.AS.Literal where
instance Data.Aeson.FromJSON OWL2.AS.Literal where

deriving instance GHC.Generics.Generic OWL2.AS.TypedOrUntyped
instance Data.Aeson.ToJSON OWL2.AS.TypedOrUntyped where
instance Data.Aeson.FromJSON OWL2.AS.TypedOrUntyped where

deriving instance GHC.Generics.Generic OWL2.AS.EntityType
instance Data.Aeson.ToJSON OWL2.AS.EntityType where
instance Data.Aeson.FromJSON OWL2.AS.EntityType where

deriving instance GHC.Generics.Generic OWL2.AS.Entity
instance Data.Aeson.ToJSON OWL2.AS.Entity where
instance Data.Aeson.FromJSON OWL2.AS.Entity where

deriving instance GHC.Generics.Generic OWL2.AS.JunctionType
instance Data.Aeson.ToJSON OWL2.AS.JunctionType where
instance Data.Aeson.FromJSON OWL2.AS.JunctionType where

deriving instance GHC.Generics.Generic (OWL2.AS.Cardinality a b)
instance (Data.Aeson.ToJSON a,
          Data.Aeson.ToJSON b) => Data.Aeson.ToJSON (OWL2.AS.Cardinality a b) where
instance (Data.Aeson.FromJSON a,
          Data.Aeson.FromJSON b) => Data.Aeson.FromJSON (OWL2.AS.Cardinality a b) where

deriving instance GHC.Generics.Generic OWL2.AS.CardinalityType
instance Data.Aeson.ToJSON OWL2.AS.CardinalityType where
instance Data.Aeson.FromJSON OWL2.AS.CardinalityType where

deriving instance GHC.Generics.Generic OWL2.AS.DatatypeCat
instance Data.Aeson.ToJSON OWL2.AS.DatatypeCat where
instance Data.Aeson.FromJSON OWL2.AS.DatatypeCat where

deriving instance GHC.Generics.Generic OWL2.AS.QuantifierType
instance Data.Aeson.ToJSON OWL2.AS.QuantifierType where
instance Data.Aeson.FromJSON OWL2.AS.QuantifierType where

deriving instance GHC.Generics.Generic OWL2.AS.PositiveOrNegative
instance Data.Aeson.ToJSON OWL2.AS.PositiveOrNegative where
instance Data.Aeson.FromJSON OWL2.AS.PositiveOrNegative where

deriving instance GHC.Generics.Generic OWL2.AS.Character
instance Data.Aeson.ToJSON OWL2.AS.Character where
instance Data.Aeson.FromJSON OWL2.AS.Character where

deriving instance GHC.Generics.Generic OWL2.AS.Relation
instance Data.Aeson.ToJSON OWL2.AS.Relation where
instance Data.Aeson.FromJSON OWL2.AS.Relation where

deriving instance GHC.Generics.Generic OWL2.AS.SameOrDifferent
instance Data.Aeson.ToJSON OWL2.AS.SameOrDifferent where
instance Data.Aeson.FromJSON OWL2.AS.SameOrDifferent where

deriving instance GHC.Generics.Generic OWL2.AS.DomainOrRange
instance Data.Aeson.ToJSON OWL2.AS.DomainOrRange where
instance Data.Aeson.FromJSON OWL2.AS.DomainOrRange where

deriving instance GHC.Generics.Generic OWL2.AS.EquivOrDisjoint
instance Data.Aeson.ToJSON OWL2.AS.EquivOrDisjoint where
instance Data.Aeson.FromJSON OWL2.AS.EquivOrDisjoint where

instance ShATermConvertible OWL2.AS.Ontology where
  toShATermAux :: ATermTable -> Ontology -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Ontology
xv = case Ontology
xv of
    Ontology a :: Maybe OntologyIRI
a b :: Maybe OntologyIRI
b c :: DirectlyImportsDocuments
c d :: [Annotation]
d e :: [Axiom]
e -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Maybe OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Maybe OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Maybe OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Maybe OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DirectlyImportsDocuments
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 [Annotation]
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> [Axiom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 [Axiom]
e
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Ontology" [Int
a', Int
b', Int
c', Int
d', Int
e'] []) ATermTable
att5
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Ontology)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Ontology" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
      case Int -> ATermTable -> (ATermTable, Maybe OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Maybe OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, Maybe OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Maybe OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DirectlyImportsDocuments
c') ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: [Annotation]
d') ->
      case Int -> ATermTable -> (ATermTable, [Axiom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: [Axiom]
e') ->
      (ATermTable
att5, Maybe OntologyIRI
-> Maybe OntologyIRI
-> DirectlyImportsDocuments
-> [Annotation]
-> [Axiom]
-> Ontology
Ontology Maybe OntologyIRI
a' Maybe OntologyIRI
b' DirectlyImportsDocuments
c' [Annotation]
d' [Axiom]
e') }}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Ontology)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Ontology" ShATerm
u

instance ShATermConvertible OWL2.AS.PrefixDeclaration where
  toShATermAux :: ATermTable -> PrefixDeclaration -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: PrefixDeclaration
xv = case PrefixDeclaration
xv of
    PrefixDeclaration a :: String
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> String -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 String
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "PrefixDeclaration" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, PrefixDeclaration)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "PrefixDeclaration" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, String)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: String
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, String -> OntologyIRI -> PrefixDeclaration
PrefixDeclaration String
a' OntologyIRI
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, PrefixDeclaration)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.PrefixDeclaration" ShATerm
u

instance ShATermConvertible OWL2.AS.OntologyDocument where
  toShATermAux :: ATermTable -> OntologyDocument -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OntologyDocument
xv = case OntologyDocument
xv of
    OntologyDocument a :: OntologyMetadata
a b :: PrefixMap
b c :: Ontology
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyMetadata -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyMetadata
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> PrefixMap -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 PrefixMap
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> Ontology -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 Ontology
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OntologyDocument" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OntologyDocument)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OntologyDocument" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyMetadata)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyMetadata
a') ->
      case Int -> ATermTable -> (ATermTable, PrefixMap)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: PrefixMap
b') ->
      case Int -> ATermTable -> (ATermTable, Ontology)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: Ontology
c') ->
      (ATermTable
att3, OntologyMetadata -> PrefixMap -> Ontology -> OntologyDocument
OntologyDocument OntologyMetadata
a' PrefixMap
b' Ontology
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OntologyDocument)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.OntologyDocument" ShATerm
u

instance ShATermConvertible OWL2.AS.OntologyMetadata where
  toShATermAux :: ATermTable -> OntologyMetadata -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OntologyMetadata
xv = case OntologyMetadata
xv of
    OntologyMetadata a :: OntologySyntaxType
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologySyntaxType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologySyntaxType
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "OntologyMetadata" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OntologyMetadata)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "OntologyMetadata" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologySyntaxType)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologySyntaxType
a') ->
      (ATermTable
att1, OntologySyntaxType -> OntologyMetadata
OntologyMetadata OntologySyntaxType
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OntologyMetadata)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.OntologyMetadata" ShATerm
u

instance ShATermConvertible OWL2.AS.OntologySyntaxType where
  toShATermAux :: ATermTable -> OntologySyntaxType -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: OntologySyntaxType
xv = case OntologySyntaxType
xv of
    MS -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "MS" [] []) ATermTable
att0
    AS -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AS" [] []) ATermTable
att0
    XML -> (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "XML" [] []) ATermTable
att0
  fromShATermAux :: Int -> ATermTable -> (ATermTable, OntologySyntaxType)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "MS" [] _ -> (ATermTable
att0, OntologySyntaxType
MS)
    ShAAppl "AS" [] _ -> (ATermTable
att0, OntologySyntaxType
AS)
    ShAAppl "XML" [] _ -> (ATermTable
att0, OntologySyntaxType
XML)
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, OntologySyntaxType)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.OntologySyntaxType" ShATerm
u

instance ShATermConvertible OWL2.AS.DGEdgeAssertion where
  toShATermAux :: ATermTable -> DGEdgeAssertion -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DGEdgeAssertion
xv = case DGEdgeAssertion
xv of
    DGEdgeAssertion a :: OntologyIRI
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DGEdgeAssertion" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DGEdgeAssertion)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DGEdgeAssertion" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, OntologyIRI -> OntologyIRI -> OntologyIRI -> DGEdgeAssertion
DGEdgeAssertion OntologyIRI
a' OntologyIRI
b' OntologyIRI
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DGEdgeAssertion)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DGEdgeAssertion" ShATerm
u

instance ShATermConvertible OWL2.AS.DGNodeAssertion where
  toShATermAux :: ATermTable -> DGNodeAssertion -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DGNodeAssertion
xv = case DGNodeAssertion
xv of
    DGNodeAssertion a :: OntologyIRI
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DGNodeAssertion" [Int
a', Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DGNodeAssertion)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DGNodeAssertion" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, OntologyIRI -> OntologyIRI -> DGNodeAssertion
DGNodeAssertion OntologyIRI
a' OntologyIRI
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DGNodeAssertion)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DGNodeAssertion" ShATerm
u

instance ShATermConvertible OWL2.AS.DGAtom where
  toShATermAux :: ATermTable -> DGAtom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DGAtom
xv = case DGAtom
xv of
    DGClassAtom a :: ClassExpression
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DGClassAtom" [Int
a', Int
b'] []) ATermTable
att2
    DGObjectPropertyAtom a :: ObjectPropertyExpression
a b :: IndividualArg
b c :: IndividualArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 IndividualArg
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DGObjectPropertyAtom" [Int
a', Int
b',
                                                         Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DGAtom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DGClassAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, ClassExpression -> IndividualArg -> DGAtom
DGClassAtom ClassExpression
a' IndividualArg
b') }}
    ShAAppl "DGObjectPropertyAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: IndividualArg
c') ->
      (ATermTable
att3, ObjectPropertyExpression
-> IndividualArg -> IndividualArg -> DGAtom
DGObjectPropertyAtom ObjectPropertyExpression
a' IndividualArg
b' IndividualArg
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DGAtom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DGAtom" ShATerm
u

instance ShATermConvertible OWL2.AS.Atom where
  toShATermAux :: ATermTable -> Atom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Atom
xv = case Atom
xv of
    ClassAtom a :: ClassExpression
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ClassAtom" [Int
a', Int
b'] []) ATermTable
att2
    DataRangeAtom a :: DataRange
a b :: DataArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataRange
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DataArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DataArg
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataRangeAtom" [Int
a', Int
b'] []) ATermTable
att2
    ObjectPropertyAtom a :: ObjectPropertyExpression
a b :: IndividualArg
b c :: IndividualArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 IndividualArg
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectPropertyAtom" [Int
a', Int
b',
                                                       Int
c'] []) ATermTable
att3
    DataPropertyAtom a :: OntologyIRI
a b :: IndividualArg
b c :: DataArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DataArg
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataPropertyAtom" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    BuiltInAtom a :: OntologyIRI
a b :: [DataArg]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [DataArg] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [DataArg]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "BuiltInAtom" [Int
a', Int
b'] []) ATermTable
att2
    SameIndividualAtom a :: IndividualArg
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IndividualArg
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SameIndividualAtom" [Int
a', Int
b'] []) ATermTable
att2
    DifferentIndividualsAtom a :: IndividualArg
a b :: IndividualArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IndividualArg
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 IndividualArg
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DifferentIndividualsAtom" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    UnknownUnaryAtom a :: OntologyIRI
a b :: UnknownArg
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> UnknownArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 UnknownArg
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UnknownUnaryAtom" [Int
a', Int
b'] []) ATermTable
att2
    UnknownBinaryAtom a :: OntologyIRI
a b :: UnknownArg
b c :: UnknownArg
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> UnknownArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 UnknownArg
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> UnknownArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 UnknownArg
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "UnknownBinaryAtom" [Int
a', Int
b',
                                                      Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Atom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "ClassAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, ClassExpression -> IndividualArg -> Atom
ClassAtom ClassExpression
a' IndividualArg
b') }}
    ShAAppl "DataRangeAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataRange
a') ->
      case Int -> ATermTable -> (ATermTable, DataArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DataArg
b') ->
      (ATermTable
att2, DataRange -> DataArg -> Atom
DataRangeAtom DataRange
a' DataArg
b') }}
    ShAAppl "ObjectPropertyAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: IndividualArg
c') ->
      (ATermTable
att3, ObjectPropertyExpression -> IndividualArg -> IndividualArg -> Atom
ObjectPropertyAtom ObjectPropertyExpression
a' IndividualArg
b' IndividualArg
c') }}}
    ShAAppl "DataPropertyAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      case Int -> ATermTable -> (ATermTable, DataArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DataArg
c') ->
      (ATermTable
att3, OntologyIRI -> IndividualArg -> DataArg -> Atom
DataPropertyAtom OntologyIRI
a' IndividualArg
b' DataArg
c') }}}
    ShAAppl "BuiltInAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, [DataArg])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [DataArg]
b') ->
      (ATermTable
att2, OntologyIRI -> [DataArg] -> Atom
BuiltInAtom OntologyIRI
a' [DataArg]
b') }}
    ShAAppl "SameIndividualAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: IndividualArg
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, IndividualArg -> IndividualArg -> Atom
SameIndividualAtom IndividualArg
a' IndividualArg
b') }}
    ShAAppl "DifferentIndividualsAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: IndividualArg
a') ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: IndividualArg
b') ->
      (ATermTable
att2, IndividualArg -> IndividualArg -> Atom
DifferentIndividualsAtom IndividualArg
a' IndividualArg
b') }}
    ShAAppl "UnknownUnaryAtom" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, UnknownArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: UnknownArg
b') ->
      (ATermTable
att2, OntologyIRI -> UnknownArg -> Atom
UnknownUnaryAtom OntologyIRI
a' UnknownArg
b') }}
    ShAAppl "UnknownBinaryAtom" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      case Int -> ATermTable -> (ATermTable, UnknownArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: UnknownArg
b') ->
      case Int -> ATermTable -> (ATermTable, UnknownArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: UnknownArg
c') ->
      (ATermTable
att3, OntologyIRI -> UnknownArg -> UnknownArg -> Atom
UnknownBinaryAtom OntologyIRI
a' UnknownArg
b' UnknownArg
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Atom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Atom" ShATerm
u

instance ShATermConvertible OWL2.AS.UnknownArg where
  toShATermAux :: ATermTable -> UnknownArg -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: UnknownArg
xv = case UnknownArg
xv of
    IndividualArg a :: IndividualArg
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> IndividualArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 IndividualArg
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IndividualArg" [Int
a'] []) ATermTable
att1
    DataArg a :: DataArg
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataArg -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataArg
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataArg" [Int
a'] []) ATermTable
att1
    Variable a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Variable" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, UnknownArg)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "IndividualArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, IndividualArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: IndividualArg
a') ->
      (ATermTable
att1, IndividualArg -> UnknownArg
IndividualArg IndividualArg
a') }
    ShAAppl "DataArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DataArg)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataArg
a') ->
      (ATermTable
att1, DataArg -> UnknownArg
DataArg DataArg
a') }
    ShAAppl "Variable" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> UnknownArg
Variable OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, UnknownArg)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.UnknownArg" ShATerm
u

instance ShATermConvertible OWL2.AS.DataArg where
  toShATermAux :: ATermTable -> DataArg -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DataArg
xv = case DataArg
xv of
    DArg a :: Literal
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Literal
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DArg" [Int
a'] []) ATermTable
att1
    DVar a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DVar" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DataArg)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Literal
a') ->
      (ATermTable
att1, Literal -> DataArg
DArg Literal
a') }
    ShAAppl "DVar" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> DataArg
DVar OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DataArg)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DataArg" ShATerm
u

instance ShATermConvertible OWL2.AS.IndividualArg where
  toShATermAux :: ATermTable -> IndividualArg -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: IndividualArg
xv = case IndividualArg
xv of
    IArg a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IArg" [Int
a'] []) ATermTable
att1
    IVar a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IVar" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, IndividualArg)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "IArg" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> IndividualArg
IArg OntologyIRI
a') }
    ShAAppl "IVar" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> IndividualArg
IVar OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, IndividualArg)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.IndividualArg" ShATerm
u

instance ShATermConvertible OWL2.AS.Rule where
  toShATermAux :: ATermTable -> Rule -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Rule
xv = case Rule
xv of
    DLSafeRule a :: [Annotation]
a b :: [Atom]
b c :: [Atom]
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [Atom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [Atom]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [Atom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [Atom]
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DLSafeRule" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    DGRule a :: [Annotation]
a b :: [DGAtom]
b c :: [DGAtom]
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [DGAtom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [DGAtom]
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [DGAtom] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [DGAtom]
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DGRule" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Rule)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "DLSafeRule" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [Atom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [Atom]
b') ->
      case Int -> ATermTable -> (ATermTable, [Atom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [Atom]
c') ->
      (ATermTable
att3, [Annotation] -> [Atom] -> [Atom] -> Rule
DLSafeRule [Annotation]
a' [Atom]
b' [Atom]
c') }}}
    ShAAppl "DGRule" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [DGAtom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [DGAtom]
b') ->
      case Int -> ATermTable -> (ATermTable, [DGAtom])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [DGAtom]
c') ->
      (ATermTable
att3, [Annotation] -> [DGAtom] -> [DGAtom] -> Rule
DGRule [Annotation]
a' [DGAtom]
b' [DGAtom]
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Rule)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Rule" ShATerm
u

instance ShATermConvertible OWL2.AS.Assertion where
  toShATermAux :: ATermTable -> Assertion -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Assertion
xv = case Assertion
xv of
    SameIndividual a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SameIndividual" [Int
a', Int
b'] []) ATermTable
att2
    DifferentIndividuals a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DifferentIndividuals" [Int
a', Int
b'] []) ATermTable
att2
    ClassAssertion a :: [Annotation]
a b :: ClassExpression
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ClassAssertion" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    ObjectPropertyAssertion a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: OntologyIRI
c d :: OntologyIRI
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 OntologyIRI
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectPropertyAssertion" [Int
a', Int
b', Int
c',
                                                            Int
d'] []) ATermTable
att4
    NegativeObjectPropertyAssertion a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: OntologyIRI
c d :: OntologyIRI
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 OntologyIRI
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NegativeObjectPropertyAssertion" [Int
a',
                                                                    Int
b', Int
c', Int
d'] []) ATermTable
att4
    DataPropertyAssertion a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c d :: Literal
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Literal
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataPropertyAssertion" [Int
a', Int
b', Int
c',
                                                          Int
d'] []) ATermTable
att4
    NegativeDataPropertyAssertion a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c d :: Literal
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 Literal
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "NegativeDataPropertyAssertion" [Int
a', Int
b',
                                                                  Int
c', Int
d'] []) ATermTable
att4
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Assertion)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SameIndividual" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> Assertion
SameIndividual [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "DifferentIndividuals" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> Assertion
DifferentIndividuals [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "ClassAssertion" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> ClassExpression -> OntologyIRI -> Assertion
ClassAssertion [Annotation]
a' ClassExpression
b' OntologyIRI
c') }}}
    ShAAppl "ObjectPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: OntologyIRI
d') ->
      (ATermTable
att4, [Annotation]
-> ObjectPropertyExpression
-> OntologyIRI
-> OntologyIRI
-> Assertion
ObjectPropertyAssertion [Annotation]
a' ObjectPropertyExpression
b' OntologyIRI
c' OntologyIRI
d') }}}}
    ShAAppl "NegativeObjectPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: OntologyIRI
d') ->
      (ATermTable
att4, [Annotation]
-> ObjectPropertyExpression
-> OntologyIRI
-> OntologyIRI
-> Assertion
NegativeObjectPropertyAssertion [Annotation]
a' ObjectPropertyExpression
b' OntologyIRI
c' OntologyIRI
d') }}}}
    ShAAppl "DataPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Literal
d') ->
      (ATermTable
att4, [Annotation] -> OntologyIRI -> OntologyIRI -> Literal -> Assertion
DataPropertyAssertion [Annotation]
a' OntologyIRI
b' OntologyIRI
c' Literal
d') }}}}
    ShAAppl "NegativeDataPropertyAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: Literal
d') ->
      (ATermTable
att4, [Annotation] -> OntologyIRI -> OntologyIRI -> Literal -> Assertion
NegativeDataPropertyAssertion [Annotation]
a' OntologyIRI
b' OntologyIRI
c' Literal
d') }}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Assertion)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Assertion" ShATerm
u

instance ShATermConvertible OWL2.AS.DataPropertyAxiom where
  toShATermAux :: ATermTable -> DataPropertyAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: DataPropertyAxiom
xv = case DataPropertyAxiom
xv of
    SubDataPropertyOf a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SubDataPropertyOf" [Int
a', Int
b',
                                                      Int
c'] []) ATermTable
att3
    EquivalentDataProperties a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EquivalentDataProperties" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    DisjointDataProperties a :: [Annotation]
a b :: DirectlyImportsDocuments
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DisjointDataProperties" [Int
a',
                                                           Int
b'] []) ATermTable
att2
    DataPropertyDomain a :: [Annotation]
a b :: OntologyIRI
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataPropertyDomain" [Int
a', Int
b',
                                                       Int
c'] []) ATermTable
att3
    DataPropertyRange a :: [Annotation]
a b :: OntologyIRI
b c :: DataRange
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DataRange
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataPropertyRange" [Int
a', Int
b',
                                                      Int
c'] []) ATermTable
att3
    FunctionalDataProperty a :: [Annotation]
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FunctionalDataProperty" [Int
a',
                                                           Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, DataPropertyAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubDataPropertyOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> DataPropertyAxiom
SubDataPropertyOf [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    ShAAppl "EquivalentDataProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> DataPropertyAxiom
EquivalentDataProperties [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "DisjointDataProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: DirectlyImportsDocuments
b') ->
      (ATermTable
att2, [Annotation] -> DirectlyImportsDocuments -> DataPropertyAxiom
DisjointDataProperties [Annotation]
a' DirectlyImportsDocuments
b') }}
    ShAAppl "DataPropertyDomain" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> ClassExpression -> DataPropertyAxiom
DataPropertyDomain [Annotation]
a' OntologyIRI
b' ClassExpression
c') }}}
    ShAAppl "DataPropertyRange" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DataRange
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> DataRange -> DataPropertyAxiom
DataPropertyRange [Annotation]
a' OntologyIRI
b' DataRange
c') }}}
    ShAAppl "FunctionalDataProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      (ATermTable
att2, [Annotation] -> OntologyIRI -> DataPropertyAxiom
FunctionalDataProperty [Annotation]
a' OntologyIRI
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, DataPropertyAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.DataPropertyAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.SubObjectPropertyExpression where
  toShATermAux :: ATermTable -> SubObjectPropertyExpression -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: SubObjectPropertyExpression
xv = case SubObjectPropertyExpression
xv of
    SubObjPropExpr_obj a :: ObjectPropertyExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SubObjPropExpr_obj" [Int
a'] []) ATermTable
att1
    SubObjPropExpr_exprchain a :: [ObjectPropertyExpression]
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [ObjectPropertyExpression]
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SubObjPropExpr_exprchain" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, SubObjectPropertyExpression)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubObjPropExpr_obj" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyExpression
a') ->
      (ATermTable
att1, ObjectPropertyExpression -> SubObjectPropertyExpression
SubObjPropExpr_obj ObjectPropertyExpression
a') }
    ShAAppl "SubObjPropExpr_exprchain" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [ObjectPropertyExpression]
a') ->
      (ATermTable
att1, [ObjectPropertyExpression] -> SubObjectPropertyExpression
SubObjPropExpr_exprchain [ObjectPropertyExpression]
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, SubObjectPropertyExpression)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.SubObjectPropertyExpression" ShATerm
u

instance ShATermConvertible OWL2.AS.ObjectPropertyAxiom where
  toShATermAux :: ATermTable -> ObjectPropertyAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ObjectPropertyAxiom
xv = case ObjectPropertyAxiom
xv of
    SubObjectPropertyOf a :: [Annotation]
a b :: SubObjectPropertyExpression
b c :: ObjectPropertyExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> SubObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 SubObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ObjectPropertyExpression
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SubObjectPropertyOf" [Int
a', Int
b',
                                                        Int
c'] []) ATermTable
att3
    EquivalentObjectProperties a :: [Annotation]
a b :: [ObjectPropertyExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ObjectPropertyExpression]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EquivalentObjectProperties" [Int
a',
                                                               Int
b'] []) ATermTable
att2
    DisjointObjectProperties a :: [Annotation]
a b :: [ObjectPropertyExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ObjectPropertyExpression]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DisjointObjectProperties" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    InverseObjectProperties a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: ObjectPropertyExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ObjectPropertyExpression
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "InverseObjectProperties" [Int
a', Int
b',
                                                            Int
c'] []) ATermTable
att3
    ObjectPropertyDomain a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectPropertyDomain" [Int
a', Int
b',
                                                         Int
c'] []) ATermTable
att3
    ObjectPropertyRange a :: [Annotation]
a b :: ObjectPropertyExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectPropertyRange" [Int
a', Int
b',
                                                        Int
c'] []) ATermTable
att3
    FunctionalObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "FunctionalObjectProperty" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    InverseFunctionalObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "InverseFunctionalObjectProperty" [Int
a',
                                                                    Int
b'] []) ATermTable
att2
    ReflexiveObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ReflexiveObjectProperty" [Int
a',
                                                            Int
b'] []) ATermTable
att2
    IrreflexiveObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "IrreflexiveObjectProperty" [Int
a',
                                                              Int
b'] []) ATermTable
att2
    SymmetricObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SymmetricObjectProperty" [Int
a',
                                                            Int
b'] []) ATermTable
att2
    AsymmetricObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AsymmetricObjectProperty" [Int
a',
                                                             Int
b'] []) ATermTable
att2
    TransitiveObjectProperty a :: [Annotation]
a b :: ObjectPropertyExpression
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "TransitiveObjectProperty" [Int
a',
                                                             Int
b'] []) ATermTable
att2
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ObjectPropertyAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubObjectPropertyOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, SubObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: SubObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ObjectPropertyExpression
c') ->
      (ATermTable
att3, [Annotation]
-> SubObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom
SubObjectPropertyOf [Annotation]
a' SubObjectPropertyExpression
b' ObjectPropertyExpression
c') }}}
    ShAAppl "EquivalentObjectProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ObjectPropertyExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom
EquivalentObjectProperties [Annotation]
a' [ObjectPropertyExpression]
b') }}
    ShAAppl "DisjointObjectProperties" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ObjectPropertyExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ObjectPropertyExpression] -> ObjectPropertyAxiom
DisjointObjectProperties [Annotation]
a' [ObjectPropertyExpression]
b') }}
    ShAAppl "InverseObjectProperties" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ObjectPropertyExpression
c') ->
      (ATermTable
att3, [Annotation]
-> ObjectPropertyExpression
-> ObjectPropertyExpression
-> ObjectPropertyAxiom
InverseObjectProperties [Annotation]
a' ObjectPropertyExpression
b' ObjectPropertyExpression
c') }}}
    ShAAppl "ObjectPropertyDomain" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom
ObjectPropertyDomain [Annotation]
a' ObjectPropertyExpression
b' ClassExpression
c') }}}
    ShAAppl "ObjectPropertyRange" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation]
-> ObjectPropertyExpression
-> ClassExpression
-> ObjectPropertyAxiom
ObjectPropertyRange [Annotation]
a' ObjectPropertyExpression
b' ClassExpression
c') }}}
    ShAAppl "FunctionalObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
FunctionalObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "InverseFunctionalObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
InverseFunctionalObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "ReflexiveObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
ReflexiveObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "IrreflexiveObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
IrreflexiveObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "SymmetricObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
SymmetricObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "AsymmetricObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
AsymmetricObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    ShAAppl "TransitiveObjectProperty" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ObjectPropertyExpression
b') ->
      (ATermTable
att2, [Annotation] -> ObjectPropertyExpression -> ObjectPropertyAxiom
TransitiveObjectProperty [Annotation]
a' ObjectPropertyExpression
b') }}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ObjectPropertyAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.ObjectPropertyAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.ClassAxiom where
  toShATermAux :: ATermTable -> ClassAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ClassAxiom
xv = case ClassAxiom
xv of
    SubClassOf a :: [Annotation]
a b :: ClassExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SubClassOf" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    EquivalentClasses a :: [Annotation]
a b :: [ClassExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ClassExpression]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "EquivalentClasses" [Int
a', Int
b'] []) ATermTable
att2
    DisjointClasses a :: [Annotation]
a b :: [ClassExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ClassExpression]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DisjointClasses" [Int
a', Int
b'] []) ATermTable
att2
    DisjointUnion a :: [Annotation]
a b :: OntologyIRI
b c :: [ClassExpression]
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [ClassExpression]
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DisjointUnion" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, ClassAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "SubClassOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: ClassExpression
c') ->
      (ATermTable
att3, [Annotation] -> ClassExpression -> ClassExpression -> ClassAxiom
SubClassOf [Annotation]
a' ClassExpression
b' ClassExpression
c') }}}
    ShAAppl "EquivalentClasses" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ClassExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ClassExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ClassExpression] -> ClassAxiom
EquivalentClasses [Annotation]
a' [ClassExpression]
b') }}
    ShAAppl "DisjointClasses" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, [ClassExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: [ClassExpression]
b') ->
      (ATermTable
att2, [Annotation] -> [ClassExpression] -> ClassAxiom
DisjointClasses [Annotation]
a' [ClassExpression]
b') }}
    ShAAppl "DisjointUnion" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, [ClassExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [ClassExpression]
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> [ClassExpression] -> ClassAxiom
DisjointUnion [Annotation]
a' OntologyIRI
b' [ClassExpression]
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, ClassAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.ClassAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.Axiom where
  toShATermAux :: ATermTable -> Axiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Axiom
xv = case Axiom
xv of
    Declaration a :: [Annotation]
a b :: Entity
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> Entity -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 Entity
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Declaration" [Int
a', Int
b'] []) ATermTable
att2
    ClassAxiom a :: ClassAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassAxiom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ClassAxiom" [Int
a'] []) ATermTable
att1
    ObjectPropertyAxiom a :: ObjectPropertyAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyAxiom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectPropertyAxiom" [Int
a'] []) ATermTable
att1
    DataPropertyAxiom a :: DataPropertyAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DataPropertyAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DataPropertyAxiom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DataPropertyAxiom" [Int
a'] []) ATermTable
att1
    DatatypeDefinition a :: [Annotation]
a b :: OntologyIRI
b c :: DataRange
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 DataRange
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DatatypeDefinition" [Int
a', Int
b',
                                                       Int
c'] []) ATermTable
att3
    HasKey a :: [Annotation]
a b :: ClassExpression
b c :: [ObjectPropertyExpression]
c d :: DirectlyImportsDocuments
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ClassExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [ObjectPropertyExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [ObjectPropertyExpression]
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 DirectlyImportsDocuments
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "HasKey" [Int
a', Int
b', Int
c', Int
d'] []) ATermTable
att4
    Assertion a :: Assertion
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Assertion -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Assertion
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Assertion" [Int
a'] []) ATermTable
att1
    AnnotationAxiom a :: AnnotationAxiom
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> AnnotationAxiom -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 AnnotationAxiom
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnotationAxiom" [Int
a'] []) ATermTable
att1
    Rule a :: Rule
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Rule -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Rule
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Rule" [Int
a'] []) ATermTable
att1
    DGAxiom a :: [Annotation]
a b :: OntologyIRI
b c :: [DGNodeAssertion]
c d :: [DGEdgeAssertion]
d e :: DirectlyImportsDocuments
e -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> [DGNodeAssertion] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 [DGNodeAssertion]
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> [DGEdgeAssertion] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 [DGEdgeAssertion]
d
      (att5 :: ATermTable
att5, e' :: Int
e') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att4 DirectlyImportsDocuments
e
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "DGAxiom" [Int
a', Int
b', Int
c', Int
d', Int
e'] []) ATermTable
att5
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Axiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Declaration" [a :: Int
a, b :: Int
b] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, Entity)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: Entity
b') ->
      (ATermTable
att2, [Annotation] -> Entity -> Axiom
Declaration [Annotation]
a' Entity
b') }}
    ShAAppl "ClassAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ClassAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ClassAxiom
a') ->
      (ATermTable
att1, ClassAxiom -> Axiom
ClassAxiom ClassAxiom
a') }
    ShAAppl "ObjectPropertyAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, ObjectPropertyAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: ObjectPropertyAxiom
a') ->
      (ATermTable
att1, ObjectPropertyAxiom -> Axiom
ObjectPropertyAxiom ObjectPropertyAxiom
a') }
    ShAAppl "DataPropertyAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, DataPropertyAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: DataPropertyAxiom
a') ->
      (ATermTable
att1, DataPropertyAxiom -> Axiom
DataPropertyAxiom DataPropertyAxiom
a') }
    ShAAppl "DatatypeDefinition" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, DataRange)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: DataRange
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> DataRange -> Axiom
DatatypeDefinition [Annotation]
a' OntologyIRI
b' DataRange
c') }}}
    ShAAppl "HasKey" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, ClassExpression)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: ClassExpression
b') ->
      case Int -> ATermTable -> (ATermTable, [ObjectPropertyExpression])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [ObjectPropertyExpression]
c') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: DirectlyImportsDocuments
d') ->
      (ATermTable
att4, [Annotation]
-> ClassExpression
-> [ObjectPropertyExpression]
-> DirectlyImportsDocuments
-> Axiom
HasKey [Annotation]
a' ClassExpression
b' [ObjectPropertyExpression]
c' DirectlyImportsDocuments
d') }}}}
    ShAAppl "Assertion" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Assertion)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Assertion
a') ->
      (ATermTable
att1, Assertion -> Axiom
Assertion Assertion
a') }
    ShAAppl "AnnotationAxiom" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, AnnotationAxiom)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: AnnotationAxiom
a') ->
      (ATermTable
att1, AnnotationAxiom -> Axiom
AnnotationAxiom AnnotationAxiom
a') }
    ShAAppl "Rule" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Rule)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Rule
a') ->
      (ATermTable
att1, Rule -> Axiom
Rule Rule
a') }
    ShAAppl "DGAxiom" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d, e :: Int
e] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, [DGNodeAssertion])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: [DGNodeAssertion]
c') ->
      case Int -> ATermTable -> (ATermTable, [DGEdgeAssertion])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: [DGEdgeAssertion]
d') ->
      case Int -> ATermTable -> (ATermTable, DirectlyImportsDocuments)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
e ATermTable
att4 of
      { (att5 :: ATermTable
att5, e' :: DirectlyImportsDocuments
e') ->
      (ATermTable
att5, [Annotation]
-> OntologyIRI
-> [DGNodeAssertion]
-> [DGEdgeAssertion]
-> DirectlyImportsDocuments
-> Axiom
DGAxiom [Annotation]
a' OntologyIRI
b' [DGNodeAssertion]
c' [DGEdgeAssertion]
d' DirectlyImportsDocuments
e') }}}}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Axiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Axiom" ShATerm
u

instance ShATermConvertible OWL2.AS.AnnotationSubject where
  toShATermAux :: ATermTable -> AnnotationSubject -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AnnotationSubject
xv = case AnnotationSubject
xv of
    AnnSubIri a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnSubIri" [Int
a'] []) ATermTable
att1
    AnnSubAnInd a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnSubAnInd" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, AnnotationSubject)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AnnSubIri" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationSubject
AnnSubIri OntologyIRI
a') }
    ShAAppl "AnnSubAnInd" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationSubject
AnnSubAnInd OntologyIRI
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AnnotationSubject)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.AnnotationSubject" ShATerm
u

instance ShATermConvertible OWL2.AS.AnnotationAxiom where
  toShATermAux :: ATermTable -> AnnotationAxiom -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AnnotationAxiom
xv = case AnnotationAxiom
xv of
    AnnotationAssertion a :: [Annotation]
a b :: OntologyIRI
b c :: AnnotationSubject
c d :: AnnotationValue
d -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> AnnotationSubject -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 AnnotationSubject
c
      (att4 :: ATermTable
att4, d' :: Int
d') <- ATermTable -> AnnotationValue -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att3 AnnotationValue
d
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnotationAssertion" [Int
a', Int
b', Int
c',
                                                        Int
d'] []) ATermTable
att4
    SubAnnotationPropertyOf a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "SubAnnotationPropertyOf" [Int
a', Int
b',
                                                            Int
c'] []) ATermTable
att3
    AnnotationPropertyDomain a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnotationPropertyDomain" [Int
a', Int
b',
                                                             Int
c'] []) ATermTable
att3
    AnnotationPropertyRange a :: [Annotation]
a b :: OntologyIRI
b c :: OntologyIRI
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 OntologyIRI
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnotationPropertyRange" [Int
a', Int
b',
                                                            Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, AnnotationAxiom)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AnnotationAssertion" [a :: Int
a, b :: Int
b, c :: Int
c, d :: Int
d] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, AnnotationSubject)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: AnnotationSubject
c') ->
      case Int -> ATermTable -> (ATermTable, AnnotationValue)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
d ATermTable
att3 of
      { (att4 :: ATermTable
att4, d' :: AnnotationValue
d') ->
      (ATermTable
att4, [Annotation]
-> OntologyIRI
-> AnnotationSubject
-> AnnotationValue
-> AnnotationAxiom
AnnotationAssertion [Annotation]
a' OntologyIRI
b' AnnotationSubject
c' AnnotationValue
d') }}}}
    ShAAppl "SubAnnotationPropertyOf" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> AnnotationAxiom
SubAnnotationPropertyOf [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    ShAAppl "AnnotationPropertyDomain" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> AnnotationAxiom
AnnotationPropertyDomain [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    ShAAppl "AnnotationPropertyRange" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: OntologyIRI
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> OntologyIRI -> AnnotationAxiom
AnnotationPropertyRange [Annotation]
a' OntologyIRI
b' OntologyIRI
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AnnotationAxiom)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.AnnotationAxiom" ShATerm
u

instance ShATermConvertible OWL2.AS.AnnotationValue where
  toShATermAux :: ATermTable -> AnnotationValue -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: AnnotationValue
xv = case AnnotationValue
xv of
    AnnAnInd a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnAnInd" [Int
a'] []) ATermTable
att1
    AnnValue a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnValue" [Int
a'] []) ATermTable
att1
    AnnValLit a :: Literal
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> Literal -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Literal
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "AnnValLit" [Int
a'] []) ATermTable
att1
  fromShATermAux :: Int -> ATermTable -> (ATermTable, AnnotationValue)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "AnnAnInd" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationValue
AnnAnInd OntologyIRI
a') }
    ShAAppl "AnnValue" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: OntologyIRI
a') ->
      (ATermTable
att1, OntologyIRI -> AnnotationValue
AnnValue OntologyIRI
a') }
    ShAAppl "AnnValLit" [a :: Int
a] _ ->
      case Int -> ATermTable -> (ATermTable, Literal)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: Literal
a') ->
      (ATermTable
att1, Literal -> AnnotationValue
AnnValLit Literal
a') }
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, AnnotationValue)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.AnnotationValue" ShATerm
u

instance ShATermConvertible OWL2.AS.Annotation where
  toShATermAux :: ATermTable -> Annotation -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: Annotation
xv = case Annotation
xv of
    Annotation a :: [Annotation]
a b :: OntologyIRI
b c :: AnnotationValue
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> [Annotation] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 [Annotation]
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> AnnotationValue -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 AnnotationValue
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Annotation" [Int
a', Int
b', Int
c'] []) ATermTable
att3
  fromShATermAux :: Int -> ATermTable -> (ATermTable, Annotation)
fromShATermAux ix :: Int
ix att0 :: ATermTable
att0 = case Int -> ATermTable -> ShATerm
getShATerm Int
ix ATermTable
att0 of
    ShAAppl "Annotation" [a :: Int
a, b :: Int
b, c :: Int
c] _ ->
      case Int -> ATermTable -> (ATermTable, [Annotation])
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
a ATermTable
att0 of
      { (att1 :: ATermTable
att1, a' :: [Annotation]
a') ->
      case Int -> ATermTable -> (ATermTable, OntologyIRI)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
b ATermTable
att1 of
      { (att2 :: ATermTable
att2, b' :: OntologyIRI
b') ->
      case Int -> ATermTable -> (ATermTable, AnnotationValue)
forall t.
ShATermConvertible t =>
Int -> ATermTable -> (ATermTable, t)
fromShATerm' Int
c ATermTable
att2 of
      { (att3 :: ATermTable
att3, c' :: AnnotationValue
c') ->
      (ATermTable
att3, [Annotation] -> OntologyIRI -> AnnotationValue -> Annotation
Annotation [Annotation]
a' OntologyIRI
b' AnnotationValue
c') }}}
    u :: ShATerm
u -> String -> ShATerm -> (ATermTable, Annotation)
forall a. String -> ShATerm -> a
fromShATermError "OWL2.AS.Annotation" ShATerm
u

instance ShATermConvertible OWL2.AS.ClassExpression where
  toShATermAux :: ATermTable -> ClassExpression -> IO (ATermTable, Int)
toShATermAux att0 :: ATermTable
att0 xv :: ClassExpression
xv = case ClassExpression
xv of
    Expression a :: OntologyIRI
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 OntologyIRI
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "Expression" [Int
a'] []) ATermTable
att1
    ObjectJunction a :: JunctionType
a b :: [ClassExpression]
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> JunctionType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 JunctionType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> [ClassExpression] -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 [ClassExpression]
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectJunction" [Int
a', Int
b'] []) ATermTable
att2
    ObjectComplementOf a :: ClassExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ClassExpression
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectComplementOf" [Int
a'] []) ATermTable
att1
    ObjectOneOf a :: DirectlyImportsDocuments
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 DirectlyImportsDocuments
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectOneOf" [Int
a'] []) ATermTable
att1
    ObjectValuesFrom a :: QuantifierType
a b :: ObjectPropertyExpression
b c :: ClassExpression
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> QuantifierType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 QuantifierType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 ObjectPropertyExpression
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> ClassExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2 ClassExpression
c
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectValuesFrom" [Int
a', Int
b', Int
c'] []) ATermTable
att3
    ObjectHasValue a :: ObjectPropertyExpression
a b :: OntologyIRI
b -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> OntologyIRI -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 OntologyIRI
b
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectHasValue" [Int
a', Int
b'] []) ATermTable
att2
    ObjectHasSelf a :: ObjectPropertyExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> ObjectPropertyExpression -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 ObjectPropertyExpression
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectHasSelf" [Int
a'] []) ATermTable
att1
    ObjectCardinality a :: Cardinality ObjectPropertyExpression ClassExpression
a -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable
-> Cardinality ObjectPropertyExpression ClassExpression
-> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 Cardinality ObjectPropertyExpression ClassExpression
a
      (ATermTable, Int) -> IO (ATermTable, Int)
forall (m :: * -> *) a. Monad m => a -> m a
return ((ATermTable, Int) -> IO (ATermTable, Int))
-> (ATermTable, Int) -> IO (ATermTable, Int)
forall a b. (a -> b) -> a -> b
$ ShATerm -> ATermTable -> (ATermTable, Int)
addATerm (String -> [Int] -> [Int] -> ShATerm
ShAAppl "ObjectCardinality" [Int
a'] []) ATermTable
att1
    DataValuesFrom a :: QuantifierType
a b :: DirectlyImportsDocuments
b c :: DataRange
c -> do
      (att1 :: ATermTable
att1, a' :: Int
a') <- ATermTable -> QuantifierType -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att0 QuantifierType
a
      (att2 :: ATermTable
att2, b' :: Int
b') <- ATermTable -> DirectlyImportsDocuments -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att1 DirectlyImportsDocuments
b
      (att3 :: ATermTable
att3, c' :: Int
c') <- ATermTable -> DataRange -> IO (ATermTable, Int)
forall t.
ShATermConvertible t =>
ATermTable -> t -> IO (ATermTable, Int)
toShATerm' ATermTable
att2