aboutsummaryrefslogtreecommitdiff
path: root/sucl/graph.dcl
diff options
context:
space:
mode:
authorzweije2001-08-10 14:34:31 +0000
committerzweije2001-08-10 14:34:31 +0000
commitfce0854bab77c1740c0244be9477349281c4d653 (patch)
tree83165e77b8e6ebfe73dd40fff080574b8a9b95db /sucl/graph.dcl
parentThis commit was generated by cvs2svn to compensate for changes in r601, (diff)
This commit was generated by cvs2svn to compensate for changes in r603,
which included commits to RCS files with non-trunk default branches. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@604 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'sucl/graph.dcl')
-rw-r--r--sucl/graph.dcl16
1 files changed, 9 insertions, 7 deletions
diff --git a/sucl/graph.dcl b/sucl/graph.dcl
index 50cf702..1ed9c29 100644
--- a/sucl/graph.dcl
+++ b/sucl/graph.dcl
@@ -99,31 +99,31 @@ Implementation
emptygraph :: Graph .sym .var
// Assign a node to a variable in a graph.
-updategraph :: .var (Node .sym .var) (Graph .sym .var) -> Graph .sym .var
+updategraph :: var .(Node sym var) !.(Graph sym var) -> .Graph sym var
// Unassign a variable in a graph, making it free.
-prunegraph :: .var (Graph .sym .var) -> Graph .sym .var
+prunegraph :: var !.(Graph sym var) -> .Graph sym var
// Restrict a graph to a given domain, i.e.
// make all variables free except those in the domain.
-restrictgraph :: !.[var] .(Graph sym var) -> Graph sym var | == var
+restrictgraph :: .[var] .(Graph sym var) -> .Graph sym var | == var
// Redirect references (node arguments) in a graph
// according to a redirection function
-redirectgraph :: (.var->.var) !(Graph .sym .var) -> Graph .sym .var | == var
+redirectgraph :: (var->var) !.(Graph sym var) -> .Graph sym var
// Overwrite the variables in the second graph by their contents in the first.
// Keeps the contents of the second graph if free in the first.
-overwritegraph :: !(Graph .sym .var) (Graph .sym .var) -> Graph .sym .var
+overwritegraph :: !.(Graph sym var) !.(Graph sym var) -> .Graph sym var
// Movegraph moves a graph to a different variable domain
// Requires a list of bound variables in the graph
-movegraph :: (var1->.var2) !.[var1] .(Graph sym var1) -> Graph sym .var2 | == var1
+movegraph :: (var1->var2) !.[var1] .(Graph sym var1) -> .Graph sym var2 | == var1
// Varcontents obtains the contents of a variable in a graph
// Returns a boolean determining if it's bound, and
// its contents if the boolean is True.
-varcontents :: !(Graph .sym var) var -> (.Bool,Node .sym var) | == var
+varcontents :: !.(Graph sym var) var -> (.Bool,Node sym var) | == var
// Graphvars determines the top-level-bound and free variables in a graph,
// reachable from a given list of variables.
@@ -213,3 +213,5 @@ compilegraph :: ![(var,Node sym var)] -> Graph sym var
> where (sdef,scont) = nodecontents sgraph snode
*/
+
+instance == (Graph sym var) | == sym & == var