I created a toy example to better understand spin before setting it  
loose on a larger model and have a question on incremental reasoning  
with iteration.  I am using TBCM3.0 and the inference engine is  
TopSpin set to incremental reasoning with iteration

The example involves calculation of volume on a box and cube.
I defined the class Polyhedron (owl:Class) with subclass Box  
(owl:Class) with owl:DatatypeProperty length, breadth, and height and  
defined a spin:rule that calculates volume - incremental reasoning  
works as expected, i.e., it calculates the volume whenever I change a  
dimension.

Next I defined the RegularPolyhedron (owl:Class) as a subclass of  
Polyhedron with owl:DatatypeProperty side xsd:float
and Defined Cube (owl:Class) to be a subclass of Box and Regular  
Polyhedron
and created a spin:rule to populate the inherited length, width, and  
height xsd:float owl:DatatypeProperty.

When I instantiate a Cube and assign a value to side, the side value  
is propagated to the length, width, and height dimensions inherited  
from Box, but the volume is not computed by the spin:rule on Box.  I  
have to explicitly run the inference engine to get it to compute the  
volume.  How can I avoid this situation?  Is multiple inheritance  
causing the problem, or is there an execution order dependency on the  
spin:rules, e.g., least specific first, that is causing this, or is it  
simply not being triggered by the derived quantities, or...?

thanks
Arthur

illustration of class lattice:

                                      Polyhedron
                                        /                 \
  RegularPolyhedron {side}      Box {spin:rule area := length * width  
* height}
                                               \       /
                                Cube {spin:rule length = side;  
width :=side; height := side}



spin:rule on Box

CONSTRUCT {
     ?this :volume ?volume .
}
WHERE {
     ?this :length ?length .
     ?this :width ?width .
     ?this :height ?height .
     LET (?volume := ((?length * ?width) * ?height)) .
}


spin:rule on Cube

CONSTRUCT {
     ?this :width ?side .
     ?this :height ?side .
     ?this :length ?side .
}
WHERE {
     ?this :side ?side .
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to