diff options
author | Camil Staps | 2016-07-05 17:25:10 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-05 17:25:10 +0200 |
commit | ceb0b74bd0b368124679378ebfb2cf316deb2e39 (patch) | |
tree | 7f5c562952bcf0427d838274177123765fe93cf5 /ABC/Machine/GraphStore.dcl | |
parent | ProgramStore as array for efficiency (diff) |
Added Machine as module level
Diffstat (limited to 'ABC/Machine/GraphStore.dcl')
-rw-r--r-- | ABC/Machine/GraphStore.dcl | 25 |
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 |