Module ICurry.Graph

Author
Michael Hanus, Sascha Ecks
Version
May 2023

An implementation of term graphs used by the ICurry interpreter.

Exported Datatypes


type NodeID = Int
type ChoiceID = Int
data PartCall

Constructors:

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

Known instances:


data Node

Constructors:

Known instances:


data Graph

Constructors:

Known instances:


Exported Functions


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