GraphLogic.hs revision efd5c582300190b8d463545c703902b43d7357f0
ea9ad77838dce923ced1df2ac09a7f0226363593Christian MaederModule : $Header$
ea9ad77838dce923ced1df2ac09a7f0226363593Christian MaederDescription : Logic for manipulating the graph in the Central GUI
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian MaederCopyright : (c) Jorina Freya Gerken, Till Mossakowski, Uni Bremen 2002-2006
ea9ad77838dce923ced1df2ac09a7f0226363593Christian MaederLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
ea9ad77838dce923ced1df2ac09a7f0226363593Christian MaederMaintainer : till@informatik.uni-bremen.de
ea9ad77838dce923ced1df2ac09a7f0226363593Christian MaederStability : provisional
f3a94a197960e548ecd6520bb768cb0d547457bbChristian MaederPortability : non-portable (imports Logic)
93fa7e4374de6e37328e752991a698bf03032c75Christian Maeder , remakeGraph
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder , performProofAction
25a0b76bc87e80c0f697951d9817862755a71d33Christian Maeder , openProofStatus
14327755c1e6236e5a23594980a4b82bdce4d0a0Christian Maeder , saveProofStatus
2eb84fc82d3ffa9116bc471fda3742bd9e5a24bbChristian Maeder , openTranslateGraph
2eb84fc82d3ffa9116bc471fda3742bd9e5a24bbChristian Maeder , showReferencedLibrary
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maeder , getSignatureOfNode
95936ba3a6577d40aae065aafac4147f5a308782Christian Maeder , getTheoryOfNode
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder , getLocalAxOfNode
dd836737068504898d4f7843ebd8a3df05f3067dChristian Maeder , translateTheoryOfNode
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder , displaySubsortGraph
1f086d5155f47fdad9a0de4e46bbebb2c4b33d30Christian Maeder , displayConceptGraph
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maeder , lookupTheoryOfNode
eed6203a39f88e398d86431a66d367036a3d17baChristian Maeder , getSublogicOfNode
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maeder , showOriginOfNode
eed6203a39f88e398d86431a66d367036a3d17baChristian Maeder , showProofStatusOfNode
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maeder , proveAtNode
71de4b92b1ca12890a9e7bc5b0301455da3e052fChristian Maeder , showJustSubtree
62198789c7cb57cac13399055515921c0fe3483fChristian Maeder , showIDOfEdge
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maeder , getNumberOfNode
71de4b92b1ca12890a9e7bc5b0301455da3e052fChristian Maeder , showMorphismOfEdge
62198789c7cb57cac13399055515921c0fe3483fChristian Maeder , showOriginOfEdge
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maeder , checkconservativityOfEdge
71de4b92b1ca12890a9e7bc5b0301455da3e052fChristian Maeder , showProofStatusOfThm
62198789c7cb57cac13399055515921c0fe3483fChristian Maeder , convertNodes
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder , convertEdges
aeb1d2a7487f480dbab690ec77f51b5a57cb04dfChristian Maeder , hideShowNames
1012fdd997ea1f35eee2ccdd4015199f09f18fe9Christian Maeder , translateGraph
aeb1d2a7487f480dbab690ec77f51b5a57cb04dfChristian Maeder , showLibGraph
906f0b21e2dc78ee4f37f879518be018a0204cd9Christian Maederimport Logic.Logic(conservativityCheck)
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maederimport Logic.Coerce(coerceSign, coerceMorphism)
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maederimport Syntax.AS_Library(LIB_NAME, getModTime, getLIB_ID)
eed6203a39f88e398d86431a66d367036a3d17baChristian Maederimport Static.DGToSpec(dgToSpec, computeTheory)
eed6203a39f88e398d86431a66d367036a3d17baChristian Maederimport Static.AnalysisLibrary(anaLibExt, anaLib)
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maederimport Static.DGTranslation(libEnv_translation)
eed6203a39f88e398d86431a66d367036a3d17baChristian Maederimport Proofs.InferBasic(basicInferenceNode)
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maederimport Proofs.StatusUtils(lookupHistory, removeContraryChanges)
42c01284bba8d7c8d995c8dfb96ace57d28ed1bcTill Mossakowskiimport GUI.Utils(listBox, createTextSaveDisplay)
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maederimport GUI.Taxonomy (displayConceptGraph,displaySubsortGraph)
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maederimport GUI.DGTranslation(getDGLogic)
a255351561838b3743d03c1629d335cfb8b83804Christian Maederimport qualified GUI.HTkUtils (displayTheory,
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder displayTheoryWithWarning,
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder createInfoDisplayWithTwoButtons)
42c01284bba8d7c8d995c8dfb96ace57d28ed1bcTill Mossakowskiimport GraphDisp(deleteArc, deleteNode)
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maederimport TextDisplay(createTextDisplay)
a255351561838b3743d03c1629d335cfb8b83804Christian Maederimport InfoBus(encapsulateWaitTermAct)
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maederimport DialogWin (useHTk)
42c01284bba8d7c8d995c8dfb96ace57d28ed1bcTill Mossakowskiimport Messages(errorMess)
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maederimport qualified HTk
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maederimport Configuration(size)
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maederimport Common.Id(nullRange)
42c01284bba8d7c8d995c8dfb96ace57d28ed1bcTill Mossakowskiimport Common.DocUtils(showDoc, pretty)
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maederimport Common.ResultT(liftR, runResultT)
71de4b92b1ca12890a9e7bc5b0301455da3e052fChristian Maederimport qualified Common.OrderedMap as OMap
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maederimport qualified Common.InjMap as InjMap
a255351561838b3743d03c1629d335cfb8b83804Christian Maederimport qualified Common.Lib.Rel as Rel
a255351561838b3743d03c1629d335cfb8b83804Christian Maederimport qualified Common.Lib.Graph as Tree
42c01284bba8d7c8d995c8dfb96ace57d28ed1bcTill Mossakowskiimport Driver.WriteFn(writeShATermFile)
42c01284bba8d7c8d995c8dfb96ace57d28ed1bcTill Mossakowskiimport Driver.ReadFn(libNameToFile, readVerbose)
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maederimport System.Directory(getModificationTime)
a255351561838b3743d03c1629d335cfb8b83804Christian Maederimport Data.Maybe(fromJust)
a255351561838b3743d03c1629d335cfb8b83804Christian Maederimport Data.List(nub,deleteBy,find)
a255351561838b3743d03c1629d335cfb8b83804Christian Maederimport Data.Graph.Inductive.Graph as Graph(Node, LEdge, LNode, lab', labNode')
14327755c1e6236e5a23594980a4b82bdce4d0a0Christian Maederimport qualified Data.IntMap as IntMap
906f0b21e2dc78ee4f37f879518be018a0204cd9Christian Maederimport qualified Data.Map as Map
9963c741a47c42d2dedc6e4589c1b197129a6239Christian MaedernegateChanges :: ([DGRule],[DGChange]) -> ([DGRule],[DGChange])
9963c741a47c42d2dedc6e4589c1b197129a6239Christian MaedernegateChanges (_, dgChanges) = ([], reverse $ map negateChange dgChanges)
9963c741a47c42d2dedc6e4589c1b197129a6239Christian Maeder negateChange :: DGChange -> DGChange
71de4b92b1ca12890a9e7bc5b0301455da3e052fChristian Maeder negateChange change = case change of
feb3da029bdab54fe36ff704ca242ab4536b3bc1Christian Maeder InsertNode x -> DeleteNode x
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder DeleteNode x -> InsertNode x
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder InsertEdge x -> DeleteEdge x
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder DeleteEdge x -> InsertEdge x
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder SetNodeLab old (node, new) -> SetNodeLab new (node, old)
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder-- | Undo one step of the History
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maederundo :: GInfo -> IO ()
a255351561838b3743d03c1629d335cfb8b83804Christian Maederundo (GInfo { libEnvIORef = ioRefProofStatus
eed6203a39f88e398d86431a66d367036a3d17baChristian Maeder , globalHist = gHist
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder , graphId = gid
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder , gi_GraphInfo = actGraph
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder le <- readIORef ioRefProofStatus
ab7a0615fceecfe401c3229ce7147d2bafc80287Christian Maeder (guHist, grHist) <- takeMVar gHist
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder case guHist of
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder showTemporaryMessage gid actGraph "History is empty ..."
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder putMVar gHist (guHist, grHist)
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder (ln:guHist') -> do
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder showTemporaryMessage gid actGraph $ "Undo last change to " ++ show ln
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder dg = lookupDGraph ln le
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder phist = proofHistory dg
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder if phist == [emptyHistory] then putMVar gHist (guHist, grHist)
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder change = negateChanges $ head phist
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder dg' = (applyProofHistory [change] dg)
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder { redoHistory = change:redoHistory dg
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder , proofHistory = tail phist}
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder le' = Map.insert ln dg' le
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder case openlock dg' of
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder Just lock -> do
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder writeIORef ioRefProofStatus le'
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder mRemakeF <- tryTakeMVar lock
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder case mRemakeF of
95936ba3a6577d40aae065aafac4147f5a308782Christian Maeder Just remakeF -> do
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder putMVar lock remakeF
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder putMVar gHist (guHist', ln:grHist)
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder Nothing -> putMVar gHist (guHist', ln:grHist)
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder Nothing -> do
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder lock <- newEmptyMVar
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder writeIORef ioRefProofStatus
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder $ Map.insert ln dg'{openlock = Just lock} le'
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder putMVar gHist (guHist', ln:grHist)
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder-- | redo one step of the redoHistory
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maederredo :: GInfo -> IO ()
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maederredo (GInfo { libEnvIORef = ioRefProofStatus
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder , globalHist = gHist
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder , graphId = gid
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder , gi_GraphInfo = actGraph
26d3a8da6b4244d65614b5585927df4948e542a0Christian Maeder le <- readIORef ioRefProofStatus
26d3a8da6b4244d65614b5585927df4948e542a0Christian Maeder (guHist, grHist) <- takeMVar gHist
26d3a8da6b4244d65614b5585927df4948e542a0Christian Maeder case grHist of
26d3a8da6b4244d65614b5585927df4948e542a0Christian Maeder showTemporaryMessage gid actGraph "History is empty ..."
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder putMVar gHist (guHist, grHist)
3f0cd3e73a8aa47bb586b69fe5f7fa450000ecfdChristian Maeder (ln:grHist') -> do
dd836737068504898d4f7843ebd8a3df05f3067dChristian Maeder showTemporaryMessage gid actGraph $ "Redo last change to " ++ show ln
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder dg = lookupDGraph ln le
690f3a0b5f77633547e0a797c96b005a5f6ae56cChristian Maeder rhist = redoHistory dg
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder if rhist == [emptyHistory] then putMVar gHist (guHist, grHist)
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder change = negateChanges $ head rhist
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder dg' = (applyProofHistory [change] dg)
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder { redoHistory = tail rhist
690f3a0b5f77633547e0a797c96b005a5f6ae56cChristian Maeder , proofHistory = change:proofHistory dg}
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder le' = Map.insert ln dg' le
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder case openlock dg' of
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder Just lock -> do
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder writeIORef ioRefProofStatus le'
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder mRemakeF <- tryTakeMVar lock
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder case mRemakeF of
9256f871e7dd915ccfb5969e2117f054306cd366Christian Maeder Just remakeF -> do
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder putMVar lock remakeF
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder putMVar gHist (ln:guHist, grHist')
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder Nothing -> putMVar gHist (ln:guHist, grHist')
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder Nothing -> do
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder lock <- newEmptyMVar
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder writeIORef ioRefProofStatus
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder $ Map.insert ln dg'{openlock = Just lock} le'
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder putMVar gHist (ln:guHist, grHist')
b645cf3dc1e449038ed291bbd11fcc6e02b2fc7fChristian Maeder-- | reloads the Library of the DevGraph
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maederreload :: GInfo -> IO()
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maederreload gInfo@(GInfo { libEnvIORef = ioRefProofStatus
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder , gi_LIB_NAME = ln
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder , gi_hetcatsOpts = opts
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder oldle <- readIORef ioRefProofStatus
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder libdeps = Rel.toList $ Rel.intransKernel $ Rel.transClosure $ Rel.fromList
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder $ getLibDeps oldle
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder ioruplibs <- newIORef ([] :: [LIB_NAME])
bc67ede91ef5309852f1ba3a5a0d6b429f405e9dChristian Maeder writeIORef ioruplibs []
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder reloadLibs ioRefProofStatus opts libdeps ioruplibs ln
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder remakeGraph gInfo
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder-- | Creates a list of all LIB_NAME pairs, which have a dependency
a255351561838b3743d03c1629d335cfb8b83804Christian MaedergetLibDeps :: LibEnv -> [(LIB_NAME, LIB_NAME)]
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian MaedergetLibDeps le =
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder concat $ map (\ ln -> getDep ln le) $ Map.keys le
1f086d5155f47fdad9a0de4e46bbebb2c4b33d30Christian Maeder-- | Creates a list of LIB_NAME pairs for the fist argument
a255351561838b3743d03c1629d335cfb8b83804Christian MaedergetDep :: LIB_NAME -> LibEnv -> [(LIB_NAME, LIB_NAME)]
a255351561838b3743d03c1629d335cfb8b83804Christian MaedergetDep ln le =
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder map (\ x -> (ln, x)) $ map (\ (_,x,_) -> dgn_libname x) $ IntMap.elems $
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder IntMap.filter (\ (_,x,_) -> isDGRef x) $ Tree.convertToMap $
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder dgBody $ lookupDGraph ln le
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder-- | Reloads a library
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian MaederreloadLib :: IORef LibEnv -> HetcatsOpts -> IORef [LIB_NAME] -> LIB_NAME
a255351561838b3743d03c1629d335cfb8b83804Christian MaederreloadLib iorle opts ioruplibs ln = do
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder mfile <- existsAnSource opts {intype = GuessIn}
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder $ rmSuffix $ libNameToFile opts ln
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder case mfile of
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder Nothing -> do
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder Just file -> do
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder le <- readIORef iorle
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder mres <- anaLibExt opts file le'
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder Just (_, newle) -> do
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder uplibs <- readIORef ioruplibs
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder writeIORef ioruplibs $ ln:uplibs
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder writeIORef iorle newle
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder Nothing -> do
190828a6ce12ff8c502e3d7303dcc0d70db49b6cChristian Maeder fail $ "Could not read original development graph from '"++ file
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder-- | Reloads libraries if nessesary
a255351561838b3743d03c1629d335cfb8b83804Christian MaederreloadLibs :: IORef LibEnv -> HetcatsOpts -> [(LIB_NAME, LIB_NAME)]
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder -> IORef [LIB_NAME] -> LIB_NAME -> IO Bool
a255351561838b3743d03c1629d335cfb8b83804Christian MaederreloadLibs iorle opts deps ioruplibs ln = do
42c01284bba8d7c8d995c8dfb96ace57d28ed1bcTill Mossakowski uplibs <- readIORef ioruplibs
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder case elem ln uplibs of
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder True -> return True
0af0cffad0fea46df86ff9a9b1d490247871719aChristian Maeder deps' = map (snd) $ filter (\ (ln',_) -> ln == ln') deps
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder res <- mapM (reloadLibs iorle opts deps ioruplibs) deps'
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder libupdate = foldl (\ u r -> if r then True else u) False res
a255351561838b3743d03c1629d335cfb8b83804Christian Maeder case libupdate of
newln:_ = filter (ln ==) $ Map.keys le
AGV.Result _ errorMsg <- checkHasHiddenNodes gid descr actGraphInfo
AGV.Result _ errorMsg <- checkHasHiddenNodes gid descr' actGraphInfo
AGV.Result descr msg <- hideSetOfNodeTypes gid
AGV.Result _ errorMsg <- checkHasHiddenNodes gid descr actGraphInfo
Just (_, libEnv) -> case Map.lookup ln libEnv of
let proofStatus = Map.insert ln
-> (LibEnv -> IO (Res.Result LibEnv))
HTk.putWinOnTop w))
Res.Result ds res <- proofFun proofStatus
Map.insert ln newGr newProofStatus
case InjMap.lookupWithB descr dgAndabstrNodeMap of
Res.Result ds Nothing -> show $ vcat $ map pretty ds
Res.Result _ m -> showDoc m ""
in createTextDisplay title (showDoc (descr-1) "") [HTk.size(10,10)]
case InjMap.lookupWithB descr dgAndabstrNodeMap of
[HTk.size(80,50)]
DGraph -> IO (Res.Result (Node,G_theory))
$ InjMap.lookupWithB descr dgAndabstrNodeMap
case InjMap.lookupWithB descr dgAndabstrNodeMap of
[HTk.size(30,10)]
Res.Result ds res -> do
$ InjMap.lookupWithB descr dgAndabstrNodeMap
Res.Result [] (Just (node,th)) -> do
Res.Result ds _ <- runResultT(
Res.Result ds _ -> showDiags opts ds
case InjMap.lookupWithB descr dgAndabstrNodeMap of
Res.Result _ (Just th) ->
in createTextDisplay title logstr [HTk.size(30,10)]
Res.Result ds _ ->
case InjMap.lookupWithB descr dgAndabstrNodeMap of
(showDoc (dgn_origin dgnode) "") [HTk.size(30,10)]
case InjMap.lookupWithB descr dgAndabstrNodeMap of
createTextDisplay title stat [HTk.size(105,55)]
let goals = OMap.filter (not . isAxiom) sens
(proven,open) = OMap.partition isProvenSenStatus goals
case InjMap.lookupWithB descr dgAndabstrNodeMap of
createTextDisplay "ID of Edge" (show $ dgl_id linklab) [HTk.size(30,10)]
++ "in the development graph") [HTk.size(30,10)]
[HTk.size(100,40)]
++ "in the development graph") [HTk.size(30,10)]
(showDoc (dgl_origin linklab) "") [HTk.size(30,10)]
++ "in the development graph") [HTk.size(30,10)]
createTextSaveDisplay "Proof Status" "proofstatus.txt"
Res.Result _ (Just th1) -> th1
sign2 <- coerceSign lid1 lid "checkconservativityOfEdge.coerceSign" sign1
let Res.Result ds res =
(showRes ++ "\n" ++ myDiags) [HTk.size(50,50)]
++ "in the development graph") [HTk.size(30,10)]
AGV.Result newDescr _ <- addnode descr
{ dgAndabstrNode = InjMap.insert (libname, node) newDescr
do let srcnode = InjMap.lookupWithA (libname,src) (dgAndabstrNode convMaps)
tarnode = InjMap.lookupWithA (libname,tar) (dgAndabstrNode convMaps)
AGV.Result newDescr msg <- addlink descr (getDGLinkType edgelab)
{ dgAndabstrEdge = InjMap.insert (libname,
case InjMap.lookupWithB descr (dgAndabstrNode convMaps) of
case Map.lookup libname libname2dgMap of
case Map.lookup refLibname libname2dgMap of
case InjMap.lookupWithB descr (dgAndabstrNode convMaps) of
case Map.lookup libname libname2dgMap of
AGV.Result eventDescr errorMsg <- hidenodes abstractGraph
case InjMap.lookupWithA (libname, node) (dgAndabstrNode convMaps) of
case InjMap.lookupWithA dgNode (dgAndabstrNode convMaps) of
AGV.Result descr err <-
{ dgAndabstrNode = InjMap.updateBWithA dgNode
AGV.Result descr err <-
{ dgAndabstrNode = InjMap.insert dgNode descr
case InjMap.lookupWithA dgnode (dgAndabstrNode convMaps) of
AGV.Result descr err <- delnode gid abstrNode grInfo
{ dgAndabstrNode = InjMap.delete dgnode abstrNode
case (InjMap.lookupWithA (libname, src) dgAndabstrNodeMap,
InjMap.lookupWithA (libname, tgt) dgAndabstrNodeMap) of
AGV.Result descr err <-
{ dgAndabstrEdge = InjMap.insert dgEdge descr
case (InjMap.lookupWithA dgEdge dgAndabstrEdgeMap) of
do AGV.Result descr err <- dellink gid abstrEdge grInfo
{ dgAndabstrEdge = InjMap.delete dgEdge
-> Res.Result G_sublogics -> ConvFunc -> LibFunc -> IO ()
openTranslateGraph libEnv ln opts (Res.Result diagsSl mSublogic) convGraph
-- (see GUI.DGTranslation.getDGLogic), the process need not to go on.
Res.Result diagsR i <- runResultT ( do
Res.Result diagsTrans (Just newLibEnv) -> do
Res.Result diagsTrans Nothing ->