From fce0854bab77c1740c0244be9477349281c4d653 Mon Sep 17 00:00:00 2001 From: zweije Date: Fri, 10 Aug 2001 14:34:31 +0000 Subject: 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 --- sucl/graph.dcl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'sucl/graph.dcl') 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 -- cgit v1.2.3