[Pellet-users] Remove built axioms
Christina Tziviskou
tzivisko at elet.polimi.it
Tue Jan 29 16:56:52 UTC 2008
Michael Smith wrote:
> On Mon, 2008-01-28 at 22:32 +0100, Christina Tziviskou wrote:
>
>
>> I have used the addDisjoint method from the KnowledgeBase class to add
>> to indicate class A disjoint to class B.
>> How can I remove this axiom?
>>
>
>
>> The removeAxiom method from the KnowledgeBase class expects the
>> identifier of the built disjointness axiom, but the addDisjoint method
>> is defined as void.
>>
>
> Internally, the addDisjoint method creates an axiom with
> ATermUtils.makeDisjoint( A, B )
>
>
I've seen the code of the addDisjoint method (year 2003) and it contains
also the following:
ATerm notC2 = ATermUtils.makeNot(c2);
ATerm notC1 = ATermUtils.makeNot(c1);
tbox.addAxiom(ATermUtils.makeSub(c1, notC2 ), ds );
tbox.addAxiom(ATermUtils.makeSub(c2, notC1 ), ds );
In this case, is it enough to try to recreate the disjointness (at the
time of removal) only by calling the ATermUtils.makeDisjoint and pass
the created axiom to the removeAxiom?
Or you suggest that instead of using the KnowledgeBase.addDisjoint I
should only use the ATermUtils.makeDisjoint?
thank you again,
christina
> You should be able to pass that as an argument to removeAxiom(), as in
> the following example (which also demonstrates that some axioms cannot
> be removed).
>
>
> ATermAppl axiom = ATermUtils.makeDisjoint( A, B );
> boolean success = kb.removeAxiom( axiom );
> if ( !success ) reload();
>
>
> Regards,
>
More information about the Pellet-users
mailing list