summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2014-11-24 20:41:24 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2014-11-24 20:41:24 -0500
commita413fc1a42bf0fbee27c2f22cc8e9ca9b17b9edf (patch)
tree2a8e53b7079d966df10718a9bcb1b3e82379e605
parenta747e57a19be5a2bf0166efd86547b5d851a5902 (diff)
Add interface to UnionFind.
-rw-r--r--src/sqlcache.sml1
-rw-r--r--src/union_find_fn.sml8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/sqlcache.sml b/src/sqlcache.sml
index 095a1474..d8169926 100644
--- a/src/sqlcache.sml
+++ b/src/sqlcache.sml
@@ -341,6 +341,7 @@ val rec dmlToFormula =
fn Sql.Insert tableVals => valsToFormula tableVals
| Sql.Delete (table, wher) => renameTables [(table, "T")] (sqexpToFormula wher)
(* TODO: refine formula for the vals part, which could take into account the wher part. *)
+ (* TODO: use pushNegate instead of mapFormulaSigned? *)
| Sql.Update (table, vals, wher) =>
let
val f = sqexpToFormula wher
diff --git a/src/union_find_fn.sml b/src/union_find_fn.sml
index 42b2d4d7..e6f8d9bf 100644
--- a/src/union_find_fn.sml
+++ b/src/union_find_fn.sml
@@ -1,4 +1,10 @@
-functor UnionFindFn(K : ORD_KEY) = struct
+functor UnionFindFn(K : ORD_KEY) :> sig
+ type unionFind
+ val empty : unionFind
+ val union : unionFind * K.ord_key * K.ord_key -> unionFind
+ val union' : (K.ord_key * K.ord_key) * unionFind -> unionFind
+ val classes : unionFind -> K.ord_key list list
+end = struct
structure M = BinaryMapFn(K)
structure S = BinarySetFn(K)