Copyright | (c) Christian Maeder, DFKI GmbH 2011 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
abstract syntax for FPL, logic for functional programs as CASL extension
- type FplBasicSpec = BASIC_SPEC FplExt () TermExt
- type FplTerm = TERM TermExt
- type FplForm = FORMULA TermExt
- data FplExt
- data FplSortItem
- data FplOpItem
- = FunOp FunDef
- | CaslOpItem (OP_ITEM TermExt)
- prepPunctBar :: [Doc] -> [Doc]
- printDD :: DATATYPE_DECL -> Doc
- data FunDef = FunDef OP_NAME OP_HEAD (Annoted FplTerm) Range
- kindHead :: OpKind -> OP_HEAD -> OP_HEAD
- data TermExt
- fplReservedWords :: [String]
- funDef :: [String] -> AParser st FunDef
- optVarDecls :: [String] -> AParser st ([VAR_DECL], [Token])
- constBool :: AParser st FplTerm
- boolTerm :: [String] -> AParser st FplTerm
- eqTerm :: [String] -> AParser st FplTerm
- eqForm :: [String] -> AParser st TermExt
- fplTerm :: [String] -> AParser st TermExt
- caseTerm :: [String] -> AParser st TermExt
- patTermPair :: [String] -> AParser st (FplTerm, FplTerm)
- letVar :: [String] -> AParser st FunDef
- letTerm :: [String] -> AParser st TermExt
- ifThenElse :: [String] -> AParser st TermExt
- fplExt :: [String] -> AParser st FplExt
- fplSortItem :: [String] -> AParser st FplSortItem
- freeType :: [String] -> SORT -> AParser st FplSortItem
- fplOpItem :: [String] -> AParser st FplOpItem
Documentation
type FplBasicSpec = BASIC_SPEC FplExt () TermExt
data FplExt
data FplSortItem
data FplOpItem
prepPunctBar :: [Doc] -> [Doc]
printDD :: DATATYPE_DECL -> Doc
data FunDef
data TermExt
extra terms of FPL. if-then-else must use a term as guard with result
sort Bool
. To allow true
, false
and an equality test an extra term
parser is needed that must not be used when parsing formulas.
FixDef FunDef | formula |
Case FplTerm [(FplTerm, FplTerm)] Range | |
Let FunDef FplTerm Range | |
IfThenElse FplTerm FplTerm FplTerm Range | |
EqTerm FplTerm FplTerm Range | |
BoolTerm FplTerm |
fplReservedWords :: [String]
optVarDecls :: [String] -> AParser st ([VAR_DECL], [Token])
eqForm :: [String] -> AParser st TermExt
extra formulas to compare bool terms with true or false. Interpreting boolean valued terms as formulas is still missing.
patTermPair :: [String] -> AParser st (FplTerm, FplTerm)
ifThenElse :: [String] -> AParser st TermExt
fplSortItem :: [String] -> AParser st FplSortItem
freeType :: [String] -> SORT -> AParser st FplSortItem