Examples of Unifier


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

Examples of aima.core.logic.fol.Unifier

    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

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

Examples of aima.core.logic.fol.Unifier

  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

Examples of graphplan.domain.Unifier

  public Iterator<? extends GraphElement> iterator() {
    return emptyIterator;
  }
 
  public boolean unifies(Proposition proposition) {
    Unifier un = new UnifierImpl();
    return un.unifies(this, proposition);
  }
View Full Code Here

Examples of jason.asSemantics.Unifier

      if(this.operatorTemplates.containsKey(signature.getPredicateIndicator().toString())) {
        //We get the template
        OperatorImpl template = (OperatorImpl) this.operatorTemplates.get(signature.getPredicateIndicator().toString());
        //And start copying it
        Structure templateSignature = new Structure(template);
        Unifier un = new Unifier();
        //The signature should unify with the template
        if(!un.unifies(signature, templateSignature)) {
          //This should not happen in a properly described domain
          throw new OperatorFactoryException("Failed to unify "+templateSignature+" with operator "+templateSignature+" instantiating "+operatorSignature);
        }
        templateSignature.apply(un);
        PropositionFactory propositionFactory = PropositionFactory.getInstance();
View Full Code Here

Examples of jason.asSemantics.Unifier

          Structure struct = new Structure(copy.getFunctor());
          for(Term term : termInstances) {
            struct.addTerm(term);
          }
         
          Unifier unifier = new Unifier();
          if(unifier.unifies(copy, struct)) {
            copy.apply(unifier);
          } else {
            System.err.println("Big mess!");
          }
         
View Full Code Here

Examples of org.languagetool.rules.patterns.Unifier

  }
 
  @Override
  public Unifier getUnifier() {
    if (unifier == null) {
      unifier = new Unifier();
    }
    return unifier;
  }
View Full Code Here

Examples of org.languagetool.rules.patterns.Unifier

  }

  @Override
  public Unifier getDisambiguationUnifier() {
    if (disambiguationUnifier == null) {
      disambiguationUnifier = new Unifier();
    }
    return disambiguationUnifier;
  }
View Full Code Here

Examples of org.languagetool.rules.patterns.Unifier

  }
 
  @Override
  public Unifier getUnifier() {
    if (unifier == null) {
      unifier = new Unifier();
    }
    return unifier;
  }
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.