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

Thomas Russ tar at ISI.EDU
Mon Oct 13 11:38:48 PDT 2008


On Oct 13, 2008, at 2:35 AM, Michael Lodemann wrote:
>
> 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.
   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}

> 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
> SQWRL?

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.





More information about the protege-owl mailing list