Package aterm

Examples of aterm.ATermAppl


  @Test
  public void testABoxRemovalWithAllValues() {
    KnowledgeBase kb = new KnowledgeBase();

    ATermAppl a = term( "a" );
    ATermAppl b = term( "b" );

    ATermAppl C = term( "C" );

    ATermAppl p = term( "p" );

    kb.addClass( C );

    kb.addObjectProperty( p );
View Full Code Here


    Properties newOptions = PropertiesBuilder.singleton( "USE_TRACING", "true" );
    Properties savedOptions = PelletOptions.setOptions( newOptions );

    try {
      ATermAppl A = ATermUtils.makeTermAppl( "A" );
      ATermAppl B = ATermUtils.makeTermAppl( "B" );
      ATermAppl C = ATermUtils.makeTermAppl( "C" );
      ATermAppl x = ATermUtils.makeTermAppl( "x" );

      KnowledgeBase kb = new KnowledgeBase();

      kb.addClass( A );
      kb.addClass( B );
View Full Code Here

    Properties newOptions = new PropertiesBuilder().set( "USE_TRACING", "true" ).set(
        "USE_ROLE_ABSORPTION", "true" ).build();
    Properties savedOptions = PelletOptions.setOptions( newOptions );

    try {
      ATermAppl A = ATermUtils.makeTermAppl( "A" );
      ATermAppl B = ATermUtils.makeTermAppl( "B" );
      ATermAppl p = ATermUtils.makeTermAppl( "p" );

      KnowledgeBase kb = new KnowledgeBase();

      kb.addClass( A );
      kb.addClass( B );
      kb.addObjectProperty( p );

      ATermAppl or1 = or( A, some( p, A ) );
      ATermAppl or2 = or( B, some( p, B ) );

      ATermList list = ATermUtils.toSet( new ATerm[] { or1, or2 }, 2 );
      kb.addDisjointClasses( list );

      assertTrue( kb.isConsistent() );

      ATermAppl disjoint = ATermUtils.makeDisjoints( list );
      assertFalse( kb.removeAxiom( disjoint ) );
    } finally {
      PelletOptions.setOptions( savedOptions );
    }
  }
View Full Code Here

    Properties newOptions = new PropertiesBuilder().set( "USE_TRACING", "true" ).set(
        "USE_ROLE_ABSORPTION", "true" ).build();
    Properties savedOptions = PelletOptions.setOptions( newOptions );

    try {
      ATermAppl A = ATermUtils.makeTermAppl( "A" );
      ATermAppl B = ATermUtils.makeTermAppl( "B" );
      ATermAppl p = ATermUtils.makeTermAppl( "p" );

      KnowledgeBase kb = new KnowledgeBase();

      kb.addClass( A );
      kb.addClass( B );
      kb.addObjectProperty( p );

      ATermAppl or1 = or( A, some( p, A ) );
      ATermAppl or2 = or( B, some( p, B ) );

      kb.addDisjointClass( or1, or2 );

      assertTrue( kb.isConsistent() );

      ATermAppl disjoint = ATermUtils.makeDisjoint( or1, or2 );
      assertFalse( kb.removeAxiom( disjoint ) );
    } finally {
      PelletOptions.setOptions( savedOptions );
    }
  }
View Full Code Here

    Properties newOptions = new PropertiesBuilder().set( "USE_TRACING", "true" ).set(
        "USE_ROLE_ABSORPTION", "true" ).build();
    Properties savedOptions = PelletOptions.setOptions( newOptions );

    try {
      ATermAppl A = ATermUtils.makeTermAppl( "A" );
      ATermAppl p = ATermUtils.makeTermAppl( "p" );

      KnowledgeBase kb = new KnowledgeBase();

      kb.addClass( A );
      kb.addObjectProperty( p );
View Full Code Here

    // This test case is to test the processing of sameAs processing
    // where there are redundancies in the assertions (see ticket 138)

    KnowledgeBase kb = new KnowledgeBase();

    ATermAppl a = term( "a" );
    ATermAppl b = term( "b" );
    ATermAppl c = term( "c" );
    ATermAppl d = term( "d" );
    ATermAppl e = term( "e" );
    ATermAppl f = term( "f" );

    kb.addIndividual( a );
    kb.addIndividual( b );
    kb.addIndividual( c );
    kb.addIndividual( d );
View Full Code Here

    // This test case is to test the restoring of edges with
    // subproperties (see ticket 109)

    KnowledgeBase kb = new KnowledgeBase();

    ATermAppl a = term( "a" );
    ATermAppl b = term( "b" );
    ATermAppl c = term( "c" );
    ATermAppl d = term( "d" );

    ATermAppl p = term( "p" );
    ATermAppl q = term( "q" );
    ATermAppl invP = term( "invP" );
    ATermAppl invQ = term( "invQ" );

    kb.addIndividual( a );
    kb.addIndividual( b );
    kb.addIndividual( c );
    kb.addIndividual( d );
View Full Code Here

    // This test case is to test the retrieval of inverse
    // properties (see ticket 117)

    KnowledgeBase kb = new KnowledgeBase();

    ATermAppl p = term( "p" );
    ATermAppl q = term( "q" );
    ATermAppl invP = term( "invP" );
    ATermAppl invQ = term( "invQ" );

    kb.addObjectProperty( p );
    kb.addObjectProperty( q );
    kb.addObjectProperty( invP );
    kb.addObjectProperty( invQ );
View Full Code Here

    // This test case is to test the retrieval of equivalences
    // for undefined classes/properties (see ticket 90)

    KnowledgeBase kb = new KnowledgeBase();

    ATermAppl C = term( "C" );
    kb.addClass( C );

    ATermAppl p = term( "p" );
    kb.addObjectProperty( p );

    ATermAppl undef = term( "undef" );

    assertEquals( Collections.singleton( p ), kb.getAllEquivalentProperties( p ) );
    assertEquals( Collections.emptySet(), kb.getEquivalentProperties( p ) );
    assertEquals( Collections.singleton( Collections.singleton( TermFactory.BOTTOM_OBJECT_PROPERTY ) ), kb.getSubProperties( p ) );
    assertEquals( Collections.singleton( Collections.singleton( TermFactory.TOP_OBJECT_PROPERTY ) ), kb.getSuperProperties( p ) );
View Full Code Here

    Properties savedOptions = PelletOptions.setOptions( newOptions );

    try {
      KnowledgeBase kb = new KnowledgeBase();

      ATermAppl p = term( "p" );
      ATermAppl c = and( all( p, value( literal( "s" ) ) ), min( p, 2, value( literal( "l" ) ) ) );

      kb.addDatatypeProperty( p );

      assertFalse( kb.isSatisfiable( c ) );
    }
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.