Copyright | (c) Rene Wagner, Heng Jiang, Uni Bremen 2007 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | luecke@informatik.uni-bremen.de |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Data structures representing SPASS signatures. Refer to http://spass.mpi-sb.mpg.de/webspass/help/syntax/dfgsyntax.html for the SPASS syntax documentation.
- type SoftFOLMorphism = DefaultMorphism Sign
- type SortMap = Map SPIdentifier (Maybe Generated)
- type FuncMap = Map SPIdentifier (Set ([SPIdentifier], SPIdentifier))
- type PredMap = Map SPIdentifier (Set [SPIdentifier])
- data Sign = Sign {}
- data Generated = Generated {
- freely :: Bool
- byFunctions :: [SPIdentifier]
- emptySign :: Sign
- type Sentence = SPTerm
- type SPIdentifier = Token
- singleSortNotGen :: Sign -> Bool
- data SFSymbol = SFSymbol {}
- data SFSymbType
- data SPProblem = SPProblem {}
- data SPLogicalPart = SPLogicalPart {}
- emptySPLogicalPart :: SPLogicalPart
- data SPSymbolList = SPSymbolList {}
- emptySymbolList :: SPSymbolList
- data SPSignSym
- = SPSignSym {
- sym :: SPIdentifier
- arity :: Int
- | SPSimpleSignSym SPIdentifier
- = SPSignSym {
- data SPSortSym = SPSortSym SPIdentifier
- data SPDeclaration
- = SPSubsortDecl { }
- | SPTermDecl {
- termDeclTermList :: [SPTerm]
- termDeclTerm :: SPTerm
- | SPSimpleTermDecl SPTerm
- | SPPredDecl {
- predSym :: SPIdentifier
- sortSyms :: [SPIdentifier]
- | SPGenDecl { }
- data SPFormulaList = SPFormulaList {
- originType :: SPOriginType
- formulae :: [SPFormula]
- isAxiomFormula :: SPFormulaList -> Bool
- data SPClauseList = SPClauseList {}
- data SPOriginType
- data SPClauseType
- type SPClause = Named NSPClause
- data NSPClause
- data NSPClauseBody = NSPClauseBody SPClauseType [SPLiteral]
- data TermWsList = TWL [SPTerm] Bool
- data SPTerm
- = SPQuantTerm {
- quantSym :: SPQuantSym
- variableList :: [SPTerm]
- qFormula :: SPTerm
- | SPComplexTerm { }
- = SPQuantTerm {
- data FileName = FileName String
- data FormKind
- data Role
- data Name = Name String
- data Annos = Annos Source (Maybe Info)
- data Source = Source GenTerm
- data AWord = AWord String
- data GenTerm
- data GenData
- data FormData = FormData FormKind SPTerm
- data Info = Info [GenTerm]
- data TPTP
- data SPLiteral = SPLiteral Bool SPSymbol
- toLiteral :: Monad m => SPTerm -> m SPLiteral
- data SPQuantSym
- data SPSymbol
- mkSPCustomSymbol :: String -> SPSymbol
- showSPSymbol :: SPSymbol -> String
- data SPProofList = SPProofList {}
- type SPProofType = SPIdentifier
- data SPProofStep = SPProofStep {}
- data SPReference = PRefTerm SPTerm
- data SPResult = PResTerm SPTerm
- data SPRuleAppl
- data SPUserRuleAppl
- data SPParent = PParTerm SPTerm
- type SPAssocList = Map SPKey SPValue
- data SPKey = PKeyTerm SPTerm
- data SPValue = PValTerm SPTerm
- type SPFormula = Named SPTerm
- typedVarTerm :: SPIdentifier -> SPIdentifier -> SPTerm
- spTerms :: [SPIdentifier] -> [SPTerm]
- spSym :: SPIdentifier -> SPSymbol
- compTerm :: SPSymbol -> [SPTerm] -> SPTerm
- simpTerm :: SPSymbol -> SPTerm
- mkConj :: SPTerm -> SPTerm -> SPTerm
- mkDisj :: SPTerm -> SPTerm -> SPTerm
- mkEq :: SPTerm -> SPTerm -> SPTerm
- data SPDescription = SPDescription {}
- data SPLogState
- data SPSetting
- = SPGeneralSettings {
- entries :: [SPHypothesis]
- | SPSettings { }
- = SPGeneralSettings {
- data SPSettingBody
- = SPClauseRelation [SPCRBIND]
- | SPFlag String [String]
- data SPHypothesis = SPHypothesis [SPIdentifier]
- data SPSettingLabel
- showSettingLabel :: SPSettingLabel -> String
- data SPCRBIND = SPCRBIND {
- clauseSPR :: String
- formulaSPR :: String
- negateSentence :: SPTerm -> Maybe SPTerm
Externally used data structures
type SoftFOLMorphism = DefaultMorphism Sign
We use the DefaultMorphism for SPASS.
type SortMap = Map SPIdentifier (Maybe Generated)
type FuncMap = Map SPIdentifier (Set ([SPIdentifier], SPIdentifier))
type PredMap = Map SPIdentifier (Set [SPIdentifier])
data Sign
This Signature data type will be translated to the SoftFOL data types internally.
sortRel contains the sorts relation. For each sort we need to know if it is a generated sort and if so by which functions it is possibly freely generated (sortMap).
For each function the types of all arguments and the return type must be known (funcMap). The same goes for the arguments of a predicate (predMap).
data Generated
Sorts can be (freely) generated by a set of functions.
Generated | |
|
type SPIdentifier = Token
A SPASS Identifier is a String for now.
singleSortNotGen :: Sign -> Bool
Check a Sign if it is single sorted (and the sort is non-generated).
Symbol related datatypes
data SFSymbol
Symbols of SoftFOL.
data SFSymbType
Symbol types of SoftFOL. (not related to CASL)
Internal data structures
SPASS Problems
data SPProblem
A SPASS problem consists of a description and a logical part. The optional settings part hasn't been implemented yet.
SPASS Logical Parts
data SPLogicalPart
A SPASS logical part consists of a symbol list, a declaration list, and a set of formula lists. Support for clause lists and proof lists hasn't been implemented yet.
SPLogicalPart | |
|
Eq SPLogicalPart | |
Data SPLogicalPart | |
Ord SPLogicalPart | |
Show SPLogicalPart | |
ShATermConvertible SPLogicalPart | |
Pretty SPLogicalPart | Creates a Doc from a SPASS Logical Part. |
PrintTPTP SPLogicalPart | Creates a Doc from a SoftFOL Logical Part. |
Typeable * SPLogicalPart |
Symbol Lists
data SPSymbolList
All non-predefined signature symbols must be declared as part of a SPASS symbol list.
Eq SPSymbolList | |
Data SPSymbolList | |
Ord SPSymbolList | |
Show SPSymbolList | |
ShATermConvertible SPSymbolList | |
Pretty SPSymbolList | Creates a Doc from a SPASS Symbol List. |
Typeable * SPSymbolList |
emptySymbolList :: SPSymbolList
Creates an empty SPASS Symbol List.
data SPSignSym
A common data type used for all signature symbols.
data SPSortSym
Declarations
data SPDeclaration
SPASS Declarations allow the introduction of sorts.
Eq SPDeclaration | |
Data SPDeclaration | |
Ord SPDeclaration | |
Show SPDeclaration | |
ShATermConvertible SPDeclaration | |
Pretty SPDeclaration | Creates a Doc from a SPASS Declaration |
PrintTPTP SPDeclaration | Creates a Doc from a SoftFOL Declaration. A subsort declaration will be rewritten as a special SPQuantTerm. |
Typeable * SPDeclaration |
Formula List
data SPFormulaList
SPASS Formula List
Eq SPFormulaList | |
Data SPFormulaList | |
Ord SPFormulaList | |
Show SPFormulaList | |
ShATermConvertible SPFormulaList | |
Pretty SPFormulaList | Creates a Doc from a SPASS Formula List |
PrintTPTP SPFormulaList | Creates a Doc from a SoftFOL Formula List. |
Typeable * SPFormulaList |
isAxiomFormula :: SPFormulaList -> Bool
test the origin type of the formula list
Clause List
data SPClauseList
SPASS Clause List
data SPOriginType
There are axiom formulae and conjecture formulae.
Eq SPOriginType | |
Data SPOriginType | |
Ord SPOriginType | |
Show SPOriginType | |
ShATermConvertible SPOriginType | |
Pretty SPOriginType | Creates a Doc from a SPASS Origin Type |
PrintTPTP SPOriginType | Creates a Doc from a SoftFOL Origin Type. |
Typeable * SPOriginType |
data SPClauseType
Formulae can be in cnf or dnf
data NSPClause
data NSPClauseBody
a true boolean indicates the cnf
data TermWsList
data SPTerm
A SPASS Term.
Eq SPTerm | |
Data SPTerm | |
Ord SPTerm | |
Show SPTerm | |
ShATermConvertible SPTerm | |
GetRange SPTerm | |
Pretty SPTerm | Creates a Doc from a SPASS Term. |
PrintTPTP SPTerm | Creates a Doc from a SoftFOL Term. |
Typeable * SPTerm | |
Sentences SoftFOL Sentence Sign SoftFOLMorphism SFSymbol | |
Comorphism SoftFOL2CommonLogic SoftFOL () [TPTP] Sentence () () Sign SoftFOLMorphism SFSymbol () ProofTree CommonLogic CommonLogicSL BASIC_SPEC TEXT_META SYMB_ITEMS SYMB_MAP_ITEMS Sign Morphism Symbol Symbol ProofTree | |
Logic SoftFOL () [TPTP] Sentence () () Sign SoftFOLMorphism SFSymbol () ProofTree | |
StaticAnalysis SoftFOL [TPTP] Sentence () () Sign SoftFOLMorphism SFSymbol () |
data FileName
data FormKind
data Role
data GenTerm
data GenData
data FormData
data TPTP
FormAnno FormKind Name Role SPTerm (Maybe Annos) | |
Include FileName [Name] | |
CommentLine String | |
EmptyLine |
data SPLiteral
Literals for SPASS CNF and DNF (the boolean indicates a negated literal).
data SPQuantSym
SPASS Quantifier Symbols.
Eq SPQuantSym | |
Data SPQuantSym | |
Ord SPQuantSym | |
Show SPQuantSym | |
ShATermConvertible SPQuantSym | |
Pretty SPQuantSym | Creates a Doc from a SPASS Quantifier Symbol. |
PrintTPTP SPQuantSym | Creates a Doc from a SoftFOL Quantifier Symbol. |
Typeable * SPQuantSym |
data SPSymbol
SPASS Symbols.
mkSPCustomSymbol :: String -> SPSymbol
showSPSymbol :: SPSymbol -> String
Proof List
data SPProofList
SPASS Proof List
type SPProofType = SPIdentifier
data SPProofStep
SPProofStep | |
|
data SPReference
data SPResult
data SPRuleAppl
data SPUserRuleAppl
data SPParent
type SPAssocList = Map SPKey SPValue
data SPKey
data SPValue
Formulae And Terms
A SPASS Formula is modelled as a Named SPTerm for now. This doesn't reflect the fact that the SPASS syntax lists both term and label as optional.
helpers for generating SoftFOL formulas
:: SPIdentifier | Variable symbol: v |
-> SPIdentifier | Sort symbol: s |
-> SPTerm | Term: s(v) |
spTerms :: [SPIdentifier] -> [SPTerm]
spSym :: SPIdentifier -> SPSymbol
SPASS Desciptions
data SPDescription
A description is mandatory for a SPASS problem. It has to specify
at least a name
, the name of the author
, the status
(see also
SPLogState
below), and a (verbose) description.
Eq SPDescription | |
Data SPDescription | |
Ord SPDescription | |
Show SPDescription | |
ShATermConvertible SPDescription | |
Pretty SPDescription | Creates a Doc from a SPASS description. |
PrintTPTP SPDescription | Creates a Doc from a SoftFOL description. |
Typeable * SPDescription |
data SPLogState
The state of a SPASS problem can be satisfiable, unsatisfiable, or unknown.
Eq SPLogState | |
Data SPLogState | |
Ord SPLogState | |
Show SPLogState | |
ShATermConvertible SPLogState | |
Pretty SPLogState | Creates a Doc from an |
PrintTPTP SPLogState | Creates a Doc from an |
Typeable * SPLogState |
SPASS Settings
data SPSetting
New impelmentation of Settings. See spass input syntax Version 1.5.
data SPSettingBody
data SPHypothesis
data SPSettingLabel
negateSentence :: SPTerm -> Maybe SPTerm
negate a sentence