-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathOWL22NeSyPatterns.hs
86 lines (75 loc) · 2.84 KB
/
OWL22NeSyPatterns.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Inclusion comorphism from OWL 2 to NeSyPatterns
Copyright : (c) Till Mossakowksi
License : GPLv2 or higher, see LICENSE.txt
Stability : provisional
Portability : non-portable (via Logic.Logic)
-}
module OWL2.OWL22NeSyPatterns (OWL22NeSyPatterns (..)) where
import Common.ProofTree
import ATC.ProofTree ()
import Logic.Logic as Logic
import Logic.Comorphism
import Common.AS_Annotation
import Common.Result
import qualified Data.Set as Set
-- OWL = domain
import OWL2.Logic_OWL2
import OWL2.AS as AS
import OWL2.ProfilesAndSublogics
import OWL2.ManchesterPrint ()
import OWL2.Morphism
import OWL2.Symbols
import qualified OWL2.Sign as OS
-- NeSyPatterns = codomain
import NeSyPatterns.Logic_NeSyPatterns
import NeSyPatterns.Sign
import NeSyPatterns.Morphism
import NeSyPatterns.AS
import NeSyPatterns.Symbol as Symbol
import NeSyPatterns.Analysis
data OWL22NeSyPatterns = OWL22NeSyPatterns deriving Show
instance Language OWL22NeSyPatterns
instance Comorphism
OWL22NeSyPatterns -- comorphism
OWL2 -- lid domain
ProfSub -- sublogics domain
OntologyDocument -- Basic spec domain
Axiom -- sentence domain
SymbItems -- symbol items domain
SymbMapItems -- symbol map items domain
OS.Sign -- signature domain
OWLMorphism -- morphism domain
Entity -- symbol domain
RawSymb -- rawsymbol domain
ProofTree -- proof tree codomain
NeSyPatterns -- lid codomain
() -- sublogics codomain
BASIC_SPEC -- Basic spec codomain
() -- sentence codomain
SYMB_ITEMS -- symbol items codomain
SYMB_MAP_ITEMS -- symbol map items codomain
Sign -- sign codomain
Morphism -- morphism codomain
Symbol -- symbol codomain
Symbol -- raw_symbol codomain
ProofTree -- proof_tree codomain
where
sourceLogic OWL22NeSyPatterns = OWL2
sourceSublogic OWL22NeSyPatterns = topS
targetLogic OWL22NeSyPatterns = NeSyPatterns
mapSublogic OWL22NeSyPatterns _ = Just ()
map_theory OWL22NeSyPatterns = mapTheory
map_morphism OWL22NeSyPatterns = mapMorphism
map_symbol OWL22NeSyPatterns _ = mapSymbol
isInclusionComorphism OWL22NeSyPatterns = True
isGTC OWL22NeSyPatterns = True
mapTheory :: (OS.Sign, [Named Axiom]) -> Result (Sign, [Named ()])
mapTheory (sig, sens) = return (emptySig{ owlClasses = OS.concepts sig
, owlTaxonomy = subClassRelation $ map sentence sens}, [])
mapMorphism :: OWLMorphism -> Result Morphism
mapMorphism _ = fail "nyi"
mapSymbol :: Entity -> Set.Set Symbol
mapSymbol _ = Set.empty