Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Modeling "for-each" in swrl

Michael Lodemann milo at
Tue Oct 14 07:37:38 PDT 2008

>> I want to verify, that the length of all road-sections belonging to a
>> specific road doesn't exceed the road-length.
>> To descibe it in an object-oriented style:
>> int section_length = 0;
>> foreach(road_section in road.sections)
>> {
>>  section_length += road_section.length;
>> }
> One problem that you will encounter is the open-world reasoning.  You
> can't find ALL of the road sections just by looking at the fillers.
> You will need to add some additional assertions to the language to
> enable the reasoning you desire.
> Specifically:
>    1.  You need to make all of the road-section individuals
> differentFrom each other.

Ok, this is done by using the individuals-wizard and making the
individuals "AllDifferent", right? Btw. is there a way to make individuals
differ without using the wizard?

>    2.  You will need to use an enumerated class and an allValuesFrom
> restriction to provide a closed set of fillers.  Something like
>      Road1  =>  belongsTo allValuesFrom {RoadSection1 RoadSection2 ...
> RoadSectionN}

I don't understand this completely.
First of all, I'm having my classes and instances in two seperate
ontologies and I want to keep it like that.
Second ... In my model the belongsTo-Property has Domain:RoadSection and
And the restriction you have written is for individuals, not classes?
Well, ok, you mean the RoadSections are part of the mentioned enumerated
class, but what about the Road1-individual?
So with that suggestion I do have to know the individuals at design-time?
Unfortunately that is unwanted.

>> Does anyone can make it clear how to describe sth. like this in
>> SWRL? Is
>> it possible only with some swrlb:add statements, or do I have to use
> I know that there is a summing operator, but I can't recall right now
> if that is only available in SQWRL.  The problem is that you can't use
> SQWRL results for inference, in part because it would provide a way to
> violate open world semantics.

So it seems to me, that I'm not able to ship around a programatical
approach, where I can make my own closed world and make use of
query-results, right?

Is there a good and complete example of how to use S(Q)WRLQueryAPI? The
wiki ( just shows
some snippets.

Thanks and regards,

More information about the protege-owl mailing list