Module ICurry.Graph

An implementation of term graphs used by the ICurry interpreter.

Author: Michael Hanus

Version: January 2020

Summary of exported operations:

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

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 ()   

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   

addPartialArg :: Node -> Int -> Node   

emptyGraph :: Graph   

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

lookupNode :: Int -> Graph -> Node   

maxNodeID :: Graph -> Int   

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

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

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

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

showGraphExp :: Graph -> Int -> String   

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

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

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