public static ATermAppl and(ATermAppl c1, ATermAppl c2) { return ATermUtils.makeAnd( c1, c2 ); }
public static ATermAppl and(ATermAppl c1, ATermAppl c2) { return ATermUtils.makeAnd( c1, c2 ); }
public static ATermAppl and(ATermAppl... c) { if( c.length == 1 ) return c[0]; return ATermUtils.makeAnd( ATermUtils.makeList( c ) ); }
public static ATermAppl and(ATermAppl... c) { if( c.length == 1 ) return c[0]; return ATermUtils.makeAnd( ATermUtils.makeList( c ) ); }
private static void addTo(Map<ATermAppl, ATermAppl> map, ATermAppl roleName, Set<ATermAppl> asserted) { if (asserted.isEmpty()) return; ATermAppl range = null; if (asserted.size() == 1) { range = asserted.iterator().next(); } else { range = ATermUtils.makeAnd(ATermUtils.toSet(asserted)); } range = ELSyntaxUtils.simplify( ATermUtils.nnf( range ) ); map.put(roleName, range); }
private static void addTo(Map<ATermAppl, ATermAppl> map, ATermAppl roleName, Set<ATermAppl> asserted) { if (asserted.isEmpty()) return; ATermAppl range = null; if (asserted.size() == 1) { range = asserted.iterator().next(); } else { range = ATermUtils.makeAnd(ATermUtils.toSet(asserted)); } range = ELSyntaxUtils.simplify( ATermUtils.nnf( range ) ); map.put(roleName, range); }
final static public ATermAppl makeAnd(ATerm c1, ATerm c2) { return makeAnd( makeList( c2 ).insert( c1 ) ); }
final static public ATermAppl makeAnd(ATerm c1, ATerm c2) { return makeAnd( makeList( c2 ).insert( c1 ) ); }
public void visit(OWLObjectIntersectionOf and) { Set<OWLClassExpression> operands = and.getOperands(); ATerm[] terms = new ATerm[operands.size()]; int size = 0; for( OWLClassExpression desc : operands ) { desc.accept( this ); terms[size++] = 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.makeAnd( setOfTerms ); }
public void visit(OWLDataIntersectionOf and) { Set<OWLDataRange> operands = and.getOperands(); ATerm[] terms = new ATerm[operands.size()]; int size = 0; for( OWLDataRange desc : operands ) { desc.accept( this ); terms[size++] = 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.makeAnd( setOfTerms ); }
@Override public void visit(OWLObjectIntersectionOf and) { Set<OWLClassExpression> operands = and.getOperands(); ATerm[] terms = new ATerm[operands.size()]; int size = 0; for( OWLClassExpression desc : operands ) { desc.accept( this ); terms[size++] = 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.makeAnd( setOfTerms ); }
@Override public void visit(OWLDataIntersectionOf and) { Set<OWLDataRange> operands = and.getOperands(); ATerm[] terms = new ATerm[operands.size()]; int size = 0; for( OWLDataRange desc : operands ) { desc.accept( this ); terms[size++] = 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.makeAnd( setOfTerms ); }
final static public ATermAppl makeExactCard(ATerm r, ATermInt n, ATerm c) { ATermAppl max = makeMax( r, n, c ); if( n.getInt() == 0 ) { return max; } ATermAppl min = makeMin( r, n, c ); return makeAnd( min, max ); }
final static public ATermAppl makeExactCard(ATerm r, ATermInt n, ATerm c) { ATermAppl max = makeMax( r, n, c ); if( n.getInt() == 0 ) { return max; } ATermAppl min = makeMin( r, n, c ); return makeAnd( min, max ); }
public void visitAnd(ATermAppl term) { boolean listChange = false; List<ATermAppl> args = new ArrayList<ATermAppl>(); for( ATermList l = (ATermList) term.getArgument( 0 ); !l.isEmpty(); l = l.getNext() ) { ATermAppl a = (ATermAppl) l.getFirst(); this.visit( a ); args.add( ret ); if( change ) listChange = true; } if( listChange ) { change = true; ret = ATermUtils.makeAnd( ATermUtils.makeList( args ) ); } else { change = false; ret = term; } }
public void visitAnd(ATermAppl term) { boolean listChange = false; List<ATermAppl> args = new ArrayList<ATermAppl>(); for( ATermList l = (ATermList) term.getArgument( 0 ); !l.isEmpty(); l = l.getNext() ) { ATermAppl a = (ATermAppl) l.getFirst(); this.visit( a ); args.add( ret ); if( change ) listChange = true; } if( listChange ) { change = true; ret = ATermUtils.makeAnd( ATermUtils.makeList( args ) ); } else { change = false; ret = term; } }
private boolean absorbVII(Set<ATermAppl> set) { ATermList list = ATermUtils.makeList( set ); ATermAppl sub = ATermUtils.nnf( (ATermAppl) list.getFirst() ); list = list.getNext(); ATermAppl sup = list.isEmpty() ? ATermUtils.makeNot( sub ) : ATermUtils.makeNot( ATermUtils.makeAnd( list ) ); sup = ATermUtils.nnf( sup ); ATermAppl subClassAxiom = ATermUtils.makeSub( sub, sup ); if( log.isLoggable( Level.FINE ) ) log.fine( "GCI: " + subClassAxiom + "\nexplanation: " + explanation ); addDef( subClassAxiom ); tbox.addAxiomExplanation( subClassAxiom, explanation ); return true; }
private boolean absorbVII(Set<ATermAppl> set) { ATermList list = ATermUtils.makeList( set ); ATermAppl sub = ATermUtils.nnf( (ATermAppl) list.getFirst() ); list = list.getNext(); ATermAppl sup = list.isEmpty() ? ATermUtils.makeNot( sub ) : ATermUtils.makeNot( ATermUtils.makeAnd( list ) ); sup = ATermUtils.nnf( sup ); ATermAppl subClassAxiom = ATermUtils.makeSub( sub, sup ); if( log.isLoggable( Level.FINE ) ) log.fine( "GCI: " + subClassAxiom + "\nexplanation: " + explanation ); addDef( subClassAxiom ); tbox.addAxiomExplanation( subClassAxiom, explanation ); return true; }
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 ); }
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 ); }