Copyright | (c) Klaus Luettich, Rainer Grabbe, Uni Bremen 2006 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | non-portable (regex-base needs MPTC+FD) |
Safe Haskell | None |
Data structures and initialising functions for Prover state and configurations. Used by GUI.GenericATP.
- type ATPIdentifier = String
- data GenericConfig proof_tree = GenericConfig {
- timeLimit :: Maybe Int
- timeLimitExceeded :: Bool
- extraOpts :: [String]
- proofStatus :: ProofStatus proof_tree
- resultOutput :: [String]
- timeUsed :: TimeOfDay
- emptyConfig :: Ord proof_tree => String -> String -> proof_tree -> GenericConfig proof_tree
- getConfig :: Ord proof_tree => String -> ATPIdentifier -> proof_tree -> GenericConfigsMap proof_tree -> GenericConfig proof_tree
- type GenericConfigsMap proof_tree = Map ATPIdentifier (GenericConfig proof_tree)
- type GenericGoalNameMap = Map String String
- data GenericState sentence proof_tree pst = GenericState {
- currentGoal :: Maybe ATPIdentifier
- currentProofTree :: proof_tree
- configsMap :: GenericConfigsMap proof_tree
- namesMap :: GenericGoalNameMap
- goalsList :: [Named sentence]
- proverState :: pst
- type InitialProverState sign sentence morphism pst = sign -> [Named sentence] -> [FreeDefMorphism sentence morphism] -> pst
- type TransSenName = String -> String
- initialGenericState :: (Ord sentence, Ord proof_tree) => String -> InitialProverState sign sentence morphism pst -> TransSenName -> Theory sign sentence proof_tree -> [FreeDefMorphism sentence morphism] -> proof_tree -> GenericState sentence proof_tree pst
- revertRenamingOfLabels :: (Ord sentence, Ord proof_tree) => GenericState sentence proof_tree pst -> [ProofStatus proof_tree] -> Result [ProofStatus proof_tree]
- data ATPRetval
- type RunProver sentence proof_tree pst = pst -> GenericConfig proof_tree -> Bool -> String -> Named sentence -> IO (ATPRetval, GenericConfig proof_tree)
- data ATPFunctions sign sentence morphism proof_tree pst = ATPFunctions {
- initialProverState :: InitialProverState sign sentence morphism pst
- atpTransSenName :: TransSenName
- atpInsertSentence :: pst -> Named sentence -> pst
- goalOutput :: pst -> Named sentence -> [String] -> IO String
- proverHelpText :: String
- batchTimeEnv :: String
- fileExtensions :: FileExtensions
- runProver :: RunProver sentence proof_tree pst
- createProverOptions :: GenericConfig proof_tree -> [String]
- data FileExtensions = FileExtensions {}
- data ATPTacticScript = ATPTacticScript {
- tsTimeLimit :: Int
- tsExtraOpts :: [String]
- guiDefaultTimeLimit :: Int
- configTimeLimit :: GenericConfig proof_tree -> Int
- parseTacticScript :: Int -> [String] -> TacticScript -> ATPTacticScript
- printCfgText :: Map ATPIdentifier (GenericConfig proof_tree) -> Doc
- excepToATPResult :: String -> String -> SomeException -> IO (ATPRetval, GenericConfig ProofTree)
Data Structures
type ATPIdentifier = String
data GenericConfig proof_tree
GenericConfig | |
|
Eq proof_tree => Eq (GenericConfig proof_tree) | |
Ord proof_tree => Ord (GenericConfig proof_tree) | |
Show proof_tree => Show (GenericConfig proof_tree) |
:: Ord proof_tree | |
=> String | name of the prover |
-> String | name of the goal |
-> proof_tree | initial empty proof_tree |
-> GenericConfig proof_tree |
Creates an empty GenericConfig with a given goal name. Default time limit, no resultOutput and no extra options.
:: Ord proof_tree | |
=> String | name of the prover |
-> ATPIdentifier | name of the goal |
-> proof_tree | initial empty proof_tree |
-> GenericConfigsMap proof_tree | |
-> GenericConfig proof_tree |
Performs a lookup on the ConfigsMap. Returns the config for the goal or an empty config if none is set yet.
type GenericConfigsMap proof_tree = Map ATPIdentifier (GenericConfig proof_tree)
We need to store one GenericConfig per goal.
type GenericGoalNameMap = Map String String
New goal name mapped to old goal name
data GenericState sentence proof_tree pst
Represents the global state of the prover GUI.
GenericState | |
|
type InitialProverState sign sentence morphism pst = sign -> [Named sentence] -> [FreeDefMorphism sentence morphism] -> pst
Initialising the specific prover state containing logical part.
type TransSenName = String -> String
:: (Ord sentence, Ord proof_tree) | |
=> String | name of the prover |
-> InitialProverState sign sentence morphism pst | |
-> TransSenName | |
-> Theory sign sentence proof_tree | |
-> [FreeDefMorphism sentence morphism] | freeness constraints |
-> proof_tree | initial empty proof_tree |
-> GenericState sentence proof_tree pst |
Creates an initial GenericState around a Theory.
revertRenamingOfLabels :: (Ord sentence, Ord proof_tree) => GenericState sentence proof_tree pst -> [ProofStatus proof_tree] -> Result [ProofStatus proof_tree]
applies the recorded name mapping (in the state) of prover specific names to the original names to the list of ProofStatus (the name of the goal and the names of used axioms are translated); additionally the axioms generated from typing information are removed and warnings are generated.
data ATPRetval
Represents the general return value of a prover run.
ATPSuccess | prover completed successfully |
ATPTLimitExceeded | prover did not terminate before the time limit exceeded |
ATPError String | an error occured while running the prover |
ATPBatchStopped | ATP batch mode was stopped with killthread |
type RunProver sentence proof_tree pst = pst -> GenericConfig proof_tree -> Bool -> String -> Named sentence -> IO (ATPRetval, GenericConfig proof_tree)
data ATPFunctions sign sentence morphism proof_tree pst
Prover specific functions
ATPFunctions | |
|
data FileExtensions
File extensions for all prover specific output formats. Given extensions should begin with a dot.
FileExtensions | |
|
data ATPTacticScript
Tactic script implementation for ATPs. Read and show functions are derived.
ATPTacticScript | |
|
Default time limit for the GUI mode prover in seconds.
configTimeLimit :: GenericConfig proof_tree -> Int
Returns the time limit from GenericConfig if available. Otherwise guiDefaultTimeLimit is returned.
:: Int | default time limit (standard:
|
-> [String] | default extra options (prover specific) |
-> TacticScript | |
-> ATPTacticScript |
Parses a given default tactic script into a
ATPTacticScript
if possible. Otherwise a default
prover's tactic script is returned.
:: Map ATPIdentifier (GenericConfig proof_tree) | |
-> Doc | prover configuration |
Pretty printing of prover configuration.
:: String | name of running prover |
-> String | goal name to prove |
-> SomeException | occured exception |
-> IO (ATPRetval, GenericConfig ProofTree) | (retval, configuration with proof status and complete output) |
Converts a thrown exception into an ATP result (ATPRetval and proof tree).