AS_CASL_DL.der.hs revision 34bff097c14521b5e57ce37279a34256e1f78aa5
{- |
Module : $Header$
Copyright : (c) Klaus L�ttich, Uni Bremen 2004
License : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : provisional
Portability : portable
Abstract syntax for CASL_DL logic extension of CASL
Only the added syntax is specified
-}
module CASL_DL.AS_CASL_DL where
import Common.Id
import Common.AS_Annotation
import CASL.AS_Basic_CASL
-- DrIFT command
{-! global: UpPos !-}
type DL_BASIC_SPEC = BASIC_SPEC () () DL_FORMULA
type AnDLFORM = Annoted (FORMULA DL_FORMULA)
data CardType = CMin | CMax | CExact deriving (Eq, Ord, Show)
-- | for a detailed specification of all the components look into the sources
data DL_FORMULA =
Cardinality CardType
PRED_SYMB -- refers to a declared (binary) predicate
(TERM DL_FORMULA)
-- this term is restricted to constructors
-- denoting a (typed) variable
(TERM DL_FORMULA)
-- the second term is restricted to an Application denoting
-- a literal of type nonNegativeInteger (Nat)
Range
-- position of keyword, brackets, parens and comma
deriving (Eq, Ord, Show)
minCardinalityS,maxCardinalityS,cardinalityS :: String
cardinalityS = "cardinality"
minCardinalityS = "minC" ++ tail cardinalityS
maxCardinalityS = "maxC" ++ tail cardinalityS
casl_DL_reserved_words :: [String]
casl_DL_reserved_words = minCardinalityS:maxCardinalityS:cardinalityS:[]