Copyright | (c) T.Mossakowski, C.Maeder and Uni Bremen 2006 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Parser for SUMO (suggested upper merged ontology) .kif files
- universe :: SORT
- llRange :: RangedLL -> Range
- kif2CASLFormula :: RangedLL -> CASLFORMULA
- trueTerm :: TERM ()
- falseTerm :: TERM ()
- toVar :: String -> Range -> Token
- toId :: String -> Range -> Id
- toSId :: String -> Range -> Token
- kif2CASLTerm :: RangedLL -> TERM ()
- kif2CASLvardeclList :: [RangedLL] -> [VAR_DECL]
- kif2CASLvardecl :: RangedLL -> VAR_DECL
- kif2CASLpass1 :: [RangedLL] -> [Annoted CASLFORMULA]
- isKifComment :: ListOfList -> Bool
- toAnno :: ListOfList -> Annotation
- skipComments :: [Annotation] -> [RangedLL] -> ([Annotation], [RangedLL])
- data Predsym = Predsym Int PRED_NAME
- sameArity :: Predsym -> Predsym -> Bool
- getName :: Predsym -> PRED_NAME
- collectPreds :: CASLFORMULA -> Set Predsym
- collectVars :: CASLFORMULA -> Set Token
- data Opsym = Opsym Int OP_NAME
- sameOpArity :: Opsym -> Opsym -> Bool
- getOpName :: Opsym -> OP_NAME
- collectOps :: CASLFORMULA -> Set Opsym
- nonEmpty :: Annoted (BASIC_ITEMS () () ()) -> Bool
- kif2CASL :: [RangedLL] -> BASIC_SPEC () () ()
Documentation
kif2CASLFormula :: RangedLL -> CASLFORMULA
translation of formulas
kif2CASLTerm :: RangedLL -> TERM ()
kif2CASLvardeclList :: [RangedLL] -> [VAR_DECL]
translation of variable declaration lists
kif2CASLvardecl :: RangedLL -> VAR_DECL
translation of variable declarations
kif2CASLpass1 :: [RangedLL] -> [Annoted CASLFORMULA]
first pass of translation, just collecting the formulas
isKifComment :: ListOfList -> Bool
check for comment
toAnno :: ListOfList -> Annotation
convert comment to annotation
skipComments :: [Annotation] -> [RangedLL] -> ([Annotation], [RangedLL])
skip the first comments; they belong to the whole file
collectPreds :: CASLFORMULA -> Set Predsym
collect all predicate symbols used in a formula
collectVars :: CASLFORMULA -> Set Token
sameOpArity :: Opsym -> Opsym -> Bool
collectOps :: CASLFORMULA -> Set Opsym
nonEmpty :: Annoted (BASIC_ITEMS () () ()) -> Bool
kif2CASL :: [RangedLL] -> BASIC_SPEC () () ()
main translation function