Package aterm

Examples of aterm.ATermAppl


  @Test
  public void test484() {
    dataProperties(p);
    individuals(a);

    ATermAppl dt = restrict(Datatypes.INTEGER, minExclusive(literal(0)), maxExclusive(literal(0)));

    kb.addType(a, some(p, dt));

    assertFalse(kb.isConsistent());
View Full Code Here


    for (int i = 0; i < n; i++) {
      kb.addSubClass(cls[i], C);
      kb.addType(ind[i], C);

      float upper = lower + increment;
      ATermAppl dt = term("D" + i);
      ATermAppl def = restrict(Datatypes.FLOAT, minInclusive(literal(lower)), maxExclusive(literal(upper)));
      kb.addDatatypeDefinition(dt, def);

      kb.addEquivalentClass(cls[i], some(p, dt));
      kb.addPropertyValue(p, ind[i], literal(lower));
      lower = upper;
View Full Code Here

        // them in the list ''types''
        List<ATermAppl> types = x.getTypes( Node.MIN );
        int size = types.size();
        for( int j = x.applyNext[Node.MIN]; j < size; j++ ) {
            // mc stores the current type (the current minCard restriction)
            ATermAppl mc = types.get( j );

            apply( x, mc );

            if( strategy.getABox().isClosed() )
                return;
View Full Code Here

    protected void apply( Individual x, ATermAppl mc ) {
        // We retrieve the role associated to the current
        // min restriction
        Role r = strategy.getABox().getRole( mc.getArgument( 0 ) );
        int n = ((ATermInt) mc.getArgument( 1 )).getInt();
        ATermAppl c = (ATermAppl) mc.getArgument( 2 );

        // FIXME make sure all neighbors are safe
        if( x.hasDistinctRNeighborsForMin( r, n, c ) )
            return;
View Full Code Here

        List<ATermAppl> maxCardinality = x.getTypes( Node.MAX );
        Iterator<ATermAppl> j = maxCardinality.iterator();

        while( j.hasNext() ) {
          ATermAppl maxCard = j.next();
          apply( x, maxCard );
        }
    }
View Full Code Here

        }
    }
   
    protected void apply( Individual x, ATermAppl maxCard ) {
        // max(r, n, c) is in normalized form not(min(p, n + 1, c))      
        ATermAppl max = (ATermAppl) maxCard.getArgument( 0 );
        Role r = strategy.getABox().getRole( max.getArgument( 0 ) );
        ATermAppl c = (ATermAppl) max.getArgument( 2 );

        if( ATermUtils.isTop( c ) )
            return;
       
        if(!PelletOptions.MAINTAIN_COMPLETION_QUEUE && x.getDepends(maxCard) == null)
View Full Code Here

        if( !x.canApply( Individual.MAX ) )
          return;

        List<ATermAppl> maxCardinality = x.getTypes( Node.MAX );
        for( int i = 0; i < maxCardinality.size(); i++ ) {
            ATermAppl mc = maxCardinality.get( i );

            applyMaxRule( x, mc );
           
            if( strategy.getABox().isClosed() )
                return;
View Full Code Here

    }
   
    protected void applyMaxRule( Individual x, ATermAppl mc ) {
        // max(r, n) is in normalized form not(min(p, n + 1))
        ATermAppl max = (ATermAppl) mc.getArgument( 0 );

        Role r = strategy.getABox().getRole( max.getArgument( 0 ) );
        int n = ((ATermInt) max.getArgument( 1 )).getInt() - 1;
        ATermAppl c = (ATermAppl) max.getArgument( 2 );

        DependencySet ds = x.getDepends( mc );

        if(!PelletOptions.MAINTAIN_COMPLETION_QUEUE && ds == null)
            return;
View Full Code Here

  public void apply(Individual y) {
    List<ATermAppl> types = y.getTypes( Node.NOM );
    int size = types.size();
    for( int j = 0; j < size; j++ ) {
      ATermAppl nc = types.get( j );
      DependencySet ds = y.getDepends( nc );

      if( !PelletOptions.MAINTAIN_COMPLETION_QUEUE && ds == null )
        continue;
View Full Code Here

  }

  void applyNominalRule(Individual y, ATermAppl nc, DependencySet ds) {
    strategy.getABox().copyOnWrite();

    ATermAppl nominal = (ATermAppl) nc.getArgument( 0 );
    // first find the individual for the given nominal
    Individual z = strategy.getABox().getIndividual( nominal );
    if( z == null ) {
      if( ATermUtils.isAnonNominal( nominal ) ) {
        z = strategy.getABox().addIndividual( nominal, ds );
View Full Code Here

TOP

Related Classes of aterm.ATermAppl

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.