public static ATermAppl value(ATermAppl r) { return ATermUtils.makeValue( r ); }
public static ATermAppl value(ATermAppl r) { return ATermUtils.makeValue( r ); }
/** * Added for incremental reasoning. Given an aterm corresponding to an * individual and concept, the expressivity is updated accordingly. */ public void updateWithIndividual(ATermAppl i, ATermAppl concept) { ATermAppl nominal = ATermUtils.makeValue(i); if( concept.equals(nominal) ) return; m_DLChecker.updateWith(m_Expressivity, concept); } }
/** * Added for incremental reasoning. Given an aterm corresponding to an * individual and concept, the expressivity is updated accordingly. */ public void updateWithIndividual(ATermAppl i, ATermAppl concept) { ATermAppl nominal = ATermUtils.makeValue(i); if( concept.equals(nominal) ) return; m_DLChecker.updateWith(m_Expressivity, concept); } }
public boolean isSameAs(ATermAppl ind1, ATermAppl ind2) { ATermAppl c = ATermUtils.makeValue( ind2 ); return isType( ind1, c ); }
final static public ATermAppl makeHasValue(ATerm r, ATerm ind) { ATermAppl c = makeValue( ind ); return factory.makeAppl( SOMEFUN, r, c ); }
final static public ATermAppl makeHasValue(ATerm r, ATerm ind) { ATermAppl c = makeValue( ind ); return factory.makeAppl( SOMEFUN, r, c ); }
public boolean isSameAs(ATermAppl ind1, ATermAppl ind2) { ATermAppl c = ATermUtils.makeValue( ind2 ); return isType( ind1, c ); }
private ATermList getClasses(final ATermAppl a) { final List<ATermAppl> aterms = new ArrayList<ATermAppl>(); for( final QueryAtom atom : findAtoms( QueryPredicate.Type, a, null ) ) { final ATermAppl arg = atom.getArguments().get( 1 ); if( ATermUtils.isVar( arg ) ) { throw new InternalReasonerException( "Variables as predicates are not supported yet" ); } aterms.add( arg ); } if( !ATermUtils.isVar( a ) ) { aterms.add( ATermUtils.makeValue( a ) ); } return ATermUtils.makeList( aterms ); }
private void processIndividuals() { if (!m_KB.getABox().isEmpty()) { m_Expressivity.setHasIndividual(true); } Iterator<Individual> i = m_KB.getABox().getIndIterator(); while( i.hasNext() ) { Individual ind = i.next(); ATermAppl nominal = ATermUtils.makeValue( ind.getName() ); Iterator<ATermAppl> j = ind.getTypes().iterator(); while( j.hasNext() ) { ATermAppl term = j.next(); if( term.equals( nominal ) ) continue; m_Visitor.visit( term ); } } }
private void processIndividuals() { if (!m_KB.getABox().isEmpty()) { m_Expressivity.setHasIndividual(true); } Iterator<Individual> i = m_KB.getABox().getIndIterator(); while( i.hasNext() ) { Individual ind = i.next(); ATermAppl nominal = ATermUtils.makeValue( ind.getName() ); Iterator<ATermAppl> j = ind.getTypes().iterator(); while( j.hasNext() ) { ATermAppl term = j.next(); if( term.equals( nominal ) ) continue; m_Visitor.visit( term ); } } }
public void visit(OWLObjectOneOf enumeration) { Set<OWLIndividual> operands = enumeration.getIndividuals(); ATerm[] terms = new ATerm[operands.size()]; int size = 0; for( OWLIndividual ind : operands ) { ind.accept( this ); terms[size++] = ATermUtils.makeValue( term ); } // create a sorted set of terms so we will have a stable // concept creation and removal using this concept will work ATermList setOfTerms = size > 0 ? ATermUtils.toSet( terms, size ) : ATermUtils.EMPTY_LIST; term = ATermUtils.makeOr( setOfTerms ); }
@Override public void visit(OWLObjectOneOf enumeration) { Set<OWLIndividual> operands = enumeration.getIndividuals(); ATerm[] terms = new ATerm[operands.size()]; int size = 0; for( OWLIndividual ind : operands ) { ind.accept( this ); terms[size++] = ATermUtils.makeValue( term ); } // create a sorted set of terms so we will have a stable // concept creation and removal using this concept will work ATermList setOfTerms = size > 0 ? ATermUtils.toSet( terms, size ) : ATermUtils.EMPTY_LIST; term = ATermUtils.makeOr( setOfTerms ); }
@Override public void visit(OWLDataOneOf enumeration) { ATermList ops = ATermUtils.EMPTY_LIST; for( OWLLiteral value : enumeration.getValues() ) { value.accept( this ); ops = ops.insert( ATermUtils.makeValue( result() ) ); } term = ATermUtils.makeOr( ops ); }
public void visit(OWLDataOneOf enumeration) { ATermList ops = ATermUtils.EMPTY_LIST; for( OWLLiteral value : enumeration.getValues() ) { value.accept( this ); ops = ops.insert( ATermUtils.makeValue( result() ) ); } term = ATermUtils.makeOr( ops ); }
private boolean processIndividuals() { IndividualIterator i = m_KB.getABox().getIndIterator(); while( i.hasNext() ) { Individual ind = i.next(); ATermAppl nominal = ATermUtils.makeValue( ind.getName() ); for( ATermAppl term : ind.getTypes() ) { if( term.equals( nominal ) ) continue; if( !isEL( term ) ) return false; } } return true; }
private boolean processIndividuals() { IndividualIterator i = m_KB.getABox().getIndIterator(); while( i.hasNext() ) { Individual ind = i.next(); ATermAppl nominal = ATermUtils.makeValue( ind.getName() ); for( ATermAppl term : ind.getTypes() ) { if( term.equals( nominal ) ) continue; if( !isEL( term ) ) return false; } } return true; }
public boolean isDifferentFrom(ATermAppl t1, ATermAppl t2) { Individual ind1 = abox.getIndividual( t1 ); Individual ind2 = abox.getIndividual( t2 ); if( ind1 == null ) { handleUndefinedEntity( t1 + " is not an individual!" ); return false; } if( ind2 == null ) { handleUndefinedEntity( t2 + " is not an individual!" ); return false; } if( ind1.isDifferent( ind2 ) && !doExplanation() ) return true; ATermAppl c = ATermUtils.makeNot( ATermUtils.makeValue( t2 ) ); return isType( t1, c ); }
public boolean isDifferentFrom(ATermAppl t1, ATermAppl t2) { Individual ind1 = abox.getIndividual( t1 ); Individual ind2 = abox.getIndividual( t2 ); if( ind1 == null ) { handleUndefinedEntity( t1 + " is not an individual!" ); return false; } if( ind2 == null ) { handleUndefinedEntity( t2 + " is not an individual!" ); return false; } if( ind1.isDifferent( ind2 ) && !doExplanation() ) return true; ATermAppl c = ATermUtils.makeNot( ATermUtils.makeValue( t2 ) ); return isType( t1, c ); }
public boolean isAsymmetricProperty(ATermAppl p) { Role role = getRole( p ); if( role == null ) { handleUndefinedEntity( p + " is not a known property" ); return false; } if( !role.isObjectRole() ) return false; else if( role.isAsymmetric() ) { if( doExplanation() ) abox.setExplanation( role.getExplainAsymmetric() ); return true; } ensureConsistency(); ATermAppl o = ATermUtils.makeAnonNominal( Integer.MAX_VALUE ); ATermAppl nom = ATermUtils.makeValue( o ); ATermAppl test = ATermUtils.makeAnd( nom, ATermUtils.makeSomeValues( p, ATermUtils.makeAnd( ATermUtils.makeNot( nom ), ATermUtils.makeSomeValues( p, nom ) ) ) ); return !abox.isSatisfiable( test ); }