aboutsummaryrefslogtreecommitdiff
path: root/GraphStore.dcl
blob: 108a77ed65faa2d827d2b815eea4014cbca720b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
definition module ABC.GraphStore

from StdOverloaded import class toString
from ABC.Def import ::Arity, ::InstrId, ::Name, ::APEntry, ::DescId, ::NodeId
from ABC.Nodes import ::Node

:: Desc = Desc APEntry Arity Name

d_ap_entry :: Desc -> InstrId
d_arity    :: Desc -> Arity
d_name     :: Desc -> String

:: DescStore (:== [Desc])

ds_get     :: DescId DescStore -> Desc
ds_init    :: [Desc] -> DescStore

:: GraphStore

show_graphstore :: GraphStore DescStore -> String

gs_get     :: NodeId GraphStore -> Node
gs_init    :: GraphStore
gs_newnode :: GraphStore -> (GraphStore, NodeId)
gs_update  :: NodeId (Node -> Node) GraphStore -> GraphStore