As.hs revision 7ce7e7613d5f66523dfee99cec72dc92c579e91b
967e5f3c25249c779575864692935627004d3f9eChristian MaederModule : $Header$
81d182b21020b815887e9057959228546cf61b6bChristian MaederDescription : abstract ADL syntax
f11f713bebd8e1e623a0a4361065df256033de47Christian MaederCopyright : (c) Stef Joosten, Christian Maeder DFKI GmbH 2010
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian MaederLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
3f69b6948966979163bdfe8331c38833d5d90ecdChristian MaederMaintainer : Christian.Maeder@dfki.de
967e5f3c25249c779575864692935627004d3f9eChristian MaederStability : provisional
89054b2b95a3f92e78324dc852f3d34704e2ca49Christian MaederPortability : portable
fd896e2068ad7e50aed66ac18c3720ea7ff2619fChristian Maeder = C String -- ^ The name of this Concept
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder | Anything -- ^ Really Anything!
650bafe7709533bc5f82bb9daf8fa06f431cd963Christian Maeder | NOthing -- ^ Nothing at all
9cb4aa4ea6685489a38f9b609f5dbe5d37f25bc7Christian Maeder deriving (Eq, Ord, Show)
ac19f8695aa1b2d2d1cd1319da2530edd8f46a96Christian Maederdata Relation = Sgn
8b9fda012e5ee53b7b2320c0638896a0ff6e99f3Christian Maeder { decnm :: String -- ^ the name
e1839fb37a3a2ccd457464cb0dcc5efd466dbe22Christian Maeder , desrc :: Concept -- ^ the source concept
4ef2a978e66e2246ff0b7f00c77deb7aabb28b8eChristian Maeder , detrg :: Concept -- ^ the target concept
fd896e2068ad7e50aed66ac18c3720ea7ff2619fChristian Maeder } deriving (Eq, Ord, Show)
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder = K0 -- ^ Reflexive and transitive closure *
fd896e2068ad7e50aed66ac18c3720ea7ff2619fChristian Maeder | K1 -- ^ Transitive closure +
717686b54b9650402e2ebfbaadf433eab8ba5171Christian Maeder | Cp -- ^ Complement -
a95f5379cabb30d3beb0545002cf50e9e4fc2c86Christian Maeder | Co -- ^ Converse ~
a95f5379cabb30d3beb0545002cf50e9e4fc2c86Christian Maeder deriving (Eq, Ord, Show)
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder = Fc -- ^ composition ;
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Fd -- ^ relative addition !
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Fi -- ^ intersection
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Fu -- ^ union \/
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder deriving (Eq, Ord, Show)
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maederdata Expression
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder = Tm Relation
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder | MulExp MulOp [Expression]
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder | UnExp UnOp Expression
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder deriving (Eq, Ord, Show)
67d92da5e9610aabad39055a16031154b4dc3748Christian Maederdata RuleType = Implication | ReverseImpl | Equivalence deriving (Eq, Ord, Show)
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder = Rule Expression RuleType Expression
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder | Truth Expression
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder deriving (Eq, Ord, Show)
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder = Uni -- ^ univalent
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Inj -- ^ injective
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Sur -- ^ surjective
67d92da5e9610aabad39055a16031154b4dc3748Christian Maeder | Tot -- ^ total
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Sym -- ^ symmetric
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Asy -- ^ antisymmetric
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Trn -- ^ transitive
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Rfx -- ^ reflexive
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder | Prop -- ^ meta property
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder deriving (Enum, Eq, Ord, Show)
1a75698c909ad515d59c76e65bd783f015c21c4dChristian MaedershowProp :: Prop -> String
67d92da5e9610aabad39055a16031154b4dc3748Christian MaedershowProp = map toUpper . show
1a75698c909ad515d59c76e65bd783f015c21c4dChristian MaederallProps :: [Prop]
67d92da5e9610aabad39055a16031154b4dc3748Christian MaederallProps = [Uni .. Rfx]
a89389521ddf76109168a0b339031575aafbd512Christian Maederdata Object = Object
a89389521ddf76109168a0b339031575aafbd512Christian Maeder { label :: String
a89389521ddf76109168a0b339031575aafbd512Christian Maeder , expr :: Expression
a89389521ddf76109168a0b339031575aafbd512Christian Maeder , props :: [Prop]
a89389521ddf76109168a0b339031575aafbd512Christian Maeder , subobjs :: [Object]
a89389521ddf76109168a0b339031575aafbd512Christian Maeder } deriving Show
a89389521ddf76109168a0b339031575aafbd512Christian Maeder | Pg Concept Concept -- specific and generic concept
a89389521ddf76109168a0b339031575aafbd512Christian Maeder | Pm [Prop] Relation
a89389521ddf76109168a0b339031575aafbd512Christian Maeder | Service Object
1a75698c909ad515d59c76e65bd783f015c21c4dChristian Maeder deriving Show