ProofDetails.hs revision 7c8051ef91610c696bc9fa2e61ad1b153fbe7ce0
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannModule : $Header$
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannDescription : GUI for showing and saving proof details.
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannCopyright : (c) Rainer Grabbe 2006
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannMaintainer : rainer25@tzi.de
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannStability : provisional
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannPortability : needs POSIX
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannAdditional window used by 'GUI.ProofManagement' for displaying proof details.
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmannmodule GUI.ProofDetails (doShowProofDetails) where
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmannimport qualified Common.Doc as Pretty
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmannimport qualified Common.OrderedMap as OMap
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmannimport XSelection
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmannimport ScrollBox
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmannimport FileDialog
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmannimport qualified Static.DevGraph as DevGraph
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann-- * record structures and basic functions for handling
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann Record structure containing proof details for a single proof.
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmanndata GoalDescription = GoalDescription {
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann proverInfo :: String, -- ^ standard proof details
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann tacticScriptText :: OpenText, -- ^ more details for tactic script
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann proofTreeText :: OpenText -- ^ more details for proof tree
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann Current state of a text tag providing additional information. The text can be
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann folded or unfolded.
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmanndata OpenText = OpenText {
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann additionalText :: String, -- ^ additional information
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann textShown :: Bool, -- ^ if true, text is unfolded (default: false)
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann textStartPosition :: Position -- ^ start position in editor widget
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann Creates an initial 'GoalDescription' filled with just the standard prover info.
2450a4210dee64b064499a3a1154129bdfc74981Daniel HausmannemptyGoalDescription :: String -- ^ information about the used prover
2450a4210dee64b064499a3a1154129bdfc74981Daniel Hausmann -> GoalDescription -- ^ initiated GoalDescription
-- | Determines the kind of content of a 'HTk.TextTag'.
-> Pretty.Doc -- ^ output document
Pretty.text (replicate numSp ' ') Pretty.<>
fillGoalDescription :: (AnyComorphism, DevGraph.BasicProof)
DevGraph.BasicProof _ ps ->
Proved _ -> Pretty.text "Used axioms:" Pretty.<+>
(map (Pretty.text . show) $
Pretty.$+$ Pretty.text "Used time:" Pretty.<+>
Pretty.text (show $ usedTime ps)
_ -> Pretty.empty)
Pretty.$+$ Pretty.text "Prover:" Pretty.<+>
Pretty.text (proverName ps)
DevGraph.BasicProof _ ps ->
otherProof -> Pretty.empty
DevGraph.BasicProof _ ps ->
otherProof -> Pretty.empty
-> OMap.OMap (String, Int) GoalDescription
-> OMap.OMap (String, Int) GoalDescription -- ^ adapted Map
OMap.map (\ gDesc ->
HTk.font (Helvetica, Roman, 18::Int)]
foldl (flip $ \ (s2, ind) -> OMap.insert (gN, ind) $
modifyIORef stateRef (\ref -> OMap.update (\ _ -> Just goalDesc')
) $ OMap.toList elementMap
(curDir++'/':thName++"-proof-details.txt")
-> IORef (OMap.OMap (String, Int) GoalDescription)
) $ OMap.toList s
-> IORef (OMap.OMap (String, Int) GoalDescription)
OMap.lookup (gName, ind) s
s' = OMap.update
-> IORef (OMap.OMap (String, Int) GoalDescription)