2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellDescription : converters for theories to MMiSSOntology
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnell (subsorting and concept taxonomies)
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellCopyright : (c) Klaus Luettich, Uni Bremen 2002-2004
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellLicense : GPLv2 or higher, see LICENSE.txt
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellMaintainer : luecke@informatik.uni-bremen.de
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellStability : provisional
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellPortability : portable
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellConverters for theories to MMiSSOntology (subsorting and concept taxonomies)
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellthe functions showOntClass, showRelationName and showRelation may be used
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellfor printing out MMiSS Ontologies in LaTeX to Stdout
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnell(see commets marked with --printOut).
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellPlease do not remove them without reason!!
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell ( -- * Conversion
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell -- * Printing of MMiSS ontologies in LaTeX
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell , showOntClass, showRelationName, showRelation) where
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnellimport qualified Common.Lib.MapSet as MapSet
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnellimport qualified Common.Lib.Rel as Rel
3cb6a584a87fa8fec140b0bb20dd91731d13e751Diego Colantoniimport qualified Data.Map as Map
3cb6a584a87fa8fec140b0bb20dd91731d13e751Diego Colantoniimport qualified Data.Set as Set
3cb6a584a87fa8fec140b0bb20dd91731d13e751Diego Colantoni{- | convert a generic CASL signature into the MMiSS ontology
3cb6a584a87fa8fec140b0bb20dd91731d13e751Diego Colantonidatastructure for display as taxonomy graph -}
2229ffbfe08c2cd606c305f8934e627548002c9eCraig McDonnellconvTaxo :: TaxoGraphKind -> MMiSSOntology
Set.fold addSor (hasValue onto) $ sortSet sign
-- start with top sorts (maybe use Rel.mostRight?)
Map.lookup sort relMap))
toStrL = map show . Set.toList
let binT = Set.filter isBinPredType tSet
in if Set.null binT
else Set.fold insType (insName on) binT