Package org.mindswap.pellet.utils

Examples of org.mindswap.pellet.utils.Bool


    }

    c = ATermUtils.normalize( c );

    if( isClassified() && !doExplanation() ) {
      Bool equivToBottom = builder.getTaxonomy().isEquivalent( ATermUtils.BOTTOM, c );
      if( equivToBottom.isKnown() )
        return equivToBottom.isFalse();
    }

    return abox.isSatisfiable( c );
  }
View Full Code Here


    List<ATermAppl> unknowns = new ArrayList<ATermAppl>();
    Iterator<Individual> i = new IndividualIterator( abox );
    while( i.hasNext() ) {
      ATermAppl x = i.next().getName();

      Bool knownType = abox.isKnownType( x, c );
      if( knownType.isTrue() )
        return true;
      else if( knownType.isUnknown() )
        unknowns.add( x );
    }

    boolean hasInstance = !unknowns.isEmpty() && abox.isType( unknowns, c );
View Full Code Here

    // normalize concepts
    c1 = ATermUtils.normalize( c1 );
    c2 = ATermUtils.normalize( c2 );

    if( isClassified() && !doExplanation() ) {
      Bool isSubNode = builder.getTaxonomy().isSubNodeOf( c1, c2 );
      if( isSubNode.isKnown() )
        return isSubNode.isTrue();
    }

    return abox.isSubClassOf( c1, c2 );
  }
View Full Code Here

    // normalize concepts
    c1 = ATermUtils.normalize( c1 );
    c2 = ATermUtils.normalize( c2 );

    if( !doExplanation() ) {
      Bool isEquivalent = Bool.UNKNOWN;
      if( isClassified() )
        isEquivalent = builder.getTaxonomy().isEquivalent( c1, c2 );

      if( isEquivalent.isUnknown() )
        isEquivalent = abox.isKnownSubClassOf( c1, c2 ).and(
            abox.isKnownSubClassOf( c2, c1 ) );

      if( isEquivalent.isKnown() )
        return isEquivalent.isTrue();
    }

    ATermAppl notC2 = ATermUtils.negate( c2 );
    ATermAppl notC1 = ATermUtils.negate( c1 );
    ATermAppl c1NotC2 = ATermUtils.makeAnd( c1, notC2 );
View Full Code Here

   
    ATermAppl c = ATermUtils.makeNot( ATermUtils.makeValue( name ) );

    Set<ATermAppl> differents = new HashSet<ATermAppl>();
    for( ATermAppl x : individuals ) {
      Bool isType = abox.isKnownType( x, c );
      if( isIndependent && isType.isKnown() ) {
        if( isType.isTrue() )
          differents.add( x );
      }
      else if( isType( x, c ) ) {
        differents.add( x );       
      }
View Full Code Here

          subs = taxonomy.getFlattenedSubs( c, false );
      }

      List<ATermAppl> unknowns = new ArrayList<ATermAppl>();
      for( ATermAppl x : individuals ) {
        Bool isType = abox.isKnownType( x, c, subs );
        if( isType.isTrue() )
          knowns.add( x );
        else if( isType.isUnknown() )
          unknowns.add( x );
      }

      if( !unknowns.isEmpty() ) {
        if( PelletOptions.INSTANCE_RETRIEVAL == InstanceRetrievalMethod.TRACING_BASED
View Full Code Here

//      System.err.println( c + " " + rootNode.debugString() );
    }
  }

  public Bool isKnownSubClassOf(ATermAppl c1, ATermAppl c2) {
    Bool isSubClassOf = Bool.UNKNOWN;
    CachedNode cached = getCached( c1 );
    if( cached != null ) {
      isSubClassOf = isType( cached, c2 );
    }
View Full Code Here

    return isSubClassOf;
  }

  public boolean isSubClassOf(ATermAppl c1, ATermAppl c2) {
    if( !doExplanation ) {
      Bool isKnownSubClass = isKnownSubClassOf( c1, c2 );
      if( isKnownSubClass.isKnown() ) {
              return isKnownSubClass.isTrue();
            }
    }
   
    if( log.isLoggable( Level.FINE ) ) {
      long count = kb.timers.getTimer( "subClassSat" ) == null
View Full Code Here

      : Collections.<ATermAppl>emptySet();
    subs.remove( ATermUtils.BOTTOM );

    CandidateSet<ATermAppl> cs = new CandidateSet<ATermAppl>();
    for( ATermAppl x : individuals ) {
      Bool isType = isKnownType( x, c, subs );
      cs.add( x, isType );
    }

    return cs;
  }
View Full Code Here

  public void getSubjects(ATermAppl p, ATermAppl o, CandidateSet<ATermAppl> candidates) {
    Iterator<ATermAppl> i = candidates.iterator();
    while( i.hasNext() ) {
      ATermAppl s = i.next();

      Bool hasObviousValue = hasObviousPropertyValue( s, p, o );
      candidates.update( s, hasObviousValue );
    }
  }
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.utils.Bool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.