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-discussion] Constraint - compare instances

Samson Tu swt at stanford.edu
Wed Nov 16 13:46:34 PST 2011


It has been a long time since I used PAL. I don't remember the behavior 
of the "=" operator. However, you can do what you want by writing

(forall ?multitext
   (exists ?base
     (Description ?base ?multitext)))

This assert that ?multitext is a Description value of ?base.

Samson

On 11/11/2011 4:20 AM, Daniel Domazer wrote:
> Hello,
>
> I have a problem concerning constraints again. I have the class
> :MULTI-LING-TEXT, which has slots of string for each language,
> and an abstract base class from which others derive. This base
> class has a slot named Description of :MULTI-LING-TEXT instances.
>
> What I want to check with the constraint is that for every instance
> of :MULTI-LING-TEXT should exist an instance of a subclass of
> AbstractBaseClass which uses this :MULTI-LING-TEXT instance.
>
>
>
> This is what I got so far:
>
> (defrange ?multitext :FRAME :MULTI-LING-TEXT)
> (defrange ?base :FRAME AbstractBaseClass)
>
> (forall ?multitext
>    (exists ?base
>      (= (Description ?base) ?multitext)))
>
> This iterates over all subclasses of AbstractBaseClass, right?
> Do I understand it right that (Description ?base) returns the
> instance and that this is compared to ?multitext if they are the
> same instance (not the content)? The documentation is not really
> clear to me.
>
> Thanks in advance!
>
> Best regards,
> Daniel Domazer
>
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03




More information about the protege-discussion mailing list