Package com.clarkparsia.pellet.rules.model

Examples of com.clarkparsia.pellet.rules.model.RuleAtom


        new Object[] { p2a, } );
  }

  public void testVariableUtils1() {
    AtomIVariable var1 = new AtomIVariable( "var1" ), var2 = new AtomIVariable( "var2" );
    RuleAtom atom = new SameIndividualAtom( var1, var2 );
    assertIteratorValues( VariableUtils.getVars( atom ).iterator(), new Object[] { var1, var2 } );
  }
View Full Code Here


  }

  public void testVariableUtils2() {
    ATermAppl p = term( "p" );
    AtomIVariable var1 = new AtomIVariable( "var1" ), var2 = new AtomIVariable( "var2" );
    RuleAtom atom = new IndividualPropertyAtom( p, var1, var2 );
    assertIteratorValues( VariableUtils.getVars( atom ).iterator(), new Object[] { var1, var2 } );
  }
View Full Code Here

    kb.addPropertyValue( p, x, b );
    kb.addPropertyValue( p, x, c );

    {
      AtomIVariable v = new AtomIVariable( "v" );
      RuleAtom body = new ClassAtom( some( p, or( and( A, B ), or(
          and( A, C ), and( B, C ) ) ) ), v );
      RuleAtom head = new IndividualPropertyAtom( q, v, new AtomIConstant( y ) );
      Rule rule = new Rule( Collections.singleton( head ), Collections.singleton( body ) );
      kb.addRule( rule );
    }

    {
      AtomIVariable v = new AtomIVariable( "v" );
      RuleAtom body = new ClassAtom( G, v );
      RuleAtom head = new IndividualPropertyAtom( p, v, new AtomIConstant( y ) );
      Rule rule = new Rule( Collections.singleton( head ), Collections.singleton( body ) );
      kb.addRule( rule );
    }

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

    VariableBinding binding = new VariableBinding(kb.getABox());
    binding.set(x, mary);
    binding.set(y, robert);

    RuleAtom atom = new IndividualPropertyAtom(p, x, y);
    TrivialSatisfactionHelpers tester = new TrivialSatisfactionHelpers(kb.getABox());
    assertTrue(tester.isAtomTrue(atom, binding) != null);
  }
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellet.rules.model.RuleAtom

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.