Module ICurry.Graph

An implementation of term graphs used by the ICurry interpreter.

Author: Michael Hanus, Sascha Ecks

Version: May 2023

Summary of exported operations:

viewDot :: Maybe String -> Int -> DotGraph -> IO ()  Deterministic 
Views a dot graph as PDF.
nodeLabel :: Node -> String  Deterministic 
nodeChildren :: Node -> [Int]  Deterministic 
addPartialArg :: Node -> Int -> Node  Deterministic 
emptyGraph :: Graph  Deterministic 
lookupNode :: Int -> Graph -> Node  Deterministic 
graphRoot :: Graph -> Int  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 

nodeChildren :: Node -> [Int]  Deterministic 

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

addPartialArg :: Node -> Int -> Node  Deterministic 

emptyGraph :: Graph  Deterministic 

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

lookupNode :: Int -> Graph -> Node  Deterministic 

graphRoot :: Graph -> Int  Deterministic 

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

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