Package aima.core.logic.fol

Examples of aima.core.logic.fol.Unifier


    this(domain, new FOLOTTERLikeTheoremProver());
  }

  public FOLKnowledgeBase(FOLDomain domain,
      InferenceProcedure inferenceProcedure) {
    this(domain, inferenceProcedure, new Unifier());
  }
View Full Code Here


    fOL_ModelEliminationDemo();
  }

  private static void unifierDemo() {
    FOLParser parser = new FOLParser(DomainFactory.knowsDomain());
    Unifier unifier = new Unifier();
    Map<Variable, Term> theta = new Hashtable<Variable, Term>();

    Sentence query = parser.parse("Knows(John,x)");
    Sentence johnKnowsJane = parser.parse("Knows(y,Mother(y))");

    System.out.println("------------");
    System.out.println("Unifier Demo");
    System.out.println("------------");
    Map<Variable, Term> subst = unifier.unify(query, johnKnowsJane, theta);
    System.out.println("Unify '" + query + "' with '" + johnKnowsJane
        + "' to get the substitution " + subst + ".");
    System.out.println("");
  }
View Full Code Here

    this(domain, new FOLOTTERLikeTheoremProver());
  }

  public FOLKnowledgeBase(FOLDomain domain,
      InferenceProcedure inferenceProcedure) {
    this(domain, inferenceProcedure, new Unifier());
  }
View Full Code Here

  private Map<Variable, Term> theta;

  @Before
  public void setUp() {
    parser = new FOLParser(DomainFactory.knowsDomain());
    unifier = new Unifier();
    theta = new Hashtable<Variable, Term>();
  }
View Full Code Here

TOP

Related Classes of aima.core.logic.fol.Unifier

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.