aboutsummaryrefslogtreecommitdiff
path: root/ABC/Machine/GraphStore.dcl
diff options
context:
space:
mode:
authorCamil Staps2016-07-05 17:25:10 +0200
committerCamil Staps2016-07-05 17:25:10 +0200
commitceb0b74bd0b368124679378ebfb2cf316deb2e39 (patch)
tree7f5c562952bcf0427d838274177123765fe93cf5 /ABC/Machine/GraphStore.dcl
parentProgramStore as array for efficiency (diff)
Added Machine as module level
Diffstat (limited to 'ABC/Machine/GraphStore.dcl')
-rw-r--r--ABC/Machine/GraphStore.dcl25
1 files changed, 25 insertions, 0 deletions
diff --git a/ABC/Machine/GraphStore.dcl b/ABC/Machine/GraphStore.dcl
new file mode 100644
index 0000000..da96156
--- /dev/null
+++ b/ABC/Machine/GraphStore.dcl
@@ -0,0 +1,25 @@
+definition module ABC.Machine.GraphStore
+
+from StdOverloaded import class toString
+from ABC.Machine.Def import ::Arity, ::InstrId, ::Name, ::APEntry, ::DescId, ::NodeId
+from ABC.Machine.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