Examples of Fact


Examples of org.gedcomx.conclusion.Fact

    int index = 0;
    for(EventFact fact : facts) {
      Marker factContext = ConversionContext.getDetachedMarker(fact.getTag() + '.' + (++index));
      ConversionContext.addReference(factContext);
      try {
        Fact gedxFact = FactMapper.toFact(fact, result);

        if(gedxFact == null) {
          fact.getType();
          if(fact.getTag() != null && fact.getTag().equalsIgnoreCase("SEX")) {
            processSex(gedxPerson, fact);
View Full Code Here

Examples of ru.bmstu.datalog.data.Fact

   * Fact ::= Predicate '.'
   * @return {@link Fact}
   * @throws Exception
   */
  private static Fact parseFact() throws Exception {   
    Fact fact = new Fact(parsePredicate());   
    parseSymbol('.');
       
    return fact;   
  }
View Full Code Here

Examples of stanfordlogic.prover.Fact

     * Test method for 'camembert.prover.Unifier.mgu(Fact, Fact)'
     */
    public void testBasicMgu()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
       
        l1 = parser_.parse("foo baz bar");
        l2 = parser_.parse("foo baz bar");
        f1 = VariableFact.fromList(l1);
        f2 = GroundFact.fromList(l2);
       
        sigma = Unifier.mgu(f1, f2);
        assertNotNull(sigma);
        assertEquals(0, sigma.numMappings());
       
       
        l1 = parser_.parse("foo ?x bar");
        l2 = parser_.parse("foo baz bar");
        f1 = VariableFact.fromList(l1);
        f2 = GroundFact.fromList(l2);
       
        sigma = Unifier.mgu( f1, f2 );
        assertNotNull(sigma);
        assertEquals( f2.getTerm( 0 ),
                sigma.getMapping( (TermVariable) f1.getTerm( 0 ) ) );
        assertEquals(1, sigma.numMappings());
       
       
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("foo baz ?y");
        f1 = VariableFact.fromList(l1);
        f2 = VariableFact.fromList(l2);
       
        sigma = Unifier.mgu(f1,f2);
        assertNotNull(sigma);
        assertEquals( f2.getTerm(0), sigma.getMapping( (TermVariable) f1.getTerm(0)) );
        assertEquals( f2.getTerm(0), sigma.getMapping( (TermVariable) f1.getTerm(1)) );
        assertEquals( f2.getTerm(0), sigma.getMapping( (TermVariable) f2.getTerm(1)) );
        assertEquals(2, sigma.numMappings());
    }
View Full Code Here

Examples of stanfordlogic.prover.Fact

    }
   
    public void testFunctionMgu()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo (f a b)");
        l2 = parser_.parse("foo ?x");
        f1 = GroundFact.fromList(l1);
        f2 = VariableFact.fromList(l2);
       
        sigma = Unifier.mgu(f1, f2);
        assertNotNull(sigma);
        assertEquals( f1.getTerm(0), sigma.getMapping( (TermVariable) f2.getTerm(0)) );
        assertEquals(1, sigma.numMappings());
    }
View Full Code Here

Examples of stanfordlogic.prover.Fact

    }
   
    public void testBadMgu()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        // Now try one that will fail
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("foo bar baz");
View Full Code Here

Examples of stanfordlogic.prover.Fact

    }

    public void testDifferentFunctions()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("toto bar baz");
        f1 = VariableFact.fromList(l1);
View Full Code Here

Examples of stanfordlogic.prover.Fact

    }
   
    public void testDifferentArity()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?y");
        l2 = parser_.parse("foo ?x ?y bar");
        f1 = VariableFact.fromList(l1);
View Full Code Here

Examples of stanfordlogic.prover.Fact

    }
   
    public void testIdenticalFunction()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x");
        l2 = parser_.parse("foo ?x");
        f1 = VariableFact.fromList(l1);
View Full Code Here

Examples of stanfordlogic.prover.Fact

    }
   
    public void testIdenticalVariables()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("foo ?x ?x");
        f1 = VariableFact.fromList(l1);
View Full Code Here

Examples of stanfordlogic.prover.Fact

    }
   
    public void testIdenticalVariableNames()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?y");
        l2 = parser_.parse("foo ?y ?y");
        f1 = VariableFact.fromList(l1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.