HolLight2DG.hs revision e9458b1a7a19a63aa4c179f9ab20f4d50681c168
4751N/AModule : ./HolLight/HolLight2DG.hs
4751N/ALicense : GPLv2 or higher, see LICENSE.txt
4751N/Amodule HolLight.HolLight2DG where
4751N/Aimport Static.GTheory
4751N/Aimport Static.DevGraph
4751N/Aimport Static.DgUtils
4751N/Aimport Static.History
4751N/Aimport Static.ComputeTheory
4751N/Aimport Logic.Logic
4751N/Aimport Logic.Prover
4751N/Aimport Logic.ExtSign
4751N/Aimport Logic.Grothendieck
4751N/Aimport Common.LibName
4751N/Aimport Common.IRI (simpleIdToIRI)
4751N/Aimport Common.AS_Annotation
4751N/Aimport Common.Result
4751N/Aimport Common.Utils
4751N/Aimport Common.SAX
4751N/Aimport Control.Monad
4751N/Aimport Common.Lib.Maybe
4751N/Aimport qualified Data.ByteString.Lazy as L
4751N/Aimport Text.XML.Expat.SAX
4751N/Aimport HolLight.Sign
4751N/Aimport HolLight.Sentence
4751N/Aimport HolLight.Term
4751N/Aimport HolLight.Helper (names)
4751N/Aimport Driver.Options
4751N/Aimport Data.Maybe (fromMaybe)
4751N/Aimport System.Exit
4751N/Aimport System.Directory
4751N/Aimport System.FilePath
4751N/A [] -> error "HolLight.readWord"
4751N/A return $ fromMaybe (error "HolLight.readInt") $ readMaybe w
4751N/A case Map.lookup i m of
4751N/A x : xs -> case Map.lookup x m of
4751N/A case (Map.lookup i sl, listToTypes m l) of
4751N/A case Map.lookup i sl of
let image = "hol_light.dmtcp"
"HETS_HOLLIGHT_TOOLS" "HolLight/OcamlTools/"
s <- L.readFile tempFile
fail $ "HolLight.importData: " ++ err
let strings = Map.fromList (zip [1 ..] sl)
Map.empty "SharedHolTypes"
Map.empty "SharedHolTerms"
Map.insert s (length ts) m'
Var _ t _ -> let ts = getTypes Map.empty t
in (ts, Map.empty)
Const s t _ -> let ts = getTypes Map.empty t
prettifyTypeVarsTp :: HolType -> Map.Map String String
-> (HolType, Map.Map String String)
prettifyTypeVarsTp (TyVar s) m = case Map.lookup s m of
Nothing -> let s' = '\'' : (names !! Map.size m)
in (TyVar s', Map.insert s s' m)
prettifyTypeVarsTm :: Term -> Map.Map String String
-> (Term, Map.Map String String)
let (t1, m1) = prettifyTypeVarsTp t Map.empty
let (t', _) = prettifyTypeVarsTm t Map.empty
treeLevels :: [(String, String)] -> Map.Map Int [(String, String)]
let s = Map.findWithDefault [] p m
-> (DGraph, Map.Map String
(String, Data.Graph.Inductive.Graph.Node, DGNodeLab))
-> (DGraph, Map.Map String
(String, Data.Graph.Inductive.Graph.Node, DGNodeLab))
n' = snd (System.FilePath.splitFileName n)
m' = Map.insert n (n, k, labelK) m
{ globalTheory = computeLabelTheory Map.empty newDG
(Map.findWithDefault emptySig (fst l1) m)
(Map.findWithDefault emptySig (fst l2) m) then
(sigUnion (Map.findWithDefault emptySig s m')
(Map.findWithDefault emptySig t m')) of
Just new_tsig -> Map.insert t new_tsig m')
let lvl' = Map.findWithDefault [] lvl h
) (m, []) [0 .. (Map.size h - 1)]
let sig = Map.findWithDefault emptySig lname m'
_insNodeDG sig sens lname (dg, node_m')) (emptyDG, Map.empty) libs
case Map.lookup source node_m of
case Map.lookup target node_m of
let sig = Map.findWithDefault emptySig n m'
sig1 = Map.findWithDefault emptySig n1 m'
le = Map.insert (emptyLibName
(System.FilePath.takeBaseName path))
dg'' Map.empty
(System.FilePath.takeBaseName path),