[sc34wg3] Problem with wildcards

Lars Heuer heuer at semagia.com
Mon Mar 2 09:27:05 EST 2009


Hi Lars,

[Dropping IIDs]
>> I was thinking of dropping only the ones for wildcards. What do you
>> think?

> That may work, although TMCL used a bootstrap template to setup
> several constraints. If TMCL (or any other CTM file) uses wildcards to
> initialize an ontology / constraints, all these wildcards are resolved
> against the included file, right? I am not sure if this may cause a
> problem or not.

Currently I think it may not cause problems. Example:

geo.ctm:

    def capital($country, $name)
        ?capital isa city; - $name .
        is-located-in(location: $country, located: ?capital)
        capital-of(region: $country, capital: ?capital)
    end

    def init-defaults()
        Norway capital("Oslo");
        Germany captial("Berlin");
    end

    init-defaults()


sweden.ctm:
   %include <geo.ctm>

   Sweden capital("Stockholm").

norway.ctm:
   %include <geo.ctm>

   Norway captial("Oslo").


If I do not miss anything, we shouldn't get problems here, although
"Oslo" gets different ?capital item identifiers: One from the
init-defaults() template invocation (resolved against "geo.ctm") and
one from the "norway.ctm" (resolved against norway.ctm).

Anyway, I'll try to verify that everything works as expected this
evening.
   
Best regards,
Lars
-- 
Semagia 
<http://www.semagia.com>



More information about the sc34wg3 mailing list