[sc34wg3] Problem with wildcards
Lars Marius Garshol
larsga at garshol.priv.no
Sat Feb 28 05:11:00 EST 2009
While waiting for the baby to fall asleep last night I thought of a
problem with wildcards. Imagine that we have geo.ctm, which contains
all kinds of nice geographical stuff, including:
def capital($country, $name)
?capital isa city;
- $name .
is-located-in(location: $country, located: ?capital)
capital-of(region: $country, capital: ?capital)
end
Looks reasonable, right?
Then we write in norway.ctm:
%include <geo.ctm>
norway isa geo:country;
capital("Oslo").
And later sweden.ctm:
%include <geo.ctm>
sweden isa geo:country;
capital("Stockholm").
If we ever decide to merge sweden.ctm and norway.ctm Oslo and
Stockholm wind up merging, because they both have the same item
identifier:
file://.../geo.ctm#$__1.capital
One possible fix might be to change the rules for %include so that
only the item identifiers from the including master file are
preserved, and the ones from the included file are lost.
Or maybe we have to give up the goal of predictable item identifiers
for wildcards, although that would suck royally, as a lot of the tests
in the suite rely on this.
--Lars M.
http://www.garshol.priv.no/blog/
http://www.garshol.priv.no/tmphoto/
More information about the sc34wg3
mailing list