[Pellet-users] Remove built axioms

Michael Smith msmith at clarkparsia.com
Tue Jan 29 13:44:38 UTC 2008


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 )

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,
-- 
Mike Smith

Clark & Parsia



More information about the Pellet-users mailing list