diff: Big fix in relation.m

Andrew Bromage bromage at hydra.cs.mu.oz.au
Mon Aug 25 16:11:55 AEST 1997


G'day all.

This bug fix is trivial, tested and committed --- no need for review.

Cheers,
Andrew Bromage


Estimated hours taken: 0.2

library/relation.m:
	Bug fix: When computing an RTC, ensure that the new relation
	being created has the correct domain information by copying
	this from the old relation, as opposed to just leaving it
	blank.


Index: relation.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/relation.m,v
retrieving revision 1.17
diff -u -r1.17 relation.m
--- relation.m	1997/07/27 15:07:07	1.17
+++ relation.m	1997/08/25 06:06:55
@@ -944,7 +944,13 @@
 	list__length(DomList, DomLen),
 	map__init(Map0),
 	relation__rtc_init_map(Map0, DomList, Map),
-	relation__init(RtcIn),
+
+	% Make a new relation using the same domain as the old one.
+	Rel   = relation(NextElement, ElMap, _, _),
+	map__init(FwdMap),
+	map__init(BwdMap),
+	RtcIn = relation(NextElement, ElMap, FwdMap, BwdMap),
+
 	Inf is (DomLen + 2) * 2,	% This is close enough to infinity.
 	relation__rtc_2(Inf, Rel, DomList, Map, RtcIn, Rtc).
 




More information about the developers mailing list