- use "OperationTreeSetSolns.sml"; [opening OperationTreeSetSolns.sml] OperationTreeSetSolns.sml:159.39 Warning: calling polyEqual OperationTreeSetSolns.sml:118.31 Warning: calling polyEqual OperationTreeSetSolns.sml:123.55-123.57 Warning: calling polyEqual OperationTreeSetSolns.sml:127.50 Warning: calling polyEqual OperationTreeSetSolns.sml:136.50 Warning: calling polyEqual OperationTreeSetSolns.sml:145.50 Warning: calling polyEqual OperationTreeSetSolns.sml:109.37 Warning: calling polyEqual OperationTreeSetSolns.sml:110.42 Warning: calling polyEqual exception Unimplemented exception Unimplementable signature SET = sig type 'a t val empty : ''a t val singleton : ''a -> ''a t val fromList : ''a list -> ''a t val toList : ''a t -> ''a list val isEmpty : ''a t -> bool val size : ''a t -> int val member : ''a -> ''a t -> bool val insert : ''a -> ''a t -> ''a t val delete : ''a -> ''a t -> ''a t val union : ''a t -> ''a t -> ''a t val intersection : ''a t -> ''a t -> ''a t val difference : ''a t -> ''a t -> ''a t val fromPred : (''a -> bool) -> ''a t val toPred : ''a t -> ''a -> bool val toString : (''a -> string) -> ''a t -> string end structure OperationTreeSet : SET opening OperationTreeSet type 'a t val empty : ''a t val singleton : ''a -> ''a t val fromList : ''a list -> ''a t val toList : ''a t -> ''a list val isEmpty : ''a t -> bool val size : ''a t -> int val member : ''a -> ''a t -> bool val insert : ''a -> ''a t -> ''a t val delete : ''a -> ''a t -> ''a t val union : ''a t -> ''a t -> ''a t val intersection : ''a t -> ''a t -> ''a t val difference : ''a t -> ''a t -> ''a t val fromPred : (''a -> bool) -> ''a t val toPred : ''a t -> ''a -> bool val toString : (''a -> string) -> ''a t -> string val range = fn : int -> int -> int list val s = - : int t val s1 = - : int t val s2 = - : int t val s3 = - : int t val dupSet = - : int t val s1UnionS2 = - : int t val s1IntersectionS2 = - : int t val s1DifferenceS2 = - : int t val s2DifferenceS1 = - : int t val intersectionSmallDiffs = - : int t val smallSets = [("s",-),("s1",-),("s2",-),("s3",-),("dupSet",-),("s1UnionS2",-), ("s1IntersectionS2",-),("s1DifferenceS2",-),("s2DifferenceS1",-), ("intersectionSmallDiffs",-)] : (string * int t) list val mapNamedSet = fn : ('a -> 'b) -> ('c * 'a) list -> ('c * 'b) list val testMember = fn : int t -> int list val testPred = fn : int t -> int list val smallMembers = [("s",[7]),("s1",[17,19,23,42]),("s2",[17,23,42,57,97]), ("s3",[17,23,42,97]),("dupSet",[1,2,3]),("s1UnionS2",[17,19,23,42,57,97]), ("s1IntersectionS2",[17,23,42]),("s1DifferenceS2",[19]), ("s2DifferenceS1",[57,97]),("intersectionSmallDiffs",[])] : (string * int list) list val smallLists = [("s",[7]),("s1",[17,19,23,42]),("s2",[17,23,42,57,97]), ("s3",[17,23,42,97]),("dupSet",[1,3,2]),("s1UnionS2",[19,17,23,42,57,97]), ("s1IntersectionS2",[17,23,42]),("s1DifferenceS2",[19]), ("s2DifferenceS1",[57,97]),("intersectionSmallDiffs",[])] : (string * int list) list val smallIsEmpties = [("s",false),("s1",false),("s2",false),("s3",false),("dupSet",false), ("s1UnionS2",false),("s1IntersectionS2",false),("s1DifferenceS2",false), ("s2DifferenceS1",false),("intersectionSmallDiffs",true)] : (string * bool) list val smallSizes = [("s",1),("s1",4),("s2",5),("s3",4),("dupSet",3),("s1UnionS2",6), ("s1IntersectionS2",3),("s1DifferenceS2",1),("s2DifferenceS1",2), ("intersectionSmallDiffs",0)] : (string * int) list val smallPreds = [("s",[7]),("s1",[17,19,23,42]),("s2",[17,23,42,57,97]), ("s3",[17,23,42,97]),("dupSet",[1,2,3]),("s1UnionS2",[17,19,23,42,57,97]), ("s1IntersectionS2",[17,23,42]),("s1DifferenceS2",[19]), ("s2DifferenceS1",[57,97]),("intersectionSmallDiffs",[])] : (string * int list) list val smallStrings = [("s","{7}"),("s1","{17,19,23,42}"),("s2","{17,23,42,57,97}"), ("s3","{17,23,42,97}"),("dupSet","{1,3,2}"), ("s1UnionS2","{19,17,23,42,57,97}"),("s1IntersectionS2","{17,23,42}"), ("s1DifferenceS2","{19}"),("s2DifferenceS1","{57,97}"), ("intersectionSmallDiffs","{}")] : (string * string) list val lowSet = - : int t val highSet = - : int t val lowUnionHighSet = - : int t val lowInsersectionHighSet = - : int t val lowDifferenceHighSet = - : int t val highDifferenceLowSet = - : int t val intersectionLowHighDiffsSet = - : int t val mod2Set = - : int t val mod3Set = - : int t val mod2UnionMod3Set = - : int t val mod2IntersectionMod3Set = - : int t val mod2DifferenceMod3Set = - : int t val mod3DifferenceMod2Set = - : int t val intersectionModDiffsSet = - : int t val bigIntersectionSet = - : int t val bigDifferenceSet = - : int t val bigSets = [("lowSet",-),("highSet",-),("lowUnionHighSet",-), ("lowInsersectionHighSet",-),("lowDifferenceHighSet",-), ("highDifferenceLowSet",-),("intersectionLowHighDiffsSet",-),("mod2Set",-), ("mod3Set",-),("mod2UnionMod3Set",-),("mod2IntersectionMod3Set",-), ("mod2DifferenceMod3Set",-),("intersectionModDiffsSet",-), ("mod3DifferenceMod2Set",-),("bigIntersectionSet",-), ("bigDifferenceSet",-)] : (string * int t) list val bigMembers = [("lowSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50, 51,52,53,54,55,56,57,58,59,60]), ("highSet", [40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87, 88,89,90,91,92,93,94,95,96,97,98,99,100]), ("lowUnionHighSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50, 51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74, 75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98, 99,100]), ("lowInsersectionHighSet", [40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]), ("lowDifferenceHighSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39]), ("highDifferenceLowSet", [61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84, 85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]), ("intersectionLowHighDiffsSet",[]), ("mod2Set", [0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50, 52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98, 100]), ("mod3Set", [0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72, 75,78,81,84,87,90,93,96,99]), ("mod2UnionMod3Set", [0,2,3,4,6,8,9,10,12,14,15,16,18,20,21,22,24,26,27,28,30,32,33,34,36,38, 39,40,42,44,45,46,48,50,51,52,54,56,57,58,60,62,63,64,66,68,69,70,72,74, 75,76,78,80,81,82,84,86,87,88,90,92,93,94,96,98,99,100]), ("mod2IntersectionMod3Set", [0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96]), ("mod2DifferenceMod3Set", [2,4,8,10,14,16,20,22,26,28,32,34,38,40,44,46,50,52,56,58,62,64,68,70,74, 76,80,82,86,88,92,94,98,100]),("intersectionModDiffsSet",[]), ("mod3DifferenceMod2Set", [3,9,15,21,27,33,39,45,51,57,63,69,75,81,87,93,99]), ("bigIntersectionSet",[42,48,54,60]), ("bigDifferenceSet", [0,1,3,5,6,7,9,11,12,13,15,17,18,19,21,23,24,25,27,29,30,31,33,35,36,37, 39])] : (string * int list) list val bigLists = [("lowSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50, 51,52,53,54,55,56,57,58,59,60]), ("highSet", [40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87, 88,89,90,91,92,93,94,95,96,97,98,99,100]), ("lowUnionHighSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50, 51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74, 75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98, 99,100]), ("lowInsersectionHighSet", [40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]), ("lowDifferenceHighSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39]), ("highDifferenceLowSet", [61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84, 85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]), ("intersectionLowHighDiffsSet",[]), ("mod2Set", [0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50, 52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98, 100]), ("mod3Set", [0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72, 75,78,81,84,87,90,93,96,99]), ("mod2UnionMod3Set", [2,4,8,10,14,16,20,22,26,28,32,34,38,40,44,46,50,52,56,58,62,64,68,70,74, 76,80,82,86,88,92,94,98,100,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45, 48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99]), ("mod2IntersectionMod3Set", [0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96]), ("mod2DifferenceMod3Set", [2,4,8,10,14,16,20,22,26,28,32,34,38,40,44,46,50,52,56,58,62,64,68,70,74, 76,80,82,86,88,92,94,98,100]),("intersectionModDiffsSet",[]), ("mod3DifferenceMod2Set", [3,9,15,21,27,33,39,45,51,57,63,69,75,81,87,93,99]), ("bigIntersectionSet",[42,48,54,60]), ("bigDifferenceSet", [0,1,3,5,6,7,9,11,12,13,15,17,18,19,21,23,24,25,27,29,30,31,33,35,36,37, 39])] : (string * int list) list val bigIsEmpties = [("lowSet",false),("highSet",false),("lowUnionHighSet",false), ("lowInsersectionHighSet",false),("lowDifferenceHighSet",false), ("highDifferenceLowSet",false),("intersectionLowHighDiffsSet",true), ("mod2Set",false),("mod3Set",false),("mod2UnionMod3Set",false), ("mod2IntersectionMod3Set",false),("mod2DifferenceMod3Set",false), ("intersectionModDiffsSet",true),("mod3DifferenceMod2Set",false), ("bigIntersectionSet",false),("bigDifferenceSet",false)] : (string * bool) list val bigSizes = [("lowSet",61),("highSet",61),("lowUnionHighSet",101), ("lowInsersectionHighSet",21),("lowDifferenceHighSet",40), ("highDifferenceLowSet",40),("intersectionLowHighDiffsSet",0), ("mod2Set",51),("mod3Set",34),("mod2UnionMod3Set",68), ("mod2IntersectionMod3Set",17),("mod2DifferenceMod3Set",34), ("intersectionModDiffsSet",0),("mod3DifferenceMod2Set",17), ("bigIntersectionSet",4),("bigDifferenceSet",27)] : (string * int) list val bigPreds = [("lowSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50, 51,52,53,54,55,56,57,58,59,60]), ("highSet", [40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87, 88,89,90,91,92,93,94,95,96,97,98,99,100]), ("lowUnionHighSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50, 51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74, 75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98, 99,100]), ("lowInsersectionHighSet", [40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]), ("lowDifferenceHighSet", [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39]), ("highDifferenceLowSet", [61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84, 85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]), ("intersectionLowHighDiffsSet",[]), ("mod2Set", [0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50, 52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98, 100]), ("mod3Set", [0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72, 75,78,81,84,87,90,93,96,99]), ("mod2UnionMod3Set", [0,2,3,4,6,8,9,10,12,14,15,16,18,20,21,22,24,26,27,28,30,32,33,34,36,38, 39,40,42,44,45,46,48,50,51,52,54,56,57,58,60,62,63,64,66,68,69,70,72,74, 75,76,78,80,81,82,84,86,87,88,90,92,93,94,96,98,99,100]), ("mod2IntersectionMod3Set", [0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96]), ("mod2DifferenceMod3Set", [2,4,8,10,14,16,20,22,26,28,32,34,38,40,44,46,50,52,56,58,62,64,68,70,74, 76,80,82,86,88,92,94,98,100]),("intersectionModDiffsSet",[]), ("mod3DifferenceMod2Set", [3,9,15,21,27,33,39,45,51,57,63,69,75,81,87,93,99]), ("bigIntersectionSet",[42,48,54,60]), ("bigDifferenceSet", [0,1,3,5,6,7,9,11,12,13,15,17,18,19,21,23,24,25,27,29,30,31,33,35,36,37, 39])] : (string * int list) list val bigStrings = [("lowSet", "{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}"), ("highSet", "{40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100}"), ("lowUnionHighSet", "{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100}"), ("lowInsersectionHighSet", "{40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}"), ("lowDifferenceHighSet", "{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}"), ("highDifferenceLowSet", "{61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100}"), ("intersectionLowHighDiffsSet","{}"), ("mod2Set", "{0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100}"), ("mod3Set", "{0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99}"), ("mod2UnionMod3Set", "{2,4,8,10,14,16,20,22,26,28,32,34,38,40,44,46,50,52,56,58,62,64,68,70,74,76,80,82,86,88,92,94,98,100,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99}"), ("mod2IntersectionMod3Set", "{0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96}"), ("mod2DifferenceMod3Set", "{2,4,8,10,14,16,20,22,26,28,32,34,38,40,44,46,50,52,56,58,62,64,68,70,74,76,80,82,86,88,92,94,98,100}"), ("intersectionModDiffsSet","{}"), ("mod3DifferenceMod2Set", "{3,9,15,21,27,33,39,45,51,57,63,69,75,81,87,93,99}"), ("bigIntersectionSet","{42,48,54,60}"), ("bigDifferenceSet", "{0,1,3,5,6,7,9,11,12,13,15,17,18,19,21,23,24,25,27,29,30,31,33,35,36,37,39}")] : (string * string) list val it = () : unit