PAL - Function with boolean

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PAL - Function with boolean

Gianluigi Loffreda
Hello,
I'm trying to learn how to use Protege OWL and the PAL Constraints.
I need to apply some constraints at instances level and I think the PAL contraints is the only way. Is it true or not?
Anyway this is a simple constraint I wrote. The intent is to check a boolean value associated to the openingStatus property.
It doesn't works and I hope you can help me to understand why.
Thank you for any advice.

(defrange ?Man :FRAME Man)
(defrange ?DoorKnob :FRAME DoorKnob)
(defrange ?Turning :FRAME Turning)
(defrange ?Rotating :FRAME Rotating)

(forall ?Man
        (forall ?DoorKnob
                (forall ?Turning
                        (forall ?Rotating
                                (=> (or
                                        (hasProximity ?Man ?DoorKnob)
                                        (hasProximity ?DoorKnob ?Man)
                                        (hasForm ?Man ?Turning)
                                        (hasForm ?DoorKnob ?Rotating)
                                    )
                                    (openingStatus ?DoorKnob true)
                                )
                        )
                )
        )
)

Thanks

Gianluigi
Gianluigi Loffreda

Sapienza University of Rome (Italy)
Reply | Threaded
Open this post in threaded view
|

Re: PAL - Function with boolean

samsontu
The PAL constraint looks fine except that I imagine you want "and" and
not "or" in the implication. What did you get that made you think that
it "didn't work"?

Samson

gianluigiloffreda wrote:

> Hello,
> I'm trying to learn how to use Protege OWL and the PAL Constraints.
> I need to apply some constraints at instances level and I think the PAL
> contraints is the only way. Is it true or not?
> Anyway this is a simple constraint I wrote. The intent is to check a boolean
> value associated to the openingStatus property.
> It doesn't works and I hope you can help me to understand why.
> Thank you for any advice.
>
> (defrange ?Man :FRAME Man)
> (defrange ?DoorKnob :FRAME DoorKnob)
> (defrange ?Turning :FRAME Turning)
> (defrange ?Rotating :FRAME Rotating)
>
> (forall ?Man
>         (forall ?DoorKnob
>                 (forall ?Turning
>                         (forall ?Rotating
>                                 (=> (or
>                                         (hasProximity ?Man ?DoorKnob)
>                                         (hasProximity ?DoorKnob ?Man)
>                                         (hasForm ?Man ?Turning)
>                                         (hasForm ?DoorKnob ?Rotating)
>                                     )
>                                     (openingStatus ?DoorKnob true)
>                                 )
>                         )
>                 )
>         )
> )
>
> Thanks
>
> Gianluigi

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03