Logic_CASL.hs revision 1dfd1687e9ee6a45e2cb5268a701ead79c1c1f79
d29201dd5328b88140ce050100693c501852657dChristian Maeder{-# LANGUAGE CPP, MultiParamTypeClasses, TypeSynonymInstances
211c5fb252e0a776baad9a4857ab198659289a4aKristina Sojakova , FlexibleInstances #-}
211c5fb252e0a776baad9a4857ab198659289a4aKristina SojakovaModule : $Header$
211c5fb252e0a776baad9a4857ab198659289a4aKristina SojakovaDescription : Instance of class Logic for the CASL logic
94e2e03f6efde106de095ef4ea0ec87f74955a31Kristina SojakovaCopyright : (c) Klaus Luettich, Uni Bremen 2002-2005
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu ProdescuLicense : GPLv2 or higher, see LICENSE.txt
94e2e03f6efde106de095ef4ea0ec87f74955a31Kristina SojakovaMaintainer : till@informatik.uni-bremen.de
211c5fb252e0a776baad9a4857ab198659289a4aKristina SojakovaStability : provisional
211c5fb252e0a776baad9a4857ab198659289a4aKristina SojakovaPortability : non-portable (imports Logic.Logic)
a3a6b6ebe9c2d1dc3554e44779dc7361a90e7617Kristina SojakovaInstance of class Logic for the CASL logic
211c5fb252e0a776baad9a4857ab198659289a4aKristina Sojakova Also the instances for Syntax and Category.
8b054cade993ef373d564b2d74c9c5a2da48f8b7Kristina Sojakovaimport CASL.ToItem (bsToItem)
dd6f22b9dcff2695181b86372e4df03d5b96e92dKristina Sojakovaimport CASL.CCC.OnePoint () -- currently unused
8b054cade993ef373d564b2d74c9c5a2da48f8b7Kristina Sojakovaimport qualified CASL.OMDocImport as OMI
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#ifdef UNI_PACKAGE
a65c6747c9acbbebc93baba7bae94d2e3d8cdafbTill Mossakowskiimport qualified Data.Set as Set
150dbefbeef7403ab31ecbf9c3bb56515be67cdfKristina Sojakovadata CASL = CASL deriving Show
345d3dcc9f809776009851c446916fc770aa428dKristina Sojakovainstance Language CASL where
a669e4685b32ff5ca1bca785eacc5e30a545b010Christian Maeder description _ = unlines
a669e4685b32ff5ca1bca785eacc5e30a545b010Christian Maeder [ "CASL - the Common algebraic specification language"
63dbf3642c023a8bebbc8ca0d56f698114551c8cKristina Sojakova , "This logic is subsorted partial first-order logic"
cb5d588c4c3b286cc1e7210335d6ef7f584d79bcKristina Sojakova , " with sort generation constraints"
150dbefbeef7403ab31ecbf9c3bb56515be67cdfKristina Sojakova , "See the CASL User Manual, LNCS 2900, Springer Verlag"
150dbefbeef7403ab31ecbf9c3bb56515be67cdfKristina Sojakova , "and the CASL Reference Manual, LNCS 2960, Springer Verlag"
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder , "See also http://www.cofi.info/CASL.html"
2fa2a7c86b9416f0e1607787e9416e274feb1143Christian Maeder , "Abbreviations of sublogic names indicate the following feature:"
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder , " Sub -> with subsorting"
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder , " Sul -> with a locally filtered subsort relation"
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder , " P -> with partial functions"
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder , " C -> with sort generation constraints"
2fa2a7c86b9416f0e1607787e9416e274feb1143Christian Maeder , " eC -> C without renamings"
2ddc9d39235393dca2e40203dde20284db4c3deeKristina Sojakova , " sC -> C with injective constructors"
8b054cade993ef373d564b2d74c9c5a2da48f8b7Kristina Sojakova , " seC -> sC and eC"
2ddc9d39235393dca2e40203dde20284db4c3deeKristina Sojakova , " FOL -> first order logic"
a669e4685b32ff5ca1bca785eacc5e30a545b010Christian Maeder , " FOAlg -> FOL without predicates"
80d2ec8f37d5ddec13c14b17b1bab01e9c94630aChristian Maeder , " Horn -> positive conditional logic"
c82e21a85ef57135a0c582ca0f418b1541151645Kristina Sojakova , " GHorn -> generalized Horn"
63dbf3642c023a8bebbc8ca0d56f698114551c8cKristina Sojakova , " GCond -> GHorn without predicates"
c82e21a85ef57135a0c582ca0f418b1541151645Kristina Sojakova , " Cond -> Horn without predicates"
8b054cade993ef373d564b2d74c9c5a2da48f8b7Kristina Sojakova , " Atom -> atomic logic"
a669e4685b32ff5ca1bca785eacc5e30a545b010Christian Maeder , " Eq -> Atom without predicates"
9d770d1ea15092156d65e2a89b081eeeb8c6b153Kristina Sojakova , " = -> with equality"
a669e4685b32ff5ca1bca785eacc5e30a545b010Christian Maeder , "Examples:"
9d770d1ea15092156d65e2a89b081eeeb8c6b153Kristina Sojakova , " SubPCFOL= -> the CASL logic itself"
63dbf3642c023a8bebbc8ca0d56f698114551c8cKristina Sojakova , " FOAlg= -> first order algebra (without predicates)"
63dbf3642c023a8bebbc8ca0d56f698114551c8cKristina Sojakova , " SubPHorn= -> the positive conditional fragement of CASL"
45caf47cd6ed07be0637f6c51e4735512ce9d83aKristina Sojakova , " SubPAtom -> the atomic subset of CASL"
df31d6f25f90e5112184f4eb60c8d3c7b116ca2dKristina Sojakova , " SubPCAtom -> SubPAtom with sort generation constraints"
df31d6f25f90e5112184f4eb60c8d3c7b116ca2dKristina Sojakova , " Eq= -> classical equational logic" ]
cb5d588c4c3b286cc1e7210335d6ef7f584d79bcKristina Sojakovatype CASLBasicSpec = BASIC_SPEC () () ()
150dbefbeef7403ab31ecbf9c3bb56515be67cdfKristina SojakovatrueC :: a -> b -> Bool
4b61e23f57d9d13d036aedb1b10178d3e013ab38Kristina SojakovatrueC _ _ = True
2fa2a7c86b9416f0e1607787e9416e274feb1143Christian Maederinstance (Ord f, Ord e, Ord m, MorphismExtension e m) =>
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder Category (Sign f e) (Morphism f e m) where
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder ide sig = idMor (ideMorphismExtension $ extendedInfo sig) sig
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder inverse = inverseMorphism inverseMorphismExtension
9be5b6267dea82f0eb283bd4ae9d4f83e05a6944Christian Maeder composeMorphisms = composeM composeMorphismExtension
2fa2a7c86b9416f0e1607787e9416e274feb1143Christian Maeder dom = msource
4b61e23f57d9d13d036aedb1b10178d3e013ab38Kristina Sojakova isInclusion = isInclusionMorphism isInclusionMorphismExtension
345d3dcc9f809776009851c446916fc770aa428dKristina Sojakova legal_mor = legalMor
345d3dcc9f809776009851c446916fc770aa428dKristina Sojakovainstance Monoid (BASIC_SPEC b s f) where
345d3dcc9f809776009851c446916fc770aa428dKristina Sojakova mempty = Basic_spec []
top = SL.top
symsOfSen CASL = Set.toList
. foldFormula (symbolsRecord $ const Set.empty)
matches CASL = CASL.Morphism.matches
omdocToSen CASL = OMI.omdocToSen
omdocToSym CASL = OMI.omdocToSym
addOMadtToTheory CASL = OMI.addOMadtToTheory
addOmdocToTheory CASL = OMI.addOmdocToTheory