Module ICurry.Graph

An implementation of term graphs used by the ICurry interpreter.

Author: Michael Hanus

Version: January 2021

Summary of exported operations:

viewDot :: Maybe String -> Int -> DotGraph -> IO ()  Deterministic 
Views a dot graph as PDF.
nodeLabel :: Node -> String  Deterministic 
addPartialArg :: Node -> Int -> Node  Deterministic 
emptyGraph :: Graph  Deterministic 
lookupNode :: Int -> Graph -> Node  Deterministic 
maxNodeID :: Graph -> Int  Deterministic 
addNode :: Node -> Graph -> (Graph,Int)  Deterministic 
updateNode :: Graph -> Int -> Node -> Graph  Deterministic 
replaceNode :: Graph -> Int -> Int -> Graph  Deterministic 
showGraphExp :: Graph -> Int -> String  Deterministic 
graphToDot :: Graph -> [(Int,[(String,String)])] -> Bool -> Bool -> DotGraph  Deterministic 
fullGraphToDot :: Graph -> [(Int,[(String,String)])] -> Bool -> DotGraph  Deterministic 
reachableGraph :: Graph -> [Int] -> Graph  Deterministic 

Exported datatypes:


NodeID

Type synonym: NodeID = Int


ChoiceID

Type synonym: ChoiceID = Int


PartCall

Constructors:

  • PartFuncCall :: Int -> PartCall
  • PartConsCall :: Int -> PartCall

Node

Constructors:


Graph

Constructors:


Exported operations:

viewDot :: Maybe String -> Int -> DotGraph -> IO ()  Deterministic 

Views a dot graph as PDF. If the first argument is (Just c), the command c (e.g., "evince" or "okular --noraise") to view the generated PDF is started in background, otherwise the viewer is not invoked. The second argument is the step number and used to index the output files if it is positive.

nodeLabel :: Node -> String  Deterministic 

addPartialArg :: Node -> Int -> Node  Deterministic 

emptyGraph :: Graph  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

lookupNode :: Int -> Graph -> Node  Deterministic 

maxNodeID :: Graph -> Int  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

addNode :: Node -> Graph -> (Graph,Int)  Deterministic 

updateNode :: Graph -> Int -> Node -> Graph  Deterministic 

replaceNode :: Graph -> Int -> Int -> Graph  Deterministic 

showGraphExp :: Graph -> Int -> String  Deterministic 

graphToDot :: Graph -> [(Int,[(String,String)])] -> Bool -> Bool -> DotGraph  Deterministic 

fullGraphToDot :: Graph -> [(Int,[(String,String)])] -> Bool -> DotGraph  Deterministic 

reachableGraph :: Graph -> [Int] -> Graph  Deterministic