Hets - the Heterogeneous Tool Set

Copyright(c) T.Mossakowski, C.Maeder and Uni Bremen 2006
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellNone

CASL.Kif2CASL

Description

Parser for SUMO (suggested upper merged ontology) .kif files

Synopsis

Documentation

universe :: SORT

the universal sort

kif2CASLFormula :: RangedLL -> CASLFORMULA

translation of formulas

toId :: String -> Range -> Id

toSId :: String -> Range -> Token

convert a string to a legal CASL identifier

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

data Predsym

Constructors

Predsym Int PRED_NAME 

collectPreds :: CASLFORMULA -> Set Predsym

collect all predicate symbols used in a formula

data Opsym

Constructors

Opsym Int OP_NAME 

Instances

nonEmpty :: Annoted (BASIC_ITEMS () () ()) -> Bool

kif2CASL :: [RangedLL] -> BASIC_SPEC () () ()

main translation function